|
@@ -331,7 +331,7 @@ const funChartSelect = async (batch) => {
|
|
|
yDataArr.push(dataSetObj[1].source[scatterIndex].k)
|
|
|
}
|
|
|
}
|
|
|
- const wtRes = await request.get('/power/fitting/filter', { params: { yk: yDataArr.join(','), wk: wDataArr.join(',') } })
|
|
|
+ const wtRes = await request.get('/power/fitting/filter', { params: { yk: yDataArr.join(','), wk: wDataArr.join(','), only: dataRadom.value } })
|
|
|
if (wtRes.code === 200) {
|
|
|
let id = 1
|
|
|
const tempArr = [] //用于以风机id 聚合dataArr
|
|
@@ -464,10 +464,43 @@ const funChartArea = () => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+const handleClick = (val) =>{
|
|
|
+ wtTab.value = val.props.name
|
|
|
+ if (wtTab.value === 'problem') {
|
|
|
+ faultDataFn()
|
|
|
+ } else if (wtTab.value === 'warning') {
|
|
|
+ warnDataFn()
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+//故障数据
|
|
|
+const faultDataFn = async() =>{
|
|
|
+ let params = {
|
|
|
+ only: dataRadom.value,
|
|
|
+ table: 'alarmWt'
|
|
|
+ }
|
|
|
+ const faultRes = await request.get('/power/fitting/alarms', { params: params })
|
|
|
+ faultData.value = faultRes.data
|
|
|
+}
|
|
|
+//预警数据
|
|
|
+const warnDataFn = async() =>{
|
|
|
+ let params = {
|
|
|
+ only: dataRadom.value,
|
|
|
+ table: 'alarmCt'
|
|
|
+ }
|
|
|
+ const warnRes = await request.get('/power/fitting/alarms', { params: params })
|
|
|
+ warnData.value = warnRes.data
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
/**dialog 数据 */
|
|
|
const wtDialog = ref(false)
|
|
|
const wtData = ref([])
|
|
|
+const faultData = ref([])
|
|
|
+const warnData = ref([])
|
|
|
const wtTab = ref('table')
|
|
|
+// 随机数
|
|
|
+const dataRadom = ref(null)
|
|
|
/**tab */
|
|
|
const activeTab = ref('1')
|
|
|
/**created */
|
|
@@ -475,6 +508,7 @@ const activeTab = ref('1')
|
|
|
// funGetProcessTree()
|
|
|
/**mounted */
|
|
|
onMounted(() => {
|
|
|
+ dataRadom.value = (new Date().getTime()).toString()
|
|
|
tableHeight.value = window.innerHeight - 314 + 'px'
|
|
|
excelHeight.value =(window.innerHeight - 270) / 2 + 'px'
|
|
|
treeHeight.value = (window.innerHeight - 270) / 2 + 'px'
|
|
@@ -501,7 +535,7 @@ onActivated(() => {
|
|
|
<search-cop class="mb-[20px] shadow rounded-[6px] shadow-blue-500" @submit="funSubmit">
|
|
|
</search-cop>
|
|
|
<el-dialog v-model="wtDialog" draggable title="风机功率点位">
|
|
|
- <el-tabs v-model="wtTab">
|
|
|
+ <el-tabs v-model="wtTab" @tab-click="handleClick">
|
|
|
<el-tab-pane label="数据" name="table">
|
|
|
<el-table :data="wtData" row-key="id" :max-height="550">
|
|
|
<el-table-column property="wtId" align="center" label="风机" />
|
|
@@ -512,11 +546,31 @@ onActivated(() => {
|
|
|
<el-table-column property="filter" sortable align="center" label="是否有用点" />
|
|
|
</el-table>
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane label="故障" name="problem" disabled>
|
|
|
-
|
|
|
+ <el-tab-pane label="故障" name="problem">
|
|
|
+ <el-table :data="faultData" row-key="id" :max-height="550">
|
|
|
+ <el-table-column property="deviceId" align="center" label="风机" />
|
|
|
+ <el-table-column property="ts" sortable :width="160" align="center" label="时间">
|
|
|
+ <template v-slot="scope">
|
|
|
+ {{new Date(scope.row.ts).formatDate("yyyy-MM-dd hh:mm:ss")}}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column property="characteristic" sortable align="center" label="特性" />
|
|
|
+ <el-table-column property="components" sortable align="center" label="部件" />
|
|
|
+ <el-table-column property="description" sortable align="center" label="描述" />
|
|
|
+ </el-table>
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane label="预警" name="warning" disabled>
|
|
|
-
|
|
|
+ <el-tab-pane label="预警" name="warning">
|
|
|
+ <el-table :data="warnData" row-key="id" :max-height="550">
|
|
|
+ <el-table-column property="deviceId" align="center" label="风机" />
|
|
|
+ <el-table-column property="ts" sortable :width="160" align="center" label="时间" >
|
|
|
+ <template v-slot="scope">
|
|
|
+ {{new Date(scope.row.ts).formatDate("yyyy-MM-dd hh:mm:ss")}}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column property="characteristic" sortable align="center" label="特性" />
|
|
|
+ <el-table-column property="components" sortable align="center" label="部件" />
|
|
|
+ <el-table-column property="description" sortable align="center" label="描述" />
|
|
|
+ </el-table>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</el-dialog>
|