Browse Source

Merge branch 'master' of http://git.tjyourong.com.cn/ctop/adsp-vue

魏志佳 4 years ago
parent
commit
fb53a44f80

+ 429 - 0
src/components/formComponents/selectRegion.vue

@@ -0,0 +1,429 @@
+<style scoped>
+  .transfer {
+    display: flex;
+  }
+
+  .transfer .transfer-box {
+    width: 350px;
+    height: 250px;
+    border: 1px solid #dadfe3;
+    display: flex;
+    overflow-x: auto;
+    overflow-y: hidden;
+    box-sizing: border-box;
+    margin-right: 25px;
+  }
+
+  .content-box {
+    min-width: 174px;
+    width: 100%;
+    height: 100%;
+    border-right: 1px solid #dadfe3;
+  }
+
+  .content-box .content-title {
+    width: 100%;
+    background: #f8f9fa;
+    border-bottom: 1px solid #dadfe3;
+    padding: 5px 15px;
+    font-size: 16px;
+    font-weight: 700;
+    line-height: 30px;
+  }
+
+  .content-box .content {
+    width: 100%;
+    height: 85%;
+    overflow: auto;
+  }
+
+  .content-box .content p:hover {
+    background: #edf1f5;
+    cursor: pointer;
+  }
+
+  .content-box .content p:hover span {
+    display: inline-block;
+  }
+
+  .content-box .content p span {
+    display: none;
+  }
+
+  p {
+    padding: 5px;
+    margin-bottom: 0;
+    border-bottom: 1px solid #f2f2f2;
+  }
+
+  .backgroundOnly {
+    background: #edf1f5;
+  }
+</style>
+<style>
+  .transfer .ant-checkbox-group {
+    width: 100px;
+    overflow-x: hidden;
+  }
+
+  .transfer .ant-checkbox-group-item {
+    display: inline-block;
+    margin-right: 8px;
+    width: 100%;
+  }
+</style>
+
+<template>
+  <div class="transfer">
+    <div class="transfer-box">
+      <div class="content-box">
+        <p class="content-title">省份</p>
+        <div class="content" style="position:relative">
+          <!-- <div style="position:absolute;top:0;left:0;width:100%;height:100%;background: rgba(0, 0, 0, 0.5)"
+            v-if="loading"></div> -->
+          <p><input type="checkbox" class="select_all" @change="checkAllBox" v-model="checkAll" /> 全选</p>
+
+          <p v-for="(item, index) of province" :key="item.value" :class="{ backgroundOnly: provinceIndex == index }">
+            <input class="checkItem" type="checkbox" :value="item.value" :id="item.value" v-model="checkMatched"
+              @change="checkOne(item, index)" />
+            <span @click="showCity(item, index)" style="color:black;display:inline-block;margin-left:5px;width:80%">{{
+              item.label
+            }}</span>
+          </p>
+        </div>
+      </div>
+      <div class="content-box" :style="{ borderRight: !showClass ? '0px' : '1px solid #dadfe3' }" v-show="showCityData">
+        <p class="content-title">城市</p>
+        <div class="content">
+          <!-- <p>
+            <input
+              type="checkbox"
+              class="select_all"
+              @change="checkAllBoxCity"
+              v-model="checkAllCity"
+            /> 全选
+          </p>-->
+          <p v-for="(item, index) of city" :key="item.id" :class="{ backgroundOnly: cityIndex == index }">
+            <input class="checkItem" type="checkbox" :value="item.value" :id="item.value" v-model="checkMatchedCity"
+              @change="checkOneCity(item, index)" />
+            {{ item.label }}
+          </p>
+        </div>
+      </div>
+    </div>
+    <div class="transfer-box" style="width:176px">
+      <div class="content-box">
+        <p class="content-title">
+          已选
+          <span style="float:right;font-weight:normal;color:blue;cursor: pointer;font-size:14px"
+            @click="clear">清空</span>
+        </p>
+        <div class="content">
+          <p v-for="(item, index) of checkData" :key="index">
+            {{ item.label }}
+            <!-- <span
+              style="float:right;font-weight:normal;color:blue;cursor: pointer;font-size:14px"
+              @click="detele(item,index)"
+            >删除</span>-->
+          </p>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+  import {
+    JeecgListMixin
+  } from '@/mixins/JeecgListMixin'
+  import {
+    getProvince,
+    postAction
+  } from '@/api/manage'
+  import $ from 'jquery'
+  export default {
+    name: 'ByteDanceUserOrientationTemplateList',
+    components: {},
+    props: ['dataValue'],
+    data() {
+      return {
+        showClass: false,
+        showCityData: false,
+        checkData: [],
+        checkMatched: [],
+        province: [],
+        city: [],
+        area: [],
+        CityData: '/kuaishou/batch/getRegion',
+        provinceIndex: null,
+        cityIndex: null,
+        checkAll: false,
+        checkMatchedCity: [],
+        checkAllCity: false,
+        nowProvince: null,
+        loading: false
+      }
+    },
+    computed: {},
+    mounted() {
+      this.$nextTick(() => {
+        this.getData().then(() => {
+            console.log(this.dataValue)
+          if (this.dataValue.length>0&&this.dataValue[0].value) {
+            return
+          } else {
+            postAction('/kuaishou/batch/getRegionDetail', {
+              regionArr: this.dataValue
+            }).then(res => {
+              if (res.success) {
+                //   this.populationData.allForm.region = res.result
+                this.checkData = res.result
+                this.checkMatched = res.result.map(item => {
+                  return item.value
+                })
+                this.checkMatchedCity = res.result.map(item => {
+                  return item.value
+                })
+                this.$emit('update:checkData', this.checkData)
+              }
+            })
+          }
+
+          //   if (this.dataValue.length > 0) {
+
+          //   }
+        })
+
+      })
+    },
+    watch: {
+      dataValue: {
+        deep: true,
+        immediate: true, // immediate选项可以开启首次赋值监听
+        handler(n, o) {
+          if (n.length > 0 && n[0].value) {
+            // this.getData().then(() => {
+            console.log(1)
+            //   if (n.length > 0) {
+            this.$nextTick(() => {
+              this.checkData = n
+              this.checkMatched = n.map(item => {
+                return item.value
+              })
+              this.checkMatchedCity = n.map(item => {
+                return item.value
+              })
+              this.$emit('update:checkData', this.checkData)
+            })
+            //   }
+            // })
+
+          }
+
+        }
+      }
+    },
+    methods: {
+      getData() {
+        this.loading = true
+        var that = this
+        return new Promise(function (resolve, reject) {
+          getProvince(that.CityData, {
+            level: 1
+          }).then(res => {
+            if (res.code == '0') {
+              //   this.province.push(...res.result.records)
+              that.province = res.result.map(item => {
+                return {
+                  label: item.name,
+                  value: item.regionId
+                }
+              })
+              that.province = that.province.filter(item => {
+                return item.label != '台湾' && item.label != '香港' && item.label != '澳门'
+              })
+              that.loading = false
+              resolve()
+            }
+          })
+        })
+
+      },
+      showCity(item, index) {
+        this.city = []
+        this.showCityData = false
+        this.showClass = false
+        this.provinceIndex = index
+        this.cityIndex = null
+        this.nowProvince = item
+        this.checkMatchedCity = []
+        getProvince(this.CityData, {
+          parent: item.value
+        }).then(res => {
+          if (res.code == '0') {
+            this.city = res.result.map(item => {
+              return {
+                label: item.name,
+                value: item.regionId
+              }
+            })
+            if (this.checkMatched.indexOf(item.value) != -1) {
+              this.checkAllCity = true
+              this.checkMatchedCity = this.city.map(item => {
+                return item.value
+              })
+            } else {
+              this.checkMatchedCity = this.checkData.map(item => {
+                return item.value
+              })
+            }
+            //   this.city.push(...res.result.records)
+            this.showCityData = true
+          }
+        })
+      },
+      checkAllBox() {
+        this.checkMatched = []
+        this.checkData = []
+        if (this.checkAll) {
+          this.checkMatched = this.province.map(item => {
+            return item.value
+          })
+          this.checkData.push(...this.province)
+        } else {
+          this.checkMatched = []
+          this.checkData = []
+          this.checkMatchedCity = []
+        }
+        this.$emit('update:checkData', this.checkData)
+      },
+      checkOne(item, index) {
+        if (this.checkMatched.indexOf(item.value) == -1) {
+          var index1 = this.checkData.findIndex(v => v.value === item.value)
+          this.checkData.splice(index1, 1)
+          if (this.nowProvince) {
+            if (this.nowProvince.value == item.value) {
+              this.checkMatchedCity = []
+            }
+          }
+        } else {
+          this.checkData.push(item)
+          var data = []
+          getProvince(this.CityData, {
+            parent: item.value
+          }).then(res => {
+            if (res.code == '0') {
+              data = res.result.map(item => {
+                return {
+                  label: item.name,
+                  value: item.regionId
+                }
+              })
+              for (var i = 0; i < this.checkData.length; i++) {
+                for (let j = 0; j < data.length; j++) {
+                  if (this.checkData[i].value == data[j].value) {
+                    this.checkData.splice(i, 1)
+                  }
+                }
+              }
+            }
+          })
+
+          if (this.nowProvince) {
+            if (item.value == this.nowProvince.value) {
+              this.checkMatchedCity = this.city.map(item => {
+                return item.value
+              })
+            }
+          }
+        }
+        if (this.checkMatched.length == this.province.length) {
+          this.checkAll = true
+        } else {
+          this.checkAll = false
+        }
+        this.$emit('update:checkData', this.checkData)
+      },
+      checkAllBoxCity() {
+        this.checkMatchedCity = []
+        if (this.checkAllCity) {
+          this.checkMatchedCity = this.city.map(item => {
+            return item.value
+          })
+          this.checkMatched.push(this.nowProvince.value)
+          this.checkData.push(this.nowProvince)
+        } else {
+          this.checkMatchedCity = []
+          var index = this.checkData.findIndex(v => v.value === this.nowProvince.value)
+          var index1 = this.checkMatched.findIndex(v => v === this.nowProvince.value)
+          this.checkData.splice(index, 1)
+          this.checkMatched.splice(index1, 1)
+        }
+        this.$emit('update:checkData', this.checkData)
+      },
+      checkOneCity(item, index) {
+        var allCity = this.checkMatchedCity.filter(v => {
+          return v.toString().slice(0, 2) == this.nowProvince.value
+        })
+
+        if (allCity.length == this.city.length) {
+          this.checkMatched.push(this.nowProvince.value)
+          this.checkData.push(this.nowProvince)
+          for (var i = 0; i < allCity.length; i++) {
+            for (var j = 0; j < this.checkData.length; j++) {
+              if (allCity[i] == this.checkData[j].value) {
+                this.checkData.splice(j, 1)
+                j--
+              }
+            }
+          }
+        }
+        if (this.checkMatchedCity.indexOf(item.value) != -1) {
+          if (allCity.length != this.city.length) {
+            this.checkData.push(item)
+          }
+          if (this.checkMatched.length == this.province.length) {
+            this.checkAll = true
+          } else {
+            this.checkAll = false
+          }
+        } else {
+          if (this.checkMatched.indexOf(this.nowProvince.value) != -1) {
+            var index1 = this.checkData.findIndex(v => v.value === this.nowProvince.value)
+            var index2 = this.checkMatched.findIndex(v => v === this.nowProvince.value)
+            this.checkData.splice(index1, 1)
+            this.checkMatched.splice(index2, 1)
+            this.checkAll = false
+            var data = this.city.filter(v => {
+              return v.value != item.value
+            })
+            this.checkData.push(...data)
+          } else {
+            var index1 = this.checkData.findIndex(v => v.value === item.value)
+            this.checkData.splice(index1, 1)
+          }
+        }
+        this.$emit('update:checkData', this.checkData)
+      },
+      clear() {
+        this.checkData = []
+        this.checkMatched = []
+        this.checkMatchedCity = []
+        this.checkAll = false
+        this.$emit('update:checkData', this.checkData)
+      },
+      detele(item, index) {
+        //   if (this.checkMatched.indexOf(this.nowProvince.value) != -1) {
+        var index1 = this.checkMatched.findIndex(v => v === item.value)
+        var index2 = this.checkData.findIndex(v => v.value === item.value)
+        this.checkData.splice(index2, 1)
+        this.checkMatched.splice(index1, 1)
+        this.checkAll = false
+        //   } else {
+        //   }
+
+        this.$emit('update:checkData', this.checkData)
+      }
+    }
+  }
+</script>

