From f620b6b035b2dcf8ee56a872e76f16f36e2bf73a Mon Sep 17 00:00:00 2001 From: ruancuihong <2806986110@qq.com> Date: Tue, 7 May 2024 19:05:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=BC=8F=E6=8F=90=E4=BA=A4=E7=9A=84?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../warnInfo/components/forecastDetail.vue | 156 +- .../fourPredictions/warnInfo/index.vue | 86 +- .../fourPredictions/warnInfo/js/detailData.js | 1516 ++++++++++++----- 3 files changed, 1184 insertions(+), 574 deletions(-) diff --git a/src/views/aiSupervision/fourPredictions/warnInfo/components/forecastDetail.vue b/src/views/aiSupervision/fourPredictions/warnInfo/components/forecastDetail.vue index 4e7eb8d..0580833 100644 --- a/src/views/aiSupervision/fourPredictions/warnInfo/components/forecastDetail.vue +++ b/src/views/aiSupervision/fourPredictions/warnInfo/components/forecastDetail.vue @@ -22,52 +22,39 @@
{{ item.chartData.chartName }} -
+
+
{{ item.tableName }} - - - - - - + + - -
- {{warnDetailData.wranTypeName}} - - - - - - - - - - - - - - - - + {{ warnDetailData.wranTypeName }} + +
- +
@@ -97,17 +84,16 @@ @@ -116,8 +102,10 @@ 取消 上一步 下一步 - 提交 - 关闭 + 提交 + 关闭
@@ -184,7 +172,10 @@ export default { value: '1小时' }, ], - isSuccessDeal: false + isSuccessDeal: false, + analysisTableColumnData: [], + flowTableColumnData: [], + loading: false }; }, watch: { @@ -204,13 +195,16 @@ export default { }, methods: { init () { + this.resetData() if (!this.warnItem.length) return + this.loading = true this.warnDetailData = this.warnItem.find(item => item.warnType === this.selectValue) - const { warnTypeList, checkbox, analysisTableData, flowTableData, flowWaterChartData, analysisTableName } = this.warnDetailData + const { warnTypeList, checkbox, analysisTableData, flowTableData, flowWaterChartData, analysisTableName, analysisTableColumnData, flowTableColumnData } = this.warnDetailData this.radioOptions = warnTypeList this.flowTableData = flowTableData this.isCheckbox = checkbox - this.analysisList = [] + this.analysisTableColumnData = analysisTableColumnData + this.flowTableColumnData = flowTableColumnData if (checkbox) { this.checkedValue.forEach(elem => { let chart = flowWaterChartData.find(item => item.id === elem) @@ -222,9 +216,12 @@ export default { } this.$nextTick(() => { this.initChart() + this.loading = false }); + }, changeProject (data) { + this.loading = true this.radioValue = data this.checkedValue = ['1'] this.analysisList = [] @@ -232,9 +229,11 @@ export default { this.analysisList.push({ chartId: 'chart' + data, chartData: chart, tableName: this.warnDetailData.analysisTableName, tableData: this.warnDetailData.analysisTableData }) this.$nextTick(() => { this.initChart() + this.loading = false }); }, changeCheckProject (data) { + this.loading = true this.radioValue = '1' this.checkedValue = data this.analysisList = [] @@ -244,18 +243,22 @@ export default { }); this.$nextTick(() => { this.initChart() + this.loading = false }); }, changeType (val) { + this.resetData() + this.loading = true this.warnDetailData = this.warnItem.find(item => item.warnType === this.selectValue) - const { warnTypeList, checkbox, analysisTableData, flowTableData, flowWaterChartData, analysisTableName } = this.warnDetailData + const { warnTypeList, checkbox, analysisTableData, flowTableData, flowWaterChartData, analysisTableName, analysisTableColumnData, flowTableColumnData } = this.warnDetailData this.radioOptions = warnTypeList this.flowTableData = flowTableData this.isCheckbox = checkbox + this.analysisTableColumnData = analysisTableColumnData + this.flowTableColumnData = flowTableColumnData this.selectValue = val this.radioValue = '1' this.checkedValue = ['1'] - this.analysisList = [] if (checkbox) { this.checkedValue.forEach(elem => { let chart = flowWaterChartData.find(item => item.id === elem) @@ -267,8 +270,17 @@ export default { } this.$nextTick(() => { this.initChart() + this.loading = false }); }, + resetData () { + this.analysisList = [] + this.analysisTableColumnData = [] + this.flowTableColumnData = [] + this.radioOptions = [] + this.flowTableData = [] + this.isCheckbox = false + }, initChart () { this.analysisList.forEach((data) => { let chart = echarts.init(document.getElementById(data.chartId)); @@ -341,24 +353,24 @@ export default { upStep () { if (this.active-- < 0) this.active = 0; }, - closeDrawer() { + closeDrawer () { this.drawerVisible = false this.active = 0 this.resetForm() }, - submitForm() { - this.$refs['dynamicValidateForm'].validate((valid) => { - if (valid) { - this.drawerVisible = false - this.active = 0 - } else { - return false; - } - }); - }, - resetForm() { - this.$refs['dynamicValidateForm']?.resetFields(); - }, + submitForm () { + this.$refs['dynamicValidateForm'].validate((valid) => { + if (valid) { + this.drawerVisible = false + this.active = 0 + } else { + return false; + } + }); + }, + resetForm () { + this.$refs['dynamicValidateForm']?.resetFields(); + }, } }; @@ -447,6 +459,7 @@ export default { margin-bottom: 16px; border-top: 1px solid #E5E5E5; border-bottom: 1px solid #E5E5E5; + .echarts-content { width: 951px; height: 320px; @@ -459,9 +472,11 @@ export default { } .warn-analysis { - flex: 1; + flex: 1; height: 300px; + padding-right: 16px; border-right: 1px solid #E5E5E5; + overflow: hidden; } } @@ -501,6 +516,12 @@ export default { .green-span { color: #31A08E; } + + ::v-deep.table-fixed { + .el-table__body-wrapper { + height: calc(100% - 44px) !important; + } + } } ::v-deep.drawer-wrapper { @@ -523,6 +544,7 @@ export default { .step-description { margin-bottom: 10px; + .description-item { height: 22px; font-family: 思源黑体; @@ -531,20 +553,24 @@ export default { line-height: 22px; letter-spacing: 0px; margin-bottom: 4px; + .item-name { color: rgba(0, 0, 0, 0.55); } + .item-value { color: rgba(0, 0, 0, 0.85); } } } + .el-step__icon-inner { font-size: 14px; font-weight: normal; line-height: 22px; letter-spacing: 0px; } + .el-step__title.is-success, .el-step__title.is-process, .el-step__title.is-wait, @@ -556,25 +582,31 @@ export default { letter-spacing: 0px; color: rgba(0, 0, 0, 0.85); } + .el-step__head.is-finish { .el-step__icon-inner { color: #36B29E; } } + .el-step__head.is-process { color: #fff; + .el-step__icon.is-text { background: #36B29E; border-color: #36B29E; } } + .el-step__head.is-wait { color: #fff; + .el-step__icon.is-text { background: #CDCDCD; border-color: #CDCDCD; } } + .el-form-item--medium .el-form-item__label { font-size: 14px; font-weight: 500; @@ -582,10 +614,12 @@ export default { letter-spacing: 0px; color: rgba(0, 0, 0, 0.85); } + .el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label:before { content: ''; margin-right: 0px; } + .detail-footer { position: absolute; bottom: 0px; diff --git a/src/views/aiSupervision/fourPredictions/warnInfo/index.vue b/src/views/aiSupervision/fourPredictions/warnInfo/index.vue index a2eae7f..8cd5415 100644 --- a/src/views/aiSupervision/fourPredictions/warnInfo/index.vue +++ b/src/views/aiSupervision/fourPredictions/warnInfo/index.vue @@ -1,4 +1,3 @@ -