zhuxinbo 5 vuotta sitten
vanhempi
commit
0ef3605de6

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

@@ -17,6 +17,25 @@
         <a-button type="primary" style="margin:10px" @click="addUser">搜索</a-button>
       </a-col>
     </a-row>
+    <a-form layout="inline">
+      <a-row class="image-list-heading vm-panel" style="padding: 8px 20px;">
+        <a-col :md="6" :sm="8" style="display:flex">
+          <a-form-item label="计划id">
+            <a-input placeholder="请输入计划id" v-model="campaignId"></a-input>
+          </a-form-item>
+        </a-col>
+        <a-col :md="6" :sm="8" style="display:flex">
+          <a-form-item label="计划名称">
+            <a-input placeholder="请输入计划名称" v-model="campaignName"></a-input>
+          </a-form-item>
+        </a-col>
+        <a-col :md="6" :sm="8" style="display:flex">
+          <a-button type="primary" style="margin:0 10px" @click="searchLabel">查询</a-button>
+          <a-button type="primary" style="margin:0 10px" @click="searchRe">重置</a-button>
+        </a-col>
+
+      </a-row>
+    </a-form>
     <a-row :gutter="15" style="margin-top:15px">
       <a-col :span="12">
         <a-card hoverable title="总花费">
@@ -265,6 +284,8 @@
     },
     data: function () {
       return {
+        campaignId: '',
+        campaignName: '',
         loadingList: false,
         form: this.$form.createForm(this),
         jihua: false,
@@ -307,7 +328,18 @@
             // 切换分页时的回调,
             // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
             this.ipagination.current = current
-            this.addUser()
+            if (this.campaignId == '' && this.campaignName == '') {
+              this.addUser()
+            } else {
+              var params = {}
+              params.accountId = this.appId + ''
+              params.pageNo = current
+              params.pageSize = this.ipagination.pageSize
+              params.campaignId = this.campaignId
+              params.campaignName = this.campaignName
+              this.getCampaignList(params)
+            }
+
           },
           total: 0
         },
@@ -462,6 +494,25 @@
         postAction('/kuaishou/batch/batchUpdateStatus', params).then(res => {})
       },
       ...mapGetters(['nickname', 'avatar', 'userInfo']),
