LIDEXI 4 лет назад
Родитель
Сommit
055771ea0e

+ 54 - 0
package-lock.json

@@ -2996,6 +2996,16 @@
       "dev": true,
       "optional": true
     },
+    "clipboard": {
+      "version": "2.0.8",
+      "resolved": "https://registry.npm.taobao.org/clipboard/download/clipboard-2.0.8.tgz?cache=0&sync_timestamp=1615409953598&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fclipboard%2Fdownload%2Fclipboard-2.0.8.tgz",
+      "integrity": "sha1-/8bBA90pZ6gwBfP2GXaqRlWkzbo=",
+      "requires": {
+        "good-listener": "^1.2.2",
+        "select": "^1.1.2",
+        "tiny-emitter": "^2.0.0"
+      }
+    },
     "clipboardy": {
       "version": "2.3.0",
       "resolved": "https://registry.npm.taobao.org/clipboardy/download/clipboardy-2.3.0.tgz",
@@ -4153,6 +4163,11 @@
       "resolved": "https://registry.npm.taobao.org/delayed-stream/download/delayed-stream-1.0.0.tgz",
       "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
     },
+    "delegate": {
+      "version": "3.2.0",
+      "resolved": "https://registry.npm.taobao.org/delegate/download/delegate-3.2.0.tgz",
+      "integrity": "sha1-tmtxwxWFIuirV0T3INjKDCr1kWY="
+    },
     "delegates": {
       "version": "1.0.0",
       "resolved": "https://registry.npm.taobao.org/delegates/download/delegates-1.0.0.tgz",
@@ -4369,6 +4384,14 @@
         "safer-buffer": "^2.1.0"
       }
     },
+    "echarts": {
+      "version": "4.9.0",
+      "resolved": "https://registry.nlark.com/echarts/download/echarts-4.9.0.tgz",
+      "integrity": "sha1-qbm6oD8Doqcx5jQMVb77V6nhNH0=",
+      "requires": {
+        "zrender": "4.3.2"
+      }
+    },
     "ee-first": {
       "version": "1.1.1",
       "resolved": "https://registry.npm.taobao.org/ee-first/download/ee-first-1.1.1.tgz",
@@ -5610,6 +5633,14 @@
         "minimatch": "~3.0.2"
       }
     },
+    "good-listener": {
+      "version": "1.2.2",
+      "resolved": "https://registry.npm.taobao.org/good-listener/download/good-listener-1.2.2.tgz",
+      "integrity": "sha1-1TswzfkxPf+33JoNR3CWqm0UXFA=",
+      "requires": {
+        "delegate": "^3.1.2"
+      }
+    },
     "graceful-fs": {
       "version": "4.2.6",
       "resolved": "https://registry.npm.taobao.org/graceful-fs/download/graceful-fs-4.2.6.tgz",
@@ -10154,6 +10185,11 @@
         }
       }
     },
+    "select": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npm.taobao.org/select/download/select-1.1.2.tgz",
+      "integrity": "sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0="
+    },
     "select-hose": {
       "version": "2.0.0",
       "resolved": "https://registry.npm.taobao.org/select-hose/download/select-hose-2.0.0.tgz",
@@ -11370,6 +11406,11 @@
       "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=",
       "dev": true
     },
+    "tiny-emitter": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npm.taobao.org/tiny-emitter/download/tiny-emitter-2.1.0.tgz",
+      "integrity": "sha1-HRpW7fxRxD6GPLtTgqcjMONVVCM="
+    },
     "tmp": {
       "version": "0.0.33",
       "resolved": "https://registry.npm.taobao.org/tmp/download/tmp-0.0.33.tgz",
@@ -11886,6 +11927,14 @@
       "resolved": "https://registry.npm.taobao.org/vue-axios/download/vue-axios-2.1.5.tgz?cache=0&sync_timestamp=1612148512007&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-axios%2Fdownload%2Fvue-axios-2.1.5.tgz",
       "integrity": "sha1-GvS/EhjtcTCcdq+zjQ9oPjEsJKc="
     },
