Browse Source

统计报表

master
songguoqiang 10 months ago
parent
commit
823611adfa
  1. 5
      src/utils/dict.ts
  2. 2
      src/views/tjanalysis/electricdatatotal/index.vue
  3. 33
      src/views/tjanalysis/natgasdatacd/index.vue
  4. 4
      src/views/tjanalysis/natgasdatahr/index.vue
  5. 38
      src/views/tjanalysis/natgasdatatotal/index.vue

5
src/utils/dict.ts

@ -106,6 +106,11 @@ export enum DICT_TYPE {
pszc_hr_puncherdata108_roll ='pszc_hr_puncherdata108_roll',//热轧108轧制时间类型 pszc_hr_puncherdata108_roll ='pszc_hr_puncherdata108_roll',//热轧108轧制时间类型
pszc_hr_puncherdata108_operation ='pszc_hr_puncherdata108_operation',//热轧108运行时间下拉组合类型数据由数据库四种类型分为两种类型,数据用逗号分隔 pszc_hr_puncherdata108_operation ='pszc_hr_puncherdata108_operation',//热轧108运行时间下拉组合类型数据由数据库四种类型分为两种类型,数据用逗号分隔
//==========================冷拨天然气字典项===========================
natgasdatacd = 'natgasdatacd',
//==========================天然气总量字典项===========================
natgasdatatotal = 'natgasdatatotal',
// ========== SYSTEM 模块 ========== // ========== SYSTEM 模块 ==========
SYSTEM_USER_SEX = 'system_user_sex', SYSTEM_USER_SEX = 'system_user_sex',

2
src/views/tjanalysis/electricdatatotal/index.vue

@ -1,6 +1,6 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 智能电表统计表搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" :inline="true"> <el-form :model="queryParams" ref="queryForm" :inline="true">
<el-form-item label="日期" prop="dateRange"> <el-form-item label="日期" prop="dateRange">
<el-date-picker <el-date-picker

33
src/views/tjanalysis/natgasdatacd/index.vue

@ -1,6 +1,6 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 冷拔天然气日统计搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" :inline="true"> <el-form :model="queryParams" ref="queryForm" :inline="true">
<el-form-item label="日期" prop="date"> <el-form-item label="日期" prop="date">
<el-date-picker <el-date-picker
@ -12,12 +12,12 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="位置" prop="mcode"> <el-form-item label="位置" prop="mcode">
<el-select v-model="queryParams.mcode" placeholder="请选择"> <el-select v-model="queryParams.flag" placeholder="请选择">
<el-option <el-option
v-for="item in mcodeList" v-for="item in flagList"
:key="item.code" :key="item.value"
:label="item.label" :label="item.label"
:value="item.code" /> :value="item.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -29,7 +29,7 @@
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <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>{{names}}天然气</b></div></el-divider>
<el-table <el-table
v-loading="loading" :data="dataList.dList" border="true" highlight-current-row="true" v-loading="loading" :data="dataList.dList" border="true" highlight-current-row="true"
header-row-style="height: 50px; text-align: center"> header-row-style="height: 50px; text-align: center">
@ -61,6 +61,7 @@ import * as TjanalysisApi from '@/api/tjanalysis'
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
import { get } from 'http' import { get } from 'http'
import * as PszcCommonApi from '@/api/pszc/pszccommon' import * as PszcCommonApi from '@/api/pszc/pszccommon'
import * as DictApi from '@/utils/dict'
defineOptions({ name: 'Natgasdatahr' }) defineOptions({ name: 'Natgasdatahr' })
@ -71,16 +72,19 @@ const route = useRoute() // 路由信息
const routeName = ref() const routeName = ref()
routeName.value = route.name routeName.value = route.name
const loading = ref(true) const loading = ref(true)
const mcodeList = ref([]); const flagList = ref([]);
const names = ref('');
const dataList = reactive({dList: [] , days: 0}) const dataList = reactive({dList: [] , days: 0})
const icode = 'Gas_Data_008'
const queryParams = reactive({ const queryParams = reactive({
date: formatDate(new Date() , 'YYYY-MM-DD'), date: formatDate(new Date() , 'YYYY-MM-DD'),
mcode:'', flag:'0',
icode: icode//
}) })
const handleQuery = async () => { const handleQuery = async () => {
const ll = flagList.value.find(map=>map.value ==queryParams.flag );
names.value =ll?.label
// const l2 =await flagList.value.find(map=>map.value =queryParams.flag );
// names.value =l2.label
dataList.dList = [] dataList.dList = []
getList() getList()
} }
@ -102,10 +106,13 @@ const getList = async () => {
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
const res =await PszcCommonApi.selectMcodeListByIcode({flag:2,icode:icode});
const res =await DictApi.getStrDictOptions(DICT_TYPE.natgasdatacd);
if (res != null && res.length>0) { if (res != null && res.length>0) {
mcodeList.value = res flagList.value = res
queryParams.mcode= mcodeList.value[0].code; queryParams.flag= flagList.value[0].value;
const ll = flagList.value.find(map=>map.value ==queryParams.flag );
names.value =ll?.label
} }
getList() getList()
}) })

4
src/views/tjanalysis/natgasdatahr/index.vue

@ -1,6 +1,6 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 热轧天然气数据统计搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" :inline="true"> <el-form :model="queryParams" ref="queryForm" :inline="true">
<el-form-item label="日期" prop="date"> <el-form-item label="日期" prop="date">
<el-date-picker <el-date-picker
@ -102,7 +102,7 @@ const getList = async () => {
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
const res =await PszcCommonApi.selectMcodeListByIcode({flag:1,icode:icode}); const res =await PszcCommonApi.selectHr108Pros({flag:2,type:2});
if (res != null && res.length>0) { if (res != null && res.length>0) {
mcodeList.value = res mcodeList.value = res
queryParams.mcode= mcodeList.value[0].code; queryParams.mcode= mcodeList.value[0].code;

38
src/views/tjanalysis/natgasdatatotal/index.vue

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

Loading…
Cancel
Save