|
|
@ -1,6 +1,6 @@ |
|
|
|
<template> |
|
|
|
<ContentWrap> |
|
|
|
<!-- 搜索工作栏 --> |
|
|
|
<!-- 天然气总量日统计报表搜索工作栏 --> |
|
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true"> |
|
|
|
<el-form-item label="日期" prop="date"> |
|
|
|
<el-date-picker |
|
|
@ -8,14 +8,15 @@ |
|
|
|
style="width: 240px; height: 30px" |
|
|
|
value-format="YYYY-MM-DD" |
|
|
|
type="date" |
|
|
|
:clearable="false" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="位置" prop="mcode"> |
|
|
|
<el-form-item label="位置" prop="flag"> |
|
|
|
<el-select v-model="queryParams.flag" placeholder="请选择"> |
|
|
|
<el-option |
|
|
|
v-for="item in types.flagList" |
|
|
|
v-for="item in flagList" |
|
|
|
:key="item.value" |
|
|
|
:label="item.name" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" /> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
@ -28,7 +29,7 @@ |
|
|
|
|
|
|
|
<!-- 列表 --> |
|
|
|
<ContentWrap> |
|
|
|
<el-divider content-position="left"><div style="font-size:16px; float: left"><b>天然气:</b></div></el-divider> |
|
|
|
<el-divider content-position="left"><div style="font-size:16px; float: left"><b>{{name}}:</b></div></el-divider> |
|
|
|
<el-table |
|
|
|
v-loading="loading" :data="dataList.dList" border="true" highlight-current-row="true" |
|
|
|
header-row-style="height: 50px; text-align: center"> |
|
|
@ -57,11 +58,12 @@ |
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
|
import * as TjanalysisApi from '@/api/tjanalysis' |
|
|
|
import * as PselectricdataApi from '@/api/pszc/pselectricdata' |
|
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
|
import { get } from 'http' |
|
|
|
import * as PszcCommonApi from '@/api/pszc/pszccommon' |
|
|
|
import * as DictApi from '@/utils/dict' |
|
|
|
|
|
|
|
defineOptions({ name: 'Natgasdatatotal' }) |
|
|
|
// defineOptions({ name: 'Natgasdatahr' }) |
|
|
|
|
|
|
|
const message = useMessage() // 消息弹窗 |
|
|
|
const { t } = useI18n() // 国际化 |
|
|
@ -69,18 +71,18 @@ const { t } = useI18n() // 国际化 |
|
|
|
const route = useRoute() // 路由信息 |
|
|
|
const routeName = ref() |
|
|
|
routeName.value = route.name |
|
|
|
|
|
|
|
const loading = ref(true) |
|
|
|
const types = reactive({flagList: [ |
|
|
|
{name: '热轧' , value: '1'}, |
|
|
|
{name: '冷拔' , value: '2'} |
|
|
|
]}) |
|
|
|
const flagList = ref([]); |
|
|
|
const dataList = reactive({dList: [] , days: 0}) |
|
|
|
const name = ref(""); |
|
|
|
|
|
|
|
const queryParams = reactive({ |
|
|
|
date: formatDate(new Date() , 'YYYY-MM-DD'), |
|
|
|
flag: '1' |
|
|
|
flag: 1 |
|
|
|
}) |
|
|
|
|
|
|
|
let aa = flagList.value.find(map=>map.code==queryParams.flag); |
|
|
|
name.value = aa?.label |
|
|
|
const handleQuery = async () => { |
|
|
|
dataList.dList = [] |
|
|
|
getList() |
|
|
@ -93,6 +95,8 @@ const resetQuery = async () => { |
|
|
|
} |
|
|
|
|
|
|
|
const getList = async () => { |
|
|
|
let aa = flagList.value.find(map=>map.code==queryParams.flag); |
|
|
|
name.value = aa?.label |
|
|
|
const res = await TjanalysisApi.queryNatgasdatatotal(queryParams) |
|
|
|
if (res != null && res.trList != null) { |
|
|
|
dataList.dList = res.trList |
|
|
@ -103,7 +107,15 @@ const getList = async () => { |
|
|
|
|
|
|
|
/** 初始化 **/ |
|
|
|
onMounted(async () => { |
|
|
|
const res =await DictApi.getStrDictOptions(DICT_TYPE.natgasdatatotal); |
|
|
|
if (res != null && res.length>0) { |
|
|
|
flagList.value = res |
|
|
|
queryParams.flag= flagList.value[0].value; |
|
|
|
cosnt ll = flagList.value.find(map=>map.value == queryParams.flag); |
|
|
|
name.value = ll?.label |
|
|
|
} |
|
|
|
getList() |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
</script> |
|
|
|