+    "vue-clipboard2": {
+      "version": "0.3.1",
+      "resolved": "https://registry.npm.taobao.org/vue-clipboard2/download/vue-clipboard2-0.3.1.tgz",
+      "integrity": "sha1-blUft704SImyiw2jsSKJ7WvKSJQ=",
+      "requires": {
+        "clipboard": "^2.0.0"
+      }
+    },
     "vue-eslint-parser": {
       "version": "2.0.3",
       "resolved": "https://registry.npm.taobao.org/vue-eslint-parser/download/vue-eslint-parser-2.0.3.tgz",
@@ -12890,6 +12939,11 @@
           "dev": true
         }
       }
+    },
+    "zrender": {
+      "version": "4.3.2",
+      "resolved": "https://registry.nlark.com/zrender/download/zrender-4.3.2.tgz",
+      "integrity": "sha1-7HQy+UFcgsc1hLa3uMR+GwFiCcY="
     }
   }
 }

+ 2 - 0
package.json

@@ -16,6 +16,7 @@
     "babel-polyfill": "^6.26.0",
     "classlist-polyfill": "^1.2.0",
     "crypto-js": "^4.0.0",
+    "echarts": "^4.9.0",
     "element-ui": "^2.15.1",
     "js-base64": "^2.5.1",
     "js-cookie": "^2.2.0",
@@ -27,6 +28,7 @@
     "script-loader": "^0.7.2",
     "vue": "^2.6.10",
     "vue-axios": "^2.1.2",
+    "vue-clipboard2": "^0.3.1",
     "vue-i18n": "^8.7.0",
     "vue-router": "^3.0.1",
     "vuex": "^3.1.1"

BIN
public/img/logo.png


+ 2 - 1
public/index.html

@@ -19,7 +19,8 @@
   <script src="<%= BASE_URL %>cdn/xlsx/FileSaver.min.js"></script>
   <script src="<%= BASE_URL %>cdn/xlsx/xlsx.full.min.js"></script>
   <link rel="icon" href="<%= BASE_URL %>favicon.png">
-  <title>音乐之声</title>
+  <!-- <title>音乐之声</title> -->
+   <title>广告商管理系统</title>
   <style>
     html,
     body,

+ 71 - 0
src/components/index/accountstatic.vue

@@ -0,0 +1,71 @@
+<template>
+  <el-card :header="head">
+    <avue-data-display :option="option"></avue-data-display>
+  </el-card>
+</template>
+
+<script>
+  export default {
+    props: {
+      head: {},
+      data: {
+        todayIn:{},
+        todayOut:{},
+        historyIn:{},
+        historyOut:{}
+      }
+    },
+    data() {
+      return {
+        option: {
+          span: 6,
+          data: [{
+              click: function() {
+
+              },
+              count: 100,
+              decimals: 2,
+              title: '今日提现',
+
+            },
+            {
+              click: function() {
+
+              },
+              count: 100,
+              decimals: 2,
+              title: '历史提现',
+
+            },
+            {
+              click: function() {
+
+              },
+              count: 100,
+              decimals: 2,
+              title: '今日收入',
+
+            },
+            {
+              click: function() {},
+              count: 100,
+              decimals: 2,
+              title: '历史收入',
+
+            }
+          ]
+        },
+      }
+    },
+    mounted() {
+        this.option.data[0].count = this.data.todayOut;
+        this.option.data[1].count = this.data.historyOut;
+        this.option.data[2].count = this.data.todayIn;
+        this.option.data[3].count = this.data.historyIn;
+
+    }
+  }
+</script>
+
+<style>
+</style>

+ 2 - 2
src/config/website.js

