<a-table>->Column-> customRender

接口状态展示问题的解决方法

正确示例:

<a-table :columns="columns" :data-source="tableData">
      <span slot="status" slot-scope="record">
        <a> {{ record.status === 0 ? '正常' : '禁用' }}</a>
      </span>
</a-table>
{
  title: '状态',
  key: 'status',
  // 采用dataIndex方式,需要将tableData里的status转换成正常和禁用
  // 觉得不应该去修改原接口返回数据,且是为了做展示去修改成展示值
  // 再来就是后续其他地方使用tableData时还是期望使用0和1
  // dataIndex: 'status',
  scopedSlots: { customRender: 'status' },
},

问题描述:

接口返回的status是0和-1,页面期望展示成正常和禁用。

若采用dataIndex方式,需要将tableData里的status转换成正常和禁用,觉得为了做展示去把tableData中status的值修改成展示值,不是很合理,且后续其他地方使用tableData时还是期望使用0和1

解决方法:

使用Column的customRender借助插槽来完成页面展示

 

<template> <!-- 表格列示例 - 其他列类似 --> <el-table-column prop="C" label="蒸汽量" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div :class="{'edited-cell': isCellEdited(scope.row, 'C')}" @dblclick.stop="handleCellDblClick(scope.row, 'C')"> <el-input v-if="scope.row.editing && scope.row.editField === 'C'" v-model="scope.row.C" size="mini" @blur="handleCellBlur(scope.row, 'C')" @keyup.enter.native="handleCellBlur(scope.row, 'C')" @keydown.native="handleKeyDown(scope.row, 'C', $event)" /> <span v-else>{{ scope.row.C }}</span> <span v-if="isCellEdited(scope.row, 'C')" class="edit-time"> {{ getEditTime(scope.row, 'C') }} </span> </div> </template> </el-table-column> </template> 以下代码仿照以上<div :class="{'edited-cell': isCellEdited(scope.row, 'C')}" @dblclick.stop="handleCellDblClick(scope.row, 'C')"> <el-input v-if="scope.row.editing && scope.row.editField === 'C'" v-model="scope.row.C" size="mini" @blur="handleCellBlur(scope.row, 'C')" @keyup.enter.native="handleCellBlur(scope.row, 'C')" @keydown.native="handleKeyDown(scope.row, 'C', $event)" /> <span v-else>{{ scope.row.C }}</span> <span v-if="isCellEdited(scope.row, 'C')" class="edit-time"> {{ getEditTime(scope.row, 'C') }} </span> </div>完整输出只输出</template>里面的<template> <div class="app-container"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" class="custom-search-form" > <div class="form-left"> <el-form-item label="统计时间"> <el-date-picker v-model="dateRange" style="width: 240px" value-format="yyyy-MM" type="monthrange" range-separator="-" start-placeholder="开始月份" end-placeholder="结束月份" clearable ></el-date-picker> </el-form-item> </div> </el-form> <div class="center-box"> <el-row :gutter="10" class="mb8"> <el-col :span="1.5"> <el-button type="primary" plain icon="el-icon-upload" size="mini" @click="handleAdd" >导入</el-button> </el-col> <el-col :span="1.5"> <el-button type="primary" plain icon="el-icon-download" size="mini" @click="handleExport" >导出</el-button> </el-col> </el-row> <!-- 生物质、光伏、地热热厂供热(能效1) --> <div class="table-section"> <h3 class="section-title">生物质、光伏、地热热厂供热(能效1)</h3> <!-- 生物质电厂热力月销售量 --> <h4 class="sub-section-title">生物质电厂热力月销售量</h4> <el-table :data="biomassPlantData" border style="width: 100%" max-height="500" :summary-method="getBiomassPlantSummaries" show-summary > <el-table-column label="日期" align="center" width="120" fixed> <el-table-column prop="A" label="年" align="center" width="60"></el-table-column> <el-table-column prop="B" label="月" align="center" width="60"></el-table-column> </el-table-column> <el-table-column label="销售量(蒸吨)" align="center"> <el-table-column prop="C" label="蒸汽量" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'C')"> <el-input v-if="scope.row.editing && scope.row.editField === 'C'" v-model="scope.row.C" size="mini" @blur="handleCellBlur(scope.row, 'C')" @keyup.enter.native="handleCellBlur(scope.row, 'C')" /> <span v-else>{{ scope.row.C }}</span> </div> </template> </el-table-column> <el-table-column prop="D" label="平均蒸汽温度(℃)" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'D')"> <el-input v-if="scope.row.editing && scope.row.editField === 'D'" v-model="scope.row.D" size="mini" @blur="handleCellBlur(scope.row, 'D')" @keyup.enter.native="handleCellBlur(scope.row, 'D')" /> <span v-else>{{ scope.row.D }}</span> </div> </template> </el-table-column> <el-table-column prop="E" label="平均蒸汽压力(MPa)" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'E')"> <el-input v-if="scope.row.editing && scope.row.editField === 'E'" v-model="scope.row.E" size="mini" @blur="handleCellBlur(scope.row, 'E')" @keyup.enter.native="handleCellBlur(scope.row, 'E')" /> <span v-else>{{ scope.row.E }}</span> </div> </template> </el-table-column> <el-table-column prop="F" label="回水温度(℃)" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'F')"> <el-input v-if="scope.row.editing && scope.row.editField === 'F'" v-model="scope.row.F" size="mini" @blur="handleCellBlur(scope.row, 'F')" @keyup.enter.native="handleCellBlur(scope.row, 'F')" /> <span v-else>{{ scope.row.F }}</span> </div> </template> </el-table-column> <el-table-column prop="G" label="平均回水压力(MPa)" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'G')"> <el-input v-if="scope.row.editing && scope.row.editField === 'G'" v-model="scope.row.G" size="mini" @blur="handleCellBlur(scope.row, 'G')" @keyup.enter.native="handleCellBlur(scope.row, 'G')" /> <span v-else>{{ scope.row.G }}</span> </div> </template> </el-table-column> <el-table-column prop="H" label="供热量(GJ)" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'H')"> <el-input v-if="scope.row.editing && scope.row.editField === 'H'" v-model="scope.row.H" size="mini" @blur="handleCellBlur(scope.row, 'H')" @keyup.enter.native="handleCellBlur(scope.row, 'H')" /> <span v-else>{{ scope.row.H }}</span> </div> </template> </el-table-column> </el-table-column> </el-table> <!-- 垃圾热力月销售量 --> <h4 class="sub-section-title">垃圾热力月销售量</h4> <el-table :data="wasteHeatData" border style="width: 100%" max-height="500" :summary-method="getWasteHeatSummaries" show-summary > <el-table-column label="日期" align="center" width="120" fixed> <el-table-column prop="A" label="年" align="center" width="60"></el-table-column> <el-table-column prop="B" label="月" align="center" width="60"></el-table-column> </el-table-column> <el-table-column label="销售量(蒸吨)" align="center"> <el-table-column prop="C" label="蒸汽量" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'C')"> <el-input v-if="scope.row.editing && scope.row.editField === 'C'" v-model="scope.row.C" size="mini" @blur="handleCellBlur(scope.row, 'C')" @keyup.enter.native="handleCellBlur(scope.row, 'C')" /> <span v-else>{{ scope.row.C }}</span> </div> </template> </el-table-column> <el-table-column prop="D" label="平均蒸汽温度(℃)" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'D')"> <el-input v-if="scope.row.editing && scope.row.editField === 'D'" v-model="scope.row.D" size="mini" @blur="handleCellBlur(scope.row, 'D')" @keyup.enter.native="handleCellBlur(scope.row, 'D')" /> <span v-else>{{ scope.row.D }}</span> </div> </template> </el-table-column> <el-table-column prop="E" label="平均蒸汽压力(MPa)" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'E')"> <el-input v-if="scope.row.editing && scope.row.editField === 'E'" v-model="scope.row.E" size="mini" @blur="handleCellBlur(scope.row, 'E')" @keyup.enter.native="handleCellBlur(scope.row, 'E')" /> <span v-else>{{ scope.row.E }}</span> </div> </template> </el-table-column> <el-table-column prop="F" label="回水温度(℃)" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'F')"> <el-input v-if="scope.row.editing && scope.row.editField === 'F'" v-model="scope.row.F" size="mini" @blur="handleCellBlur(scope.row, 'F')" @keyup.enter.native="handleCellBlur(scope.row, 'F')" /> <span v-else>{{ scope.row.F }}</span> </div> </template> </el-table-column> <el-table-column prop="G" label="平均回水压力(MPa)" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'G')"> <el-input v-if="scope.row.editing && scope.row.editField === 'G'" v-model="scope.row.G" size="mini" @blur="handleCellBlur(scope.row, 'G')" @keyup.enter.native="handleCellBlur(scope.row, 'G')" /> <span v-else>{{ scope.row.G }}</span> </div> </template> </el-table-column> <el-table-column prop="H" label="供热量(GJ)" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'H')"> <el-input v-if="scope.row.editing && scope.row.editField === 'H'" v-model="scope.row.H" size="mini" @blur="handleCellBlur(scope.row, 'H')" @keyup.enter.native="handleCellBlur(scope.row, 'H')" /> <span v-else>{{ scope.row.H }}</span> </div> </template> </el-table-column> </el-table-column> </el-table> </div> <!-- 煤锅炉供热(能效0.85) --> <div class="table-section"> <h3 class="section-title">煤锅炉供热(能效0.85)</h3> <!-- 敦煌示范区煤锅炉热力月销售量 --> <h4 class="sub-section-title">敦煌示范区煤锅炉热力月销售量</h4> <el-table :data="dunhuangBoilerData" border style="width: 100%" max-height="500" :summary-method="getDunhuangBoilerSummaries" show-summary > <el-table-column label="日期" align="center" width="120" fixed> <el-table-column prop="A" label="年" align="center" width="60"></el-table-column> <el-table-column prop="B" label="月" align="center" width="60"></el-table-column> </el-table-column> <el-table-column label="销售量(蒸吨)" align="center"> <el-table-column prop="C" label="蒸汽量" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'C')"> <el-input v-if="scope.row.editing && scope.row.editField === 'C'" v-model="scope.row.C" size="mini" @blur="handleCellBlur(scope.row, 'C')" @keyup.enter.native="handleCellBlur(scope.row, 'C')" /> <span v-else>{{ scope.row.C }}</span> </div> </template> </el-table-column> <el-table-column prop="D" label="平均蒸汽温度(℃)" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'D')"> <el-input v-if="scope.row.editing && scope.row.editField === 'D'" v-model="scope.row.D" size="mini" @blur="handleCellBlur(scope.row, 'D')" @keyup.enter.native="handleCellBlur(scope.row, 'D')" /> <span v-else>{{ scope.row.D }}</span> </div> </template> </el-table-column> <el-table-column prop="E" label="平均蒸汽压力(MPa)" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'E')"> <el-input v-if="scope.row.editing && scope.row.editField === 'E'" v-model="scope.row.E" size="mini" @blur="handleCellBlur(scope.row, 'E')" @keyup.enter.native="handleCellBlur(scope.row, 'E')" /> <span v-else>{{ scope.row.E }}</span> </div> </template> </el-table-column> <el-table-column prop="F" label="回水温度(℃)" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'F')"> <el-input v-if="scope.row.editing && scope.row.editField === 'F'" v-model="scope.row.F" size="mini" @blur="handleCellBlur(scope.row, 'F')" @keyup.enter.native="handleCellBlur(scope.row, 'F')" /> <span v-else>{{ scope.row.F }}</span> </div> </template> </el-table-column> <el-table-column prop="G" label="平均回水压力(MPa)" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'G')"> <el-input v-if="scope.row.editing && scope.row.editField === 'G'" v-model="scope.row.G" size="mini" @blur="handleCellBlur(scope.row, 'G')" @keyup.enter.native="handleCellBlur(scope.row, 'G')" /> <span v-else>{{ scope.row.G }}</span> </div> </template> </el-table-column> <el-table-column prop="H" label="供热量(GJ)" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'H')"> <el-input v-if="scope.row.editing && scope.row.editField === 'H'" v-model="scope.row.H" size="mini" @blur="handleCellBlur(scope.row, 'H')" @keyup.enter.native="handleCellBlur(scope.row, 'H')" /> <span v-else>{{ scope.row.H }}</span> </div> </template> </el-table-column> </el-table-column> </el-table> <!-- xx煤锅炉热力月销售量 --> <h4 class="sub-section-title">xx煤锅炉热力月销售量</h4> <el-table :data="xxBoilerData" border style="width: 100%" max-height="500" :summary-method="getXxBoilerSummaries" show-summary > <el-table-column label="日期" align="center" width="120" fixed> <el-table-column prop="A" label="年" align="center" width="60"></el-table-column> <el-table-column prop="B" label="月" align="center" width="60"></el-table-column> </el-table-column> <el-table-column label="销售量(蒸吨)" align="center"> <el-table-column prop="C" label="蒸汽量" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'C')"> <el-input v-if="scope.row.editing && scope.row.editField === 'C'" v-model="scope.row.C" size="mini" @blur="handleCellBlur(scope.row, 'C')" @keyup.enter.native="handleCellBlur(scope.row, 'C')" /> <span v-else>{{ scope.row.C }}</span> </div> </template> </el-table-column> <el-table-column prop="D" label="平均蒸汽温度(℃)" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'D')"> <el-input v-if="scope.row.editing && scope.row.editField === 'D'" v-model="scope.row.D" size="mini" @blur="handleCellBlur(scope.row, 'D')" @keyup.enter.native="handleCellBlur(scope.row, 'D')" /> <span v-else>{{ scope.row.D }}</span> </div> </template> </el-table-column> <el-table-column prop="E" label="平均蒸汽压力(MPa)" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'E')"> <el-input v-if="scope.row.editing && scope.row.editField === 'E'" v-model="scope.row.E" size="mini" @blur="handleCellBlur(scope.row, 'E')" @keyup.enter.native="handleCellBlur(scope.row, 'E')" /> <span v-else>{{ scope.row.E }}</span> </div> </template> </el-table-column> <el-table-column prop="F" label="回水温度(℃)" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'F')"> <el-input v-if="scope.row.editing && scope.row.editField === 'F'" v-model="scope.row.F" size="mini" @blur="handleCellBlur(scope.row, 'F')" @keyup.enter.native="handleCellBlur(scope.row, 'F')" /> <span v-else>{{ scope.row.F }}</span> </div> </template> </el-table-column> <el-table-column prop="G" label="平均回水压力(MPa)" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'G')"> <el-input v-if="scope.row.editing && scope.row.editField === 'G'" v-model="scope.row.G" size="mini" @blur="handleCellBlur(scope.row, 'G')" @keyup.enter.native="handleCellBlur(scope.row, 'G')" /> <span v-else>{{ scope.row.G }}</span> </div> </template> </el-table-column> <el-table-column prop="H" label="供热量(GJ)" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'H')"> <el-input v-if="scope.row.editing && scope.row.editField === 'H'" v-model="scope.row.H" size="mini" @blur="handleCellBlur(scope.row, 'H')" @keyup.enter.native="handleCellBlur(scope.row, 'H')" /> <span v-else>{{ scope.row.H }}</span> </div> </template> </el-table-column> </el-table-column> </el-table> </div> <!-- 热电厂供热(供热能效0.4) --> <div class="table-section"> <h3 class="section-title">热电厂供热(供热能效0.4)</h3> <!-- 生物质热电厂热力月销售量 --> <h4 class="sub-section-title">生物质热电厂热力月销售量</h4> <el-table :data="biomassPowerPlantData" border style="width: 100%" max-height="500" :summary-method="getBiomassPowerPlantSummaries" show-summary > <el-table-column label="日期" align="center" width="120" fixed> <el-table-column prop="A" label="年" align="center" width="60"></el-table-column> <el-table-column prop="B" label="月" align="center" width="60"></el-table-column> </el-table-column> <el-table-column label="销售量(蒸吨)" align="center"> <el-table-column prop="C" label="蒸汽量" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'C')"> <el-input v-if="scope.row.editing && scope.row.editField === 'C'" v-model="scope.row.C" size="mini" @blur="handleCellBlur(scope.row, 'C')" @keyup.enter.native="handleCellBlur(scope.row, 'C')" /> <span v-else>{{ scope.row.C }}</span> </div> </template> </el-table-column> <el-table-column prop="D" label="平均蒸汽温度(℃)" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'D')"> <el-input v-if="scope.row.editing && scope.row.editField === 'D'" v-model="scope.row.D" size="mini" @blur="handleCellBlur(scope.row, 'D')" @keyup.enter.native="handleCellBlur(scope.row, 'D')" /> <span v-else>{{ scope.row.D }}</span> </div> </template> </el-table-column> <el-table-column prop="E" label="平均蒸汽压力(MPa)" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'E')"> <el-input v-if="scope.row.editing && scope.row.editField === 'E'" v-model="scope.row.E" size="mini" @blur="handleCellBlur(scope.row, 'E')" @keyup.enter.native="handleCellBlur(scope.row, 'E')" /> <span v-else>{{ scope.row.E }}</span> </div> </template> </el-table-column> <el-table-column prop="F" label="回水温度(℃)" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'F')"> <el-input v-if="scope.row.editing && scope.row.editField === 'F'" v-model="scope.row.F" size="mini" @blur="handleCellBlur(scope.row, 'F')" @keyup.enter.native="handleCellBlur(scope.row, 'F')" /> <span v-else>{{ scope.row.F }}</span> </div> </template> </el-table-column> <el-table-column prop="G" label="平均回水压力(MPa)" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'G')"> <el-input v-if="scope.row.editing && scope.row.editField === 'G'" v-model="scope.row.G" size="mini" @blur="handleCellBlur(scope.row, 'G')" @keyup.enter.native="handleCellBlur(scope.row, 'G')" /> <span v-else>{{ scope.row.G }}</span> </div> </template> </el-table-column> <el-table-column prop="H" label="供热量(GJ)" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'H')"> <el-input v-if="scope.row.editing && scope.row.editField === 'H'" v-model="scope.row.H" size="mini" @blur="handleCellBlur(scope.row, 'H')" @keyup.enter.native="handleCellBlur(scope.row, 'H')" /> <span v-else>{{ scope.row.H }}</span> </div> </template> </el-table-column> </el-table-column> </el-table> <!-- 垃圾热电厂热力月销售量 --> <h4 class="sub-section-title">垃圾热电厂热力月销售量</h4> <el-table :data="wastePowerPlantData" border style="width: 100%" max-height="500" :summary-method="getWastePowerPlantSummaries" show-summary > <el-table-column label="日期" align="center" width="120" fixed> <el-table-column prop="A" label="年" align="center" width="60"></el-table-column> <el-table-column prop="B" label="月" align="center" width="60"></el-table-column> </el-table-column> <el-table-column label="销售量(蒸吨)" align="center"> <el-table-column prop="C" label="蒸汽量" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'C')"> <el-input v-if="scope.row.editing && scope.row.editField === 'C'" v-model="scope.row.C" size="mini" @blur="handleCellBlur(scope.row, 'C')" @keyup.enter.native="handleCellBlur(scope.row, 'C')" /> <span v-else>{{ scope.row.C }}</span> </div> </template> </el-table-column> <el-table-column prop="D" label="平均蒸汽温度(℃)" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'D')"> <el-input v-if="scope.row.editing && scope.row.editField === 'D'" v-model="scope.row.D" size="mini" @blur="handleCellBlur(scope.row, 'D')" @keyup.enter.native="handleCellBlur(scope.row, 'D')" /> <span v-else>{{ scope.row.D }}</span> </div> </template> </el-table-column> <el-table-column prop="E" label="平均蒸汽压力(MPa)" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'E')"> <el-input v-if="scope.row.editing && scope.row.editField === 'E'" v-model="scope.row.E" size="mini" @blur="handleCellBlur(scope.row, 'E')" @keyup.enter.native="handleCellBlur(scope.row, 'E')" /> <span v-else>{{ scope.row.E }}</span> </div> </template> </el-table-column> <el-table-column prop="F" label="回水温度(℃)" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'F')"> <el-input v-if="scope.row.editing && scope.row.editField === 'F'" v-model="scope.row.F" size="mini" @blur="handleCellBlur(scope.row, 'F')" @keyup.enter.native="handleCellBlur(scope.row, 'F')" /> <span v-else>{{ scope.row.F }}</span> </div> </template> </el-table-column> <el-table-column prop="G" label="平均回水压力(MPa)" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'G')"> <el-input v-if="scope.row.editing && scope.row.editField === 'G'" v-model="scope.row.G" size="mini" @blur="handleCellBlur(scope.row, 'G')" @keyup.enter.native="handleCellBlur(scope.row, 'G')" /> <span v-else>{{ scope.row.G }}</span> </div> </template> </el-table-column> <el-table-column prop="H" label="供热量(GJ)" align="center" :render-header="renderHeader"> <template slot-scope="scope"> <div class="editable-cell" @dblclick.stop="handleCellDblClick(scope.row, 'H')"> <el-input v-if="scope.row.editing && scope.row.editField === 'H'" v-model="scope.row.H" size="mini" @blur="handleCellBlur(scope.row, 'H')" @keyup.enter.native="handleCellBlur(scope.row, 'H')" /> <span v-else>{{ scope.row.H }}</span> </div> </template> </el-table-column> </el-table-column> </el-table> </div> </div> <!-- 导入对话框 --> <el-dialog :title="importTitle" :visible.sync="importDialogVisible" width="600px" append-to-body @close="importDialogVisible = false" > <excel-upload :upload-url="importUrl" :template-url="templateUrl" @upload-success="handleImportSuccess" /> <div slot="footer" class="dialog-footer"> <el-button @click="importDialogVisible = false">关 闭</el-button> </div> </el-dialog> </div> </template>
07-23
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值