Просмотр исходного кода

大方人员和培训看板修改

cyy 11 месяцев назад
Родитель
Сommit
2f2eb0e6a5

+ 7 - 2
src/views/business/trainManagement/indexDaFang.vue

@@ -130,6 +130,8 @@ import screenfull from 'screenfull'
 import data from './constants/simulated.js'
 import { getFormatDate } from './utils/config.js'
 import { trainingDashBoard, externalTrainByDfx } from '@/api/platform/spectaculars/lab'
+import { getSetting } from '@/utils/query'
+
 export default {
     components: {
         JobPlanChart: () => import('./components/jobPlanChart.vue'),
@@ -275,10 +277,13 @@ export default {
                 background: 'rgba(0, 0, 0, 0.7)'
             })
             this.initializeData()
+            const { typeProportion } = await getSetting('pxSpectacularsOption') || {}
+            console.log(typeProportion)
             const tData = await trainingDashBoard(
                 {
                     dept: this.deptVal,
-                    date: this.hoverClassAdd === 'm' ? this.dateValM : this.dateValY
+                    date: this.hoverClassAdd === 'm' ? this.dateValM : this.dateValY,
+                    typeProportion: JSON.stringify(typeProportion)
                 }
             ).then(res => {
                 const data = res.data[0] || {}
@@ -296,7 +301,7 @@ export default {
             this.nowWeekData = tData.weekDtoList
             this.mergeData[1].numData = tData.planDto
             this.mergeData[0].numData = tData.typeDto.typeDtoList
-            this.mergeData[0].title = tData.typeDto.remark
+            // this.mergeData[0].title = tData.typeDto.remark
             this.mergeData[0].total = tData.typeDto.typeTotal
             this.mergeData[3].numData = tData.objectDto.objectDtoList
             this.mergeData[3].total = tData.objectDto.objectTotal

+ 16 - 16
src/views/peopleManages/personComcont/GetPieView.vue

@@ -76,22 +76,22 @@ export default {
                 },
                 label: {
                     formatter: function (name) {
-                        const text = name.name + '(' + name.value + ')'
+                        const text = name.name
                         let result = ''// 拼接加\n返回的类目项
                         const maxLength = 7// 每项显示文字个数
                         const valLength = text.length// X轴类目项的文字个数
                         const rowNumber = Math.ceil(valLength / maxLength) // 类目项需要换行的行数
                         if (rowNumber > 1) { // 如果文字大于3,
-                            for (var i = 0; i < rowNumber; i++) {
+                            for (let i = 0; i < rowNumber; i++) {
                                 let temp = ''// 每次截取的字符串
                                 const start = i * maxLength// 开始截取的位置
                                 const end = start + maxLength// 结束截取的位置
-                                temp = text.substring(start, end) + '\n'
+                                temp = text.substring(start, end) + (i === rowNumber - 1 ? '' : '\n')
                                 result += temp // 拼接生成最终的字符串
                             }
-                            return result
+                            return result + '(' + name.value + ')'
                         } else {
-                            return text
+                            return text + '(' + name.value + ')'
                         }
                     },
                     edgeDistance: '20%',
@@ -99,22 +99,22 @@ export default {
                     fontSize: '12px'
                 },
                 legend: {
-                    // show: this.info.hasOwnProperty('legend') ? this.info.legend : true,
-                    show: true,
+                    show: this.info.hasOwnProperty('legend') ? this.info.legend : true,
+                    // show: true,
                     // orient: 'vertical',
                     itemGap: 6,
                     z: 3,
-                    type: this.info.hasOwnProperty('legend') && this.info.legend === false ? 'scroll' : 'plain',
-                    orient: this.info.hasOwnProperty('legend') && this.info.legend === false ? 'vertical' : 'horizontal',
-                    left: this.info.hasOwnProperty('legend') && this.info.legend === false ? 'left' : 'center',
+                    // type: this.info.hasOwnProperty('legend') && this.info.legend === false ? 'scroll' : 'plain',
+                    // orient: this.info.hasOwnProperty('legend') && this.info.legend === false ? 'vertical' : 'horizontal',
+                    // left: this.info.hasOwnProperty('legend') && this.info.legend === false ? 'left' : 'center',
                     textStyle: {
                         color: '#fff'
                     },
-                    pageIconColor: '#fff',
-                    pageIconInactiveColor: '#fff',
-                    pageTextStyle: {
-                        color: '#fff'
-                    },
+                    // pageIconColor: '#fff',
+                    // pageIconInactiveColor: '#fff',
+                    // pageTextStyle: {
+                    //     color: '#fff'
+                    // },
                     formatter: function (name) {
                         const text = name
                         let result = ''// 拼接加\n返回的类目项
@@ -139,7 +139,7 @@ export default {
                     {
                         type: 'pie',
                         radius: radius,
-                        center: this.info.hasOwnProperty('legend') && this.info.legend === false ? ['60%', '50%'] : ['50%', '50%'],
+                        center: this.info.hasOwnProperty('legend') && this.info.legend === false ? ['50%', '40%'] : ['50%', '50%'],
                         data: this.info.data,
                         emphasis: {
                             itemStyle: {

+ 3 - 2
src/views/peopleManages/taskStatistics/indexDaFang.vue

@@ -473,6 +473,8 @@ export default {
                 animation: true,
                 tooltip: {
                     trigger: 'axis',
+                    confine: true,
+                    // appendToBody: true,
                     axisPointer: {
                         type: 'shadow'
                     }
@@ -488,7 +490,7 @@ export default {
                 grid: {
                     left: '3%',
                     right: '4%',
-                    top: '35%',
+                    top: '40%',
                     bottom: '2%',
                     containLabel: true
                 },
@@ -541,7 +543,6 @@ export default {
                         }
                     }
                 ],
-                // " 大专", "本科", "硕士", "博士", "初级职称", "中级职称", "高级职称"
                 series: [
 
                 ],