添加数据贯通代码未调试

This commit is contained in:
2026-04-25 18:19:29 +08:00
parent 7fa0a7d38f
commit 73b65962f2
9 changed files with 1197 additions and 0 deletions

View File

@@ -0,0 +1,110 @@
<template>
<div class="timing-page realtime-page">
<el-card shadow="never" class="page-card">
<div slot="header" class="card-header">
<span>实时跟踪页</span>
<el-tag type="warning" size="mini">Gauge + Shape</el-tag>
</div>
<el-form :inline="true" :model="queryForm" size="mini" class="query-form">
<el-form-item label="MATID">
<el-input v-model="queryForm.matId" placeholder="输入 MATID" clearable style="width: 240px;" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-refresh" :loading="loading" @click="handleQuery">获取实时数据</el-button>
<el-button icon="el-icon-delete" @click="handleReset">清空</el-button>
</el-form-item>
</el-form>
<el-empty v-if="!realtimeData" description="请输入 MATID 后查询实时数据" />
<template v-else>
<el-row :gutter="16">
<el-col :span="12">
<el-card shadow="never" class="sub-card">
<div slot="header">Gauge 厚度数据</div>
<el-table :data="gaugeRows" size="mini" height="520" border>
<el-table-column prop="XTIME" label="XTIME" width="120" />
<el-table-column prop="XLOCATION" label="XLOCATION" width="100" />
<el-table-column prop="THICK0" label="THICK0" width="90" />
<el-table-column prop="THICK1" label="THICK1" width="90" />
<el-table-column prop="THICK4" label="THICK4" width="90" />
<el-table-column prop="THICK5" label="THICK5" width="90" />
<el-table-column prop="EXIT_SPEED" label="EXIT_SPEED" width="100" />
</el-table>
</el-card>
</el-col>
<el-col :span="12">
<el-card shadow="never" class="sub-card">
<div slot="header">Shape 板形数据</div>
<el-table :data="shapeRows" size="mini" height="520" border>
<el-table-column prop="XTIME" label="XTIME" width="120" />
<el-table-column prop="XLOCATION" label="XLOCATION" width="100" />
<el-table-column prop="HIGHZONEID" label="HIGHZONEID" width="100" />
<el-table-column prop="LOWZONEID" label="LOWZONEID" width="100" />
<el-table-column prop="EXIT_SPEED" label="EXIT_SPEED" width="100" />
<el-table-column prop="ROLLFORCE" label="ROLLFORCE" width="100" />
<el-table-column prop="ABSDEVIATION" label="ABSDEVIATION" width="110" />
</el-table>
</el-card>
</el-col>
</el-row>
</template>
</el-card>
</div>
</template>
<script>
import createTimingFetch from '@/api/l2/timing'
export default {
name: 'TimingRealtimePage',
props: {
baseURL: { type: String, required: true }
},
data() {
return {
fetchApi: null,
loading: false,
queryForm: { matId: '' },
realtimeData: null,
gaugeRows: [],
shapeRows: []
}
},
created() {
this.fetchApi = createTimingFetch(this.baseURL)
},
methods: {
async handleQuery() {
if (!this.queryForm.matId) {
this.$message.warning('请输入 MATID')
return
}
this.loading = true
try {
const res = await this.fetchApi.getRealtimeData(this.queryForm.matId)
this.realtimeData = res?.data || res
this.gaugeRows = this.realtimeData?.gauge?.result || []
this.shapeRows = this.realtimeData?.shape?.result || []
} finally {
this.loading = false
}
},
handleReset() {
this.queryForm.matId = ''
this.realtimeData = null
this.gaugeRows = []
this.shapeRows = []
}
}
}
</script>
<style scoped>
.timing-page { padding: 16px; }
.page-card { border-radius: 12px; }
.card-header { display: flex; align-items: center; justify-content: space-between; font-weight: 600; }
.query-form { margin-bottom: 12px; }
.sub-card { border-radius: 10px; }
</style>