zhuxinbo 4 سال پیش
والد
کامیت
f82e416a8d

+ 72 - 22
src/views/modules/kuaishouapp/account/advertisingGroup.vue

@@ -53,7 +53,8 @@
             <div v-show="selectedRowKeys.length > 0">
               批量修改预算:
               <a-input-number :min="-1" :step="0.1" v-model="allMoney" style="width:150px" @fouse.stop />
-              <a-button @click="editMoney" style="margin:0 15px 15px 15px" type="primary" :loading="loadingMoney">修改</a-button>
+              <a-button @click="editMoney" style="margin:0 15px 15px 15px" type="primary" :loading="loadingMoney">修改
+              </a-button>
 
               批量修改出价:
               <a-select style="width: 120px" v-model="allPrice" @change="changePrice">
@@ -71,7 +72,8 @@
                   {{allMoneyBid&&deepConversionBid?((allMoneyBid/deepConversionBid)*100).toFixed(2)+'%':''}}</span>
               </div>
 
-              <a-button @click="editMoneyBid" style="margin:0 15px 15px 15px" type="primary" :loading="loadingAllMoney">修改</a-button>
+              <a-button @click="editMoneyBid" style="margin:0 15px 15px 15px" type="primary" :loading="loadingAllMoney">
+                修改</a-button>
 
               批量操作:
               <a-select style="width: 120px" v-model="allType">
@@ -81,7 +83,8 @@
                 <a-select-option value="4">修改</a-select-option>
                 <a-select-option value="5">复制</a-select-option>
               </a-select>
-              <a-button @click="editStatus" style="margin:0 0 15px 15px" type="primary" :loading="loadingState">确认</a-button>
+              <a-button @click="editStatus" style="margin:0 0 15px 15px" type="primary" :loading="loadingState">确认
+              </a-button>
             </div>
             <a-modal title="列表项筛选" v-model="showEdit" @ok="handleOk">
               <a-checkbox :indeterminate="indeterminate" @change="onCheckAllChange" :checked="checkAll">全选</a-checkbox>
@@ -92,7 +95,7 @@
               :pagination="ipagination" :scroll="{ x: 2500 }" :rowSelection="{
                 selectedRowKeys: selectedRowKeys,
                 onChange: onSelectChange
-              }"   @change="sort"    style="margin-top:30px" :loading="loadingList">
+              }" @change="sort" style="margin-top:30px" :loading="loadingList">
               <!-- getCheckboxProps: getCheckboxProps -->
               <span slot="unitName" slot-scope="text, record" :title="text">
                 <div style="display:flex;justify-content: center;">
@@ -212,6 +215,17 @@
           }}</a-select-option>
           </a-select>
         </a-form-item>
+        <a-form-item label="修改监测链接" :labelCol="{ lg: { span: 6 }, sm: { span: 6 } }"
+          :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }">
+          <a-radio-group buttonStyle="solid" v-decorator="['isUpdateTrackUrl',{initialValue: false}]">
+            <a-radio-button :value="false">否</a-radio-button>
+            <a-radio-button :value="true">是</a-radio-button>
+          </a-radio-group>
+        </a-form-item>
+        <a-form-item label="监测链接" :labelCol="{ lg: { span: 6 }, sm: { span: 6 } }"
+          :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }" v-if="getData('isUpdateTrackUrl')">
+          <a-input v-model="clickTrackUrl" />
+        </a-form-item>
         <a-form-item label="迭代次数" :labelCol="{ lg: { span: 6 }, sm: { span: 6 } }"
           :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }">
           <a-input-number v-decorator="[
@@ -252,7 +266,8 @@
         </a-form-item>
       </a-form>
       <template slot="footer">
-        <a-button key="submit" type="primary" @click="handleSubmitCopy" :loading='loading'>
+        <a-button key="submit" type="primary" @click="handleSubmitCopy"
+          :disabled="getData('isUpdateTrackUrl')?clickTrackUrl==''?true:false:false" :loading='loading'>
           确定
         </a-button>
       </template>
