소스 검색

修改提测问题

朱鑫波 4 년 전
부모
커밋
162bc76fd4

+ 34 - 3
src/views/modules/stockWatch/modules/keep-manage/keep-manage.less

@@ -3,6 +3,11 @@
         min-height: 300px;
         margin-bottom: 20px;
     }
+    .echarts-card {
+        /deep/  .ant-card-body {
+            padding: 0;
+        }
+    }
     .keep-person-content {
         .person-content-title {
             display: flex;
@@ -37,9 +42,9 @@
         
     }
     .accountIndexEchart {
-        width:100%;
-        height:260px;
-        margin:0 auto;
+        width: 100%;
+        height: 315px;
+        margin: 0 auto;
     }
     .card-content {
         min-height: 400px;
@@ -51,6 +56,7 @@
                 color: rgb(0,153,255);
                 font-size: 36px;
                 font-weight: bold;
+                line-height: 37px;
             }
         }
         h1 {
@@ -69,6 +75,7 @@
                     height: 25px;
                     margin-bottom: 5px;
                     margin-right: 5px;
+                    transform: rotate(180deg);
                 }
             }
             .left-title-radio-down {
@@ -79,6 +86,7 @@
                     height: 25px;
                     margin-bottom: 5px;
                     margin-right: 5px;
+                    transform: rotate(180deg);
                 }
             }
         }
@@ -86,11 +94,34 @@
             font-size: 16px;
             display: flex;
             line-height: 30px;
+            /deep/ .anticon {
+                line-height: 37px;
+            }
             .title-label {
                 width: 100px;
                 text-align: right;
                 margin-right: 30px;
             }
+            .left-title-radio {
+                color: #1afa29;
+                .title-radio-img {
+                    width: 25px;
+                    height: 25px;
+                    margin-bottom: 5px;
+                    margin-right: 5px;
+                    transform: rotate(180deg);
+                }
+            }
+            .left-title-radio-down {
+                color: #d81e06;
+                .title-radio-img {
+                    width: 25px;
+                    height: 25px;
+                    margin-bottom: 5px;
+                    margin-right: 5px;
+                    transform: rotate(180deg);
+                }
+            }
         }
     }
     .between-row {

+ 71 - 34
src/views/modules/stockWatch/modules/keep-manage/keep-manage.vue

@@ -3,7 +3,7 @@
         <a-spin :spinning="accountPageSpinning">
             <a-row :gutter="24">
                 <a-col :sm="18" :md="18" :xl="18" class="keep-manage-col">
-                    <a-card title="运营人员" class="card-content">
+                    <a-card title="运营人员" class="card-content echarts-card">
                         <div class="person-content-title" slot="extra">
                             <div class="content-title-acount"></div>
                             <div class="content-title-checkout">
@@ -18,8 +18,8 @@
                                 <span class="title-checkout-select">
                                     <a-select v-model="selectValue" @change="getQueryNewlyData">
                                         <a-select-option value="charge">花费</a-select-option>
-                                        <a-select-option value="campaign">新上计划数</a-select-option>
-                                        <a-select-option value="unit">新上组数</a-select-option>
+                                        <a-select-option value="campaign" :disabled="checkDisabled">新上计划数</a-select-option>
+                                        <a-select-option value="unit" :disabled="checkDisabled">新上组数</a-select-option>
                                     </a-select>
                                 </span>
                             </div>
@@ -38,12 +38,12 @@
                         </h2>
                         <div class="header-left-title">
                             <span>今日消耗:</span>
-                            <span class="left-title-radio" v-if="personData && personData.grew >= 0">
+                            <span class="left-title-radio" v-if="personData && personData.grew < 0">
                                 <img class="title-radio-img" src="@/assets/up.png" alt="">
                                 {{ personData.grew ? personData.grew + '%' : '-' }}
                             </span>
                             <!-- TODO 这个是下降的样式,后续优化  -->
-                            <span class="left-title-radio-down" v-else-if="personData && personData.grew < 0">
+                            <span class="left-title-radio-down" v-else-if="personData && personData.grew >= 0">
                                 <img class="title-radio-img" src="@/assets/down.png" alt="">
                                 {{personData.grew ? personData.grew + '%':'-'}}
                             </span>
@@ -68,10 +68,24 @@
                             </span>
                         </div>
                         <div class="header-left-title-else">
-                            <span class="title-label">周环比:</span>
-                            <span>
-                                {{ personData.weekGrew ? personData.weekGrew + '%':'-' }}
+                            <span class="title-label">
+                                周消耗环比:
+                            </span>
+                            <span class="left-title-radio" v-if="personData && personData.grew < 0">
+                                {{ personData.weekGrew ? personData.weekGrew + '%' : '-' }}
+                                <img class="title-radio-img" src="@/assets/up.png" alt="">
+                            </span>
+                            <!-- TODO 这个是下降的样式,后续优化  -->
+                            <span class="left-title-radio-down" v-else-if="personData && personData.grew >= 0">
+                                {{personData.grew ? personData.grew + '%':'-'}}
+                                <img class="title-radio-img" src="@/assets/down.png" alt="">
                             </span>
+                            <a-tooltip>
+                                <template slot="title">
+                                本周与上周的消耗环比
+                                </template>
+                                <a-icon type="question-circle" />
+                            </a-tooltip>
                         </div>
                     </a-card>
                 </a-col>
@@ -309,8 +323,8 @@ export default {
             columnsFixd: keepPersonData.setNoDeleteProjectColumns(),
             scrollX: 1500,
             personData: null,
-            dateEchart: [moment().subtract(7, 'days'), moment().subtract(1, 'days')],
-            dateValue: [moment().subtract(7, 'days'), moment().subtract(1, 'days')],
+            dateEchart: [moment(), moment()],
+            dateValue: [moment(), moment()],
             dateRanges: keepPersonData.setTimeRange(),
             target: 'cost',
             order: 'descend',
@@ -354,6 +368,17 @@ export default {
             },
         }
     },