@@ -2,10 +2,10 @@
  * 全局配置文件
  */
 export default {
-  title: "音乐之声",
+  title: "广告商管理系统",
   logo: "S",
   key: 'saber',//配置主键,目前用于存储
-  indexTitle: '音乐之声',
+  indexTitle: '广告商管理系统',
   clientId: 'saber', // 客户端id
   clientSecret: 'saber_secret', // 客户端密钥
   tenantMode: true, // 是否开启租户模式

+ 2 - 2
src/lang/zh.js

@@ -1,6 +1,6 @@
 export default {
   tip: '提示',
-  title: '音乐之声',
+  title: '广告商管理系统',
   logoutTip: '退出系统, 是否继续?',
   submitText: '确定',
   cancelText: '取消',
@@ -67,7 +67,7 @@ export default {
   },
   login: {
     title: '登录 ',
-    info: '音乐之声',
+    info: '广告商管理系统',
     tenantId: '请输入租户ID',
     username: '请输入账号',
     password: '请输入密码',

+ 62 - 89
src/views/wel/index.vue

@@ -1,7 +1,8 @@
 <template>
   <basic-container>
     <el-dialog :modal-append-to-body="false" :visible.sync="editBussinessVisible" title="编辑资料" width="80%">
-      <avue-form v-if="editBussinessVisible" :table-loading="loading" v-model="bussiness" :option="bussinessOption" @reset-change="emptytChange" @submit="submitBussiness()">
+      <avue-form v-if="editBussinessVisible" :table-loading="loading" v-model="bussiness" :option="bussinessOption"
+        @reset-change="emptytChange" @submit="submitBussiness()">
 
       </avue-form>
     </el-dialog>
@@ -42,27 +43,16 @@
             {{userInfo.userName}} 欢迎回来
           </el-card> -->
 
-          <el-card header="音乐之声-基础数据统计" v-if="permission.basic_static">
+          <el-card header="基础数据统计" v-if="permission.basic_static">
             <avue-data-rotate :option="optionMusic"></avue-data-rotate>
           </el-card>
           <br>
-          <el-card header="音乐之声-财务账本" v-if="permission.account_static">
-            <avue-data-display :option="option"></avue-data-display>
-            <el-row>
-              <el-col :span="6">
-                <div align="center" id="todayOut" style="width: 100%;height: 300px;"></div>
-              </el-col>
-              <el-col :span="6">
-                <div align="center" id="historyOut" style="width: 100%;height: 300px;"></div>
-              </el-col>
-              <el-col :span="6">
-                <div align="center" id="todayIn" style="width: 100%;height: 300px;"></div>
-              </el-col>
-              <el-col :span="6">
-                <div align="center" id="historyIn" style="width: 100%;height: 300px;"></div>
-              </el-col>
-            </el-row>
+          <el-card header="用户数增长曲线">
+            <div id="userStatistics" :style="{ width: '100%', height: '450px' }"></div>
           </el-card>
+          <accountstatic head="用户财务账本" :data="useraccountData" v-if="permission.account_static"></accountstatic>
+          <accountstatic head="广告商财务账本" :data="bussinessaccountData" v-if="permission.account_static"></accountstatic>
+          <accountstatic head="代理商财务账本" :data="agenteraccountData" v-if="permission.account_static"></accountstatic>
           <el-card header="音乐之声-佣金结算统计" v-if="permission.ordercommission_static">
 
             <el-button-group>
@@ -122,7 +112,7 @@
                 </span>
                 <span style="margin-left: 30px;background-color: #4d4dff;">
                   <el-link target="_blank" type="success" :href="bussiness.apiFilePath">Api文档下载(打开需输入密钥)</el-link>
-                  </span>
+                </span>
                 <div>
                   <el-button style="margin-left:50px;" type="primary" class="button" @click="editBussiness">编辑资料</el-button>
                   <span style="color: white;margin-left: 40px;">服务费率(千分比):{{bussiness.serviceRate}}</span>
@@ -209,6 +199,7 @@
 <script>
   import request from '@/router/axios';
   import echarts from "echarts";
+  import accountstatic from "@/components/index/accountstatic.vue"
   import {
     getList as getParams
   } from "@/api/system/param";
@@ -225,9 +216,15 @@
     mapGetters
   } from "vuex";
   export default {
+    components: {
+      accountstatic
+    },
 
     data() {
       return {
+        agenteraccountData:{},
+        useraccountData: {},
+        bussinessaccountData: {},
         loading: true,
         editBussinessVisible: false,
         moneyChina: "壹拾万元整",
@@ -468,44 +465,7 @@
 
           ]
         },
-        option: {
-          span: 6,
-          data: [{
-              click: function() {
-
-              },
-              count: 100,
-              decimals: 2,
-              title: '今日提现',
 
-            },
-            {
-              click: function() {
-
-              },
-              count: 100,
-              decimals: 2,
-              title: '历史提现',
-
-            },
-            {
-              click: function() {
-
-              },
-              count: 100,
-              decimals: 2,
-              title: '今日收入',
-
-            },
-            {
-              click: function() {},
-              count: 100,
-              decimals: 2,
-              title: '历史收入',
-
-            }
-          ]
-        },
         optionMusic: {
           span: 6,
           data: [{
@@ -713,6 +673,7 @@
           }]
         },
 
+
       }
     },
     computed: {
@@ -726,8 +687,8 @@
           this.money = 1;
         }
         this.moneyChina = this.convertCurrency(this.money)
-        this.statDatas[0].value = this.bussiness.serviceRate /1000
-        this.statDatas[1].value = this.money * this.bussiness.serviceRate /1000
+        this.statDatas[0].value = this.bussiness.serviceRate / 1000
+        this.statDatas[1].value = this.money * this.bussiness.serviceRate / 1000
         this.statDatas[2].value = parseFloat(this.money)
         this.statDatas[3].value = parseFloat(this.statDatas[2].value) - parseFloat(this.statDatas[1].value)
       },
