朱鑫波 преди 4 години
родител
ревизия
0dccfddc7f

+ 66 - 49
src/views/modules/Statistics/components/Treeselect.vue

@@ -19,7 +19,7 @@
       :limit="2"
       :default-options="true"
       :limitText="
-        count => {
+        (count) => {
           return '隐藏' + count + '条'
         }
       "
@@ -50,6 +50,12 @@ export default {
     showLoading: 'loading...',
   }),
   props: {
+    oneData: {
+      type: Boolean,
+      default() {
+        return false
+      },
+    },
     //是否多选
     multiple: {
       type: Boolean,
@@ -58,7 +64,6 @@ export default {
       },
     },
     appId: {
-      
       default() {
         return ''
       },
@@ -83,21 +88,21 @@ export default {
   },
   watch: {
     $route(n, o) {},
-      appId: {
-        handler(n, o) {
-          console.log(n)
-          if (n.length == 0) {
-            if (this.multiple) {
-              this.value = []
-            } else {
-              this.value = undefined
-            }
-          }else{
-            this.value=this.appId
+    appId: {
+      handler(n, o) {
+        console.log(n)
+        if (n.length == 0) {
+          if (this.multiple) {
+            this.value = []
+          } else {
+            this.value = undefined
           }
-        },
-        deep: true
-      }
+        } else {
+          this.value = this.appId
+        }
+      },
+      deep: true,
+    },
   },
   methods: {
     ...mapGetters(['nickname', 'avatar', 'userInfo']),
@@ -165,7 +170,7 @@ export default {
       }
 
       if (this.reqUrl == '/ctop/projectMember/participateListByMediaId') {
-        if(this.options.length>0){
+        if (this.options.length > 0) {
           return
         }
         postAction(this.reqUrl, params).then((res) => {
@@ -179,7 +184,11 @@ export default {
                       return {
                         id: i.accountId,
                         label:
-                          (i.userName.length==2?i.userName+'\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0':i.userName.length==3?i.userName+'\xa0\xa0\xa0\xa0':i.userName) +
+                          (i.userName.length == 2
+                            ? i.userName + '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0'
+                            : i.userName.length == 3
+                            ? i.userName + '\xa0\xa0\xa0\xa0'
+                            : i.userName) +
                           '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0' +
                           i.accountId +
                           '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0' +
@@ -189,40 +198,48 @@ export default {
                   : [],
               }
             })
+            if (this.oneData) {
+              var data = this.options.map((item) => {
+                if (item.children.length > 0) {
+                  return { ...item }
+                }
+              })
+              this.$emit('update:appId', data[0].children[0].id)
+            }
           }
         })
-      } else if(this.reqUrl == '/ctop/projectMember/getProjectAccountByUserId'){
-          getAction(this.reqUrl, {
-            mediaType: this.request,
-          }).then((res) => {
-            if (res.code == 0) {
-              if (res.result.length > 0) {
-                res.result.forEach((element,index) => {
-                  if(element){                  
-                      this.options.push({});                    
-                      this.options[index].label=element.project.projectName +'_('+ element.project.advertiserName +')';
-                      this.options[index].id='project'+element.project.projectId;
-                      this.options[index].key=element.project.projectId;
-                      this.options[index].mediaId=element.project.mediaId;
-                      this.options[index].children=[];
-                                          
-                      if(element.account.length){
-                        element.account.forEach((ele,i)=>{
-                            this.options[index].children.push({});
-                            this.options[index].children[i].label=ele.userName+'_'+ele.authName+'_'+element.project.projectName;
-                            this.options[index].children[i].id=ele.accountId;
-                            this.options[index].children[i].key=ele.accountId;
-                        })
-                          
-                      }                           
-                  }      
-                });
-              } else {
-                this.showLoading = '暂无数据'
-              }
+      } else if (this.reqUrl == '/ctop/projectMember/getProjectAccountByUserId') {
+        getAction(this.reqUrl, {
+          mediaType: this.request,
+        }).then((res) => {
+          if (res.code == 0) {
+            if (res.result.length > 0) {
+              res.result.forEach((element, index) => {
+                if (element) {
+                  this.options.push({})
+                  this.options[index].label = element.project.projectName + '_(' + element.project.advertiserName + ')'
+                  this.options[index].id = 'project' + element.project.projectId
+                  this.options[index].key = element.project.projectId
+                  this.options[index].mediaId = element.project.mediaId
+                  this.options[index].children = []
+
+                  if (element.account.length) {
+                    element.account.forEach((ele, i) => {
+                      this.options[index].children.push({})
+                      this.options[index].children[i].label =
+                        ele.userName + '_' + ele.authName + '_' + element.project.projectName
+                      this.options[index].children[i].id = ele.accountId
+                      this.options[index].children[i].key = ele.accountId
+                    })
+                  }
+                }
+              })
+            } else {
+              this.showLoading = '暂无数据'
             }
-          })
-      }else {
+          }
+        })
+      } else {
         getAction(this.reqUrl, {
           userId: this.userInfo().id,
         }).then((res) => {

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

@@ -133,7 +133,7 @@
           <!-- {{ text | ocpxActionType }} -->
         </span>
         <span slot="bidType" slot-scope="text">
-          <div v-if="text">
+          <div v-if="text&&JSON.parse(text).length>0">
             <span v-for="(item, index) of JSON.parse(text)" :key="index"
               >{{ item | bidType }}{{ index == JSON.parse(text).length - 1 ? '' : ',' }}</span
             >

+ 2 - 2
src/views/modules/advertiser/modules/projectListModal.vue

@@ -329,8 +329,8 @@ export default {
       //       }
       if (record.mediaId == '2' || record.mediaId == '4') {
         var params = { ...record }
-        params.bidType = (record.bidType == null||record.bidType == '') ? [2] : JSON.parse(record.bidType)
-        params.ocpxActionType = (record.ocpxActionType == null||record.ocpxActionType == '') ? [2] : JSON.parse(record.ocpxActionType)
+        params.bidType = (record.bidType == null||record.bidType == '') ? [] : JSON.parse(record.bidType)
+        params.ocpxActionType = (record.ocpxActionType == null||record.ocpxActionType == '') ? [] : JSON.parse(record.ocpxActionType)
         this.showDian = true
       } else {
         var { ocpxActionType, bidType, ...params } = record

Файловите разлики са ограничени, защото са твърде много
+ 887 - 804
src/views/modules/kuaishouapp/account/accountIndex.vue


Файловите разлики са ограничени, защото са твърде много
+ 1214 - 0
src/views/modules/kuaishouapp/account/copyAllUnit.vue


+ 89 - 55
src/views/modules/kuaishouapp/batchCreation/campaignList.vue

@@ -106,6 +106,18 @@
           :pagination="ipagination"
           @change="sort"
         >
+          <span slot="actionTwo" slot-scope="text, record">
+            <a-popconfirm @confirm="getInfo(record, 'allUnit')">
+              <div slot="title">
+                <div>
+                  计划名称:
+                  <a-input placeholder="请输入" v-model="refuseReason" style="display: inline-block; width: 500px" />
+                </div>
+              </div>
+              <!-- <a-button slot="okText" type="primary" :disabled="refuseReason == ''">确定</a-button> -->
+              <a @click="setData(record)">复制此计划下所有组</a>
+            </a-popconfirm>
+          </span>
           <template slot="campaignName" slot-scope="text, record">
             <div style="display: flex; justify-content: center">
               <a @click="toDetail(record)" class="count" v-show="!record.editName">{{ text }}</a>
@@ -193,51 +205,22 @@
       </template>
     </a-modal>
 
-    <!-- 实时数据 -->
-    <a-modal v-model="realTimeVisiable" title="广告计划实时数据" @afterClose="clear" width="80%" :maskClosable="false">
-      <div class="optBody">
-        <a-range-picker
-          :disabled-date="disabledDate"
-          format="YYYY-MM-DD"
-          style="width: 250px"
-          @change="dateValueChange"
-          v-model="dateValue"
-        />
-      </div>
-      <div class="tableBox" style="margin-top: 20px; min-height: 400px">
-        <a-table
-          size="middle"
-          :columns="realTimeColumn"
-          :dataSource="realTimeData"
-          bordered
-          :pagination="false"
-          :scroll="{ x: scrollX }"
-          :loading="realTimeLoading"
-          ref="accountTable"
-          style="word-break: break-all"
-        >
-          <span slot="ctr" slot-scope="text">{{ text | toPercentage }}</span>
-          <span slot="action_ratio" slot-scope="text">{{ text | toPercentage }}</span>
-          <span slot="photo_click_ratio" slot-scope="text">{{ text | toPercentage }}</span>
-
-          <span slot="charge" slot-scope="text">{{ text | decimalsHandle }}</span>
-          <span slot="activationCost" slot-scope="text, records">{{
-            (records.activation / records.charge) | decimalsHandle
-          }}</span>
-          <span slot="event_register_cost" slot-scope="text">{{ text | decimalsHandle }}</span>
-          <span slot="form_cost" slot-scope="text">{{ text | decimalsHandle }}</span>
-          <span slot="event_order_paid_cost" slot-scope="text">{{ text | decimalsHandle }}</span>
+    <a-modal v-model="allUnitCopy" title="复制计划下所有组" width="80%" :maskClosable="false">
+      <a-form-item
+        label="是否修改定向与出价"
+        :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
+        :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }"
+      >
+        <a-radio-group buttonStyle="solid" v-model="editUnit" @change="editUnitType">
+          <a-radio-button value="1">是</a-radio-button>
+          <a-radio-button value="2">否</a-radio-button>
+        </a-radio-group>
+      </a-form-item>
 
-          <span slot="show" slot-scope="text">{{ text | formatCurrency }}</span>
-          <span slot="photo_click" slot-scope="text">{{ text | formatCurrency }}</span>
-          <span slot="aclick" slot-scope="text">{{ text | formatCurrency }}</span>
-          <span slot="bclick" slot-scope="text">{{ text | formatCurrency }}</span>
-          <span slot="activation" slot-scope="text">{{ text | formatCurrency }}</span>
-          <span slot="event_register" slot-scope="text">{{ text | formatCurrency }}</span>
-          <span slot="form_count" slot-scope="text">{{ text | formatCurrency }}</span>
-          <span slot="event_order_paid" slot-scope="text">{{ text | formatCurrency }}</span>
-        </a-table>
-      </div>
+      <copyAllUnit ref="copyAllUnit" v-show="editUnit == '1'" @getUnitData="getUnitData" />
+      <template slot="footer">
+        <a-button key="submit" type="primary" @click="handleEditAllUnit"> 确定 </a-button>
+      </template>
     </a-modal>
   </div>
 </template>
@@ -252,7 +235,7 @@ import { deleteAction, getAction, postAction } from '@/api/manage'
 
 import Treeselect from '@/views/modules/Statistics/components/Treeselect.vue'
 
-//   import copyGroup from './copyGroup'
+import copyAllUnit from '../account/copyAllUnit'
 
 var columns = [
   {
@@ -265,6 +248,16 @@ var columns = [
       customRender: 'campaignName',
     },
   },
+  // {
+  //   title: '操作',
+  //   align: 'center',
+  //   dataIndex: 'actionTwo',
+  //   fixed: 'left',
+  //   width: 200,
+  //   scopedSlots: {
+  //     customRender: 'actionTwo',
+  //   },
+  // },
   {
     title: '计划单日预算金额',
     align: 'center',
@@ -461,6 +454,7 @@ export default {
     ARow,
     countTo,
     Treeselect,
+    copyAllUnit,
     //   copyGroup
   },
   data: function () {
@@ -550,6 +544,12 @@ export default {
       campaignBudget: 'UNLIMITED',
       unitId: '',
       campaignId: '',
+      editUnit: '2',
+      allUnitCopy: false,
+      oldCampaignId: '',
+      oldCampaignName: '',
+      newCampaignId: '',
+      campaignType: '',
     }
   },
   filters: {
@@ -669,6 +669,41 @@ export default {
     },
   },
   methods: {
+    getUnitData() {
+      this.addUser()
+      this.allUnitCopy = false
+      this.editUnit = '2'
+    },
+    handleEditAllUnit(e) {
+      if (this.editUnit == '1') {
+        this.$refs.copyAllUnit.handleSubmit(e)
+      } else {
+        postAction('/kuaishouCampaignCopyData/add', {
+          accountId: this.appId,
+          oldCampaignId: this.oldCampaignId,
+          oldCampaignName: this.oldCampaignName,
+          newCampaignId: this.newCampaignId,
+        }).then((res) => {
+          if (res.success) {
+            this.addUser()
+            this.allUnitCopy = false
+          }
+        })
+      }
+    },
+    editUnitType() {
+      if (this.editUnit == '2') {
+      } else {
+        var params = {
+          accountId: this.appId,
+          oldCampaignId: this.oldCampaignId,
+          oldCampaignName: this.oldCampaignName,
+          newCampaignId: this.newCampaignId,
+          campaignType: this.campaignType,
+        }
+        this.$refs.copyAllUnit.handleOk(params)
+      }
+    },
     disabledDate(current) {
       // console.log(current)
       return (current && current > moment()) || (current && current < moment().subtract(7, 'days'))
@@ -777,7 +812,8 @@ export default {
       d = d < 10 ? '0' + d : d
       this.refuseReason = item.campaignName + '-' + y + '/' + MM + '/' + d
     },
-    getInfo(item) {
+    getInfo(item, type) {
+      this.editUnit == '2'
       if (this.refuseReason == '') {
         this.$message.error('请输入计划名称')
         return
@@ -790,15 +826,13 @@ export default {
         params.accountId = this.appId + ''
         postAction('/kuaishou/batch/campaignCreate', params).then((res) => {
           if (res.success) {
-            this.jihua = true
-            this.loadingGroup = false
-            this.refuseReason = ''
-            this.unitId = ''
-            // 7156834
-            this.planId = res.result
-            this.campaignId = item.campaignId
-            this.getDataList(item.campaignId)
-            this.addUser()
+            if (type) {
+              this.allUnitCopy = true
+              this.oldCampaignId = item.campaignId
+              this.oldCampaignName = item.campaignName
+              this.newCampaignId = res.result
+              this.campaignType = item.campaignType
+            }
           } else {
             this.$message.error(res.message)
           }

Файловите разлики са ограничени, защото са твърде много
+ 1278 - 0
src/views/modules/kuaishouapp/populationAnalysis/index.vue


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

@@ -885,7 +885,7 @@ a {
             :value.sync="urlList.url"
             @overUpload="overUpload"
             @removeUpload="removeUpload"
-            :fileCount="10"
+            :fileCount="1"
             uploadType="video"
             :multiple="false"
           />

+ 2 - 2
vue.config.js

@@ -76,8 +76,8 @@ module.exports = {
         // target: 'http://192.168.1.43:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.1.43:8888', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.0.252:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
-        // target: 'http://192.168.1.219:8080', //请求本地 需要jeecg-boot后台项目  赵西安
-         target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
+        target: 'http://192.168.1.219:8080', //请求本地 需要jeecg-boot后台项目  赵西安
+        //  target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
         // target: 'https://trac.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
         // target: 'http://39.106.184.70:8088/', //请求本地 需要jeecg-boot后台项目
         //  target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目