From e58bfa85f175d789445f479f55c87619c43fd7c0 Mon Sep 17 00:00:00 2001 From: gaoshp <291585735@qq.com> Date: 星期三, 24 四月 2024 21:12:07 +0800 Subject: [PATCH] 过程参数 --- src/views/mdc/processParam/index.vue | 54 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 49 insertions(+), 5 deletions(-) diff --git a/src/views/mdc/processParam/index.vue b/src/views/mdc/processParam/index.vue index 53a28f8..b25fc1d 100644 --- a/src/views/mdc/processParam/index.vue +++ b/src/views/mdc/processParam/index.vue @@ -1,7 +1,7 @@ <!-- * @Date: 2024-04-09 22:11:21 * @LastEditors: Sneed - * @LastEditTime: 2024-04-23 21:40:53 + * @LastEditTime: 2024-04-24 21:11:17 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/processParam/index.vue 瀹炴椂鐪嬫澘 --> @@ -20,16 +20,39 @@ </el-container> </el-aside> <el-container> - <el-main> + <el-main v-show="list.length > 0"> <el-row> - <el-col style='text-align: right;'> + <el-col :span="4"> + <el-switch v-model="isShowTable" class="mb-2" active-text="鏁版嵁琛�" inactive-text="缁熻鍥�" /> + </el-col> + <el-col :span="20" style='text-align: right;'> <el-date-picker :max-range="3" :clearable="false" value-format="YYYY-MM-DD" style="width: 250px" v-model="time" type="daterange" range-separator="-" start-placeholder="" end-placeholder="" :disabled-date="disabledDate" @calendar-change="change" /> </el-col> </el-row> - <TimeLine ref="timeLine"></TimeLine> + <TimeLine v-model="timeRange" ref="timeLine"></TimeLine> + <el-collapse v-model="activeList" accordion> + <el-collapse-item :title="item.description" :name="index" v-for="(item, index) in list" + :key="index"> + <div> + <el-button>鏌ョ湅鏁版嵁</el-button> + </div> + <scEcharts v-show="!isShowTable" style="width:100%" height="300px" + :option="item.dayCharts"> + </scEcharts> + <scTable v-show="isShowTable" ref="table0" row-key="id" border :apiObj="item.apiObj" + stripe> + <el-table-column prop="alarmCode" label="鎶ヨ浠g爜" /> + <el-table-column prop="alarmMsg" label="鎶ヨ淇℃伅" /> + <el-table-column prop="count" label="鎶ヨ娆℃暟" /> + </scTable> + </el-collapse-item> + </el-collapse> + </el-main> + <el-main v-show="list.length == 0"> + <el-empty description="鏆傛棤鏁版嵁" /> </el-main> </el-container> </el-container> @@ -52,10 +75,17 @@ }, time() { this.query() + }, + timeRange(val) { + console.log(val, '>>>>>>>???/') } }, data() { return { + isShowTable: false, + list: [], + activeList: [], + timeRange: '', treeChecked: [], timeStart: moment().format('YYYY-MM-DD'), time: [moment().format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')], @@ -68,10 +98,24 @@ }, methods: { query() { - this.$refs.timeLine.init({ + this.$refs?.timeLine?.init({ dates: this.time, workstationId: this.treeChecked.toString() }) + this.$HTTP.get('/api/blade-mdc/process-parameter/param', { workstationId: this.treeChecked.toString() }).then(res => { + if (res.code === 200) { + this.list = res.data + } + }) + }, + queryChart(dmpDTO) { + this.$HTTP.post('/api/blade-mdc/process-parameter/chart/dmp-item', { + methodEnum: "HOUR", + startTime: this.timeRange.startTime, + endTime: this.timeRange.endTime, + workstationId: this.treeChecked.toString(), + dmpDTO + }) }, change(e) { this.timeStart = e[0] || moment().format('YYYY-MM-DD') -- Gitblit v1.9.3