+    computed: {
+        checkDisabled() {
+            if(this.dateEchart.length === 2&&
+            moment(this.dateEchart[0]).format('YYYY-MM-DD') === moment(this.dateEchart[1]).format('YYYY-MM-DD')) {
+               return true
+            }
+            else {
+                return false
+            }
+        }
+    },
     methods: {
         ...mapGetters(["userInfo"]),
         
@@ -617,29 +642,42 @@ export default {
                     trigger: 'axis',
                 },
                 grid:{
-                    left:'5px',
-                    top:0,
-                    right:'5px',
-                    bottom:0
+                    x: '6%',
+                    width: '90%',
+                    y: '12%',
+                    bottom: '25px',
+                    right: '15px'
+
                 },
-                xAxis:[
-                    {
-                        type: 'category',
-                        show:false,
-                        boundaryGap: false,
-                        data:  data.map(item => {
-                            return item.time
-                        }),
-                        axisPointer: {
-                            type: 'none'
-                        },
-                        
+                xAxis: [{
+                    
+                type: 'category',
+                data: data.map(item => {
+                                return item.time
+                            }), 
+                axisLine: {
+                    lineStyle: {
+                        color: '#ddd'
+                    }
+                },
+                axisTick: {
+                    show: false
+                },
+                axisLabel: {
+                    interval: 0,
+                    textStyle: {
+                        color: '#c56790'
                     },
-                ] ,
-                yAxis: {
-                    type: 'value',
-                    show:false,
+                    margin: 15
                 },
+                boundaryGap: false
+                    
+      
+                }],
+                yAxis: [{
+                    type: 'value',
+                    show:true,
+                }],
                 series: [
                     {
                         name: this.selectValue === 'campaign'
@@ -650,14 +688,13 @@ export default {
                         }),
                         type: 'line',
                         smooth: true,
-                        showSymbol: false,
                         symbol: 'circle',
                         lineStyle: {                               
-                            color: '#2461F1',   
+                            color: '#007AFF',   
                             width: 3,
                         },
                         itemStyle:{
-                            color:'#2461F1',
+                            color:'#007AFF',
                             borderWidth:2,
                             borderColor:'#fff'
                         },
@@ -669,7 +706,7 @@ export default {
                                 x2: 0,
                                 y2: 1,
                                 colorStops: [{
-                                    offset: 0, color: '#2461F1' // 0% 处的颜色
+                                    offset: 0, color: '#007AFF' // 0% 处的颜色
                                 }, {
                                     offset: 1, color: 'white' // 100% 处的颜色
                                 }],

+ 3 - 0
src/views/modules/stockWatch/modules/keep-person/keep-person.less

@@ -29,6 +29,7 @@
                         height: 25px;
                         margin-bottom: 5px;
                         margin-right: 5px;
+                        transform: rotate(180deg);
                     }
                 }
                 .left-title-radio-down {
@@ -39,6 +40,7 @@
                         height: 25px;
                         margin-bottom: 5px;
                         margin-right: 5px;
+                        transform: rotate(180deg);
                     }
                 }
             }
@@ -59,6 +61,7 @@
                         height: 25px;
                         margin-bottom: 5px;
                         margin-right: 5px;
+                        transform: rotate(180deg);
                     }
                     .msg-ranking {
                         font-size: 30px;

+ 20 - 8
src/views/modules/stockWatch/modules/keep-person/keep-person.vue

@@ -2,32 +2,45 @@
     <div class="keep-person-main">
         <div class="keep-person-header">
             <div class="person-header-left">
-                <div class="header-left-img"><img src="@/assets/daiban.png" alt=""></div>
+                <div class="header-left-img"><img src="@/assets/touxiang.png" alt=""></div>
                 <div>
                     <div class="header-left-title">你好,{{ personData ? personData.realName : 'admin' }},祝你开心每一天</div>
                     <div class="header-left-title">
                         <span>今日消耗:</span>
                         <span>{{ personData ? personData.charge : '-' }}</span>
-                        <span class="left-title-radio" v-if="personData && personData.grew >= 0">
+                        <span class="left-title-radio" v-if="personData && personData.grew < 0">
                             <img class="title-radio-img" src="@/assets/up.png" alt="">
                             {{ personData.grew ? personData.grew + '%' : '-' }}
                         </span>
                         <!-- TODO 这个是下降的样式,后续优化  -->
-                        <span class="left-title-radio-down" v-else-if="personData && personData.grew < 0">
+                        <span class="left-title-radio-down" v-else-if="personData && personData.grew >= 0">
                             <img class="title-radio-img" src="@/assets/down.png" alt="">
                             {{personData.grew ? personData.grew + '%':'-'}}
                         </span>
+                        <a-tooltip>
+                            <template slot="title">
+                            截止此时今日与昨日的消耗同比
+                            </template>
+                            <a-icon type="question-circle" />
+                        </a-tooltip>
                     </div>
                 </div>
             </div>
             <div class="person-header-right">
                 <div class="header-right-msg">
-                    <div class="right-msg-class">周消耗环比</div>
-                    <div class="right-msg-class msg-class-up" v-if="personData && personData.weekGrew >= 0">
+                    <div class="right-msg-class">周消耗环比
+                        <a-tooltip>
+                            <template slot="title">
+                            本周与上周的消耗环比
+                            </template>
+                            <a-icon type="question-circle" />
+                        </a-tooltip>
+                    </div>
+                    <div class="right-msg-class msg-class-up" v-if="personData && personData.weekGrew < 0">
                         <img class="title-radio-img" src="@/assets/up.png" alt="">
                         {{ personData.weekGrew ? personData.weekGrew + '%' : '-' }}
                     </div>
-                    <div class="right-msg-class msg-class-down" v-else-if="personData && personData.weekGrew < 0">
+                    <div class="right-msg-class msg-class-down" v-else-if="personData && personData.weekGrew >= 0">
                         <img class="title-radio-img" src="@/assets/down.png" alt="">
                         {{ personData.weekGrew ? personData.weekGrew + '%' : '-' }}
                     </div>
@@ -194,7 +207,7 @@ export default {
             columnsFixd: keepPersonData.setNoDeleteColumns(),
             scrollX: 1500,
             personData: null,
-            dateValue: [moment().subtract(6, 'days'), moment()],
+            dateValue: [moment(), moment()],
             dateRanges: keepPersonData.setTimeRange(),
             target: 'cost',
             order: 'descend',
@@ -347,7 +360,6 @@ export default {
             let params = {}
             params.userId = this.userInfo().id
             this.getAction('/etl/reportAccountHourly/personalAchievements', params).then(res => {
-                console.log(res)
                 if(res.success) {
                     this.personData = res.result
                 }

+ 2 - 2
vue.config.js

@@ -77,7 +77,7 @@ module.exports = {
         // target: 'http://192.168.1.43:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.1.43:8806', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.0.252:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
-        target: 'http://192.168.1.219:8080', //请求本地 需要jeecg-boot后台项目  赵西安
+        // target: 'http://192.168.1.219:8080', //请求本地 需要jeecg-boot后台项目  赵西安
         // target: 'http://192.168.1.193:8080', //请求本地 需要jeecg-boot后台项目  李煜一
         // target: 'http://192.168.1.193:31012', //请求本地 需要jeecg-boot后台项目  李煜一
         //  target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
@@ -86,7 +86,7 @@ module.exports = {
         //  target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目
         // target: 'http://192.168.1.251/', //请求本地 需要jeecg-boot后台项目 
         // target:'http://118.24.244.213:8804',
-      //  target:'http://139.186.165.84:8806', //测试
+       target:'http://139.186.165.84:8806', //测试
 
         ws: false,