@@ -556,9 +571,10 @@
 
     data: function () {
       return {
-        loadingMoney:false,
-        loadingState:false,
-        loadingAllMoney:false,
+        clickTrackUrl: "",
+        loadingMoney: false,
+        loadingState: false,
+        loadingAllMoney: false,
         unitName: '',
         unitNameInit: '',
         unitId: '',
@@ -598,17 +614,17 @@
           pageSize: 10,
           //   pageSizeOptions: ['10', '20', '30'],
           showTotal: (total, range) => {
-              return range[0] + "-" + range[1] + " 共" + total + "条"
+            return range[0] + "-" + range[1] + " 共" + total + "条"
           },
           showQuickJumper: true,
-          showSizeChanger:true,
+          showSizeChanger: true,
           pageSizeOptions: ['10', '30', '50'],
           total: 0,
           onChange: (current, pageSize) => {
             // 切换分页时的回调,
             // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
             this.ipagination.current = current
-            this.ipagination.pageSize= pageSize;
+            this.ipagination.pageSize = pageSize;
             this.getDataList(this.titleKey)
           }
         },
@@ -741,12 +757,14 @@
       }
     },
     methods: {
-       sort(pagination, filters, sorter, { currentDataSource }){
-            
-            this.ipagination.current=pagination.current;
+      sort(pagination, filters, sorter, {
+        currentDataSource
+      }) {
+
+        this.ipagination.current = pagination.current;
 
-            this.ipagination.pageSize=pagination.pageSize;
-           this.getDataList(this.titleKey)
+        this.ipagination.pageSize = pagination.pageSize;
+        this.getDataList(this.titleKey)
       },
       // getCheckboxProps(record) {
       //   return {
@@ -825,6 +843,7 @@
       },
       copyDetail(item) {
         this.visibleCopy = true
+        this.clickTrackUrl = ''
         this.campaignId = localStorage.getItem('advertisingGroupKey')
         this.form.resetFields()
         this.getCampaignList()
@@ -908,6 +927,8 @@
                 this.$message.error(
                   '广告组:' + res.result.failInfo[0].unitName + '          ' + '错误:' + res.result.failInfo[0].message
                 )
+                this.visibleData = res.result
+                this.visible = true
               }
             })
           }
