diff --git a/src/api/safetyIndex/index.js b/src/api/safetyIndex/index.js index ebcc16e..536e87a 100644 --- a/src/api/safetyIndex/index.js +++ b/src/api/safetyIndex/index.js @@ -128,4 +128,12 @@ export function statisticsDetail(params) { method: 'post', params }) -} \ No newline at end of file +} +//排名 +export function topRanking(params) { + return request({ + url: '/safety/index/company/top/ranking', + method: 'post', + params + }) +} diff --git a/src/views/safetyIndex/index.vue b/src/views/safetyIndex/index.vue index a482920..5556b99 100644 --- a/src/views/safetyIndex/index.vue +++ b/src/views/safetyIndex/index.vue @@ -6,8 +6,8 @@
- - + +
@@ -17,19 +17,28 @@ import yuangong from './yuangong.vue' import cheliang from './cheliang.vue' import wupin from './wupin.vue' import toubu from './toubu.vue' +import paiming from './paiming.vue' + export default { components: { yuangong, cheliang, wupin, - toubu + toubu, + paiming }, data() { return { staffStatisticsList: [], + scoreType: 'month', } }, + methods: { + tabChange(val) { + this.scoreType = val + } + } } diff --git a/src/views/safetyIndex/paiming.vue b/src/views/safetyIndex/paiming.vue new file mode 100644 index 0000000..fd2e41e --- /dev/null +++ b/src/views/safetyIndex/paiming.vue @@ -0,0 +1,415 @@ + + + + + \ No newline at end of file diff --git a/src/views/safetyIndex/toubu.vue b/src/views/safetyIndex/toubu.vue index de2a9d7..2fd9688 100644 --- a/src/views/safetyIndex/toubu.vue +++ b/src/views/safetyIndex/toubu.vue @@ -80,7 +80,9 @@ 企业名称  {{ topSortData[1].companyName }}
- 企业地址  {{ topSortData[1].companyAddress }} + + 企业地址   {{ + topSortData[1].companyAddress }}
@@ -97,7 +99,8 @@ 企业名称  {{ topSortData[2].companyName }}
- 企业地址  {{ topSortData[2].companyAddress }} + 企业地址  {{ + topSortData[2].companyAddress }}
@@ -114,7 +117,8 @@ 企业名称  {{ topSortData[0].companyName }}
- 企业地址  {{ topSortData[0].companyAddress }} + 企业地址  {{ + topSortData[0].companyAddress }}
@@ -159,6 +163,7 @@ export default { }) }, gettopSort() { + this.$emit('tabChange', this.topTabsName) topSort({ scoreType: this.topTabsName }).then(res => { this.topSortData = res.data }) @@ -177,6 +182,7 @@ export default { box-sizing: border-box; position: relative; + .topBox { width: 100%; height: 30%; @@ -417,7 +423,7 @@ export default { .mingcheng { padding-left: 5px; - height: 33.33%; + height: 50%; width: 100%; font-size: 12px; @@ -425,12 +431,16 @@ export default { letter-spacing: 0.86px; font-weight: 400; text-align: left; + overflow: hidden; + white-space: nowrap; //禁止换行 + text-overflow: ellipsis; //... span { font-size: 14px; color: #D0DEEE; letter-spacing: 0.75px; font-weight: 500; + } } } @@ -488,7 +498,7 @@ export default { .mingcheng { padding-left: 5px; - height: 33.33%; + height: 50%; width: 100%; font-size: 12px; @@ -496,6 +506,9 @@ export default { letter-spacing: 0.86px; font-weight: 400; text-align: left; + overflow: hidden; + white-space: nowrap; //禁止换行 + text-overflow: ellipsis; //... span { font-size: 14px; @@ -566,7 +579,7 @@ export default { .mingcheng { padding-left: 5px; - height: 33.33%; + height: 59%; width: 100%; font-size: 12px; @@ -574,6 +587,9 @@ export default { letter-spacing: 0.86px; font-weight: 400; text-align: left; + overflow: hidden; + white-space: nowrap; //禁止换行 + text-overflow: ellipsis; //... span { font-size: 14px; diff --git a/src/views/safetyIndex/yuangong.vue b/src/views/safetyIndex/yuangong.vue index 52d8536..c6f969e 100644 --- a/src/views/safetyIndex/yuangong.vue +++ b/src/views/safetyIndex/yuangong.vue @@ -155,7 +155,7 @@ export default { }, initygtb() { let myChart = echarts.init(document.getElementById("ygtb")); - const colors = ['#66C3FF', '#FEF699', '#19F7C3', '#E4FEF0', '#ADF1FF'] + const colors = ['#66C3FF', '#FEF699', '#19F7C3', '#ADF1FF'] let data = [] this.staffStatisticsList.forEach((item, index) => { @@ -168,12 +168,17 @@ export default { trigger: 'item' }, legend: { - top: '20%', + // type: 'scroll', + orient: 'vertical', + top: '5%', right: '5%', padding: [5, 10], + itemGap: 10, itemWidth: 6, itemHeight: 6, + width: 100, backgroundColor: 'rgba(108,128,151,0.2)', + lineHeight: 24, textStyle: { rich: { a: {