Browse Source

热轧天然气日统计、冷拔天然气日统计

master
songguoqiang 11 months ago
parent
commit
fe683cf22b
  1. 7
      src/api/pszc/pszccommon/index.ts
  2. 5
      src/api/tjanalysis/index.ts
  3. 4
      src/views/tjanalysis/hrelongatordata/index.vue
  4. 28
      src/views/tjanalysis/natgasdatacd/index.vue
  5. 27
      src/views/tjanalysis/natgasdatahr/index.vue

7
src/api/pszc/pszccommon/index.ts

@ -20,3 +20,10 @@ export const selectHr108Pros = async (params) => {
export const selectHrTrqPros = async (params) => { export const selectHrTrqPros = async (params) => {
return await request.get({ url: `/pszccommon/selectHrTrqPros`, params }) return await request.get({ url: `/pszccommon/selectHrTrqPros`, params })
} }
//根据数据点动态获取仪表下拉数据(pszc_hr_natgasdata 热轧-天然气总量 pszc_cd_natgasdata 冷拔-天然气总量)
// flag 1 热轧-天然气总量 ;2 冷拔-天然气总量
// icode 数据点一般固定
export const selectMcodeListByIcode = async (params) => {
return await request.get({ url: `/pszccommon/selectMcodeListByIcode`, params })
}

5
src/api/tjanalysis/index.ts

@ -35,6 +35,11 @@ export const exportElectricdataAllTj = async (params) => {
return await request.download({ url: `/tjanalysis/exportElectricdataAllTj`, params}) return await request.download({ url: `/tjanalysis/exportElectricdataAllTj`, params})
} }
// 冷拔天然气数据日统计报表
export const queryNatgasDatacdDay = async (params) => {
return await request.get({ url: `/tjanalysis/queryNatgasDatacdDay`, params})
}
// 热轧天然气数据日统计报表 // 热轧天然气数据日统计报表
export const queryNatgasdataDay = async (params) => { export const queryNatgasdataDay = async (params) => {
return await request.get({ url: `/tjanalysis/queryNatgasdataDay`, params}) return await request.get({ url: `/tjanalysis/queryNatgasdataDay`, params})

4
src/views/tjanalysis/hrelongatordata/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
@ -81,7 +81,7 @@ const resetQuery = async () => {
} }
const getList = async () => { const getList = async () => {
const res = await TjanalysisApi.querySizingmillDay(queryParams) const res = await TjanalysisApi.queryRzcjinfoDay(queryParams)
dataList.value = res.dataList dataList.value = res.dataList
loading.value = false loading.value = false
if(queryParams.flag=='1'){ if(queryParams.flag=='1'){

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

@ -14,10 +14,10 @@
<el-form-item label="位置" prop="mcode"> <el-form-item label="位置" prop="mcode">
<el-select v-model="queryParams.mcode" placeholder="请选择"> <el-select v-model="queryParams.mcode" placeholder="请选择">
<el-option <el-option
v-for="item in types.flagList" v-for="item in mcodeList"
:key="item.value" :key="item.code"
:label="item.name" :label="item.label"
:value="item.value" /> :value="item.code" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -60,6 +60,7 @@
import * as TjanalysisApi from '@/api/tjanalysis' 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'
defineOptions({ name: 'Natgasdatahr' }) defineOptions({ name: 'Natgasdatahr' })
@ -70,17 +71,13 @@ 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 mcodeList = ref([]);
{name: '步进炉' , value: 'Gas_hr_001'},
{name: '固熔炉' , value: '2'},
{name: '缝式炉' , value: '3'}
]})
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: 'Gas_hr_001', mcode:'',
flag: '2' icode: icode//
}) })
const handleQuery = async () => { const handleQuery = async () => {
@ -95,7 +92,7 @@ const resetQuery = async () => {
} }
const getList = async () => { const getList = async () => {
const res = await TjanalysisApi.queryNatgasdataDay(queryParams) const res = await TjanalysisApi.queryNatgasDatacdDay(queryParams)
if (res != null && res.dataList != null) { if (res != null && res.dataList != null) {
dataList.dList = res.dataList dataList.dList = res.dataList
} }
@ -105,6 +102,11 @@ const getList = async () => {
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
const res =await PszcCommonApi.selectMcodeListByIcode({flag:2,icode:icode});
if (res != null && res.length>0) {
mcodeList.value = res
queryParams.mcode= mcodeList.value[0].code;
}
getList() getList()
}) })

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

@ -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.flag" placeholder="请选择"> <el-select v-model="queryParams.mcode" placeholder="请选择">
<el-option <el-option
v-for="item in types.flagList" v-for="item in mcodeList"
:key="item.value" :key="item.code"
:label="item.name" :label="item.label"
:value="item.value" /> :value="item.code" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -60,6 +60,7 @@
import * as TjanalysisApi from '@/api/tjanalysis' 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'
defineOptions({ name: 'Natgasdatahr' }) defineOptions({ name: 'Natgasdatahr' })
@ -70,15 +71,13 @@ 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 mcodeList = ref([]);
{name: '热轧108环炉' , value: '1'}
// ,{name: '90' , value: '2'}
]})
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'),
flag: '1' mcode:'',
icode: icode//
}) })
const handleQuery = async () => { const handleQuery = async () => {
@ -103,7 +102,13 @@ const getList = async () => {
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
const res =await PszcCommonApi.selectMcodeListByIcode({flag:1,icode:icode});
if (res != null && res.length>0) {
mcodeList.value = res
queryParams.mcode= mcodeList.value[0].code;
}
getList() getList()
}) })
</script> </script>

Loading…
Cancel
Save