Ver código fonte

修改,提升页面加载速度

朱鑫波 4 anos atrás
pai
commit
27125d3015

+ 1 - 1
src/views/modules/advertiser/ProjectMemberList.vue

@@ -70,7 +70,7 @@
             <a
               @click="projectLook(record)"
               v-if="noTitleKey == 'myProject'"
-              :disabled="record.needExamine == 0"
+              :disabled="record.needExamine == 0||record.needExamine == null"
             >待办事项</a>
           </a-badge>
         </span>

+ 1 - 2
src/views/modules/advertiser/UserAllocationList.vue

@@ -300,7 +300,7 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import { mapGetters } from 'vuex'
 import { httpAction, getAction, deleteAction } from '@/api/manage'
 
-import treeSelect from './modules/Treeselect'
+
 import moment from 'moment'
 import { postAction } from '../../../api/manage'
 import qs from 'qs'
@@ -309,7 +309,6 @@ export default {
   mixins: [JeecgListMixin],
   components: {
     UserAllocationModal,
-    treeSelect,
   },
   data() {
     return {

+ 0 - 154
src/views/modules/advertiser/modules/Treeselect.vue

@@ -1,154 +0,0 @@
-<style lang="scss" scoped>
-.select-project {
-  width: 50%;
-}
-</style>
-<template>
-  <div class="select-project">
-    <treeselect
-      :multiple="multiple"
-      :disable-branch-nodes="!multiple"
-      :disable-fuzzy-matching="true"
-      :options="options"
-      :load-options="loadOptions"
-      placeholder="请选择项目"
-      v-model="value"
-      :value-consists-of="valueConsistsOf"
-      @select="update"
-      @input="emitValue"
-      :limit="2"
-      :limitText="
-        count => {
-          return '隐藏' + count + '条'
-        }
-      "
-      noChildrenText="该广告主下暂无项目"
-      noOptionsText="暂无项目"
-    />
-  </div>
-</template>
-
-<script>
-// import the component
-import Treeselect from '@riophae/vue-treeselect'
-// import the styles
-import '@riophae/vue-treeselect/dist/vue-treeselect.css'
-import { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
-
-import { getAction, postAction } from '@/api/manage'
-import { mapGetters } from 'vuex'
-// We just use `setTimeout()` here to simulate an async operation
-// instead of requesting a real API server for demo purpose.
-
-export default {
-  data: () => ({
-    value: null,
-    valueConsistsOf: 'LEAF_PRIORITY',
-    options: [],
-    mediaId: ''
-  }),
-  props: {
-    multiple: {
-      type: Boolean,
-      default() {
-        return true
-      }
-    },
-    appId: {}
-  },
-  components: { Treeselect },
-  watch: {
-    $route(n, o) {},
-    appId: {
-      handler(n, o) {
-        console.log(n)
-        if (n.length == 0) {
-          if (this.multiple) {
-            this.value = []
-          } else {
-            this.value = ''
-          }
-        }
-      },
-      deep: true
-    }
-  },
-  methods: {
-    ...mapGetters(['nickname', 'avatar', 'userInfo']),
-    update(node, id) {
-      console.log(node, id)
-
-      getAction('/ctop/project/getProjectByAdvertiserAndMediaId', {
-        advertiserId: node.id,
-        mediaId: this.mediaId
-      }).then(res => {
-        console.log(res)
-        if (res.code == 0) {
-          if (res.result.length > 0) {
-            node.children = res.result.map(item => {
-              return {
-                id: item.id,
-                label: item.projectName
-              }
-            })
-          } else {
-          }
-        } else {
-          new Error('Failed to load options: network error.')
-        }
-      })
-    },
-    emitValue() {
-      this.$emit('update:appId', this.value)
-    },
-    getChildren() {},
-    loadOptions({ action, parentNode, callback }) {
-      // Typically, do the AJAX stuff here.
-      // Once the server has responded,
-      // assign children options to the parent node & call the callback.
-      if (action === LOAD_CHILDREN_OPTIONS) {
-        getAction('/ctop/project/getProjectByAdvertiserAndMediaId', {
-          advertiserId: parentNode.id,
-          mediaId: this.mediaId
-        }).then(res => {
-          console.log(res)
-          if (res.code == 0) {
-            if (res.result.length > 0) {
-              parentNode.children = res.result.map(item => {
-                return {
-                  id: item.id,
-                  label: item.projectName
-                }
-              })
-              callback()
-            } else {
-              parentNode.children = []
-              callback()
-            }
-          } else {
-            callback(new Error('Failed to load options: network error.'))
-          }
-        })
-      }
-    },
-    getParticipateList(mediaId) {
-      this.mediaId = mediaId
-      this.value = null
-      getAction('/ctop/advertiser/getAdvertiserByCompany', { userId: this.userInfo().id }).then(res => {
-        console.log(res)
-        if (res.code == 0) {
-          this.options = res.result.map(item => {
-            return {
-              id: item.id,
-              label: item.name,
-              children: null
-            }
-          })
-        }
-      })
-    }
-  },
-
-  mounted() {}
-}
-</script>

+ 21 - 39
src/views/modules/earlyWarningRules/pushTreeSelect.vue

@@ -81,7 +81,7 @@ export default {
   },
   methods: {
     ...mapGetters(['nickname', 'avatar', 'userInfo']),
-  
+
     emitValue() {
       this.$emit('update:appId', this.value)
     },
@@ -90,52 +90,34 @@ export default {
       // Typically, do the AJAX stuff here.
       // Once the server has responded,
       // assign children options to the parent node & call the callback.
-      if (action === LOAD_CHILDREN_OPTIONS) {
-        getAction('/ctop/userAllocation/getAccountList', { projectId: parentNode.id, userId: this.userInfo().id }).then(
-          (res) => {
-            console.log(res)
-            if (res.code == 0) {
-              if (res.result.length > 0) {
-                parentNode.children = res.result.map((i) => {
-                  return {
-                    id: i.accountId,
-                    label:
-                      (i.userName.length == 2
-                        ? i.userName + '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0'
-                        : i.userName.length == 3
-                        ? i.userName + '\xa0\xa0\xa0\xa0'
-                        : i.userName) +
-                      '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0' +
-                      i.accountId +
-                      '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0' +
-                      i.authName,
-                  }
-                })
-                callback()
-              } else {
-                parentNode.children = []
-                callback()
-              }
-            } else {
-              callback(new Error('Failed to load options: network error.'))
-            }
-          }
-        )
-      }
     },
     getParticipateList() {
       //我参与的
-      getAction('/ctop/projectMember/participateListV2', {
+      this.postDataAction('/ctop/projectMember/participateListByMediaId', {
         userId: this.userInfo().id,
-        pageSize: 1000000,
-        pageNo: 1,
       }).then((res) => {
         if (res.code == 0) {
-          this.options = res.result.records.map((item) => {
+          this.options = res.result.map((item) => {
             return {
-              id: item.projectId,
+              id: item.projectId + 'projectId',
               label: item.projectName + '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0' + item.advertiserName,
-              children: null,
+              children: item.accountList
+                ? item.accountList.map((i) => {
+                    return {
+                      id: i.accountId,
+                      label:
+                        (i.userName.length == 2
+                          ? i.userName + '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0'
+                          : i.userName.length == 3
+                          ? i.userName + '\xa0\xa0\xa0\xa0'
+                          : i.userName) +
+                        '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0' +
+                        i.accountId +
+                        '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0' +
+                        i.authName,
+                    }
+                  })
+                : [],
             }
           })
         }

+ 1 - 1
src/views/modules/kuaishouapp/account/accountIndex.vue

@@ -1222,7 +1222,7 @@ export default {
   computed: {},
   activated() {
     this.manyTwo = this.many
-    this.$refs.treeSelect.getParticipateList()
+    // this.$refs.treeSelect.getParticipateList()
     if (this.appId == '') {
       return
     } else {

+ 39 - 34
src/views/modules/kuaishouapp/account/editGroup.vue

@@ -623,6 +623,45 @@
         this.$refs.application.showApplication()
       },
       handleOk(item, type, campaignId, unitNameCopy, isUpdateTrackUrl, clickTrackUrl) {
+        this.getAppList()
+        this.getCampaignList()
+        this.getMould()
+        getAction('/kuaishou/batch/getIsActivate', {
+          accountId: localStorage.getItem('accountId')
+        }).then(res => {
+          if (res.success) {
+            this.allForm.groupTypeData = res.result
+          }
+        })
+
+        getAction('/kuaishou/batch/getWhiteList',{
+          accountId:localStorage.getItem('accountId')
+        }).then(res=>{
+          if(res.success){
+            console.log(res)
+            if(res.result){
+              if(res.result.alliance_account == 1){
+                this.allianceAccount = true
+              }else{
+                this.allianceAccount = false
+              }
+            }else{
+              this.allianceAccount = false
+            }
+          }
+        })
+
+        getAction('/kuaishou/batch/getProjectMaxBid', {
+          accountId: localStorage.getItem('accountId')
+        }).then(res => {
+          if (res.success) {
+            this.maxBid = res.result / 1000
+          }
+        })
+
+
+
+
         this.checkedTrue = false
         this.nameValue = ''
         this.visible = true
@@ -991,41 +1030,7 @@
       },
     },
     activated: function () {
-      this.getAppList()
-      this.getCampaignList()
-      this.getMould()
-      getAction('/kuaishou/batch/getIsActivate', {
-        accountId: localStorage.getItem('accountId')
-      }).then(res => {
-        if (res.success) {
-          this.allForm.groupTypeData = res.result
-        }
-      })
 
-      getAction('/kuaishou/batch/getWhiteList',{
-        accountId:localStorage.getItem('accountId')
-      }).then(res=>{
-        if(res.success){
-          console.log(res)
-          if(res.result){
-            if(res.result.alliance_account == 1){
-              this.allianceAccount = true
-            }else{
-              this.allianceAccount = false
-            }
-          }else{
-            this.allianceAccount = false
-          }
-        }
-      })
-
-      getAction('/kuaishou/batch/getProjectMaxBid', {
-        accountId: localStorage.getItem('accountId')
-      }).then(res => {
-        if (res.success) {
-          this.maxBid = res.result / 1000
-        }
-      })
     }
   }
 </script>

+ 39 - 35
src/views/modules/kuaishouapp/account/editGroupNew.vue

@@ -636,6 +636,44 @@
         this.$refs.application.showApplication()
       },
       handleOk(item, type, campaignId, unitNameCopy, count, isUpdateTrackUrl, clickTrackUrl) {
+        this.getAppList()
+        this.getCampaignList()
+        this.getMould()
+        getAction('/kuaishou/batch/getIsActivate', {
+          accountId: localStorage.getItem('accountId')
+        }).then(res => {
+          if (res.success) {
+            this.allForm.groupTypeData = res.result
+          }
+        })
+
+        getAction('/kuaishou/batch/getWhiteList',{
+          accountId:localStorage.getItem('accountId')
+        }).then(res=>{
+          if(res.success){
+            console.log(res)
+            if(res.result){
+              if(res.result.alliance_account == 1){
+                this.allianceAccount = true
+              }else{
+                this.allianceAccount = false
+              }
+            }else{
+              this.allianceAccount = false
+            }
+          }
+        })
+
+        getAction('/kuaishou/batch/getProjectMaxBid', {
+          accountId: localStorage.getItem('accountId')
+        }).then(res => {
+          if (res.success) {
+            this.maxBid = res.result / 1000
+          }
+        })
+
+
+
         this.checkedTrue = false
         this.nameValue = ''
         this.visible = true
@@ -1024,41 +1062,7 @@
       },
     },
     activated: function () {
-      this.getAppList()
-      this.getCampaignList()
-      this.getMould()
-      getAction('/kuaishou/batch/getIsActivate', {
-        accountId: localStorage.getItem('accountId')
-      }).then(res => {
-        if (res.success) {
-          this.allForm.groupTypeData = res.result
-        }
-      })
-
-      getAction('/kuaishou/batch/getWhiteList',{
-        accountId:localStorage.getItem('accountId')
-      }).then(res=>{
-        if(res.success){
-          console.log(res)
-          if(res.result){
-            if(res.result.alliance_account == 1){
-              this.allianceAccount = true
-            }else{
-              this.allianceAccount = false
-            }
-          }else{
-            this.allianceAccount = false
-          }
-        }
-      })
-
-      getAction('/kuaishou/batch/getProjectMaxBid', {
-        accountId: localStorage.getItem('accountId')
-      }).then(res => {
-        if (res.success) {
-          this.maxBid = res.result / 1000
-        }
-      })
+     
     }
   }
 </script>

+ 1 - 1
src/views/modules/kuaishouapp/batchCreation/campaignList.vue

@@ -1095,7 +1095,7 @@ export default {
   computed: {},
   activated() {
     this.manyTwo = this.many
-    this.$refs.treeSelect.getParticipateList()
+    // this.$refs.treeSelect.getParticipateList()
     if (this.appId == '') {
       return
     } else {

+ 590 - 0
src/views/modules/kuaishouapp/newBatch/result.vue

@@ -0,0 +1,590 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline">
+        <a-row :gutter="24">
+          <a-col :md="8" :sm="8">
+            <a-form-item label="广告主开户主体名称">
+              <!-- <a-input placeholder="请输入广告主开户主体名称" v-model="queryParam.name"></a-input> -->
+              <a-select
+                labelInValue
+                v-model="allIdUser"
+                placeholder="请选择广告主开户主体名称"
+                @keyup.enter.native="searchQueryOne"
+                @focus="getList"
+                showSearch
+                optionFilterProp="children"
+                :filterOption="filterOption"
+                @search="getList"
+              >
+                <a-select-option :value="item.id" v-for="(item, index) of list" :key="index">
+                  {{ item.name }}
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="8" :sm="8">
+            <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQueryOne" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchRe" icon="reload" style="margin-left: 8px">重置</a-button>
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 操作按钮区域 -->
+    <!-- <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+    </div>-->
+    <a-tabs @change="callbackTwo" v-model="active">
+      <a-tab-pane key="advertiser" tab="广告主列表"></a-tab-pane>
+      <a-tab-pane key="product" tab="产品列表">
+        <a-tag
+          color="blue"
+          style="height: 30px; line-height: 30px; font-size: 14px; margin-bottom: 20px"
+          v-if="queryParam.advertiserId"
+        >
+          {{ advertiserName }}
+          <a-icon type="close" @click="clear('advertiserId')" />
+        </a-tag>
+        <a-row :gutter="24" style="margin-bottom: 20px">
+          <a-col :md="8" :sm="8">
+            <a-input placeholder="请输入产品名称" v-model="queryParam.productName"></a-input>
+          </a-col>
+          <a-col :md="8" :sm="8">
+            <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQueryOne" icon="search">查询</a-button>
+            </span>
+          </a-col>
+        </a-row>
+      </a-tab-pane>
+      <a-tab-pane key="project" tab="项目列表">
+        <a-tag
+          color="blue"
+          style="height: 30px; line-height: 30px; font-size: 14px; margin-bottom: 20px"
+          v-if="queryParam.productId"
+        >
+          {{ advertiserName ? advertiserName + ' / ' + productName : productName }}
+          <a-icon type="close" @click="clear('productId')" />
+        </a-tag>
+        <a-row :gutter="24" style="margin-bottom: 20px">
+          <a-col :md="8" :sm="8">
+            <a-input placeholder="请输入项目名称" v-model="queryParam.projectName"></a-input>
+          </a-col>
+          <a-col :md="8" :sm="8">
+            <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQueryOne" icon="search">查询</a-button>
+            </span>
+          </a-col>
+        </a-row>
+      </a-tab-pane>
+      <a-button type="primary" slot="tabBarExtraContent" @click="addNew">新增</a-button>
+    </a-tabs>
+
+    <div>
+      <a-table
+        ref="table"
+        size="middle"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        @change="handleTableChange"
+      >
+        <span slot="ocpxActionType" slot-scope="text">
+          <div v-if="text">
+            <span v-for="(item, index) of JSON.parse(text)" :key="index"
+              >{{ item | ocpxActionType }}{{ index == JSON.parse(text).length - 1 ? '' : ',' }}</span
+            >
+          </div>
+          <div v-else>-</div>
+
+          <!-- {{ text | ocpxActionType }} -->
+        </span>
+        <span slot="bidType" slot-scope="text">
+          <div v-if="text && JSON.parse(text).length > 0">
+            <span v-for="(item, index) of JSON.parse(text)" :key="index"
+              >{{ item | bidType }}{{ index == JSON.parse(text).length - 1 ? '' : ',' }}</span
+            >
+          </div>
+          <div v-else>-</div>
+        </span>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+            <a>删除</a>
+          </a-popconfirm>
+        </span>
+        <span slot="actionProduct" slot-scope="text, record">
+          <a @click="handleEditElse(record, 'product')">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+            <a>删除</a>
+          </a-popconfirm>
+        </span>
+        <span slot="actionProject" slot-scope="text, record">
+          <a @click="handleEditElse(record, 'project')">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+            <a>删除</a>
+          </a-popconfirm>
+        </span>
+        <span slot="maxBid" slot-scope="text">{{ text / 1000 }}</span>
+        <span slot="maxDeepCpaBid" slot-scope="text">{{ text / 1000 }}</span>
+        <a slot="name" slot-scope="text, record" @click="toProduct(record, 'product')">{{ text }}</a>
+        <a slot="productName" slot-scope="text, record" @click="toProduct(record, 'project')">{{ text }}</a>
+      </a-table>
+    </div>
+    <!-- table区域-begin -->
+
+    <!-- table区域-end -->
+
+    <!-- 表单区域 -->
+    <j-select-user ref="userForm" @ok="modalFormOk"></j-select-user>
+  </a-card>
+</template>
+
+<script>
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import JTreeSelect from '@/components/jeecg/JTreeSelect'
+import AFormItem from 'ant-design-vue/es/form/FormItem'
+import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
+import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
+import JSelectUser from '@/components/jeecgbiz/JSelectUser'
+import { postAction, getAction } from '@/api/manage'
+import { mapActions, mapGetters } from 'vuex'
+
+const advertiserColumns = [
+  {
+    title: '广告主开户主体名称',
+    align: 'center',
+    dataIndex: 'name',
+    scopedSlots: { customRender: 'name' },
+  },
+  {
+    title: '联系人姓名',
+    align: 'center',
+    dataIndex: 'contact',
+  },
+  {
+    title: '联系人手机',
+    align: 'center',
+    dataIndex: 'mobile',
+  },
+  {
+    title: '联系人邮箱',
+    align: 'center',
+    dataIndex: 'email',
+  },
+  {
+    title: '操作',
+    dataIndex: 'action',
+    align: 'center',
+    scopedSlots: { customRender: 'action' },
+  },
+]
+const productColumns = [
+  {
+    title: '产品名',
+    align: 'center',
+    dataIndex: 'productName',
+    scopedSlots: { customRender: 'productName' },
+  },
+  {
+    title: '广告主名称',
+    align: 'center',
+    dataIndex: 'advertiserId_dictText',
+  },
+  {
+    title: '创建人',
+    align: 'center',
+    dataIndex: 'userId_dictText',
+  },
+  {
+    title: '行业',
+    align: 'center',
+    dataIndex: 'industryId_dictText',
+  },
+  {
+    title: '状态',
+    align: 'center',
+    dataIndex: 'productStatus',
+    customRender: function (text) {
+      if (text == 0) {
+        return '启动'
+      } else if (text == 1) {
+        return '暂停'
+      } else if (text == 2) {
+        return '删除'
+      }
+    },
+  },
+  {
+    title: '操作',
+    dataIndex: 'actionProduct',
+    align: 'center',
+    scopedSlots: { customRender: 'actionProduct' },
+  },
+]
+const projectColumns = [
+  {
+    title: '项目名称',
+    align: 'center',
+    dataIndex: 'projectName',
+  },
+  {
+    title: '产品名',
+    align: 'center',
+    dataIndex: 'productId_dictText',
+  },
+  {
+    title: '广告主名称',
+    align: 'center',
+    dataIndex: 'advertiserId_dictText',
+  },
+  {
+    title: '最高出价',
+    align: 'center',
+    dataIndex: 'maxBid',
+    scopedSlots: {
+      customRender: 'maxBid',
+    },
+  },
+  {
+    title: '最高转化出价',
+    align: 'center',
+    dataIndex: 'maxDeepCpaBid',
+    scopedSlots: {
+      customRender: 'maxDeepCpaBid',
+    },
+  },
+  {
+    title: '优化目标',
+    align: 'center',
+    dataIndex: 'bidType',
+    scopedSlots: {
+      customRender: 'bidType',
+    },
+  },
+  {
+    title: '转化目标',
+    align: 'center',
+    dataIndex: 'ocpxActionType',
+    scopedSlots: {
+      customRender: 'ocpxActionType',
+    },
+  },
+  {
+    title: '供应商',
+    align: 'center',
+    dataIndex: 'supplierCode_dictText',
+  },
+  {
+    title: '销售',
+    align: 'center',
+    dataIndex: 'saleId_dictText',
+  },
+  {
+    title: '运营负责人',
+    align: 'center',
+    dataIndex: 'responsibleId_dictText',
+  },
+  {
+    title: '设计负责人',
+    align: 'center',
+    dataIndex: 'designResponsibleId_dictText',
+  },
+  {
+    title: '操作',
+    dataIndex: 'actionProject',
+    align: 'center',
+    scopedSlots: {
+      customRender: 'actionProject',
+    },
+  },
+]
+export default {
+  name: 'AdvertiserList',
+  mixins: [JeecgListMixin],
+  components: {
+    AFormItem,
+    JTreeSelect,
+    JSelectUserByDep,
+    JSelectDepart,
+    JSelectUser,
+  },
+  data() {
+    return {
+      list: [],
+      allIdUser: {},
+      departDisabled: false, //是否是我的部门调用该页面
+      users: this.userInfo().realname, //用户名称
+      departmentId: this.userInfo().departId, //部门id
+      description: '广告主信息表管理页面',
+      visible: false,
+      accountName: '',
+      password: '',
+      mode: 'login',
+      showLogin: true,
+      showAuthorization: false,
+      authorizationType: 'kuaishou',
+      loginType: 'kuaishou',
+      form: this.$form.createForm(this),
+      active: 'advertiser',
+      advertiserName: '',
+      advertiserId: '',
+      productName: '',
+      examinelList: [
+        {
+          value: '0',
+          tab: '广告主列表',
+        },
+        {
+          value: '1',
+          tab: '产品列表',
+        },
+        {
+          value: '2',
+          tab: '项目列表',
+        },
+      ],
+      // 表头
+      columns: advertiserColumns,
+      url: {
+        list: '/ctop/advertiser/list',
+        delete: '/ctop/advertiser/delete',
+        deleteBatch: '/ctop/advertiser/deleteBatch',
+        exportXlsUrl: 'ctop/advertiser/exportXls',
+        importExcelUrl: 'ctop/advertiser/importExcel',
+        bindAccountLoginUrl: '/ctop/bindAccountLogin/login',
+        bindAuthorizationUrl: '/ctop/bindAccountAuth/authorization',
+        getLoginInfo: '/ctop/bindAccount/getLoginInfo',
+        userId: '/sys/user/generateUserId', // 引入生成添加用户情况下的url
+        userWithDepart: '/sys/user/userDepartList', // 引入为指定用户查看部门信息需要的url
+      },
+    }
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
+    },
+  },
+  created() {
+    // this.queryParam.userId = this.userInfo().id
+    this.getList(null)
+  },
+  methods: {
+    filterOption(input, option) {
+      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+    },
+    getList(value) {
+      var params = {}
+      // params.userId = this.userInfo().id
+      params.pageSize = 50
+      params.pageNo = 1
+      params.name = value
+      console.log(params)
+      getAction('/ctop/advertiser/list', params)
+        .then((res) => {
+          if (res.success) {
+            console.log(res)
+            this.list = res.result.records
+          } else {
+            this.$message.warning(res.message)
+          }
+        })
+        .finally(() => {})
+    },
+    handleEditElse(item, type) {
+      if (type == 'product') {
+        this.$refs.modalFormTwo.edit(item)
+        this.$refs.modalFormTwo.title = '编辑'
+        this.$refs.modalFormTwo.disableSubmit = false
+      } else if (type == 'project') {
+        this.$refs.modalFormThree.edit(item)
+        this.$refs.modalFormThree.title = '编辑'
+        this.$refs.modalFormThree.disableSubmit = false
+      }
+    },
+    clear(type) {
+      this.queryParam.name = null
+      this.queryParam.advertiserId = null
+      this.queryParam.productId = null
+      this.queryParam.id = null
+      this.queryParam.productName = null
+      this.queryParam.projectName = null
+      this.allIdUser = {}
+      this.loadData(1)
+    },
+    addNew() {
+      if (this.active == 'advertiser') {
+        this.$refs.modalForm.add()
+        this.$refs.modalForm.title = '新增'
+        this.$refs.modalForm.disableSubmit = false
+      } else if (this.active == 'product') {
+        if (this.queryParam.advertiserId) {
+          this.$refs.modalFormTwo.add({ advertiserId: this.queryParam.advertiserId })
+        } else {
+          this.$refs.modalFormTwo.add()
+        }
+        this.$refs.modalFormTwo.title = '新增'
+        this.$refs.modalFormTwo.disableSubmit = false
+      } else if (this.active == 'project') {
+        this.$refs.modalFormThree.add({
+          advertiserId: this.queryParam.advertiserId
+            ? this.queryParam.advertiserId
+            : this.advertiserId
+            ? this.advertiserId
+            : undefined,
+          productId: this.queryParam.productId ? this.queryParam.productId : undefined,
+        })
+        this.$refs.modalFormThree.title = '新增'
+        this.$refs.modalFormThree.disableSubmit = false
+      }
+    },
+    toProduct(item, key) {
+      if (key == 'product') {
+        this.queryParam.advertiserId = item.id
+        this.advertiserName = item.name
+        this.queryParam.productId = null
+        this.productName = null
+        this.queryParam.productName = null
+        this.callbackTwo('product')
+      } else if (key == 'project') {
+        this.queryParam.productId = item.id
+        this.productName = item.productName
+        this.advertiserId = item.advertiserId
+        this.queryParam.projectName = null
+        this.callbackTwo('project')
+      }
+    },
+    callbackTwo(key) {
+      this.active = key
+      if (key == 'advertiser') {
+        this.columns = advertiserColumns
+        this.url.list = '/ctop/advertiser/list'
+        this.url.delete = '/ctop/advertiser/delete'
+      } else if (key == 'product') {
+        this.columns = productColumns
+        this.url.list = '/ctop/product/list'
+        this.url.delete = '/ctop/product/delete'
+      } else if (key == 'project') {
+        this.columns = projectColumns
+        this.url.list = '/ctop/project/list'
+        this.url.delete = '/ctop/project/delete'
+      }
+      this.searchQueryOne()
+    },
+    ...mapGetters(['nickname', 'avatar', 'userInfo']),
+    searchRe() {
+      this.queryParam.name = null
+      this.queryParam.advertiserId = null
+      this.queryParam.productId = null
+      this.queryParam.id = null
+      this.queryParam.productName = null
+      this.queryParam.projectName = null
+      this.allIdUser = {}
+      this.callbackTwo('advertiser')
+    },
+    searchQueryOne() {
+      console.log(this.allIdUser)
+      if (this.allIdUser.key) {
+        if (this.active == 'advertiser') {
+          this.queryParam.advertiserId = null
+          this.queryParam.id = this.allIdUser.key
+        } else {
+          this.queryParam.id = null
+          this.queryParam.advertiserId = this.allIdUser.key
+        }
+        this.advertiserName = this.allIdUser.label
+      } else {
+        // this.queryParam.advertiserId = null
+        // this.queryParam.productId = null
+        // this.queryParam.id = null
+      }
+      this.searchQuery()
+    },
+    handleSubmit() {
+      let params = {}
+      params.advertiserId = this.record.id
+      params.advertiser_name = this.record.name
+      params.userId = this.userInfo().id
+      params.userName = this.userInfo().realname
+      params.projectId = this.record.projectId
+      params.projectName = this.record.projectName
+
+      // 触发表单验证
+      this.form.validateFields((err) => {
+        if (!err) {
+          if (this.mode == 'login') {
+            params.accountName = this.accountName
+            params.password = this.password
+            params.loginType = this.loginType
+            if (this.loginType == 'kuaishou') {
+              params.mediaId = 2
+            } else if (this.loginType == 'bytedance') {
+              params.mediaId = 1
+            }
+            postAction(this.url.bindAccountLoginUrl, params).then((res) => {
+              if (res.success) {
+                alert('绑定成功')
+                this.accountName = ''
+                this.password = ''
+                this.loginType = ''
+              } else {
+                alert(res.message)
+              }
+            })
+          }
+          // 授权登录
+          if (this.mode == 'authorization') {
+            params.authorizationType = this.authorizationType
+            if (this.authorizationType == 'kuaishou') {
+              params.mediaId = 2
+            } else if (this.authorizationType == 'bytedance') {
+              params.mediaId = 1
+            }
+            postAction(this.url.bindAuthorizationUrl, params).then((res) => {
+              if (res.success) {
+                window.open(res.message, '_blank')
+              } else {
+                alert('绑定失败')
+              }
+            })
+          }
+        }
+      })
+    },
+
+    onChageLogin() {
+      console.log(this.mode)
+      if (this.mode == 'login') {
+        this.showLogin = true
+        this.showAuthorization = false
+      } else {
+        this.showLogin = false
+        this.showAuthorization = true
+      }
+    },
+    showModal(record) {
+      this.record = record
+      this.visible = true
+    },
+
+    handleCancel() {
+      this.close()
+    },
+  },
+}
+</script>
+<style scoped>
+@import '~@assets/less/common.less';
+</style>

+ 1 - 1
src/views/modules/material/musicTab.vue

@@ -172,7 +172,7 @@ export default {
 }
 </style>
 <style lang="less">
-.ant-tabs-bar {
+.music-tab .ant-tabs-bar {
   margin: 0 0 12px 0;
   /* height: 55px; */
   border-bottom: 1px solid #e8e8e8;

+ 1 - 1
src/views/user/Login.vue

@@ -148,7 +148,7 @@
     },
     data() {
       return {
-        customActiveKey: 'tab2',
+        customActiveKey: 'tab1',
         loginBtn: false,
         // login type: 0 email, 1 username, 2 telephone
         loginType: 0,

+ 2 - 2
vue.config.js

@@ -71,7 +71,7 @@ module.exports = {
           // target: 'http://192.168.1.8:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
           // target: 'http://192.168.1.8:8081', //请求本地 需要jeecg-boot后台项目  蒙蒙
         // target: 'http://192.168.0.59:8088', //请求本地 需要jeecg-boot后台项目  英豪
-        // target: 'http://192.168.1.188:8088', //请求本地 需要jeecg-boot后台项目  英豪
+        target: 'http://192.168.1.188:8088', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
         // target: 'http://192.168.1.43:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.1.43:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
@@ -86,7 +86,7 @@ module.exports = {
         //  target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目
         // target: 'http://192.168.1.251/', //请求本地 需要jeecg-boot后台项目
         // target:'http://118.24.244.213:8804',
-       target:'http://139.186.151.174:8804', //测试
+      //  target:'http://139.186.151.174:8804', //测试
 
         ws: false,