+      searchLabel() {
+        this.ipagination.current = 1
+        if (this.appId) {
+          var params = {}
+          params.accountId = this.appId + ''
+          params.pageNo = this.ipagination.current
+          params.pageSize = this.ipagination.pageSize
+          params.campaignId = this.campaignId
+          params.campaignName = this.campaignName
+          this.getCampaignList(params)
+        } else {
+          this.$message.error('请选择账户')
+        }
+      },
+      searchRe() {
+        this.campaignId = ''
+        this.campaignName = ''
+        this.searchLabel()
+      },
       addUser() {
         this.loading = true
         this.dataList = []

+ 33 - 1
src/views/modules/kuaishouapp/account/advertisingGroup.vue

@@ -31,6 +31,25 @@
           <a-tab-pane v-for="pane in title" :tab="pane.tab" :key="pane.key">
             <a-button @click="dianji" style="margin-bottom:15px;">新增广告组</a-button>
             <a-button @click="showEdit = true" style="margin:0 0 15px 15px;">列表项筛选</a-button>
+            <a-form layout="inline">
+              <a-row class="image-list-heading vm-panel" style="padding: 8px 20px;">
+                <a-col :md="6" :sm="8" style="display:flex">
+                  <a-form-item label="广告组id">
+                    <a-input placeholder="请输入广告组id" v-model="unitId"></a-input>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="6" :sm="8" style="display:flex">
+                  <a-form-item label="广告组名称">
+                    <a-input placeholder="请输入广告组名称" v-model="unitName"></a-input>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="6" :sm="8" style="display:flex">
+                  <a-button type="primary" style="margin:0 10px" @click="searchLabel">查询</a-button>
+                  <a-button type="primary" style="margin:0 10px" @click="searchRe">重置</a-button>
+                </a-col>
+
+              </a-row>
+            </a-form>
             <div v-show="selectedRowKeys.length > 0">
               批量修改预算:
               <a-input-number :min="-1" :step="0.1" v-model="allMoney" style="width:150px" @fouse.stop />
@@ -129,7 +148,7 @@
       </a-card>
     </a-row>
     <editGroup ref="editGroup" @getList="getDataList" />
-    <editGroupNew ref="editGroupNew" @getList="getDataList" />
+    <editGroupNew ref="editGroupNew" @getListNew="getDataList" />
     <a-modal title="批量修改" v-model="visibleEditAll" :width="900">
       <editAllGroup :populationData.sync="populationData" ref="population" />
       <template slot="footer">
@@ -497,6 +516,8 @@
 
     data: function () {
       return {
+        unitName: '',
+        unitId: '',
         editOk: '1',
         loadingList: false,
         visible: false,
@@ -1018,6 +1039,15 @@
           this.columns = this.columnsElse
         }
       },
+      searchLabel() {
+        this.ipagination.current = 1
+        this.getDataList(localStorage.getItem('advertisingGroupKey'))
+      },
+      searchRe() {
+        this.unitId = ''
+        this.unitName = ''
+        this.getDataList(localStorage.getItem('advertisingGroupKey'))
+      },
       onTabChange(key) {
         this.ipagination.current = 1
         this.titleKey = key
@@ -1033,6 +1063,8 @@
         params.accountId = localStorage.getItem('accountId')
         params.pageNo = this.ipagination.current
         params.pageSize = this.ipagination.pageSize
+        params.unitId = this.unitId
+        params.unitName = this.unitName
         getAction('/kuaishou/batch/getUnitList', params).then(res => {
           if (res.success) {
             this.loadingList = false

+ 7 - 5
src/views/modules/kuaishouapp/account/editGroup.vue

@@ -584,7 +584,8 @@
 
             this.populationData = dataJson
             this.populationData.population = dataJson.population ? JSON.parse(dataJson.population) : null
-            this.populationData.excludePopulation = dataJson.excludePopulation ? JSON.parse(dataJson.excludePopulation) :
+            this.populationData.excludePopulation = dataJson.excludePopulation ? JSON.parse(dataJson
+                .excludePopulation) :
               null
 
             this.populationData.devicePrice = dataJson.devicePrice ? JSON.parse(dataJson.devicePrice) : null
@@ -603,7 +604,7 @@
             this.populationData.allForm.regionType =
               dataJson.region && JSON.parse(dataJson.region).length > 0 ? 'limit' : 'noLimit'
 
-            this.populationData.allForm.region = dataJson.region 
+            this.populationData.allForm.region = dataJson.region
             // postAction('/kuaishou/batch/getRegionDetail', {
             //   regionArr: dataJson.region
             // }).then(res => {
@@ -708,10 +709,11 @@
               params.groupArr = [groupArr]
               postAction('/kuaishou/batch/copyUnit', params).then(res => {
                 if (res.success) {
+                  var that = this
                   setTimeout(() => {
-                    this.visible = false
-                    this.loading = false
-                    this.$emit('getList', localStorage.getItem('advertisingGroupKey'))
+                    that.visible = false
+                    that.loading = false
+                    that.$emit('getList', localStorage.getItem('advertisingGroupKey'))
                   }, 1000)
                 } else {
                   this.$message.error(res.message)

+ 9 - 8
src/views/modules/kuaishouapp/account/editGroupNew.vue

@@ -730,12 +730,12 @@
                     this.visibleData = res.result
                     this.visibleFail = true
                   } else {
-
+                    var that = this
                     setTimeout(function () {
-                      this.visible = false
-                      this.loading = false
-                      this.$emit('getList', localStorage.getItem('advertisingGroupKey'))
-                    },1500)
+                      that.visible = false
+                      that.loading = false
+                      that.$emit('getListNew', localStorage.getItem('advertisingGroupKey'))
+                    }, 1500)
 
 
                   }
@@ -776,10 +776,11 @@
                     this.visibleData = res.result
                     this.visibleFail = true
                   } else {
+                    var that = this
                     setTimeout(() => {
-                      this.visible = false
-                      this.loading = false
-                      this.$emit('getList', localStorage.getItem('advertisingGroupKey'))
+                      that.visible = false
+                      that.loading = false
+                      that.$emit('getListNew', localStorage.getItem('advertisingGroupKey'))
                     }, 1500)
                   }
 

+ 32 - 0
src/views/modules/kuaishouapp/account/originality.vue

@@ -24,6 +24,25 @@
         <a-tabs v-model="titleKey" type="editable-card" hideAdd @edit="remove" @change="onTabChange">
           <a-tab-pane v-for="pane in title" :tab="pane.tab" :key="pane.key">
             <a-button @click="dianji" style="margin-bottom:15px" :disabled="ipagination.total==15">新增创意</a-button>
+            <a-form layout="inline">
+              <a-row class="image-list-heading vm-panel" style="padding: 8px 20px;">
+                <a-col :md="6" :sm="8" style="display:flex">
+                  <a-form-item label="广告创意id">
+                    <a-input placeholder="请输入广告创意id" v-model="creativeId"></a-input>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="6" :sm="8" style="display:flex">
+                  <a-form-item label="广告创意名称">
+                    <a-input placeholder="请输入广告创意名称" v-model="creativeName"></a-input>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="6" :sm="8" style="display:flex">
+                  <a-button type="primary" style="margin:0 10px" @click="searchLabel">查询</a-button>
+                  <a-button type="primary" style="margin:0 10px" @click="searchRe">重置</a-button>
+                </a-col>
+
+              </a-row>
+            </a-form>
             <div v-show="selectedRowKeys.length > 0">
               批量操作:
               <a-select style="width: 120px" v-model="allType">
@@ -211,6 +230,8 @@
 
     data: function () {
       return {
+        creativeName: "",
+        creativeId: '',
         visible: false,
         visibleAll: false,
         allLoading: false,
@@ -488,6 +509,15 @@
           })
         }
       },
+      searchLabel() {
+        this.ipagination.current = 1
+        this.getDataList(localStorage.getItem('originalityKey'))
+      },
+      searchRe() {
+        this.creativeId = ''
+        this.creativeName = ''
+        this.getDataList(localStorage.getItem('originalityKey'))
+      },
       getDataList(id) {
         this.loadingList = true
         this.dataList = []
@@ -496,6 +526,8 @@
         params.accountId = localStorage.getItem('accountId')
         params.pageNo = this.ipagination.current
         params.pageSize = this.ipagination.pageSize
+        params.creativeId = this.creativeId
+        params.creativeName = this.creativeName
         getAction('/kuaishou/batch/getCreativeList', params).then(res => {
           if (res.code == 0) {
             this.loadingList = false

+ 13 - 0
src/views/modules/material/scriptFile.vue

@@ -83,6 +83,8 @@
           <a @click="getViewUrlDbPath(record)">编辑</a>
           <a-divider type="vertical" />
           <a @click="bindProject(record)">项目绑定</a>
+          <!-- <a-divider type="vertical" />
+          <a @click="downLoad(record)">下载</a> -->
           <a-divider type="vertical" />
           <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
             <a>删除</a>
@@ -253,6 +255,17 @@
       })
     },
     methods: {
+      downLoad(item) {
+        let blob = new Blob([item.downloadUrl])
+        let downloadElement = document.createElement('a')
+        let href = window.URL.createObjectURL(blob) //创建下载的链接
+        downloadElement.href = href
+        downloadElement.download = item.name //下载后文件名
+        document.body.appendChild(downloadElement)
+        downloadElement.click() //点击下载
+        document.body.removeChild(downloadElement) //下载完成移除元素
+        window.URL.revokeObjectURL(href) //释放掉blob对象
+      },
       filterOption(input, option) {
         return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       },