Compare commits

...

2 Commits

Author SHA1 Message Date
chenbo 66d829cff6 fixed 2024-01-05 11:46:21 +08:00
chenbo 2f11d9e2fe fixed 2024-01-05 11:22:19 +08:00
2 changed files with 12 additions and 13 deletions

View File

@ -44,17 +44,17 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="监测类型" align="center" prop="type"> <el-table-column label="监测类型" align="center" prop="type">
<template #default="{ row }"> <template #default="{ row }">
<dict-value :options="dictData.alarm_type" :value="row.type" /> <dict-value :options="dictData.monitor_item" :value="row.type" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="报警内容" width="300" prop="content" show-overflow-tooltip /> <el-table-column label="报警内容" width="300" prop="content" show-overflow-tooltip />
<el-table-column label="报警数值" prop="value" show-overflow-tooltip /> <el-table-column label="报警数值" prop="value" show-overflow-tooltip />
<el-table-column label="报警时间" align="center" prop="create_time"> <el-table-column label="报警时间" align="center" prop="create_time">
<template #default="{ row }"> <template #default="{ row }">
<span>{{ row.create_time ? timeFormat(row.create_time, 'yyyy-mm-dd hh:MM:ss') : '' }}</span> <span>{{ row.create_time ? timeFormat(row.create_time, 'yyyy-mm-dd hh:MM:ss') : '' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="140" align="center" fixed="right"> <el-table-column label="操作" width="140" align="center" fixed="right">
<template #default="{ row }"> <template #default="{ row }">
<el-button type="primary" link @click="handleDetail(row)" <el-button type="primary" link @click="handleDetail(row)"
@ -123,7 +123,7 @@ const handleSelectionChange = (val: any[]) => {
} }
// //
const { dictData } = useDictData('alarm_type') const { dictData } = useDictData('monitor_item')
// //
const { pager, getLists, resetParams, resetPage } = usePaging({ const { pager, getLists, resetParams, resetPage } = usePaging({
@ -140,9 +140,9 @@ const detailData = reactive({
const handleDetail = (data: any) => { const handleDetail = (data: any) => {
detailData.gridData = [{}] detailData.gridData = [{}]
let deviceType = '' let deviceType = ''
for (const key in dictData['alarm_type']) { for (const key in dictData['monitor_item']) {
if (dictData['alarm_type'][key]['value'] == data.type) { if (dictData['monitor_item'][key]['value'] == data.type) {
deviceType = dictData['alarm_type'][key]['name'] deviceType = dictData['monitor_item'][key]['name']
} }
} }
detailData.gridData.unshift({ detailData.gridData.unshift({

View File

@ -61,7 +61,6 @@ class LandController extends BaseApiController
// 先排序,再分组 // 先排序,再分组
$subQuery = Db::name('land_collection') $subQuery = Db::name('land_collection')
->order('id', 'desc') ->order('id', 'desc')
->limit(1000)
->buildSql(); ->buildSql();
$list = Db::table($subQuery)->alias('lc') $list = Db::table($subQuery)->alias('lc')