Browse Source

聚义修改上线

朱鑫波 3 năm trước cách đây
mục cha
commit
602f64ce67

+ 2 - 2
src/permission.js

@@ -57,7 +57,7 @@ router.beforeEach((to, from, next) => {
             } else {
               // 跳转到目的路由
               if( to.path === '/dashboard/analysis' && from.path == '/'){
-                if (store.getters.userInfo.id == '4aba62011120ac565c7f2b9f8f4aa96b' || store.getters.userInfo.id == 'e9ca23d68d884d4ebb19d07889727dae') {
+                if (store.getters.userInfo.id == '4aba62011120ac565c7f2b9f8f4aa96b' || store.getters.userInfo.id == 'e9ca23d68d884d4ebb19d07889727dae'|| store.getters.userInfo.id == 'db2d59e9b4a3b18629c838fd7f5b58d8') {
                   const a = document.createElement('a');
                   document.body.appendChild(a);
                   a.style.display = 'none';
@@ -88,7 +88,7 @@ router.beforeEach((to, from, next) => {
         next()
       }
       if( to.path === '/dashboard/analysis' && from.path == '/'){
-        if (store.getters.userInfo.id == '4aba62011120ac565c7f2b9f8f4aa96b' || store.getters.userInfo.id == 'e9ca23d68d884d4ebb19d07889727dae') {
+        if (store.getters.userInfo.id == '4aba62011120ac565c7f2b9f8f4aa96b' || store.getters.userInfo.id == 'e9ca23d68d884d4ebb19d07889727dae' || store.getters.userInfo.id == 'db2d59e9b4a3b18629c838fd7f5b58d8') {
           const a = document.createElement('a');
           document.body.appendChild(a);
           a.style.display = 'none';

+ 0 - 1
src/store/modules/user.js

@@ -321,7 +321,6 @@ const user = {
         Vue.ls.remove(USER_INFO)
         commit('SET_INFO', [])
         localStorage.removeItem("roleCode")
-
         //console.log('logoutToken: '+ logoutToken)
         logout(logoutToken).then(() => {
           resolve()

+ 40 - 11
src/views/bossDataKanban/index.vue

@@ -317,7 +317,8 @@
                         </a-radio-group>
                         <a-range-picker format="YYYY-MM-DD" style="float: right;" v-model="priceRangeDate"
                             :disabled-date="disabledDate"  :allowClear="false" dropdownClassName="range-pick-echart"
-                             @change="changePriceRangeDate" />
+                             @change="changePriceRangeDate" @openChange="onOpenChange"
+                             @calendarChange="onCalendarChange" />
 
                         <div class="chart-container">
                             <div class="chart" ref="chart" v-if="chartPie"></div>
@@ -563,15 +564,26 @@
             calendarPriceRangeChange(date) {
                 this.selectPriceDate = date[0]
             },
+            onOpenChange (status) {
+      // 清空禁用时间段的设置
+      this.selectPriceDate = null
+    },
+    onCalendarChange (dates) {
+      // 获取手动选择的时间段起始值
+      this.selectPriceDate = dates[0]
+    },
             //根据选择的开始时间/结束时间,动态渲染要禁用的日期
             disabledDate(current) {
-                if (this.selectPriceDate) {
-                    let selectV = moment(this.selectPriceDate, 'YYYY-MM-DD').valueOf()
-                    return  current > moment(new Date(selectV + this.offsetDays), 'YYYY-MM-DD') ||
-                        current < moment(new Date(selectV - this.offsetDays), 'YYYY-MM-DD') 
-                } else {
-                    return current && current > moment().endOf('day')
-                }
+                if (!this.selectPriceDate) return current && current > moment().endOf('day')
+                     return (current && current < moment(this.selectPriceDate).subtract(1, 'M').startOf('day')) || current > moment(this.selectPriceDate).add(1, 'M').endOf('day') || current && current > moment().endOf('day')
+                // if (this.selectPriceDate) {
+                //     let selectV = moment(this.selectPriceDate, 'YYYY-MM-DD').valueOf()
+                //     return  current > moment(new Date(selectV + this.offsetDays), 'YYYY-MM-DD') ||
+                //         current < moment(new Date(selectV - this.offsetDays), 'YYYY-MM-DD')  
+                // } else {
+                    
+                //     return   current && current > moment().endOf('day')
+                // }
 
             },
 
@@ -620,6 +632,8 @@
                 this.getAction(process.env.VUE_APP_BASE_MATERIAL_URL + '/boss/bossDataExhibitionController/getCompanyMeterialConsume', paramsTwo).then(res => {
                     if (res.code == 0) {
                         resultArray = res.result;
+                        // resultArray.push({area:'聚义',cost:2050422.25},{area:'华南',cost:5050422.25})
+                        // console.log(resultArray);
                         if (resultArray.length > 0) {
                             this.emptyShowTwo = true;
                             resultArray.forEach(element => {
@@ -771,7 +785,7 @@
                         itemGap: 20,
                         itemWidth: 15,
                         itemHeight: 10,
-                        padding: [-20, 0, 0, 80],
+                        padding: [-45, 0, 0, 80],
                         bottom: '55%',
                         formatter: function (name) {  //该函数用于设置图例显示后的百分比
                             var data = list
@@ -869,7 +883,12 @@
                 }, {
                     value: payPersonNum[5],
                     itemStyle: {
-                        color: '#40E0D0'
+                        color: 'rgba(0,255,127,1.0)'
+                    }
+                },{
+                    value: payPersonNum[6],
+                    itemStyle: {
+                        color: 'rgba(255,192,203,1.0)'
                     }
                 },
                 ]
@@ -907,6 +926,16 @@
                     itemStyle: {
                         color: 'rgba(182,105,86,.1)'
                     }
+                },{
+                    value: Math.max.apply(null, payPersonNum),
+                    itemStyle: {
+                        color: 'rgba(0,255,127,.1)'
+                    }
+                },{
+                    value: Math.max.apply(null, payPersonNum),
+                    itemStyle: {
+                        color: 'rgba(255,192,203,.1)'
+                    }
                 }
                 ]
                 if (VALUE1.length != VALUE2.length) {
@@ -963,7 +992,7 @@
                 echarts.graphic.registerShape('CubeLeft', CubeLeft)
                 echarts.graphic.registerShape('CubeRight', CubeRight)
                 echarts.graphic.registerShape('CubeTop', CubeTop)
-                const MAX = [300, 300, 300, 300, 300, 300]
+                const MAX = [300, 300, 300, 300, 300, 300,300]
                 const VALUE = payPersonNum
                 let option = {
                     backgroundColor: "transparent",

+ 1 - 1
src/views/dashboard/Analysis.vue

@@ -351,7 +351,7 @@
     methods: {
       ...mapGetters(['userInfo']),
       getUserId(){
-        if (this.userInfo().id == '4aba62011120ac565c7f2b9f8f4aa96b' || this.userInfo().id == 'e9ca23d68d884d4ebb19d07889727dae') {
+        if (this.userInfo().id == '4aba62011120ac565c7f2b9f8f4aa96b' || this.userInfo().id == 'e9ca23d68d884d4ebb19d07889727dae' || this.userInfo().id == 'db2d59e9b4a3b18629c838fd7f5b58d8') {
           this.userInfoId = true;
         }else{
           this.userInfoId = false;

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

@@ -447,7 +447,7 @@ export default {
       this.$router.push({
         path: '/dashboard/analysis',
       })
-      if (this.userInfo().id == '4aba62011120ac565c7f2b9f8f4aa96b' || this.userInfo().id == 'e9ca23d68d884d4ebb19d07889727dae') {
+      if (this.userInfo().id == '4aba62011120ac565c7f2b9f8f4aa96b' || this.userInfo().id == 'e9ca23d68d884d4ebb19d07889727dae' || this.userInfo().id == 'db2d59e9b4a3b18629c838fd7f5b58d8') {
           const a = document.createElement('a');
           document.body.appendChild(a);
           a.style.display = 'none';