|
@@ -17,9 +17,9 @@
|
|
|
<span class="exceedSpan" style="margin-left: 10px;width: 80px">指标类型:</span>
|
|
|
<el-select v-model="indicatorIds" placeholder="请选择指标类型">
|
|
|
<el-option
|
|
|
- v-for="item in indicatorData"
|
|
|
+ v-for="item in indicatorTypeData"
|
|
|
:key="item.id"
|
|
|
- :label="item.sectionName"
|
|
|
+ :label="item.typeName"
|
|
|
:value="item.id">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
@@ -44,10 +44,10 @@
|
|
|
placeholder="选择时间"
|
|
|
/>
|
|
|
</div>
|
|
|
- <el-button type="primary" style="margin-left: 10px;" @click="getSeachData">搜索</el-button>
|
|
|
- <el-button style="margin-left: 10px;" @click="resetSeach">重置</el-button>
|
|
|
+ <seachs @handleSeach="getSeachData" @handleRest="resetSeach"></seachs>
|
|
|
+ <el-button type="info" icon="Download" size="mini" @click="handleExport" style="margin-left:50px">导出</el-button>
|
|
|
</div>
|
|
|
- <div class="PeriodBtn">
|
|
|
+ <!-- <div class="PeriodBtn">
|
|
|
<btns
|
|
|
:showImport="false" :showExport="true"
|
|
|
:showAdd="false"
|
|
@@ -57,63 +57,33 @@
|
|
|
:disDelete="true" :disImport="true" :disExport="true"
|
|
|
@handleAdd="handleAdd" @handleEdit="handleEdit" @handleDelete="handleDelete"
|
|
|
@handleImport="handleImport" @handleExport="handleExport"></btns>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<div class="benchmarkingIndicatorTableData">
|
|
|
<div class="tableMain">
|
|
|
- <el-table :data="benchmarkingIndicatorData" style="width: 100%">
|
|
|
+ <el-table :data="benchmarkingIndicatorData" style="width: 100%" ref="benchmark">
|
|
|
<el-table-column type="index" label="序号" align="center"></el-table-column>
|
|
|
- <el-table-column label="考评单位" prop="organizationShortName" width="200">
|
|
|
+ <el-table-column label="考评单位" prop="organization_name" width="200">
|
|
|
<template #default="scope">
|
|
|
- <el-tooltip class="box-item" effect="customized" :content="scope.row.organizationShortName"
|
|
|
+ <el-tooltip class="box-item" effect="customized" :content="scope.row.organization_name"
|
|
|
placement="right">
|
|
|
- <span class="tooltipCC">{{scope.row.organizationShortName}}</span>
|
|
|
+ <span class="tooltipCC">{{scope.row.organization_name}}</span>
|
|
|
</el-tooltip>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="排名" prop="organizationType" />
|
|
|
- <el-table-column label="综合得分" prop="evaluationCycle" />
|
|
|
- <el-table-column label="经营回报" align="center">
|
|
|
- <el-table-column label="净利润" prop="zzc" />
|
|
|
- <el-table-column label="EBITDA" prop="k1" />
|
|
|
- <el-table-column label="售电成本" prop="k1" />
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="生产运营及协同指标" align="center">
|
|
|
- <el-table-column label="财务'一集中三加强'" prop="zzc" />
|
|
|
- <el-table-column label="发电量" prop="k1" />
|
|
|
- <el-table-column label="市场占有率" prop="k1" />
|
|
|
- <el-table-column label="电力营销" prop="k1" />
|
|
|
- <el-table-column label="供电煤耗" prop="k1" />
|
|
|
- <el-table-column prop="k1">
|
|
|
- <template #header>
|
|
|
- <div>综合厂</div>
|
|
|
- <div>用电率</div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="非计划停运和出力受阻" prop="k1" />
|
|
|
- <el-table-column prop="k1">
|
|
|
- <template #header>
|
|
|
- <div>内部煤炭</div>
|
|
|
- <div>接卸量</div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="k1">
|
|
|
- <template #header>
|
|
|
- <div>外部煤炭</div>
|
|
|
- <div>采购量</div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="k1">
|
|
|
- <template #header>
|
|
|
- <div>入厂入炉</div>
|
|
|
- <div>标单差</div>
|
|
|
+ <el-table-column label="排名" prop="level" />
|
|
|
+ <el-table-column label="综合得分" prop="ZHDF" />
|
|
|
+ <el-table-column v-for="(it, index) in benchmarkingIndicatorHeader" :key="index" :label="it.name" align="center">
|
|
|
+ <el-table-column v-for="(iv, index) in it.children" :key="index" :label="iv.key">
|
|
|
+ <template #default="scope">
|
|
|
+ <span :style="scope.row[iv.code+'_flag'] === '1'?'color:#3B7AD1': scope.row[iv.code+'_flag'] === '-1'?'color:#F65177':'color:#666666'">{{scope.row[iv.code]}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
|
|
+ <!-- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
|
|
:current-page="page.currentPage" :page-size="page.pagesize"
|
|
|
layout="total, prev, pager, next, jumper" :total="page.total">
|
|
|
- </el-pagination>
|
|
|
+ </el-pagination> -->
|
|
|
</div>
|
|
|
<div class="tableSeach">
|
|
|
<div class="seachType" v-for="item in titleMsgArr" :key="item.isName"
|
|
@@ -130,6 +100,12 @@
|
|
|
|
|
|
<script>
|
|
|
import btns from '../elbuttonS.vue'
|
|
|
+import seachs from '../seachGroup.vue'
|
|
|
+
|
|
|
+import * as XLSX from 'xlsx'
|
|
|
+import { saveAs } from 'file-saver'
|
|
|
+import * as XLSXD from 'xlsx-js-style'
|
|
|
+
|
|
|
import huoDef from '../../assets/benchmarkImg/huoDef.png'
|
|
|
import shuiDef from '../../assets/benchmarkImg/shuiDef.png'
|
|
|
import xinDef from '../../assets/benchmarkImg/xinDef.png'
|
|
@@ -143,20 +119,21 @@ import xinCha from '../../assets/benchmarkImg/xinCha.png'
|
|
|
import meiCha from '../../assets/benchmarkImg/meiCha.png'
|
|
|
import guoCha from '../../assets/benchmarkImg/guoCha.png'
|
|
|
import zongCha from '../../assets/benchmarkImg/zongCha.png'
|
|
|
-import {apiGetscoreCountevaluationList, apiGetbinstageList} from '../../api/api'
|
|
|
+import {apiGetscoreCountevaluationList, apiGetbinstageList, apiGetIndicatorTypeList} from '../../api/api'
|
|
|
export default {
|
|
|
- components: {btns},
|
|
|
+ components: {btns, seachs},
|
|
|
data() {
|
|
|
return {
|
|
|
benchmarkingIndicatorData: [],
|
|
|
- indicatorData: [],
|
|
|
+ benchmarkingIndicatorHeader: [],
|
|
|
+ indicatorTypeData: [],
|
|
|
stageData: [],
|
|
|
companyDatas: [],
|
|
|
periodId: '',
|
|
|
stageIds: '',
|
|
|
indicatorIds: '',
|
|
|
timeIds: '',
|
|
|
- timeStr: '',
|
|
|
+ timeStr: 'JDKP',
|
|
|
binSectionStr: 'HD',
|
|
|
page: {
|
|
|
pagesize: 12,
|
|
@@ -168,18 +145,25 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
+ let year = new Date().getFullYear()
|
|
|
+ let month = new Date().getMonth() + 1
|
|
|
+ if (month<10) {
|
|
|
+ this.timeIds = (year + '-0' + month).toString()
|
|
|
+ } else {
|
|
|
+ this.timeIds = (year + '-' + month).toString()
|
|
|
+ }
|
|
|
this.timerData = [
|
|
|
{
|
|
|
label: '年度',
|
|
|
- value: '1'
|
|
|
+ value: 'NDKP'
|
|
|
},
|
|
|
{
|
|
|
label: '季度',
|
|
|
- value: '2'
|
|
|
+ value: 'JDKP'
|
|
|
},
|
|
|
{
|
|
|
label: '月度',
|
|
|
- value: '3'
|
|
|
+ value: 'YDKP'
|
|
|
}
|
|
|
]
|
|
|
this.titleMsgArr = [
|
|
@@ -239,6 +223,7 @@ export default {
|
|
|
}
|
|
|
]
|
|
|
this.getEvalBenchmarkingIndicData()
|
|
|
+ this.getBinstageAndType()
|
|
|
},
|
|
|
methods: {
|
|
|
// 查询考评对标分析数据
|
|
@@ -253,15 +238,36 @@ export default {
|
|
|
}
|
|
|
apiGetscoreCountevaluationList(params).then(datas => {
|
|
|
if (datas && datas.data) {
|
|
|
- that.benchmarkingIndicatorData = datas.data.records
|
|
|
- that.page.total = datas.data.total
|
|
|
+ that.benchmarkingIndicatorData = datas.data.value
|
|
|
+ if (datas.data.title) {
|
|
|
+ let header = []
|
|
|
+ for(let i in datas.data.title) {
|
|
|
+ let obj = {
|
|
|
+ name: i,
|
|
|
+ children: datas.data.title[i]
|
|
|
+ }
|
|
|
+ header.push(obj)
|
|
|
+ }
|
|
|
+ that.benchmarkingIndicatorHeader = header
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
- apiGetbinstageList(params).then(datas =>{
|
|
|
+ },
|
|
|
+ // 获取阶段数据及指标类型数据
|
|
|
+ getBinstageAndType() {
|
|
|
+ let that = this
|
|
|
+ apiGetbinstageList().then(datas =>{
|
|
|
if (datas && datas.data) {
|
|
|
that.stageData = datas.data
|
|
|
}
|
|
|
})
|
|
|
+ apiGetIndicatorTypeList({
|
|
|
+ type: 2
|
|
|
+ }).then(datas =>{
|
|
|
+ if (datas && datas.data) {
|
|
|
+ that.indicatorTypeData = datas.data
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
changType(data) {
|
|
|
this.titleMsgArr.forEach(it =>{
|
|
@@ -271,6 +277,7 @@ export default {
|
|
|
this.binSectionStr = it.isNameEn
|
|
|
}
|
|
|
})
|
|
|
+ this.getEvalBenchmarkingIndicData()
|
|
|
},
|
|
|
getSeachData() {
|
|
|
this.page.currentPage = 1
|
|
@@ -284,13 +291,23 @@ export default {
|
|
|
this.binSectionIds = ''
|
|
|
this.getEvalBenchmarkingIndicData()
|
|
|
},
|
|
|
- handleSizeChange(val) {
|
|
|
- this.page.pagesize = val
|
|
|
- this.getEvalBenchmarkingIndicData()
|
|
|
- },
|
|
|
- handleCurrentChange(val) {
|
|
|
- this.page.currentPage = val
|
|
|
- this.getEvalBenchmarkingIndicData()
|
|
|
+ handleExport() {
|
|
|
+ let $e = this.$refs.benchmark.$el
|
|
|
+ try {
|
|
|
+ let $table = $e.querySelector('.el-table__fixed')
|
|
|
+ if(!$table) {
|
|
|
+ $table = $e
|
|
|
+ }
|
|
|
+ const wb = XLSX.utils.table_to_book($table, {raw:true})
|
|
|
+
|
|
|
+ const wbout = XLSXD.write(wb, {bookType: 'xlsx', bookSST:true, type: 'array'})
|
|
|
+ saveAs(
|
|
|
+ new Blob([wbout],{type: 'application/octet-stream'}),
|
|
|
+ `考评对标分析数据导出.xlsx`,
|
|
|
+ )
|
|
|
+ } catch (e) {
|
|
|
+ if (typeof console !== 'undefined') console.error(e)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -395,11 +412,13 @@ export default {
|
|
|
|
|
|
.benchmarkingIndicatorTableData {
|
|
|
display: flex;
|
|
|
+ width: 100%;
|
|
|
+ margin-top: 20px;
|
|
|
.tableMain{
|
|
|
- width: 95%;
|
|
|
+ width: calc(100% - 95px);
|
|
|
.el-table {
|
|
|
.el-table__body-wrapper {
|
|
|
- height: 55vh !important;
|
|
|
+ height: 68vh !important;
|
|
|
}
|
|
|
|
|
|
.el-input__inner {
|
|
@@ -436,6 +455,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.tableSeach{
|
|
|
+ width: 81px;
|
|
|
height: 100%;
|
|
|
margin-left: 10px;
|
|
|
border: 1px solid #D6DBEA;
|