| @@ -86,7 +86,7 @@ | |||||
| </el-select> | </el-select> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <div class="app-titel" style="margin: 15px 0 0 110px;"> | |||||
| <div class="app-titel" style="margin: 15px 0 0 110px"> | |||||
| <div> | <div> | ||||
| <el-button type="primary" size="small" @click="screen()" | <el-button type="primary" size="small" @click="screen()" | ||||
| >筛选</el-button | >筛选</el-button | ||||
| @@ -105,6 +105,7 @@ | |||||
| ></i | ></i | ||||
| ></el-button> | ></el-button> | ||||
| </div> | </div> | ||||
| <div | <div | ||||
| style="margin-left: auto; margin-right: 10px" | style="margin-left: auto; margin-right: 10px" | ||||
| v-if="sta_rec_downLoad" | v-if="sta_rec_downLoad" | ||||
| @@ -115,7 +116,14 @@ | |||||
| </div> | </div> | ||||
| <!-- 表格 --> | <!-- 表格 --> | ||||
| <div class="cen-tab"> | <div class="cen-tab"> | ||||
| <el-table @sort-change="customTabLast" ref="table" height="527px" :header-cell-style="{background:'#F5F7FA',color:'#333333'}" :data="tableData" style="width: 100%"> | |||||
| <el-table | |||||
| @sort-change="customTabLast" | |||||
| ref="table" | |||||
| height="527px" | |||||
| :header-cell-style="{ background: '#F5F7FA', color: '#333333' }" | |||||
| :data="tableData" | |||||
| style="width: 100%" | |||||
| > | |||||
| <el-table-column prop="batchId" width="120" label="序号" align="center"> | <el-table-column prop="batchId" width="120" label="序号" align="center"> | ||||
| <template slot-scope="scope"> | <template slot-scope="scope"> | ||||
| {{ | {{ | ||||
| @@ -380,8 +388,14 @@ export default { | |||||
| console.log(e); | console.log(e); | ||||
| if (e.prop == "statDate") { | if (e.prop == "statDate") { | ||||
| this.tableData.sort((a, b) => { | this.tableData.sort((a, b) => { | ||||
| let timeA = a[e.prop] == null ? null : new Date(a[e.prop].replace(/-/g, "/")).getTime(); | |||||
| let timeB = b[e.prop] == null ? null : new Date(b[e.prop].replace(/-/g, "/")).getTime(); | |||||
| let timeA = | |||||
| a[e.prop] == null | |||||
| ? null | |||||
| : new Date(a[e.prop].replace(/-/g, "/")).getTime(); | |||||
| let timeB = | |||||
| b[e.prop] == null | |||||
| ? null | |||||
| : new Date(b[e.prop].replace(/-/g, "/")).getTime(); | |||||
| if (e.order == "ascending") { | if (e.order == "ascending") { | ||||
| return timeA - timeB; | return timeA - timeB; | ||||
| } | } | ||||
| @@ -555,7 +569,7 @@ export default { | |||||
| }) | }) | ||||
| .then((res) => { | .then((res) => { | ||||
| this.tableData = res.data.records; | this.tableData = res.data.records; | ||||
| // 表格中设置ref属性,在数据渲染之后或者updated()之后 | // 表格中设置ref属性,在数据渲染之后或者updated()之后 | ||||
| this.$nextTick(() => { | this.$nextTick(() => { | ||||
| this.$refs.table.doLayout(); | this.$refs.table.doLayout(); | ||||