@@ -751,17 +712,17 @@
 
       getByAccount().then(res => {
         _that.bussiness = res.data.data
-         _that.statDatas[0].value = res.data.data.serviceRate / 1000
-         _that.statDatas[1].value = _that.money * _that.statDatas[0].value
-         _that.statDatas[2].value = _that.money
-         _that.statDatas[3].value = _that.statDatas[2].value  - _that.statDatas[1].value
+        _that.statDatas[0].value = res.data.data.serviceRate / 1000
+        _that.statDatas[1].value = _that.money * _that.statDatas[0].value
+        _that.statDatas[2].value = _that.money
+        _that.statDatas[3].value = _that.statDatas[2].value - _that.statDatas[1].value
         console.log("buss" + JSON.stringify(_that.bussiness))
       })
 
     },
     methods: {
-      submitBussiness(){
-        update(this.bussiness).then(res=>{
+      submitBussiness() {
+        update(this.bussiness).then(res => {
           this.$message({
             type: "success",
             message: res.data.msg
@@ -870,9 +831,9 @@
       toMyDebit() {
         this.$router.push('/guosen/bussinessdebitrequest');
       },
-	  toBin() {
-	    this.$router.push('/guosen/bankcode');
-	  },
+      toBin() {
+        this.$router.push('/guosen/bankcode');
+      },
       toMyOrder() {
         this.$router.push('/bussiness/order');
       },
@@ -934,35 +895,47 @@
         }).then(res => {
           //今日提现
           let todayOut = res.data.data.todayOut;
-          this.optionTodayOut.series[0].data[0].value = todayOut.userOut;
-          this.optionTodayOut.series[0].data[1].value = todayOut.proxyOut;
-          this.optionTodayOut.series[0].data[2].value = todayOut.adsOut;
-          this.optionTodayOut.series[0].data[3].value = todayOut.operationOut;
-          this.optionTodayOut.series[0].data[4].value = todayOut.sponsorOut;
-          this.option.data[0].count = todayOut.total;
+          this.useraccountData.todayOut = todayOut.userOut;
+          this.agenteraccountData.todayOut = todayOut.proxyOut;
+          this.bussinessaccountData.todayOut = todayOut.adsOut;
+          // this.optionTodayOut.series[0].data[0].value = todayOut.userOut;
+          // this.optionTodayOut.series[0].data[1].value = todayOut.proxyOut;
+          // this.optionTodayOut.series[0].data[2].value = todayOut.adsOut;
+          // this.optionTodayOut.series[0].data[3].value = todayOut.operationOut;
+          // this.optionTodayOut.series[0].data[4].value = todayOut.sponsorOut;
+          // this.option.data[0].count = todayOut.total;
           //历史提现
           let historyOut = res.data.data.totalOut;
-          this.optionHistoryOut.series[0].data[0].value = historyOut.userOut;
-          this.optionHistoryOut.series[0].data[1].value = historyOut.proxyOut;
-          this.optionHistoryOut.series[0].data[2].value = historyOut.adsOut;
-          this.optionHistoryOut.series[0].data[3].value = historyOut.operationOut;
-          this.optionHistoryOut.series[0].data[4].value = historyOut.sponsorOut;
-          this.option.data[1].count = historyOut.total;
+         this.useraccountData.historyOut = historyOut.userOut;
+         this.agenteraccountData.historyOut = historyOut.proxyOut;
+         this.bussinessaccountData.historyOut = historyOut.adsOut;
+          // this.optionHistoryOut.series[0].data[0].value = historyOut.userOut;
+          // this.optionHistoryOut.series[0].data[1].value = historyOut.proxyOut;
+          // this.optionHistoryOut.series[0].data[2].value = historyOut.adsOut;
+          // this.optionHistoryOut.series[0].data[3].value = historyOut.operationOut;
+          // this.optionHistoryOut.series[0].data[4].value = historyOut.sponsorOut;
+          // this.option.data[1].count = historyOut.total;
 
           //今日收入
           let todayIn = res.data.data.todayIn;
-          this.optionTodayIn.series[0].data[0].value = todayIn.userIn;
-          this.optionTodayIn.series[0].data[1].value = todayIn.proxyIn;
-          this.optionTodayIn.series[0].data[2].value = todayIn.adsIn;
-
-          this.option.data[2].count = todayIn.total;
+          this.useraccountData.todayIn = todayIn.userOut;
+          this.agenteraccountData.todayIn = todayIn.proxyOut;
+          this.bussinessaccountData.todayIn = todayIn.adsOut;
+          // this.optionTodayIn.series[0].data[0].value = todayIn.userIn;
+          // this.optionTodayIn.series[0].data[1].value = todayIn.proxyIn;
+          // this.optionTodayIn.series[0].data[2].value = todayIn.adsIn;
+
+          // this.option.data[2].count = todayIn.total;
           //历史收入
           let historyIn = res.data.data.totalIn;
-          this.optionHistoryIn.series[0].data[0].value = historyIn.userIn;
-          this.optionHistoryIn.series[0].data[1].value = historyIn.proxyIn;
-          this.optionHistoryIn.series[0].data[2].value = historyIn.adsIn;
-
-          this.option.data[3].count = historyIn.total;
+          this.useraccountData.historyIn = historyIn.userOut;
+          this.agenteraccountData.historyIn = historyIn.proxyOut;
+          this.bussinessaccountData.historyIn = historyIn.adsOut;
+          // this.optionHistoryIn.series[0].data[0].value = historyIn.userIn;
+          // this.optionHistoryIn.series[0].data[1].value = historyIn.proxyIn;
+          // this.optionHistoryIn.series[0].data[2].value = historyIn.adsIn;
+
+          // this.option.data[3].count = historyIn.total;
 
 
           this.drawPie();

+ 1 - 1
vue.config.js

@@ -1,6 +1,6 @@
 module.exports = {
   //路径前缀
-  publicPath: "/",
+  publicPath: "/cyzhtest/",
   lintOnSave: true,
   productionSourceMap: false,
   chainWebpack: (config) => {