Browse Source

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

魏志佳 4 years ago
parent
commit
230cbeb126

+ 1 - 1
public/index.html

@@ -6,7 +6,7 @@
   <meta http-equiv="X-UA-Compatible" content="IE=edge">
   <meta name="referrer" content="never">
   <meta name="viewport" content="width=device-width,initial-scale=1.0">
-  <title>汇创投放助手</title>
+  <title>有腾投放助手</title>
   <link rel="icon" href="<%= BASE_URL %>logo.png">
   <link href="<%= BASE_URL %>color.less">
   <script src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/7.2.5/polyfill.js"></script>

BIN
public/logo.png


BIN
src/assets/logo.png


+ 4 - 5
src/components/layouts/UserLayout.vue

@@ -1,10 +1,10 @@
 <template>
   <div id="userLayout" :class="['user-layout-wrapper', device]">
     <div class="container">
-      <div class="top" style="margin-bottom:15px">
+      <div class="top" style="margin-bottom:30px">
         <div class="header">
           <a href="/">
-            <img src="~@/assets/logo.png" class="logo" alt="logo" style="height: 66px" />
+            <img src="~@/assets/logo.png" class="logo" alt="logo" style="height: 50px" />
             <!--            <span class="title">Jeecg Boot</span>-->
           </a>
         </div>
@@ -21,7 +21,7 @@
           <a href="https://github.com/zhangdaiscott/jeecg-boot" target="_blank">隐私</a>
           <a href="https://github.com/zhangdaiscott/jeecg-boot" target="_blank">条款</a>
         </div>-->
-        <div class="copyright">Copyright &copy; 2019 汇创思拓</div>
+        <div class="copyright">Copyright &copy; 2019 上海有腾</div>
       </div>
     </div>
   </div>
@@ -65,7 +65,7 @@ export default {
     min-height: 100%;
     background: #f0f2f5 url(~@/assets/background.svg) no-repeat 50%;
     background-size: 100%;
-    padding: 110px 0 144px;
+    padding: 160px 0 144px;
     position: relative;
 
     a {
@@ -92,7 +92,6 @@ export default {
         .logo {
           height: 44px;
           vertical-align: top;
-          margin-right: 16px;
           border-style: none;
         }
 

+ 1 - 1
src/components/page/GlobalFooter.vue

@@ -3,7 +3,7 @@
     <div class="copyright">
       Copyright
       <a-icon type="copyright"/>
-      2019 <span>汇创思拓</span>
+      2019 <span>上海有腾</span>
     </div>
   </div>
 </template>

+ 2 - 1
src/mixins/JeecgListMixin.js

@@ -141,12 +141,13 @@ export const JeecgListMixin = {
             // this.ipagination = null;
             this.ipagination.pageSize=res.result.length
           }
-            
+          this.spinning= false
         }
         if (res.code === 510) {
           this.$message.warning(res.message)
         }
         this.loading = false;
+        this.spinning= false
       })
     },
     initDictConfig() {

+ 2 - 2
src/utils/request.js

@@ -13,8 +13,8 @@ if (process.env.NODE_ENV == 'development') {
 else if (process.env.NODE_ENV == 'debug') { 
 } 
 else if (process.env.NODE_ENV == 'production') { 
-    axios.defaults.baseURL = 'http://192.168.1.251/jeecg-boot';
-// axios.defaults.baseURL = 'http://api.tjyourong.com.cn/jeecg-boot';
+    // axios.defaults.baseURL = 'http://192.168.1.251/jeecg-boot';
+axios.defaults.baseURL = 'http://api.tjyourong.com.cn/jeecg-boot';
 }
 const service = axios.create({
 //   baseURL: '/jeecg-boot', // api base_url

+ 4 - 0
src/views/modules/Statistics/accountReport.vue

@@ -105,6 +105,10 @@
                   </span>
                 </a-tooltip>
             </div>
+            <div class="infoNum"> 
+                <span class="red">{{showNumLink.showNum | formatCurrency }}</span> 
+                <span class="green" v-if="dateValue[0].format('YYYY-MM-DD')==dateValue[1].format('YYYY-MM-DD')"><span class="huanbi">环比: </span> {{ showNumLink.showNumLink|toPercentage  }}</span> 
+            </div>
             </div>
         <div class="showBox">
             <div class="title">

+ 164 - 130
src/views/modules/Statistics/components/Treeselect.vue

@@ -1,76 +1,82 @@
 <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"  :default-options="true" :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"
+      :default-options="true"
+      :limitText="
         count => {
           return '隐藏' + count + '条'
         }
-      " noChildrenText="该项目下暂无账号" :noOptionsText="showLoading" />
+      "
+      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: [],
-      showLoading: 'loading...'
-    }),
-    props: {
-      //是否多选
-      multiple: {
-        type: Boolean,
-        default () {
-          return true
-        }
+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'
-        }
+    },
+    //判断媒体类型
+    request: {
+      type: String,
+      default() {
+        return '2,4'
       },
-      //一级请求接口
-      reqUrl: {
-        type: String,
-        default () {
-          return '/ctop/projectMember/participateList'
-        }
-
-      }
     },
-    components: {
-      Treeselect
+    //一级请求接口
+    reqUrl: {
+      type: String,
+      default() {
+        return '/ctop/projectMember/participateListByMediaId'
+      },
     },
-    watch: {
-      $route(n, o) {},
+  },
+  components: {
+    Treeselect,
+  },
+  watch: {
+    $route(n, o) {},
     //   appId: {
     //     handler(n, o) {
     //       console.log(n)
@@ -84,103 +90,131 @@
     //     },
     //     deep: true
     //   }
+  },
+  methods: {
+    ...mapGetters(['nickname', 'avatar', 'userInfo']),
+    update(node, id) {
+      // console.log(node)
+      // 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.')
+      //   }
+      // })
     },
-    methods: {
-      ...mapGetters(['nickname', 'avatar', 'userInfo']),
-      update(node, id) {
-          console.log(node)
-        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 {
+    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
+      var params = {}
+      params.userId = this.userInfo().id
 
-            }
-          } else {
-            new Error('Failed to load options: network error.')
+      if (this.request == '1,3') {
+        params.type = 'bytedance'
+      } else if (this.request == '2,4') {
+        params.type = 'kuaishou'
+      }
+
+      if (this.reqUrl == '/ctop/projectMember/participateListByMediaId') {
+        postAction(this.reqUrl, params).then((res) => {
+          if (res.success) {
+            this.options = res.result.map((item) => {
+              return {
+                id: item.projectId + 'projectId',
+                label: item.projectName + '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0' + item.advertiserName,
+                children: item.accountList
+                  ? item.accountList.map((i) => {
+                      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) +
+                          '\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' +
+                          i.authName,
+                      }
+                    })
+                  : [],
+              }
+            })
           }
         })
-      },
-      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
+      } else {
         getAction(this.reqUrl, {
-          userId: this.userInfo().id
-        }).then(res => {
+          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 => {
+              var data = res.result.filter((item) => {
                 return item.mediaId == arr[0]
               })
               if (arr.length > 1) {
-                dataTwo = res.result.filter(item => {
+                dataTwo = res.result.filter((item) => {
                   return item.mediaId == arr[1]
                 })
               }
               var allData = data.concat(dataTwo)
-              this.options = allData.map(item => {
+              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
+                  label: item.projectName + '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0' + item.advertiserName,
+                  children: null,
                 }
               })
-            }else{
-                this.showLoading = '暂无数据'
+            } else {
+              this.showLoading = '暂无数据'
             }
-
           }
         })
       }
     },
+  },
 
-    mounted() {
-      this.getParticipateList()
-    }
-  }
+  mounted() {
+    this.getParticipateList()
+  },
+}
 </script>

