|
@@ -2,14 +2,14 @@
|
|
|
<div class="huashanlunjian">
|
|
|
<el-table
|
|
|
:data="tableData"
|
|
|
- :header-cell-style="{ backgroundColor: '#f4f5f7',color: '#606266' }"
|
|
|
+ :header-cell-style="{ backgroundColor: '#f4f5f7', color: '#606266' }"
|
|
|
v-if="tableData.length"
|
|
|
@expand-change="rowClick"
|
|
|
style="width: 100%"
|
|
|
>
|
|
|
<el-table-column type="expand">
|
|
|
<template #default="props">
|
|
|
- <div>
|
|
|
+ <div :class="'loadare' + props.row.epg_id">
|
|
|
<el-row v-if="item.programType !== 'simple'">
|
|
|
<el-col :span="20">
|
|
|
<div :ref="'huashanChart' + props.row.epg_id"></div>
|
|
@@ -26,13 +26,16 @@
|
|
|
<el-table-column align="center" label="标题" prop="program_name" />
|
|
|
<el-table-column align="center" label="收视率" prop="watchrate">
|
|
|
<template #default="scope">
|
|
|
- <watchrate-ele :watchrate="scope.row.watchrate" :zoom="item.maxRate"/>
|
|
|
+ <watchrate-ele
|
|
|
+ :watchrate="scope.row.watchrate"
|
|
|
+ :zoom="item.maxRate"
|
|
|
+ />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<el-pagination
|
|
|
:page-size="size"
|
|
|
- v-if="total/size > 1"
|
|
|
+ v-if="total / size > 1"
|
|
|
v-model:current-page="current"
|
|
|
@current-change="changePage"
|
|
|
:total="total"
|
|
@@ -107,7 +110,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
rowClick(row) {
|
|
|
- if (
|
|
|
+ if (
|
|
|
openList[row.epg_id] !== undefined ||
|
|
|
openLi[row.epg_id] !== undefined
|
|
|
) {
|
|
@@ -119,17 +122,21 @@ export default {
|
|
|
openLi[row.epg_id].dispose();
|
|
|
openLi[row.epg_id] = undefined;
|
|
|
}
|
|
|
- return
|
|
|
+ return;
|
|
|
}
|
|
|
- epgDetail({ epgId: row.epg_id, target: ".loadare" + row.epg_id }).then(res => {
|
|
|
- let more = this.createChart(
|
|
|
- this.$refs["huashanChart" + row.epg_id],
|
|
|
- res
|
|
|
- );
|
|
|
- openList[row.epg_id] = more.chart;
|
|
|
- openLi[row.epg_id] = this.createBarChart(
|
|
|
- this.$refs["huashanListChart" + row.epg_id],
|
|
|
- more.height
|
|
|
+ this.$nextTick(() => {
|
|
|
+ epgDetail({ epgId: row.epg_id, target: ".loadare" + row.epg_id }).then(
|
|
|
+ res => {
|
|
|
+ let more = this.createChart(
|
|
|
+ this.$refs["huashanChart" + row.epg_id],
|
|
|
+ res
|
|
|
+ );
|
|
|
+ openList[row.epg_id] = more.chart;
|
|
|
+ openLi[row.epg_id] = this.createBarChart(
|
|
|
+ this.$refs["huashanListChart" + row.epg_id],
|
|
|
+ more.height
|
|
|
+ );
|
|
|
+ }
|
|
|
);
|
|
|
});
|
|
|
},
|
|
@@ -306,5 +313,3 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style></style>
|
|
|
-
|
|
|
-
|