Browse Source

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

魏志佳 5 years ago
parent
commit
71c5dd47f9

+ 2 - 2
src/components/ctop/vm-card.vue

@@ -12,9 +12,9 @@
 /* .ping-list:hover span {
   display: block;
 } */
-.ant-modal-body {
+/* .ant-modal-body {
   padding-top: 0px;
-}
+} */
 li {
   list-style-type: none;
 }

+ 26 - 5
src/views/dashboard/Analysis.vue

@@ -7,7 +7,7 @@
       width: 500px;
       /* height: 600px; */
       position: relative;
-      
+      padding-top:10px;
     }
     .Updatecontent{
           padding: 0 20px 40px;
@@ -18,6 +18,7 @@
         font-weight: 500;
         color: #1890ff;
         margin-bottom: 20px;
+        /* margin-top: 20px; */
       }
     .Updatetime{
       font-size: 16px;
@@ -224,15 +225,15 @@
                  <span class="updateSpan">{{updateTime[0]}}</span>
             </div>
             <div class="updateText">
-              <div class="updateBox">
+              <!-- <div class="updateBox">
                 <h3 class="textTitle">1.脚本素材功能迭代</h3>
                 <ul class="updatelist">
                   <li>可使用在线编辑并自动保存</li>
                   <li>支持项目筛选、文件上传</li>
                 </ul>
-              </div>
+              </div> -->
               <div class="updateBox">
-                <h3 class="textTitle">2.头条-账户报表上线通知</h3>
+                <h3 class="textTitle">1.头条-账户报表上线通知</h3>
                 <ul class="updatelist">
                   <li>点击“统计报表-头条报表-账户报表”查看模块</li>
                   <li>可根据项目账户筛选查看数据,支持时间筛选</li>
@@ -240,11 +241,31 @@
                 </ul>
               </div>
               <div class="updateBox">
-                <h3 class="textTitle">3.快手批量工具更新</h3>
+                <h3 class="textTitle">2.快手批量工具更新</h3>
                 <ul>
                   <li>在创建创意模块加了时间维度筛选</li>
                 </ul>
               </div>
+              <div class="updateBox">
+                <h3 class="textTitle">3.视频报表修改</h3>
+                <ul>
+                  <li>添加了视频上传时间字段</li>
+                </ul>
+              </div>
+               <div class="updateBox">
+                <h3 class="textTitle">4.修复系统bug</h3>
+                <!-- <ul>
+                  <li>在创建创意模块加了时间维度筛选</li>
+                </ul> -->
+              </div>
+              <div class="updateBox">
+                <h3 class="textTitle">5.更新公告上线</h3>
+                <!-- <ul>
+                  <li>在创建创意模块加了时间维度筛选</li>
+                </ul> -->
+              </div>
+
+
                 
             </div>
         </div>

+ 149 - 137
src/views/modules/Statistics/components/Treeselect.vue

@@ -1,173 +1,185 @@
 <style lang="scss" scoped>
-.select-project {
-  width: 50%;
-}
+  .select-project {
+    width: 50%;
+  }
 </style>
 <template>
   <div class="select-project">
-    <treeselect
-      :multiple="multiple"
-      :disable-branch-nodes="!multiple"
-      :options="options"
-      :load-options="loadOptions"
-      placeholder="请选择项目以及账户"
-      v-model="value"
-      :value-consists-of="valueConsistsOf"
-      :auto-load-root-options="false"
-      @select="update"
-      @input="emitValue"
-
-      :limit="2"
-      :limitText="
+    <treeselect :multiple="multiple" :disable-branch-nodes="!multiple" :options="options" :load-options="loadOptions"
+      placeholder="请选择项目以及账户" v-model="value" :value-consists-of="valueConsistsOf" :auto-load-root-options="false"
+      @select="update" @input="emitValue" :limit="2" :limitText="
         count => {
           return '隐藏' + count + '条'
         }
-      "
-      noChildrenText="该项目下暂无账号"
-      noOptionsText="loading..."
-    />
+      " noChildrenText="该项目下暂无账号" :noOptionsText="showLoading" />
   </div>
 </template>
 
 <script>
-//   @open="getParticipateList"
-// import the component
-import Treeselect from '@riophae/vue-treeselect'
-// import the styles
-import '@riophae/vue-treeselect/dist/vue-treeselect.css'
-import { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
+  //   @open="getParticipateList"
+  // import the component
+  import Treeselect from '@riophae/vue-treeselect'
+  // import the styles
+  import '@riophae/vue-treeselect/dist/vue-treeselect.css'
+  import {
+    LOAD_CHILDREN_OPTIONS
+  } from '@riophae/vue-treeselect'
 
-import { getAction, postAction } from '@/api/manage'
-import { mapGetters } from 'vuex'
-// We just use `setTimeout()` here to simulate an async operation
-// instead of requesting a real API server for demo purpose.
-let called = false
-export default {
-  data: () => ({
-    value: null,
-    valueConsistsOf: 'LEAF_PRIORITY',
-    options: []
-  }),
-  props: {
-    //是否多选
-    multiple: {
-      type: Boolean,
-      default() {
-        return true
-      }
-    },
-    //判断媒体类型
-    request: {
-      type: String,
-      default() {
-        return '2,4'
-      }
-    },
-    //一级请求接口
-    reqUrl: {
+  import {
+    getAction,
+    postAction
+  } from '@/api/manage'
+  import {
+    mapGetters
+  } from 'vuex'
+  // We just use `setTimeout()` here to simulate an async operation
+  // instead of requesting a real API server for demo purpose.
+  let called = false
+  export default {
+    data: () => ({
+      value: null,
+      valueConsistsOf: 'LEAF_PRIORITY',
+      options: [],
+      showLoading: 'loading...'
+    }),
+    props: {
+      //是否多选
+      multiple: {
+        type: Boolean,
+        default () {
+          return true
+        }
+      },
+      //判断媒体类型
+      request: {
+        type: String,
+        default () {
+          return '2,4'
+        }
+      },
+      //一级请求接口
+      reqUrl: {
         type: String,
         default () {
           return '/ctop/projectMember/participateList'
         }
 
       }
-  },
-  components: { Treeselect },
-  watch: {
-    $route(n, o) {},
-    appId: {
-      handler(n, o) {
-        // console.log(n)
-        if (n.length == 0) {
-          if (this.multiple) {
-            this.value = []
-          } else {
-            this.value = ''
-          }
-        }
-      },
-      deep: true
-    }
-  },
-  methods: {
-    ...mapGetters(['nickname', 'avatar', 'userInfo']),
-    update(node, id) {
-      getAction('/ctop/userAllocation/getAccountListByProjectId', { projectId: node.id }).then(res => {
-        // console.log(res)
-        if (res.code == 0) {
-          if (res.result.length > 0) {
-            node.children = res.result.map(item => {
-              return {
-                id: item.accountId,
-                label: item.userName + '         ' + item.authName
-              }
-            })
-          } else {
-              
-          }
-        } else {
-          new Error('Failed to load options: network error.')
-        }
-      })
     },
-    emitValue() {
-      this.$emit('update:appId', this.value)
+    components: {
+      Treeselect
+    },
+    watch: {
+      $route(n, o) {},
+      appId: {
+        handler(n, o) {
+          // console.log(n)
+          if (n.length == 0) {
+            if (this.multiple) {
+              this.value = []
+            } else {
+              this.value = ''
+            }
+          }
+        },
+        deep: true
+      }
     },
-    loadOptions({ action, parentNode, callback }) {
-      // Typically, do the AJAX stuff here.
-      // Once the server has responded,
-      // assign children options to the parent node & call the callback.
-      if (action === LOAD_CHILDREN_OPTIONS) {
-        getAction('/ctop/userAllocation/getAccountListByProjectId', { projectId: parentNode.id }).then(res => {
+    methods: {
+      ...mapGetters(['nickname', 'avatar', 'userInfo']),
+      update(node, id) {
+        getAction('/ctop/userAllocation/getAccountListByProjectId', {
+          projectId: node.id
+        }).then(res => {
+          // console.log(res)
           if (res.code == 0) {
             if (res.result.length > 0) {
-              parentNode.children = res.result.map(item => {
+              node.children = res.result.map(item => {
                 return {
                   id: item.accountId,
-                  label: item.userName + '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0' + item.authName
+                  label: item.userName + '         ' + item.authName
                 }
               })
-              callback()
             } else {
-              parentNode.children = []
-              callback()
+
             }
           } else {
-            callback(new Error('Failed to load options: network error.'))
+            new Error('Failed to load options: network error.')
           }
         })
-      }
-    },
-    getParticipateList() {
-      //我参与的
-      //   toutiaoParticipateList
-      getAction(this.reqUrl, { userId: this.userInfo().id }).then(res => {
-        if (res.code == 0) {
-          var arr = this.request.split(',')
-          var dataTwo  = []
-          var data = res.result.filter(item => {
-                 return item.mediaId == arr[0]
-          })
-          if(arr.length>1){
-            dataTwo = res.result.filter(item => {
-                return item.mediaId == arr[1]
-            })
-          }
-          var allData = data.concat(dataTwo)
-          this.options = allData.map(item => {
-            return {
-              id: item.projectId,
-              label: item.projectName + '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0' + item.advertiserName,
-              children: null
+      },
+      emitValue() {
+        this.$emit('update:appId', this.value)
+      },
+      loadOptions({
+        action,
+        parentNode,
+        callback
+      }) {
+        // Typically, do the AJAX stuff here.
+        // Once the server has responded,
+        // assign children options to the parent node & call the callback.
+        if (action === LOAD_CHILDREN_OPTIONS) {
+          getAction('/ctop/userAllocation/getAccountListByProjectId', {
+            projectId: parentNode.id
+          }).then(res => {
+            if (res.code == 0) {
+              if (res.result.length > 0) {
+                parentNode.children = res.result.map(item => {
+                  return {
+                    id: item.accountId,
+                    label: item.userName + '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0' + item.authName
+                  }
+                })
+                callback()
+              } else {
+                parentNode.children = []
+                callback()
+              }
+            } else {
+              callback(new Error('Failed to load options: network error.'))
             }
           })
         }
-      })
-    }
-  },
+      },
+      getParticipateList() {
+        //我参与的
+        //   toutiaoParticipateList
+        getAction(this.reqUrl, {
+          userId: this.userInfo().id
+        }).then(res => {
+          if (res.code == 0) {
+            if (res.result.length > 0) {
+              var arr = this.request.split(',')
+              var dataTwo = []
+              var data = res.result.filter(item => {
+                return item.mediaId == arr[0]
+              })
+              if (arr.length > 1) {
+                dataTwo = res.result.filter(item => {
+                  return item.mediaId == arr[1]
+                })
+              }
+              var allData = data.concat(dataTwo)
+              this.options = allData.map(item => {
+                return {
+                  id: item.projectId,
+                  label: item.projectName + '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0' + item
+                    .advertiserName,
+                  children: null
+                }
+              })
+            }else{
+                this.showLoading = '暂无数据'
+            }
 
-  mounted() {
-    this.getParticipateList()
+          }
+        })
+      }
+    },
+
+    mounted() {
+      this.getParticipateList()
+    }
   }
-}
-</script>
+</script>

+ 32 - 1
src/views/modules/Statistics/components/customColumn.vue

@@ -22,12 +22,17 @@
           <p>已选{{mylistNum.length}}列</p>
           <a-button id="btn" type="link" @click="clearAllList">清空全部</a-button>
           <ul class="selectlist">
+                <!-- draggable="true"
+                  @dragstart="handleDragStart($event, item.dataIndex)"
+                  @dragover.prevent="handleDragOver($event, item.dataIndex)"
+                  @dragenter="handleDragEnter($event, item.dataIndex)"
+                  @dragend="handleDragEnd($event, item.dataIndex)" -->
             <li v-for="(item,index) in mylistNum" :key="index">
               <span v-if=" index < fiexColumn.length">
                 <a-icon type="lock" />
                 <span class="listText">{{item.title}}</span>
               </span>
-              <span v-else-if=" index >=fiexColumn.length">
+              <span v-else-if=" index >=fiexColumn.length"  >
                 <a-icon type="menu" style="color:#ccc" />
                 <span class="listText">{{item.title}}</span>
                 <a-icon
@@ -55,6 +60,8 @@ export default {
 
   data() {
     return {
+      dragging: null,
+      dataKey: 0,
       visibleOk: false,
       mylistNum: [],
       loading: false
@@ -74,6 +81,30 @@ export default {
     }
   },
   methods: {
+    handleDragStart(e, item) {
+      this.dragging = item
+    },
+    handleDragEnd(e, item) {
+      this.dragging = null
+    },
+    //首先把div变成可以放置的元素,即重写dragenter/dragover
+    handleDragOver(e) {
+      e.dataTransfer.dropEffect = 'move' // e.dataTransfer.dropEffect="move";//在dragenter中针对放置目标来设置!
+    },
+    handleDragEnter(e, item) {
+      e.dataTransfer.effectAllowed = 'move' //为需要移动的元素设置dragstart事件
+      if (item === this.dragging) {
+        return
+      }
+      const newItems = [...this.mylistNum]
+      console.log(newItems)
+      const src = newItems.findIndex(v => v.dataIndex === this.dragging)
+      const dst = newItems.findIndex(v => v.dataIndex === item)
+
+      newItems.splice(dst, 0, ...newItems.splice(src, 1))
+
+      this.mylistNum = newItems
+    },
     //弹出框确定
     handleOk(e) {
       this.loading = false

+ 5 - 20
src/views/modules/Statistics/dataDisplayStatistics.vue

@@ -863,7 +863,7 @@ export default {
                   : res.result.now.activationPrice
                   ? (res.result.now.activationPrice / this.discount).toFixed(2)
                   : 0,
-                formCount: res.result.now.formCount > 0 ? res.result.now.formCount : res.result.now.activationCount,
+                formCount: res.result.now.conversionNum,
                 eventRegister: res.result.now.eventRegister,
                 eventRegisterCost: res.result.now.eventRegisterCost.toFixed(2)
               }
@@ -888,10 +888,7 @@ export default {
                   : res.result.yesterday.activationPrice
                   ? (res.result.yesterday.activationPrice / this.discount).toFixed(2)
                   : 0,
-                formCount:
-                  res.result.yesterday.formCount > 0
-                    ? res.result.yesterday.formCount
-                    : res.result.yesterday.activationCount,
+                formCount:res.result.yesterday.conversionNum,
                 eventRegister: res.result.yesterday.eventRegister,
                 eventRegisterCost: res.result.yesterday.eventRegisterCost.toFixed(2)
               }
@@ -907,21 +904,9 @@ export default {
                 cvr: (res.result.chainRatio.cvrProportion * 100).toFixed(2) + '%',
                 cpm: (res.result.chainRatio.cpmProportion * 100).toFixed(2) + '%',
                 bClick: (res.result.chainRatio.bClickProportion * 100).toFixed(2) + '%',
-                formCount: res.result.chainRatio.formCountProportion
-                  ? (res.result.chainRatio.formCountProportion * 100).toFixed(2) + '%'
-                  : res.result.chainRatio.activationCountProportion
-                  ? (res.result.chainRatio.activationCountProportion * 100).toFixed(2) + '%'
-                  : 0.0 + '%',
-                beforeFormPrice: res.result.chainRatio.beforeFormPriceProportion
-                  ? (res.result.chainRatio.beforeFormPriceProportion * 100).toFixed(2) + '%'
-                  : res.result.chainRatio.beforeActivationPriceProportion
-                  ? (res.result.chainRatio.beforeActivationPriceProportion * 100).toFixed(2) + '%'
-                  : 0.0 + '%',
-                afterFormPrice: res.result.chainRatio.afterFormPriceProportion
-                  ? (res.result.chainRatio.afterFormPriceProportion * 100).toFixed(2) + '%'
-                  : res.result.chainRatio.afterActivationPriceProportion
-                  ? (res.result.chainRatio.afterActivationPriceProportion * 100).toFixed(2) + '%'
-                  : 0 + '%',
+                formCount: (res.result.chainRatio.nowConversionNumProportion* 100).toFixed(2) + '%',
+                beforeFormPrice: (res.result.chainRatio.beforeConversionPriceProportion*100).toFixed(2) + '%',
+                afterFormPrice: (res.result.chainRatio.afterConversionPriceProportion*100).toFixed(2) + '%',
                 costY: (res.result.chainRatio.costProportion * 100).toFixed(2) + '%',
                 eventRegister: (res.result.chainRatio.eventRegisterProportion * 100).toFixed(2) + '%',
                 eventRegisterCost: (res.result.chainRatio.eventRegisterCostProportion * 100).toFixed(2) + '%',

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

@@ -275,7 +275,7 @@
     <a-modal title="选择素材" v-model="visibleMatemal" @ok="handleOkShow" :width="1000">
       <a-tabs type="card" @change="callback" v-model="active" class="check-video">
         <a-tab-pane :tab="item.label" v-for="item of tab" :key="item.value">
-          <a-range-picker name="buildTime" style="width: 400px;margin:10px 0" v-model="time" />
+          <a-range-picker name="buildTime" style="width: 400px;margin:10px 0" v-model="time" v-if="active==0"/>
           <ul v-if="dataSource.length>0" style="overflow:auto;padding-left:0">
             <a-checkbox-group v-model="checkVideo" @change="onChangeVideo">
               <li v-for="(item,index) of dataSource" :key="index" class="chouzhen">

+ 1 - 1
vue.config.js

@@ -65,7 +65,7 @@ module.exports = {
        },*/
       '/jeecg-boot': {
         // target: 'http://39.97.120.42:8080', //请求本地 需要jeecg-boot后台项目  生产环境
-        // target: 'http://192.168.1.13:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
+        target: 'http://192.168.1.23:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
         // target: 'http://192.168.1.22:8080', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.0.111:8080', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.1.103:8080', //请求本地 需要jeecg-boot后台项目