+ 1 - 4
src/views/modules/Statistics/components/lifting.vue

@@ -11,13 +11,10 @@
   padding: 5px 10px;
   cursor: pointer;
 }
-p{
-  margin-bottom: 0px;
-}
 </style>
 <style>
 .data-display-statistics{
-  margin: 12px 0;
+  margin: 10px 0;
 }
 .data-display-statistics .ant-card-body {
   display: flex;

+ 19 - 17
src/views/modules/material/videoMaterial.vue

@@ -691,7 +691,7 @@ a {
               alt
               v-if="!loading"
             />
-            <div v-else ></div>
+            <div v-else></div>
           </div>
         </a-spin>
       </a-tab-pane>
@@ -2880,6 +2880,7 @@ export default {
         bmf.md5(file, (err, md5) => {
           that.urlList.name = file.name
           that.urlList.md5 = md5
+          resolve()
           fileCheck({
             code: md5,
             projectId: that.getData('projectId'),
@@ -2910,22 +2911,23 @@ export default {
       }
       return new Promise(function (resolve, reject) {
         bmf.md5(file, (err, md5) => {
-          fileCheckImage({
-            code: md5,
-            projectId: that.getData('projectId'),
-            videoId: codeData,
-          }).then((res) => {
-            if (res.code == 0) {
-              that.$message.error('此素材已经上传')
-              reject()
-            } else {
-              that.urlListImage.name.push(file.name)
-              that.urlListImage.md5.push(md5)
-              that.urlListImage.size.push(file.size)
-              resolve()
-              //   reject()
-            }
-          })
+          that.urlListImage.name.push(file.name)
+          that.urlListImage.md5.push(md5)
+          that.urlListImage.size.push(file.size)
+          resolve()
+          // fileCheckImage({
+          //   code: md5,
+          //   projectId: that.getData('projectId'),
+          //   videoId: codeData,
+          // }).then((res) => {
+          //   if (res.code == 0) {
+          //     that.$message.error('此素材已经上传')
+          //     reject()
+          //   } else {
+
+          //     //   reject()
+          //   }
+          // })
         })
       })
     },

+ 1 - 1
src/views/user/Login.vue

@@ -10,7 +10,7 @@
         @change="handleTabClick">
         <a-tab-pane key="tab1" tab="企业微信扫码登录">
           <a-form-item>
-            <div id="wx_reg" style="display:flex;justify-content: center;"></div>
+            <div id="wx_reg" style="display:flex;justify-content: center;margin-top:15px"></div>
             <div style="display:flex;justify-content: center;color:red;font-size:16px;">
               需先用企业微信开通过账号,方可使用企业微信登录
             </div>