From 84a124a49844f2e8185acf6491861e4b43fa83c0 Mon Sep 17 00:00:00 2001
From: lzhe <181968431@qq.com>
Date: 星期五, 26 四月 2024 23:30:47 +0800
Subject: [PATCH] 1
---
src/views/mdc/components/recordChartsByDate.vue | 41 +++++++++++++++++++++++++++++++++++------
1 files changed, 35 insertions(+), 6 deletions(-)
diff --git a/src/views/mdc/components/recordCharts.vue b/src/views/mdc/components/recordChartsByDate.vue
similarity index 89%
rename from src/views/mdc/components/recordCharts.vue
rename to src/views/mdc/components/recordChartsByDate.vue
index d28dbde..f78a063 100644
--- a/src/views/mdc/components/recordCharts.vue
+++ b/src/views/mdc/components/recordChartsByDate.vue
@@ -2,37 +2,49 @@
<div>
<div id="record" style="width: 100%;height:500px;"></div>
<div class="pagination">
- <el-pagination layout="prev, pager, next" :total="total" :default-page-size="6"/>
+ <el-pagination layout="prev, pager, next" @current-change="recordChange" :total="total" :default-page-size="6"/>
</div>
+ <save-dialog v-if="dialog.save" ref="saveDialog" @success="addfeedbackSuccess" :workstationId="lastLevelId" @closed="dialog.save=false"></save-dialog>
</div>
</template>
<script>
+import saveDialog from '../add-station-status'
import moment from 'moment';
import * as echarts from 'echarts';
export default {
- components: {},
+ components: {saveDialog},
props: ['collectionstatus','date','workstationInfoList'],
watch: {
date(val) {
+ this.current = "1";
this.getCharts();
},
workstationInfoList(val) {
+ this.current = "1";
this.getCharts();
}
},
data() {
return {
+ dialog: {
+ save: false
+ },
current: "1",
size: "6",
total: 0,
- records: []
+ records: [],
+ lastLevelId: ""
}
},
mounted() {
this.getCharts();
},
methods: {
+ addfeedbackSuccess() {
+ this.current = "1";
+ this.getCharts();
+ },
renderItem(params, api) {
var categoryIndex = api.value(0);
var start = api.coord([api.value(1), categoryIndex]);
@@ -100,6 +112,7 @@
})
newData.push(...item.statusRecordList);
})
+ this.total = res.data.total;
//娓叉煋鍥捐〃
this.setCharts(yAxisData,newData);
// 妫�鏌ユ槸鍚﹀瓨鍦╥d涓�'parentNodeDom'鐨凞OM鍏冪礌,鏈夊氨鍏堝垹闄�
@@ -258,13 +271,22 @@
}
}
dom.style.left = recordDom.offsetLeft + "px"; //瀹氫綅left
+ var that = this;
dom.addEventListener('click', function (event) {
- console.log(event.target.dataset.code);
+ that.lastLevelId = event.target.dataset.id;
+ that.dialog.save = true
+ that.$nextTick(() => {
+ that.$refs.saveDialog.open('edit').setData(that.lastLevelId);
+ })
})
parentNodeDom.appendChild(dom);
}
- }
+ },
+ recordChange(current) {
+ this.current = current;
+ this.getCharts();
+ },
}
}
</script>
@@ -272,7 +294,6 @@
<style scoped>
#record {
position: relative;
- margin-bottom: 120px;
}
#record /deep/ .domSpan {
display: inline-block;
@@ -286,4 +307,12 @@
display: inline-block;
width: 80px;
}
+ .pagination {
+ text-align: right;
+ display: flex;
+ justify-content: end;
+ margin-top: -60px;
+ position: relative;
+ z-index: 99;
+ }
</style>
\ No newline at end of file
--
Gitblit v1.9.3