@@ -931,6 +952,8 @@
             postAction('/kuaishou/batch/batchUpdateUnitBudget', params).then(res => {
               console.log(res)
               if (res.result.failCount > 0) {
+                this.visibleData = res.result
+                this.visible = true
                 this.$message.error(
                   '广告计划:' +
                   res.result.failInfo[0].unitName +
@@ -948,7 +971,7 @@
       editStatus() {
         this.loadingState = true
         if (this.allType == '4') {
-            this.loadingState = false
+          this.loadingState = false
           this.visibleEditAll = true
         } else if (this.allType == '5') {
           this.getCampaignList()
@@ -980,7 +1003,7 @@
         }
       },
       editMoney() {
-          this.loadingMoney = true
+        this.loadingMoney = true
         var params = {}
         params.accountId = localStorage.getItem('accountId')
         params.proportion = this.allMoney
@@ -1033,7 +1056,7 @@
         }
       },
       editMoneyBid() {
-          this.loadingAllMoney = true
+        this.loadingAllMoney = true
         if (this.allPrice == '2') {
 
 
@@ -1232,7 +1255,8 @@
           this.form.validateFields((err, values) => {
             if (!err) {
               this.visibleCopy = false
-              this.$refs.editGroup.handleOk(this.copyData, 'copy', this.getData('campaignId'), values.unitName)
+              this.$refs.editGroup.handleOk(this.copyData, 'copy', this.getData('campaignId'), values.unitName, this
+                .getData('isUpdateTrackUrl'), this.clickTrackUrl)
             }
           })
 
@@ -1251,6 +1275,18 @@
                 createType: this.getData('createType'),
                 accountId: this.copyData.accountId
               }
+              if (this.getData('isUpdateTrackUrl')) {
+                params.otherJson = {
+                  isUpdateTrackUrl: true,
+                  clickTrackUrl: this.clickTrackUrl,
+                  isUpdate: false
+                }
+              } else {
+                params.otherJson = {
+                  isUpdateTrackUrl: false,
+                  isUpdate: false
+                }
+              }
               postAction('/kuaishou/batch/copyUnit', params).then(res => {
                 if (res.success) {
                   //   visibleData
@@ -1286,6 +1322,18 @@
                   return item.unitName
                 })
               }
+              if (this.getData('isUpdateTrackUrl')) {
+                params.otherJson = {
+                  isUpdateTrackUrl: true,
+                  clickTrackUrl: this.clickTrackUrl,
+                  isUpdate: false
+                }
+              } else {
+                params.otherJson = {
+                  isUpdateTrackUrl: false,
+                  isUpdate: false
+                }
+              }
               postAction('/kuaishou/batch/copyUnit', params).then(res => {
                 if (res.success) {
                   if (res.result.failCount > 0) {
@@ -1311,7 +1359,8 @@
             this.visibleCopy = false
             if (this.getData('createType') == '1') {
               this.$refs.editGroupNew.handleOk(this.copyData, 'typeOne', this.getData('campaignId'), [], this.getData(
-                'createCount'))
+                  'createCount'), this
+                .getData('isUpdateTrackUrl'), this.clickTrackUrl)
 
             } else if (this.getData('createType') == '2') {
               this.unitNameList.map(item => {
@@ -1320,7 +1369,8 @@
                 }
               })
               this.$refs.editGroupNew.handleOk(this.copyData, 'typeTwo', this.getData('campaignId'), this.unitNameList,
-                this.getData('createCount'))
+                this.getData('createCount'), this
+                .getData('isUpdateTrackUrl'), this.clickTrackUrl)
 
             }
           }

+ 37 - 8
src/views/modules/kuaishouapp/account/editGroup.vue

@@ -392,7 +392,9 @@
         copyCampaignId: '',
         showSite: false,
         siteId: "",
-        siteList: []
+        siteList: [],
+        isUpdateTrackUrl: false,
+        clickTrackUrl: ""
       }
     },
     computed: {},
@@ -577,9 +579,11 @@
       addApplication() {
         this.$refs.application.showApplication()
       },
-      handleOk(item, type, campaignId, unitNameCopy) {
+      handleOk(item, type, campaignId, unitNameCopy, isUpdateTrackUrl, clickTrackUrl) {
         this.visible = true
         this.showSite = false
+        this.isUpdateTrackUrl = isUpdateTrackUrl
+        this.clickTrackUrl = clickTrackUrl
         //   /kuaishou/batch/getUnitDetail
         this.typeCopy = type
         if (campaignId) {
@@ -743,13 +747,38 @@
                 params.appStore = this.allForm.appStore
               }
             }
-            if (this.showSite && (this.getPlatForm(this.getData('appId')) == '1' || this.getPlatForm(this.getData(
-                'appId')) == '2')) {
-              params.appJson = {
-                isUpdate: true,
-                siteId: this.siteId
+            if (this.isUpdateTrackUrl) {
+              if (this.showSite && (this.getPlatForm(this.getData('appId')) == '1' || this.getPlatForm(this.getData(
+                  'appId')) == '2')) {
+                params.otherJson = {
+                  isUpdate: true,
+                  siteId: this.siteId,
+                  isUpdateTrackUrl: true,
+                  clickTrackUrl: this.clickTrackUrl
+                }
+              } else {
+                params.otherJson = {
+                  isUpdateTrackUrl: true,
+                  clickTrackUrl: this.clickTrackUrl,
+                  isUpdate: false
+                }
+              }
+            } else {
+              if (this.showSite && (this.getPlatForm(this.getData('appId')) == '1' || this.getPlatForm(this.getData(
+                  'appId')) == '2')) {
+                params.otherJson = {
+                  isUpdate: true,
+                  siteId: this.siteId,
+                  isUpdateTrackUrl: false,
+                }
+              } else {
+                params.otherJson = {
+                  isUpdate: false,
+                  isUpdateTrackUrl: false,
+                }
               }
             }
+
             if (this.checkedTrue) {
               var data = this.populationData
               postAction('/kuaishou/batch/addDirectionalTemplate', {
@@ -770,7 +799,7 @@
                   this.loading = false
                 } else {
                   this.loading = false
-                  this.$message.error(res.message)
+                  this.$message.error(res.result.message)
                 }
               })
             } else if (this.typeCopy == 'copy') {

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

@@ -404,7 +404,9 @@
         countAll: 0,
         showSite: false,
         siteId: "",
-        siteList: []
+        siteList: [],
+        isUpdateTrackUrl: false,
+        clickTrackUrl: ""
       }
     },
     computed: {},
@@ -595,9 +597,11 @@
       addApplication() {
         this.$refs.application.showApplication()
       },
-      handleOk(item, type, campaignId, unitNameCopy, count) {
+      handleOk(item, type, campaignId, unitNameCopy, count, isUpdateTrackUrl, clickTrackUrl) {
         this.visible = true
         this.showSite = false
+        this.isUpdateTrackUrl = isUpdateTrackUrl
+        this.clickTrackUrl = clickTrackUrl
         //   /kuaishou/batch/getUnitDetail
         this.typeCopy = type
         this.countAll = count
@@ -734,11 +738,35 @@
                 params.appStore = this.allForm.appStore
               }
             }
-            if (this.showSite && (this.getPlatForm(this.getData('appId')) == '1' || this.getPlatForm(this.getData(
-                'appId')) == '2')) {
-              params.appJson = {
-                isUpdate: true,
-                siteId: this.siteId
+            if (this.isUpdateTrackUrl) {
+              if (this.showSite && (this.getPlatForm(this.getData('appId')) == '1' || this.getPlatForm(this.getData(
+                  'appId')) == '2')) {
+                params.otherJson = {
+                  isUpdate: true,
+                  siteId: this.siteId,
+                  isUpdateTrackUrl: true,
+                  clickTrackUrl: this.clickTrackUrl
+                }
+              } else {
+                params.otherJson = {
+                  isUpdateTrackUrl: true,
+                  clickTrackUrl: this.clickTrackUrl,
+                  isUpdate: false
+                }
+              }
+            } else {
+              if (this.showSite && (this.getPlatForm(this.getData('appId')) == '1' || this.getPlatForm(this.getData(
+                  'appId')) == '2')) {
+                params.otherJson = {
+                  isUpdate: true,
+                  siteId: this.siteId,
+                  isUpdateTrackUrl: false,
+                }
+              } else {
+                params.otherJson = {
+                  isUpdate: false,
+                  isUpdateTrackUrl: false,
+                }
               }
             }
             if (this.checkedTrue) {

+ 26 - 1
src/views/modules/kuaishouapp/account/stepForm/Step3.vue

@@ -473,6 +473,9 @@
       <a-row :gutter="10" class="onlny-click-track">
         <a-col :sm="24" style="margin-bottom: 20px;z-index: 10">
           <a-card class="search-box" style="over-flow:auto">
+            <!-- <a-input v-model="trackName"></a-input> -->
+            <a-input-search placeholder="请输入监测链接名称" enter-button="Search" size="large" @search="onSearch"
+              style="width:40%;margin-bottom:20px" v-model="trackName" />
             <a-list size="large" bordered :dataSource="trackUrlList">
               <a-list-item slot="renderItem" slot-scope="item" :title="item.trackUrl" style="line-height:50px">
 
@@ -484,7 +487,7 @@
 
 
                 {{ item.trackName }}
-                <a-input v-model="item.trackUrl" readOnly style="margin:10px"></a-input>
+                <a-input v-model="item.trackUrl" readOnly style="margin:10px;width:70%"></a-input>
               </a-list-item>
             </a-list>
           </a-card>
@@ -527,6 +530,7 @@
     },
     data() {
       return {
+        trackName: '',
         showImageChouzhen: false,
         showImageStr: null,
         tongbuLoading: false,
@@ -659,6 +663,22 @@
     },
     methods: {
       ...mapGetters(["nickname", "avatar", "userInfo"]),
+      onSearch(value) {
+        console.log(value, this.trackName);
+        var params = {}
+        params.accountId = localStorage.getItem('accountId')
+        params.userId = this.userInfo().id
+        params.pageNo = 1
+        params.pageSize = 500
+        params.trackName = value
+        getAction('/kuaishou/kuaiShouTrackUrlCollection/list', params).then(res => {
+          if (res.success) {
+            this.trackUrlList = res.result.records
+          } else {
+            this.$message.error(res.message)
+          }
+        })
+      },
       changeTrackUrlName() {
         var params = {}
         params.accountId = localStorage.getItem('accountId')
@@ -1679,6 +1699,11 @@
         if (!n) {
           closeAllVideoFun()
         }
+      },
+      clickTrackUrlList(n, o) {
+        if (!n) {
+          this.trackName = ''
+        }
       }
     },
     mounted: function () {

+ 2 - 2
vue.config.js

@@ -58,7 +58,7 @@ module.exports = {
     open : true,
     proxy: {
       '/jeecg-boot': {
-        //  target: 'http://192.168.1.90:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
+         target: 'http://192.168.1.90:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
         // target: 'http://192.168.0.59:8088', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.1.72:8088', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
@@ -66,7 +66,7 @@ module.exports = {
         // target: 'http://192.168.0.230:8088', //请求本地 需要jeecg-boot后台项目  孙震
         // target: 'http://192.168.1.51:8080', //请求本地 需要jeecg-boot后台项目  毕洁泉
 
-        target: 'http://192.168.1.51:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
+        // target: 'http://192.168.1.51:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.0.252:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.0.170:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
         //  target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目