+ 2 - 2
src/views/dashboard/Analysis.vue

@@ -69,7 +69,7 @@
 
 </style>
 <template>
-  <div class="page-header-index-wide">
+  <div class="page-header-index-wide analysis">
     <div v-if="roleCode == 'operator'">
       <a-row :gutter="24">
         <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
@@ -522,7 +522,7 @@
   }
 </style>
 <style lang="less">
-  .ant-tabs-bar {
+  .analysis .ant-tabs-bar {
     margin: 0 0 12px 0;
     /* height: 55px; */
     border-bottom: 1px solid #e8e8e8;

+ 3 - 0
src/views/modules/Statistics/components/Treeselect.vue

@@ -165,6 +165,9 @@ export default {
       }
 
       if (this.reqUrl == '/ctop/projectMember/participateListByMediaId') {
+        if(this.options.length>0){
+          return
+        }
         postAction(this.reqUrl, params).then((res) => {
           if (res.success) {
             this.options = res.result.map((item) => {

+ 12 - 12
src/views/modules/Statistics/yicheStatistics/timeStatistics.vue

@@ -125,7 +125,7 @@ th div {
             :dataSource="data"
             bordered
             id="outTable"
-            :pagination="ipagination"
+            :pagination="false"
             :scroll="{ x: true }"
             :loading="loading"
           >
@@ -148,7 +148,7 @@ import lifting from '../components/lifting'
 import timeCheck from '../components/timeCheck'
 import Treeselect from '../components/Treeselect.vue'
 import { mapGetters } from 'vuex'
-import { JeecgListMixin } from '@/mixins/ipagination'
+// import { JeecgListMixin } from '@/mixins/ipagination'
 
 var length = 0
 var active = 1
@@ -181,12 +181,12 @@ const columns = [
     align: 'center',
     scopedSlots: { customRender: 'activationCost' }
   },
-  {
-    title: '预估成本',
-    dataIndex: 'estimatedCost',
-    align: 'center',
-    scopedSlots: { customRender: 'estimatedCost' }
-  }
+  // {
+  //   title: '预估成本',
+  //   dataIndex: 'estimatedCost',
+  //   align: 'center',
+  //   scopedSlots: { customRender: 'estimatedCost' }
+  // }
 ]
 
 const columnsGroup = columns
@@ -201,7 +201,7 @@ export default {
     timeCheck,
     Treeselect
   },
-  mixins: [JeecgListMixin],
+  // mixins: [JeecgListMixin],
   data: function() {
     return {
       statDate: moment(new Date()),
@@ -298,8 +298,8 @@ export default {
           }
         })
       }
-      this.ipagination.total = this.data.length
-      this.ipagination.current = 1
+      // this.ipagination.total = this.data.length
+      // this.ipagination.current = 1
     },
     disabledDate(current) {
       return current && current > moment().subtract(1, 'day')
@@ -350,7 +350,7 @@ export default {
               this.data = []
             }
           }
-          this.ipagination.total = this.data.length
+          // this.ipagination.total = this.data.length
         }
       })
     },

+ 31 - 13
src/views/modules/earlyWarningRules/ruleModule.vue

@@ -131,10 +131,12 @@
                       >
                       </scheduleTime>
                       <!--  v-model="value.threshold" -->
+                      <!-- :cascaderValue.sync="value.threshold" -->
                       <region
                         :disabled="!editShow"
-                        :cascaderValue.sync="value.threshold"
-                        style="width: 100%; height: 32px"
+                        :checkData.sync="value.threshold"
+                        :dataValue="value.threshold"
+                        style="width: 100%"
                         :isLazy="true"
                         v-else-if="value.modelType == 'region'"
                       >
@@ -285,10 +287,18 @@
                   <div class="input-item">
                     <div class="toolbox-automate-rules-create-content_rules-and-condition_rules">
                       <div class="content">
-                        <div class="rules-list" v-for="(valueElse, valueIndex) of item.ruleDetail" :key="valueIndex">
+                        <div
+                          class="rules-list"
+                          v-for="(valueElse, valueIndex) of item.ruleDetail"
+                          :key="valueIndex + 'ruleDetail'"
+                        >
                           <div class="rules-list-item">
                             <template v-for="(value, valueElseIndex) of valueElse">
-                              <div class="row-item row-group" v-if="value.variableType == 1" :key="valueElseIndex">
+                              <div
+                                class="row-item row-group"
+                                v-if="value.variableType == 1"
+                                :key="valueElseIndex + 'valueElse'"
+                              >
                                 <!-- <div class="hint-item"></div>
                               <div class="label-item">
                                 <div class="text-item"></div>
@@ -470,7 +480,7 @@ import selectGroup from '@/components/formComponents/selectGroup'
 import checkBoxGroup from '@/components/formComponents/checkBoxGroup'
 import timeRange from '@/components/formComponents/timeRange'
 import scheduleTime from '@/components/formComponents/toutiaoTime'
-import region from '@/components/formComponents/Cascader'
+import region from '@/components/formComponents/selectRegion'
 import switchConfig from './switchConfig'
 let statusList = [
   {
@@ -968,33 +978,41 @@ export default {
       this.$refs.ruleForm.validate((valid) => {
         if (valid) {
           // this.form.rulesList=this.rulesList;
-          console.log(valid, this.form)
 
-          var data = this.form.ruleList.map((item) => {
+          var datas = []
+          datas = this.form.ruleList.map((item) => {
             return {
               ...item,
               ruleDetail: item.ruleDetail.map((end) => {
-                if (isArray(end)) {
+                if (isArray(item.ruleDetail[0])) {
                   var data = end.map((c) => {
                     return {
                       ...c,
-                      threshold: isArray(c.threshold) ? JSON.stringify(c.threshold) : end.threshold,
+                      threshold: isArray(c.threshold) ? JSON.stringify(c.threshold) : c.threshold,
                     }
                   })
-                  return [...data]
+                  return data
                 } else {
                   return {
                     ...end,
-                    threshold: isArray(end.threshold) ? JSON.stringify(end.threshold) : end.threshold,
+                    threshold: isArray(end.threshold)
+                      ? end.modelType == 'region'
+                        ? JSON.stringify(
+                            end.threshold.map((c) => {
+                              return c.value
+                            })
+                          )
+                        : JSON.stringify(end.threshold)
+                      : end.threshold,
                   }
                 }
               }),
             }
           })
-
+          // console.log(data)
           var params = {
             ...this.form,
-            ruleList: data,
+            ruleList: datas,
             accountId: JSON.parse(localStorage.getItem('getRuleDetail')).accountId,
           }
           this.saveLoading = true

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

@@ -571,7 +571,7 @@ let realTimeColumn=[
         // 3 - 获取电商下单;
         // 4 - 推广品牌活动;
         // 5 - 收集销售线索;
-        var data = ['', '', '提升应用安装', '获取电商下单', '推广品牌活动', '收集销售线索']
+        var data = ['', '', '提升应用安装', '获取电商下单', '推广品牌活动', '收集销售线索','', '提高应用活跃']
         return data[type]
       },
       status(sta) {

+ 2 - 1
src/views/modules/kuaishouapp/account/editGroup.vue

@@ -623,6 +623,8 @@
         this.$refs.application.showApplication()
       },
       handleOk(item, type, campaignId, unitNameCopy, isUpdateTrackUrl, clickTrackUrl) {
+        this.checkedTrue = false
+        this.nameValue = ''
         this.visible = true
         this.showSite = false
         this.isUpdateTrackUrl = isUpdateTrackUrl
@@ -656,7 +658,6 @@
             ]
             this.allForm.sceneId = this.allForm.sceneIdAll == 1 ? [7] : JSON.parse(res.result.baseInfo
               .sceneId)
-            console.log(this.allForm.sceneId, 1111111)
             this.allForm.dayBudget = dataJson.dayBudget == 0 ? '0' : '1'
             dataJson.dayBudget = dataJson.dayBudget / 1000
             this.allForm.time = dataJson.endTime ? '2' : '1'

+ 2 - 0
src/views/modules/kuaishouapp/account/editGroupNew.vue

@@ -636,6 +636,8 @@
         this.$refs.application.showApplication()
       },
       handleOk(item, type, campaignId, unitNameCopy, count, isUpdateTrackUrl, clickTrackUrl) {
+        this.checkedTrue = false
+        this.nameValue = ''
         this.visible = true
         this.showSite = false
         this.isUpdateTrackUrl = isUpdateTrackUrl

+ 77 - 15
src/views/modules/kuaishouapp/account/stepForm/Step3.vue

@@ -451,8 +451,10 @@ li.chouzhen.first:before {
               :token-separators="[',', ' ', ',']"
             >
             </a-select>
-            <span v-if="getData('creativeTag')&&getData('creativeTag').length > 10" style="color:red">创意标签最多填写10个,请删减</span>
-            <br>
+            <span v-if="getData('creativeTag') && getData('creativeTag').length > 10" style="color: red"
+              >创意标签最多填写10个,请删减</span
+            >
+            <br />
             <a-popconfirm @confirm="getInfo(record)">
               <div slot="title">
                 <div>
@@ -499,7 +501,7 @@ li.chouzhen.first:before {
             </a-select>
           </a-form-item>
 
-          <a-form-item label="监测链接" :labelCol="labelCol" :wrapperCol="wrapperCol">
+          <a-form-item label="第三方点击监测链接" :labelCol="labelCol" :wrapperCol="wrapperCol">
             <a-input
               v-if="pane.bid_type == 6"
               v-decorator="[
@@ -522,10 +524,53 @@ li.chouzhen.first:before {
               placeholder="请输入第三方检测链接"
             >
             </a-input>
-            <a v-if="getData('clickTrackUrl')" @click="clickTrackUrlShow = true" style="margin-right: 10px"
+            <a
+              v-if="getData('clickTrackUrl')"
+              @click="
+                clickTrackUrlShow = true
+                clickTrackUrlShowType == '1'
+              "
+              style="margin-right: 10px"
+              >收藏监测链接</a
+            >
+            <a
+              @click="
+                getClickTrackUrlList('1')
+                clickTrackUrlShowType = '1'
+              "
+              >监测链接列表</a
+            >
+          </a-form-item>
+          <a-form-item label="第三方ActionBar点击监控链接" :labelCol="labelCol" :wrapperCol="wrapperCol">
+            <a-input
+              v-decorator="[
+                'actionbarClickUrl',
+                {
+                  rules: [{ message: '请输入第三方点击监控链接' }],
+                },
+              ]"
+              placeholder="请输入第三方点击监控链接"
+            >
+            </a-input>
+            <span style="color: red; position: relative; top: -10px">仅加白使用</span>
+            <br />
+            <a
+              v-if="getData('actionbarClickUrl')"
+              @click="
+                clickTrackUrlShow = true
+                clickTrackUrlShowType = '2'
+              "
+              style="margin-right: 10px; position: relative; top: -20px"
               >收藏监测链接</a
             >
-            <a @click="getClickTrackUrlList()">监测链接列表</a>
+            <a
+              @click="
+                getClickTrackUrlList('2')
+                clickTrackUrlShowType = '2'
+              "
+              style="margin-right: 10px; position: relative; top: -20px"
+              >监测链接列表</a
+            >
           </a-form-item>
         </a-form>
       </a-tab-pane>
@@ -823,6 +868,7 @@ li.chouzhen.first:before {
       <span style="color: red" v-if="!showTrackUrlNameElse">名称重复</span>
     </a-modal>
     <a-modal title="监测链接列表" v-model="clickTrackUrlList" :width="1000" :footer="null">
+       <a-spin :spinning="spinning">
       <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">
@@ -850,6 +896,7 @@ li.chouzhen.first:before {
           </a-card>
         </a-col>
       </a-row>
+       </a-spin>
     </a-modal>
   </a-card>
 </template>
@@ -896,7 +943,9 @@ export default {
       tongbuLoading: false,
       showTrackUrlNameElse: true,
       clickTrackUrlShow: false,
+      clickTrackUrlShowType: '1',
       clickTrackUrlList: false,
+      spinning:false,
       trackUrlList: [],
       trackUrlName: '',
       showSite: true,
@@ -970,16 +1019,16 @@ export default {
       siteList: [],
       labelCol: {
         lg: {
-          span: 4,
+          span: 6,
         },
         sm: {
           span: 6,
         },
         xs: {
-          span: 4,
+          span: 6,
         },
         md: {
-          span: 4,
+          span: 6,
         },
       },
       wrapperCol: {
@@ -1077,6 +1126,7 @@ export default {
       var params = {}
       params.accountId = localStorage.getItem('accountId')
       params.userId = this.userInfo().id
+      params.trackType = this.clickTrackUrlShowType
       params.pageNo = 1
       params.pageSize = 500
       params.trackName = value
@@ -1102,7 +1152,9 @@ export default {
       params.accountId = localStorage.getItem('accountId')
       params.userId = this.userInfo().id
       params.trackName = this.trackUrlName
-      params.trackUrl = this.getData('clickTrackUrl')
+      params.trackType = this.clickTrackUrlShowType
+      params.trackUrl =
+        this.clickTrackUrlShowType == '1' ? this.getData('clickTrackUrl') : this.getData('actionbarClickUrl')
       postAction('/kuaishou/kuaiShouTrackUrlCollection/add', params).then((res) => {
         if (res.success) {
           this.clickTrackUrlShow = false
@@ -1115,31 +1167,41 @@ export default {
     },
     okClickTrackUrl(item) {
       this.clickTrackUrlList = false
-      this.form.setFieldsValue({
-        clickTrackUrl: item.trackUrl,
-      })
+      if (this.clickTrackUrlShowType == '1') {
+        this.form.setFieldsValue({
+          clickTrackUrl: item.trackUrl,
+        })
+      } else {
+        this.form.setFieldsValue({
+          actionbarClickUrl: item.trackUrl,
+        })
+      }
     },
     removeClickTrackUrl(item) {
       deleteAction('/kuaishou/kuaiShouTrackUrlCollection/delete', {
         id: item.id,
       }).then((res) => {
         if (res.success) {
-          this.getClickTrackUrlList()
+          this.getClickTrackUrlList(this.clickTrackUrlShowType)
         }
       })
     },
-    getClickTrackUrlList() {
+    getClickTrackUrlList(type) {
+      this.spinning = true
       this.clickTrackUrlList = true
-
+      this.trackUrlList = []
       var params = {}
       params.accountId = localStorage.getItem('accountId')
+      params.trackType = type
       params.userId = this.userInfo().id
       params.pageNo = 1
       params.pageSize = 500
       getAction('/kuaishou/kuaiShouTrackUrlCollection/list', params).then((res) => {
         if (res.success) {
+          this.spinning = false
           this.trackUrlList = res.result.records
         } else {
+          this.spinning = false
           this.$message.error(res.message)
         }
       })

+ 101 - 39
src/views/modules/kuaishouapp/account/stepForm/Step4.vue

@@ -446,7 +446,8 @@ li.chouzhen.first:before {
             </a-select>
           </a-form-item>
           <!-- , { validator: handleConfirmValue } -->
-          <a-form-item label="点击监测链接" :labelCol="labelCol" :wrapperCol="wrapperCol">
+
+          <a-form-item label="第三方点击监测链接" :labelCol="labelCol" :wrapperCol="wrapperCol">
             <a-input
               v-decorator="[
                 'clickUrl',
@@ -456,12 +457,57 @@ li.chouzhen.first:before {
               ]"
               placeholder="请输入第三方点击监测链接"
             ></a-input>
-              <a v-if="getData('clickUrl')" @click="clickTrackUrlShow = true" style="margin-right: 10px"
+
+            <a
+              v-if="getData('clickUrl')"
+              @click="
+                clickTrackUrlShow = true
+                clickTrackUrlShowType == '1'
+              "
+              style="margin-right: 10px"
               >收藏监测链接</a
             >
-            <a @click="getClickTrackUrlList()">监测链接列表</a>
+            <a
+              @click="
+                getClickTrackUrlList('1')
+                clickTrackUrlShowType = '1'
+              "
+              >监测链接列表</a
+            >
           </a-form-item>
+          
           <!-- , { validator: handleConfirmValue } -->
+          <a-form-item label="第三方ActionBar点击监控链接" :labelCol="labelCol" :wrapperCol="wrapperCol">
+            <a-input
+              v-decorator="[
+                'actionbarClickUrl',
+                {
+                  rules: [{ message: '请输入第三方点击监控链接' }],
+                },
+              ]"
+              placeholder="请输入第三方点击监控链接"
+            >
+            </a-input>
+            <span style="color:red;position: relative;top: -10px;">仅加白使用</span>
+            <br />
+            <a
+              v-if="getData('actionbarClickUrl')"
+              @click="
+                clickTrackUrlShow = true
+                clickTrackUrlShowType = '2'
+              "
+              style="margin-right: 10px; position: relative; top: -20px"
+              >收藏监测链接</a
+            >
+            <a
+              @click="
+                getClickTrackUrlList('2')
+                clickTrackUrlShowType = '2'
+              "
+              style="margin-right: 10px; position: relative; top: -20px"
+              >监测链接列表</a
+            >
+          </a-form-item>
 
           <a-form-item label="创意标题" :labelCol="labelCol" :wrapperCol="wrapperCol">
             <a-input
@@ -760,32 +806,34 @@ li.chouzhen.first:before {
       <span style="color: red" v-if="!showTrackUrlNameElse">名称重复</span>
     </a-modal>
     <a-modal title="监测链接列表" v-model="clickTrackUrlList" :width="1000" :footer="null">
-      <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">
-                <div slot="actions">
-                  <a @click="okClickTrackUrl(item)">选择</a>
-                  <a-divider type="vertical" />
-                  <a @click="removeClickTrackUrl(item)">删除</a>
-                </div>
-                {{ item.trackName }}
-                <a-input v-model="item.trackUrl" read-only style="margin: 10px; width: 70%"></a-input>
-              </a-list-item>
-            </a-list>
-          </a-card>
-        </a-col>
-      </a-row>
+      <a-spin :spinning="spinning">
+		<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">
+					<div slot="actions">
+					<a @click="okClickTrackUrl(item)">选择</a>
+					<a-divider type="vertical" />
+					<a @click="removeClickTrackUrl(item)">删除</a>
+					</div>
+					{{ item.trackName }}
+					<a-input v-model="item.trackUrl" read-only style="margin: 10px; width: 70%"></a-input>
+				</a-list-item>
+				</a-list>
+			</a-card>
+			</a-col>
+		</a-row>
+      </a-spin>
     </a-modal>
   </a-card>
 </template>
@@ -874,7 +922,9 @@ export default {
       tongbuLoading: false,
       showTrackUrlNameElse: true,
       clickTrackUrlShow: false,
+      clickTrackUrlShowType: '1',
       clickTrackUrlList: false,
+      spinning: false,
       trackUrlList: [],
       trackUrlName: '',
       showSite: true,
@@ -948,16 +998,16 @@ export default {
       siteList: [],
       labelCol: {
         lg: {
-          span: 4,
+          span: 6,
         },
         sm: {
           span: 6,
         },
         xs: {
-          span: 4,
+          span: 6,
         },
         md: {
-          span: 4,
+          span: 6,
         },
       },
       wrapperCol: {
@@ -1144,7 +1194,9 @@ export default {
       params.accountId = localStorage.getItem('accountId')
       params.userId = this.userInfo().id
       params.trackName = this.trackUrlName
-      params.trackUrl = this.getData('clickUrl')
+      params.trackType = this.clickTrackUrlShowType
+      params.trackUrl = this.clickTrackUrlShowType == '1' ? this.getData('clickUrl') : this.getData('actionbarClickUrl')
+      // params.trackUrl = this.getData('clickUrl')
       postAction('/kuaishou/kuaiShouTrackUrlCollection/add', params).then((res) => {
         if (res.success) {
           this.clickTrackUrlShow = false
@@ -1157,32 +1209,42 @@ export default {
     },
     okClickTrackUrl(item) {
       this.clickTrackUrlList = false
-      this.form.setFieldsValue({
-        clickUrl: item.trackUrl,
-      })
+      if (this.clickTrackUrlShowType == '1') {
+        this.form.setFieldsValue({
+          clickUrl: item.trackUrl,
+        })
+      } else {
+        this.form.setFieldsValue({
+          actionbarClickUrl: item.trackUrl,
+        })
+      }
     },
     removeClickTrackUrl(item) {
       deleteAction('/kuaishou/kuaiShouTrackUrlCollection/delete', {
         id: item.id,
       }).then((res) => {
         if (res.success) {
-          this.getClickTrackUrlList()
+          this.getClickTrackUrlList(this.clickTrackUrlShowType)
         }
       })
     },
-    getClickTrackUrlList() {
+    getClickTrackUrlList(type) {
       this.clickTrackUrlList = true
-
+      this.spinning = true
+      this.trackUrlList = []
       var params = {}
       params.accountId = localStorage.getItem('accountId')
       params.userId = this.userInfo().id
+      params.trackType = type
       params.pageNo = 1
       params.pageSize = 500
       getAction('/kuaishou/kuaiShouTrackUrlCollection/list', params).then((res) => {
         if (res.success) {
           this.trackUrlList = res.result.records
+          this.spinning = false
         } else {
           this.$message.error(res.message)
+          this.spinning = false
         }
       })
     },

+ 9 - 1
src/views/modules/kuaishouapp/account/stepForm/stepModule/targetedPopulation.vue

@@ -46,7 +46,7 @@ li:hover {
         <a-radio-button value="3">定向人群</a-radio-button>
         <!-- <a-radio-button value="4">付费人群</a-radio-button> -->
       </a-radio-group>
-      <span style="color: red;margin-left:10px">第三方人群包不能复制</span>
+      <span style="color: red; margin-left: 10px">第三方人群包不能复制</span>
     </a-form-item>
     <a-form-item
       v-if="people == '3'"
@@ -859,6 +859,14 @@ export default {
         }
       }
     },
+    'allForm.isOpen': function (n, o) {
+      console.log(n, o)
+      if (n == 0) {
+        this.allForm.noAgeBreak = false
+        this.allForm.noGenderBreak = false
+        this.allForm.noAreaBreak = false
+      }
+    },
   },
   directives: { clickoutside },
   data() {

File diff suppressed because it is too large
+ 1059 - 0
src/views/modules/kuaishouapp/batchCreation/campaignList.vue


+ 229 - 0
src/views/modules/kuaishouapp/batchCreation/creat/creatCampaign.vue

@@ -0,0 +1,229 @@
+<template>
+  <a-card :body-style="{ padding: '24px 32px' }" :bordered="false">
+    <a-form @submit="handleSubmit" :form="form">
+      <a-form-item
+        label="推广目的"
+        :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
+        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
+      >
+        <a-radio-group @change="typeChange" v-model="type" buttonStyle="solid">
+          <!-- <a-radio-button
+            v-for="purpose in typeList"
+            :key="purpose.itemText"
+            :value="purpose.itemValue"
+          >{{purpose.itemText}}</a-radio-button> -->
+          <a-radio-button value="2">提升应用安装</a-radio-button>
+          <a-radio-button value="3">获取电商下单</a-radio-button>
+          <a-radio-button value="4">推广品牌活动</a-radio-button>
+          <a-radio-button value="5">收集销售线索</a-radio-button>
+        </a-radio-group>
+      </a-form-item>
+
+      <a-form-item
+        label="计划名称"
+        :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
+        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
+      >
+        <a-input v-model="campaignName"></a-input>
+      </a-form-item>
+
+      <a-form-item
+        label="单日预算"
+        :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
+        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
+      >
+        <a-radio-group @change="showBudgetStatusChange" v-model="campaignBudget">
+          <a-radio-button value="UNLIMITED">不限</a-radio-button>
+          <a-radio-button value="AS_BUDGET">统一预算</a-radio-button>
+        </a-radio-group>
+      </a-form-item>
+      <a-form-item
+        label="预算金额"
+        v-if="showBudgetDaily"
+        :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
+        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
+      >
+        <a-input
+          v-decorator="[
+            'dayBudget',
+            { rules: [{ required: true, message: 'error:' }, { validator: handleConfirmValue }] },
+          ]"
+          placeholder="不小于500,不超过100000000,仅支持输入自然数"
+          type="number"
+          style="width: 70%"
+        ></a-input
+        >元
+      </a-form-item>
+      <a-form-item :wrapperCol="{ span: 24 }" style="text-align: center">
+        <a-button htmlType="submit" type="primary" :loading="loading">下一步</a-button>
+        <!-- <a-button style="margin-left: 8px">保存</a-button> -->
+      </a-form-item>
+    </a-form>
+  </a-card>
+</template>
+
+<script>
+import { deleteAction, postAction, getAction } from '@/api/manage'
+import moment from 'moment'
+import { mapActions, mapGetters } from 'vuex'
+
+export default {
+  name: 'Step1',
+  data() {
+    return {
+      promotionName: '',
+      type: '2',
+      typeList: {},
+      appList: {},
+      showBudgetDaily: false,
+      campaignName: '提升应用安装_' + moment(new Date()),
+      campaignBudget: 'UNLIMITED',
+      dayBudget: 0,
+      appId: '0', //应用目标
+      showApp: true,
+      redirectUrl: '', // 链接地址
+      showRedirect: false,
+      urlType: '1',
+      showUrlType: false,
+      channelType: '1',
+      showChannelType: false,
+      loading: false,
+      form: this.$form.createForm(this),
+      url: {
+        dictListUrl: 'toutiao/dictitem/list',
+        appListUrl: '/kuaishou/kuaiShouCreateAppTemplate/list',
+        insertTemplateUrl: '/kuaishou/batch/campaignCreate',
+      },
+    }
+  },
+  methods: {
+    ...mapGetters(['nickname', 'avatar', 'userInfo']),
+    getCampaignId(campaignId) {
+      alert(1)
+    },
+    handleConfirmValue(rule, value, callback) {
+      if (value == '' || value < 500 || value >= 100000000) {
+        callback('请输入正确预算金额')
+      }
+      callback()
+    },
+
+    handleConfirmAppId(rule, value, callback) {
+      if (this.type == 2 && (this.appId == '0' || this.appId == '')) {
+        callback('请选择目标应用')
+      }
+      callback()
+    },
+    handleSubmit(e) {
+      e.preventDefault()
+      this.form.validateFields((err, values) => {
+        if (!err) {
+          this.loading = true
+          console.log('Received values of form: ', values)
+          let params = {}
+          params.type = this.type
+          //   params.campaignBudget = this.campaignBudget
+          params.dayBudget = this.campaignBudget == 'UNLIMITED' ? 0 : values.dayBudget * 1000
+          params.campaignName = this.campaignName
+          params.accountId = localStorage.getItem('campaignAccountId')
+          console.log(params)
+
+          postAction(this.url.insertTemplateUrl, params).then((res) => {
+            console.log(res)
+            if (res.success) {
+              this.$message.success('创建成功')
+              localStorage.setItem('campaignList', res.result)
+              localStorage.setItem('campaignType', this.type)
+              this.loading = false
+              this.$router.replace({
+                path: '/creat/creatUnit',
+              })
+              this.$bus.$emit('remove', '/creat/creatCampaign')
+            } else {
+              this.$message.error(res.message)
+              this.loading = false
+            }
+          })
+        }
+      })
+    },
+    onChange(value) {
+      console.log(value)
+    },
+    showBudgetStatusChange() {
+      if (this.campaignBudget == 'UNLIMITED') {
+        this.showBudgetDaily = false
+        this.dayBudget = 0
+      } else {
+        this.showBudgetDaily = true
+        this.dayBudget = ''
+      }
+    },
+    typeChange() {
+      if (this.type == 2) {
+        this.promotionName = '提升应用安装'
+        this.showApp = true
+        this.showRedirect = false
+        this.showUrlType = false
+        this.showChannelType = false
+      }
+      if (this.type == 3) {
+        this.promotionName = '获取电商下单'
+        this.showApp = false
+        this.showRedirect = true
+        this.showUrlType = true
+        this.showChannelType = false
+      }
+      if (this.type == 4) {
+        this.promotionName = '推广品牌活动'
+        this.showApp = false
+        this.showRedirect = true
+        this.showUrlType = false
+        this.showChannelType = false
+      }
+      if (this.type == 5) {
+        this.promotionName = '收集销售线索'
+        this.showApp = false
+        this.showRedirect = true
+        this.showUrlType = false
+        this.showChannelType = true
+      }
+      this.campaignName = this.promotionName + '_' + moment(new Date())
+    },
+    handleChange(value) {
+      console.log(`selected ${value}`)
+    },
+    handleBlur() {
+      console.log('blur')
+    },
+    handleFocus() {
+      console.log('focus')
+    },
+    filterOption(input, option) {
+      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+    },
+  },
+  mounted: function () {
+    // //出价方式
+    // let params = {}
+    // params.dictId = '181afbae847dd3bc7e27795d8958956'
+    // params.pageSize = '1000'
+    // getAction(this.url.dictListUrl, params).then(res => {
+    //   if (res.success) {
+    //     this.typeList = res.result.records
+    //   }
+    // })
+    // // 应用列表
+    // //出价方式
+    // let params2 = {}
+    // params2.loginId = this.userInfo().id
+    // params2.pageSize = '1000'
+    // getAction(this.url.appListUrl, params).then(res => {
+    //   if (res.success) {
+    //     this.appList = res.result.records
+    //     console.log(this.appList)
+    //   }
+    // })
+  },
+}
+</script>

File diff suppressed because it is too large
+ 2466 - 0
src/views/modules/kuaishouapp/batchCreation/creat/creatUnit.vue


+ 774 - 0
src/views/modules/kuaishouapp/batchCreation/creativeList.vue

@@ -0,0 +1,774 @@
+<style>
+.account-statistics .ant-card-body .count {
+  display: inline-block;
+  /* height: 32px;
+    line-height: 32px; */
+}
+
+/* .creative-name .ant-table td {
+    white-space: nowrap;
+  } */
+
+.else-label .ant-form-item-label label::after {
+  content: '';
+  position: relative;
+  top: -0.5px;
+  margin: 0 8px 0 2px;
+}
+</style>
+<template>
+  <div class="creative-name">
+    <a-row style="margin-top: 15px">
+      <a-card title="">
+        <!-- :tabList="title" :activeTabKey="titleKey" @tabChange="key => onTabChange(key, 'titleKey')" -->
+        <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="7" :sm="8" style="display: flex">
+                  <a-form-item label="创意id">
+                    <a-input placeholder="请输入广告创意id" v-model="creativeIdTwo"></a-input>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="7" :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="4" :sm="4" 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">
+                <a-select-option value="1">启动</a-select-option>
+                <a-select-option value="2">暂停</a-select-option>
+                <a-select-option value="4">修改监测链接</a-select-option>
+                <a-select-option value="3">删除</a-select-option>
+              </a-select>
+              <a-button @click="editStatus" style="margin: 0 0 15px 15px" type="primary">确认</a-button>
+            </div>
+            <a-table
+              :columns="columns"
+              :dataSource="dataList"
+              bordered
+              :scroll="{ x: true }"
+              :customRow="rowClick"
+              size="middle"
+              :pagination="ipagination"
+              :loading="loadingList"
+              :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
+            >
+              <span slot="action" slot-scope="text, record">
+                <a-switch v-model="record.showSwich" @change="onChangeSwitch(record)" />
+              </span>
+              <span slot="actionTwo" slot-scope="text, record">
+                <a @click="editOriginality(record)" :disabled="record.creativeMaterialType+''=='4'">编辑</a>
+              </span>
+              <span slot="status" slot-scope="text">{{ text | status }}</span>
+              <span slot="putStatus" slot-scope="text">{{ text | putStatus }}</span>
+              <div slot="coverUrl" slot-scope="text,record">
+                <img v-if="record.creativeMaterialType+''=='4'"  :src="JSON.parse(record.materialUrl)[0]" alt="" style="width: 100px" />
+                <img v-else  :src="text" alt="" style="width: 100px" />
+              </div>
+              
+              <span slot="captions" slot-scope="text">
+                <span v-for="(item, index) of JSON.parse(text)" :key="index">{{ item }}</span>
+              </span>
+            </a-table>
+          </a-tab-pane>
+        </a-tabs>
+      </a-card>
+    </a-row>
+    <a-modal
+      v-model="visibleAll"
+      title="批量修改第三方监测链接"
+      @ok="handleOkAll"
+      :confirmLoading="allLoading"
+      :width="800"
+    >
+      <a-form-item
+        label="检测链接"
+        :labelCol="{ lg: { span: 4 }, sm: { span: 2 } }"
+        :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }"
+      >
+        <a-input v-model="clickTrackUrl" placeholder="请输入第三方检测链接"> </a-input>
+      </a-form-item>
+    </a-modal>
+    <a-modal v-model="visibleFail" title="错误信息" :footer="null">
+      <div v-if="visibleData">
+        修改条数:{{ visibleData.totalCount }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;失败条数:{{ visibleData.failCount }}
+        <div style="margin-top: 20px">
+          <p v-for="(item, index) of visibleData.failInfo" :key="index">
+            <span>名称:{{ item.creativeName }}</span
+            ><br />
+            <span>错误信息:{{ item.message }}</span>
+          </p>
+        </div>
+      </div>
+    </a-modal>
+    <a-modal v-model="visible" title="修改" @ok="handleOk" :width="800">
+      <a-form @submit="handleSubmit" :form="form" style="margin-top: 20px" :hideRequiredMark="true">
+        <a-form-item
+          label="素材类型"
+          :labelCol="{ lg: { span: 4 }, sm: { span: 4 } }"
+          :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }"
+        >
+          <a-radio-group buttonStyle="solid" v-decorator="['creativeMaterialType', { initialValue: 1 }]">
+            <a-radio-button :value="1">竖版视频</a-radio-button>
+            <a-radio-button :value="2">横版视频</a-radio-button>
+          </a-radio-group>
+        </a-form-item>
+        <a-form-item
+          label=" "
+          :labelCol="{ lg: { span: 4 }, sm: { span: 4 } }"
+          :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }"
+          class="else-label"
+        >
+          <a @click="getVideoList('video')">选择视频</a>
+          <br />
+          <video :src="video.url" controls="controls" style="width: 25%" v-if="video.url"></video>
+        </a-form-item>
+        <a-form-item
+          label=" "
+          :labelCol="{ lg: { span: 4 }, sm: { span: 4 } }"
+          :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }"
+          class="else-label"
+        >
+          <a @click="getVideoList('image')">选择封面</a>
+          <br />
+          <img :src="image.coverUrl" style="width: 25%" v-if="image.coverUrl" />
+        </a-form-item>
+        <a-form-item
+          label="创意标题"
+          :labelCol="{ lg: { span: 4 }, sm: { span: 4 } }"
+          :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }"
+        >
+          <a-input
+            class="rending"
+            v-decorator="['creativeName', { rules: [{ required: true, message: '请输入创意标题' }] }]"
+          >
+          </a-input>
+        </a-form-item>
+        <a-form-item
+          label="广告语"
+          :labelCol="{ lg: { span: 4 }, sm: { span: 4 } }"
+          :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }"
+        >
+          <a-textarea
+            class="rending"
+            placeholder="请输入广告语"
+            v-decorator="['description', { rules: [{ required: true, message: '请输入广告语' }] }]"
+            :autosize="{ minRows: 2, maxRows: 6 }"
+          ></a-textarea>
+        </a-form-item>
+        <a-form-item
+          label="行动号召"
+          :labelCol="{ lg: { span: 4 }, sm: { span: 4 } }"
+          :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }"
+        >
+          <a-select
+            v-decorator="['actionBarText', { rules: [{ required: true, message: '行动号召按钮文案' }] }]"
+            showSearch
+            allowClear
+            placeholder="选择行动号召按钮文案"
+            optionFilterProp="children"
+            :filterOption="filterOption"
+          >
+            <a-select-option v-for="appModel in appList" :key="appModel.id" :value="appModel.actionBarText">
+              {{ appModel.actionBarText }}
+            </a-select-option>
+          </a-select>
+        </a-form-item>
+        <a-form-item
+          label="检测链接"
+          :labelCol="{ lg: { span: 4 }, sm: { span: 2 } }"
+          :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }"
+        >
+          <a-input
+            v-decorator="[
+              'clickTrackUrl',
+              {
+                rules: [{ required: true, message: '请输入第三方检测链接' }],
+              },
+            ]"
+            placeholder="请输入第三方检测链接"
+          >
+          </a-input>
+        </a-form-item>
+      </a-form>
+    </a-modal>
+    <!-- <checkMatemal ref="check" @showVideo="showData"></checkMatemal> -->
+  </div>
+</template>
+
+<script>
+import ARow from 'ant-design-vue/es/grid/Row'
+import ACol from 'ant-design-vue/es/grid/Col'
+import moment from 'moment'
+import countTo from 'vue-count-to'
+import { mapGetters } from 'vuex'
+import { deleteAction, getAction, postAction } from '@/api/manage'
+// import checkMatemal from './editMatemal'
+import pick from 'lodash.pick'
+
+// import lifting from './components/lifting'
+const columns = [
+  {
+    title: '开关',
+    align: 'center',
+    dataIndex: 'action',
+    width: 100,
+    scopedSlots: {
+      customRender: 'action',
+    },
+  },
+  {
+    title: '创意名称',
+    dataIndex: 'creativeName',
+    align: 'center',
+  },
+  {
+    title: '操作',
+    align: 'center',
+    dataIndex: 'actionTwo',
+    width: 100,
+    scopedSlots: {
+      customRender: 'actionTwo',
+    },
+  },
+  {
+    title: '封面',
+    dataIndex: 'coverUrl',
+    scopedSlots: {
+      customRender: 'coverUrl',
+    },
+    align: 'center',
+  },
+  {
+    title: '广告创意状态',
+    dataIndex: 'status',
+    scopedSlots: {
+      customRender: 'status',
+    },
+    align: 'center',
+  },
+  {
+    title: '投放状态',
+    dataIndex: 'putStatus',
+    scopedSlots: {
+      customRender: 'putStatus',
+    },
+    align: 'center',
+  },
+  {
+    title: '广告语',
+    dataIndex: 'description',
+    scopedSlots: {
+      customRender: 'description',
+    },
+    align: 'center',
+  },
+]
+const columnsCXH = [
+  {
+    title: '开关',
+    align: 'center',
+    dataIndex: 'action',
+    width: 100,
+    scopedSlots: {
+      customRender: 'action',
+    },
+  },
+  {
+    title: '创意名称',
+    dataIndex: 'packageName',
+    align: 'center',
+  },
+  {
+    title: '操作',
+    align: 'center',
+    dataIndex: 'actionTwo',
+    width: 100,
+    scopedSlots: {
+      customRender: 'actionTwo',
+    },
+  },
+  // {
+  //   title: '封面',
+  //   dataIndex: 'coverUrl',
+  //   scopedSlots: {
+  //     customRender: 'coverUrl'
+  //   },
+  //   align: 'center'
+  // },
+  // {
+  //   title: '广告创意状态',
+  //   dataIndex: 'status',
+  //   scopedSlots: {
+  //     customRender: 'status'
+  //   },
+  //   align: 'center'
+  // },
+  {
+    title: '投放状态',
+    dataIndex: 'putStatus',
+    scopedSlots: {
+      customRender: 'putStatus',
+    },
+    align: 'center',
+  },
+  {
+    title: '广告语',
+    dataIndex: 'captions',
+    scopedSlots: {
+      customRender: 'captions',
+    },
+    align: 'center',
+  },
+]
+export default {
+  name: 'account-statistics',
+  components: {
+    ACol,
+    ARow,
+    countTo,
+    // checkMatemal,
+  },
+
+  data: function () {
+    return {
+      creativeName: '',
+      creativeIdTwo: '',
+      visible: false,
+      visibleAll: false,
+      allLoading: false,
+      visibleFail: false,
+      visibleData: null,
+      clickTrackUrl: '',
+      image: {},
+      video: {},
+      duration: 1000,
+      showEdit: false,
+      many: 1200,
+      manyTwo: null,
+      columns: columns,
+      dataList: [],
+      loadingList: false,
+      rowClick: (record, index) => ({
+        // 事件
+        on: {
+          dblclick: () => {
+            // 点击改行时要做的事情
+            // alert(index)
+          },
+        },
+      }),
+      ipagination: {
+        current: 1,
+        pageSize: 15,
+        //   pageSizeOptions: ['10', '20', '30'],
+        showTotal: (total, range) => {
+          return range[0] + '-' + range[1] + ' 共' + total + '条'
+        },
+        showQuickJumper: true,
+        //   showSizeChanger: true,
+        total: 0,
+        onChange: (current) => {
+          // 切换分页时的回调,
+          // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
+          this.ipagination.current = current
+          this.getDataList(this.titleKey)
+        },
+      },
+      name: null,
+      title: [],
+      titleKey: null,
+      selectedRowKeys: [],
+      selectedRowKeysValue: [],
+      allType: '1',
+      form: this.$form.createForm(this),
+      appList: [],
+      creativeId: '',
+    }
+  },
+  filters: {
+    status(sta) {
+      var data = {
+        '-1': '不限',
+        1: '已暂停',
+        3: '计划超预算',
+        6: '余额不足',
+        11: '组审核中',
+        12: '组审核未通过',
+        14: '已结束',
+        15: '组已暂停',
+        17: '组超预算',
+        19: '未达投放时间',
+        41: '审核中',
+        42: '审核未通过',
+        46: '已暂停',
+        52: '投放中',
+        53: '作品异常',
+        54: '视频审核通过',
+      }
+      return data[sta]
+    },
+    putStatus(sta) {
+      var data = {
+        1: '投放中',
+        2: '暂停',
+      }
+      return data[sta]
+    },
+  },
+  methods: {
+    editOriginality(item) {
+      this.creativeId = item.creativeId
+      if (item.creativeMaterialType + '' == '4') {
+        this.image.coverUrl = JSON.parse(item.materialUrl)
+
+        this.visible = true
+      } else {
+        getAction('/kuaishou/batch/getActionBarText', {
+          campaignId: localStorage.getItem('campaignList'),
+        }).then((res) => {
+          if (res.success) {
+            this.appList = res.result
+          }
+        })
+        getAction('/kuaishou/batch/getVideoDetail', {
+          photoId: item.photoId,
+        }).then((res) => {
+          if (res.success) {
+            console.log(res)
+            this.video.url = res.result.url
+            this.video.photoId = res.result.photoId
+
+            this.image.coverUrl = item.coverUrl
+            this.image.imageToken = item.imageToken
+
+            this.visible = true
+            this.$nextTick(() => {
+              this.form.setFieldsValue(
+                pick(item, ['clickTrackUrl', 'actionBarText', 'creativeName', 'description', 'creativeMaterialType'])
+              )
+            })
+          }
+        })
+      }
+    },
+    handleOk() {
+      this.handleSubmit()
+    },
+    handleOkAll() {
+      this.allLoading = true
+      var params = {}
+      params.accountId = localStorage.getItem('campaignAccountId')
+      params.creativeJson = {
+        clickTrackUrl: this.clickTrackUrl,
+      }
+      params.creativeIds = this.selectedRowKeysValue
+      postAction('/kuaishou/batch/batchUpdateCreative', params).then((res) => {
+        console.log(res)
+        if (res.success) {
+          if (res.result.failCount > 0) {
+            this.allLoading = false
+            this.visibleAll = false
+            this.visibleFail = true
+            this.visibleData = res.result
+          } else {
+            this.getDataList(localStorage.getItem('originalityKeyElse'))
+            this.$message.success('批量修改成功')
+            this.allType = '1'
+            this.selectedRowKeysValue = []
+            this.selectedRowKeys = []
+            this.clickTrackUrl = ''
+            this.visibleAll = false
+          }
+        } else {
+          this.$message.error('修改失败')
+          this.visibleAll = false
+        }
+      })
+    },
+    handleSubmit() {
+      this.form.validateFields((err, values) => {
+        if (!err) {
+          var params = {
+            photoId: this.video.photoId,
+            imageToken: this.image.imageToken,
+            ...values,
+            creativeId: this.creativeId,
+            accountId: localStorage.getItem('campaignAccountId'),
+          }
+          console.log(params)
+          postAction('/kuaishou/batch/updateCreative', params).then((res) => {
+            console.log(res)
+            if (res.result.code == 0) {
+              this.visible = false
+              this.$message.success('修改成功')
+              this.getDataList(localStorage.getItem('originalityKeyElse'))
+            } else {
+              this.$message.error(res.result.message)
+            }
+          })
+        }
+      })
+    },
+    getVideoList(type) {
+      if (type == 'video') {
+        this.$refs.check.showCheck(this.getData('creativeMaterialType'), '/kuaishou/batch/getVideoList', type)
+      } else {
+        this.$refs.check.showCheck(this.getData('creativeMaterialType'), '/kuaishou/batch/getImageList', type)
+      }
+    },
+    showData(item, type) {
+      if (type == 'video') {
+        this.video = {}
+        console.log(item, 'v')
+        this.video.url = item.url
+        this.video.photoId = item.photoId
+      } else {
+        console.log(item, 'i')
+        this.image = {}
+        this.image.coverUrl = item.url
+        this.image.imageToken = item.imageToken
+      }
+    },
+    getData(className) {
+      return this.form.getFieldValue(className)
+    },
+    filterOption(input, option) {
+      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+    },
+    ...mapGetters(['nickname', 'avatar', 'userInfo']),
+    onChangeSwitch(item) {
+      console.log(item)
+      var params = {}
+      params.accountId = localStorage.getItem('campaignAccountId')
+      params.putStatus = item.showSwich ? 1 : 2
+      params.userId = this.userInfo().id
+      params.creativeIds = [item.creativeId]
+      postAction('/kuaishou/batch/batchUpdateCreativeStatus', params).then((res) => {
+        console.log(res)
+      })
+    },
+    editStatus() {
+      if (this.allType == '4') {
+        // /kuaishou/batch/batchUpdateCreative
+        this.visibleAll = true
+        this.allLoading = false
+      } else {
+        var params = {}
+        params.accountId = localStorage.getItem('campaignAccountId')
+        params.putStatus = this.allType
+        params.userId = this.userInfo().id
+        params.creativeIds = this.selectedRowKeysValue
+        postAction('/kuaishou/batch/batchUpdateCreativeStatus', params).then((res) => {
+          console.log(res)
+          if (res.success) {
+            this.getDataList(localStorage.getItem('originalityKeyElse'))
+            this.$message.success('批量修改成功')
+            this.allType = '1'
+            this.selectedRowKeysValue = []
+            this.selectedRowKeys = []
+          }
+        })
+      }
+    },
+    onSelectChange(selectedRowKeys, selectionRows) {
+      this.selectedRowKeys = selectedRowKeys
+      this.selectedRowKeysValue = selectionRows.map((item) => {
+        return item.creativeId
+      })
+      //    this.selectedRowKeysValue.length > 0 ? this.selectedRowKeysValue :
+    },
+    onTabChange(key) {
+      this.ipagination.current = 1
+      this.titleKey = key
+      localStorage.setItem('originalityKeyElse', key)
+      this.getDataList(key)
+    },
+    show() {
+      if (!this.showEdit) {
+        this.many = this.manyTwo
+      } else {
+        this.manyTwo = this.many
+      }
+    },
+    editShow(item) {
+      if (!item.edit) {
+        item.money = item.elseMoney
+      } else {
+        item.elseMoney = item.money
+      }
+    },
+    dianji() {
+      if (localStorage.getItem('step')) {
+        this.$message.error('请关闭创建页面后,重新进行创建')
+        return
+      } else {
+        localStorage.setItem('step', 2)
+        var dataJson = JSON.stringify(this.title)
+        console.log(this.title, this.titleKey)
+        localStorage.setItem('pans', dataJson)
+        localStorage.setItem('pansKey', this.titleKey)
+        this.$router.replace({
+          path: '/account/stepForm',
+        })
+      }
+    },
+    searchLabel() {
+      this.ipagination.current = 1
+      // this.getDataList(localStorage.getItem('originalityKey'))
+      if (
+        this.title.filter((item) => {
+          return item.key == this.titleKey + ''
+        })[0].unitType == 7
+      ) {
+        this.columns = columnsCXH
+        this.getCXHList(localStorage.getItem('originalityKeyElse'))
+      } else {
+        this.columns = columns
+        this.getDataList(localStorage.getItem('originalityKeyElse'))
+      }
+    },
+    searchRe() {
+      this.creativeIdTwo = ''
+      this.creativeName = ''
+      if (
+        this.title.filter((item) => {
+          return item.key == this.titleKey + ''
+        })[0].unitType == 7
+      ) {
+        this.columns = columnsCXH
+        this.getCXHList(localStorage.getItem('originalityKeyElse'))
+      } else {
+        this.columns = columns
+        this.getDataList(localStorage.getItem('originalityKeyElse'))
+      }
+    },
+    getDataList(id) {
+      this.loadingList = true
+      this.dataList = []
+      var params = {}
+      params.unitId = id
+      params.accountId = localStorage.getItem('campaignAccountId')
+      params.pageNo = this.ipagination.current
+      params.pageSize = this.ipagination.pageSize
+      params.creativeId = this.creativeIdTwo
+      params.creativeName = this.creativeName
+      getAction('/kuaishou/batch/getCreativeList', params).then((res) => {
+        if (res.code == 0) {
+          this.loadingList = false
+          this.dataList = res.result.records.map((v, index) => {
+            return {
+              ...v,
+              key: index,
+              edit: false,
+              showSwich: v.putStatus == 1 ? true : false,
+            }
+          })
+          this.ipagination.total = res.result.total
+        } else {
+          this.$message.error(res.message)
+          this.loadingList = false
+        }
+      })
+    },
+
+    getCXHList(id) {
+      this.loadingList = true
+      this.dataList = []
+      var params = {}
+      params.unitId = id
+      params.accountId = localStorage.getItem('campaignAccountId')
+      params.pageNo = this.ipagination.current
+      params.pageSize = this.ipagination.pageSize
+      // params.creativeId = this.creativeIdTwo
+      // params.creativeName = this.creativeName
+      getAction('/ctop/kuaishouProgramCreative/list', params).then((res) => {
+        console.log(res)
+        if (res.code == 0) {
+          this.loadingList = false
+          this.dataList = res.result.records.map((v, index) => {
+            return {
+              ...v,
+              key: index,
+              edit: false,
+              showSwich: v.putStatus == 1 ? true : false,
+            }
+          })
+          this.ipagination.total = res.result.total
+        } else {
+          this.$message.error(res.message)
+          this.loadingList = false
+        }
+      })
+    },
+    remove(targetKey) {
+      let activeKey = this.titleKey
+      let lastIndex
+      this.title.forEach((pane, i) => {
+        if (pane.key === targetKey) {
+          lastIndex = i - 1
+        }
+      })
+      const panes = this.title.filter((pane) => pane.key !== targetKey)
+      if (panes.length && activeKey === targetKey) {
+        if (lastIndex >= 0) {
+          activeKey = panes[lastIndex].key
+        } else {
+          activeKey = panes[0].key
+        }
+      }
+      this.title = panes
+      this.titleKey = activeKey
+      if (this.title.length == 0) {
+        this.$bus.$emit('remove', '/batchCreation/creativeList')
+      } else {
+        localStorage.setItem('originalityElse', JSON.stringify(this.title))
+        localStorage.setItem('originalityKeyElse', this.titleKey)
+        this.getDataList(activeKey)
+      }
+    },
+  },
+  watch: {},
+  computed: {},
+  activated() {
+    this.titleKey = localStorage.getItem('originalityKeyElse')
+    this.creativeIdTwo = ''
+    this.creativeName = ''
+    console.log(this.$route.params)
+    this.title = JSON.parse(localStorage.getItem('originalityElse')).map((item) => {
+      return {
+        key: item.unitId ? item.unitId + '' : item.key + '',
+        tab: item.unitName ? '广告组:' + item.unitName : '广告组:' + item.tab,
+        sceneId: item.sceneId,
+        bid_type: item.ocpxActionType,
+        unitType: item.unitType,
+      }
+    })
+    if (
+      this.title.filter((item) => {
+        return item.key == this.titleKey + ''
+      })[0].unitType == 7
+    ) {
+      this.columns = columnsCXH
+      this.getCXHList(localStorage.getItem('originalityKeyElse'))
+    } else {
+      this.columns = columns
+      this.getDataList(localStorage.getItem('originalityKeyElse'))
+    }
+
+    this.data = JSON.parse(localStorage.getItem('originalityElse'))
+  },
+}
+</script>

File diff suppressed because it is too large
+ 1161 - 0
src/views/modules/kuaishouapp/batchCreation/unitList.vue


+ 29 - 16
src/views/modules/onlineTraining/onlineTrainingList.vue

@@ -58,8 +58,14 @@
           <br />
           <p>{{ course.intro }}</p>
         </div>
-        <div id="iframeData" v-show="startList && !showTi" style="height: 800px"></div>
-        <div id="videoPlay" style="height: 800px" v-show="!startList && !showTi"></div>
+        <div id="iframeData" v-show="startList" style="height: 800px"></div>
+        <!-- <div id="videoPlay" style="height: 800px" v-show="!startList && !showTi"></div> -->
+        <video
+          :src="videoSrc"
+          controls="controls"
+          v-if="!startList"
+          style="width: 100%; height: 800px"
+        ></video>
         <iframe :src="showTitle" frameborder="0" v-show="showTi"></iframe>
       </a-card>
     </a-col>
@@ -241,6 +247,7 @@ export default {
   mixins: [JeecgListMixin],
   data() {
     return {
+      videoSrc: '',
       showTitle: null,
       showTi: false,
       typeUpload: '1',
@@ -325,7 +332,7 @@ export default {
       roleName: localStorage.getItem('roleCode'),
       role: '',
       uploadAction: 'http://api.tjyourong.com.cn/jeecg-boot/ctop/wpsFile/uploadFile',
-      loadingElse:false
+      loadingElse: false,
     }
   },
   components: {
@@ -639,14 +646,18 @@ export default {
                 //     videoObject = this.videoObjectNot
                 //   }
                 if (res.result.fileId) {
-                  this.videoObject.video = textDes(
-                    'https://aweme.snssdk.com/aweme/v1/playwm/?video_id=' + res.result.fileId + '&line=0'
-                  )
+                  this.videoSrc = 'https://aweme.snssdk.com/aweme/v1/playwm/?video_id=' + res.result.fileId + '&line=0'
+                  // this.videoObject.video = textDes(
+                  //   'https://aweme.snssdk.com/aweme/v1/playwm/?video_id=' + res.result.fileId + '&line=0'
+                  // )
                 } else {
+                  
                   if (res.result.fileUrl) {
-                    this.videoObject.video = textDes(res.result.fileUrl)
+                    // this.videoObject.video = textDes(res.result.fileUrl)
+                    this.videoSrc = res.result.fileUrl
                   } else {
-                    this.videoObject.video = textDes(res.result.ossFileUrl)
+                    // this.videoObject.video = textDes(res.result.ossFileUrl)
+                    this.videoSrc = res.result.ossFileUrl
                   }
                 }
                 console.log(this.videoObject.video)
@@ -655,14 +666,16 @@ export default {
                 console.log(player)
               } else {
                 this.startList = true
-                getAction('http://www.ljserver.cn:8088/v1/api/file/getViewUrlWebPath', {
-                  fileUrl: decodeURI(res.result.ossFileUrl),
-                }).then((resF) => {
-                  console.log(resF)
-                  let r = resF.data
-                  sessionStorage.wpsUrl = r.wpsUrl
-                  sessionStorage.token = r.token
-                  this.openWps(r.wpsUrl, r.token, res.result.fileType)
+                this.$nextTick(() => {
+                  getAction('http://www.ljserver.cn:8088/v1/api/file/getViewUrlWebPath', {
+                    fileUrl: decodeURI(res.result.ossFileUrl),
+                  }).then((resF) => {
+                    console.log(resF)
+                    let r = resF.data
+                    sessionStorage.wpsUrl = r.wpsUrl
+                    sessionStorage.token = r.token
+                    this.openWps(r.wpsUrl, r.token, res.result.fileType)
+                  })
                 })
               }
             }