Browse Source

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

master
songguoqiang 10 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

@ -19,4 +19,11 @@ export const selectHr108Pros = async (params) => {
export const selectHrTrqPros = async (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})
}
// 冷拔天然气数据日统计报表
export const queryNatgasDatacdDay = async (params) => {
return await request.get({ url: `/tjanalysis/queryNatgasDatacdDay`, params})
}
// 热轧天然气数据日统计报表
export const queryNatgasdataDay = async (params) => {
return await request.get({ url: `/tjanalysis/queryNatgasdataDay`, params})

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

@ -1,6 +1,6 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<!-- 热轧延伸机日统计报表搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" :inline="true">
<el-form-item label="日期" prop="date">
<el-date-picker
@ -81,7 +81,7 @@ const resetQuery = async () => {
}
const getList = async () => {
const res = await TjanalysisApi.querySizingmillDay(queryParams)
const res = await TjanalysisApi.queryRzcjinfoDay(queryParams)
dataList.value = res.dataList
loading.value = false
if(queryParams.flag=='1'){

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

@ -14,10 +14,10 @@
<el-form-item label="位置" prop="mcode">
<el-select v-model="queryParams.mcode" placeholder="请选择">
<el-option
v-for="item in types.flagList"
:key="item.value"
:label="item.name"
:value="item.value" />
v-for="item in mcodeList"
:key="item.code"
:label="item.label"
:value="item.code" />
</el-select>
</el-form-item>
<el-form-item>
@ -60,6 +60,7 @@
import * as TjanalysisApi from '@/api/tjanalysis'
import { formatDate } from '@/utils/formatTime'
import { get } from 'http'
import * as PszcCommonApi from '@/api/pszc/pszccommon'
defineOptions({ name: 'Natgasdatahr' })
@ -70,17 +71,13 @@ const route = useRoute() // 路由信息
const routeName = ref()
routeName.value = route.name
const loading = ref(true)
const types = reactive({flagList: [
{name: '步进炉' , value: 'Gas_hr_001'},
{name: '固熔炉' , value: '2'},
{name: '缝式炉' , value: '3'}
]})
const mcodeList = ref([]);
const dataList = reactive({dList: [] , days: 0})
const icode = 'Gas_Data_008'
const queryParams = reactive({
date: formatDate(new Date() , 'YYYY-MM-DD'),
mcode: 'Gas_hr_001',
flag: '2'
mcode:'',
icode: icode//
})
const handleQuery = async () => {
@ -95,7 +92,7 @@ const resetQuery = async () => {
}
const getList = async () => {
const res = await TjanalysisApi.queryNatgasdataDay(queryParams)
const res = await TjanalysisApi.queryNatgasDatacdDay(queryParams)
if (res != null && res.dataList != null) {
dataList.dList = res.dataList
}
@ -105,6 +102,11 @@ const getList = 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()
})

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

@ -12,12 +12,12 @@
/>
</el-form-item>
<el-form-item label="位置" prop="mcode">
<el-select v-model="queryParams.flag" placeholder="请选择">
<el-select v-model="queryParams.mcode" placeholder="请选择">
<el-option
v-for="item in types.flagList"
:key="item.value"
:label="item.name"
:value="item.value" />
v-for="item in mcodeList"
:key="item.code"
:label="item.label"
:value="item.code" />
</el-select>
</el-form-item>
<el-form-item>
@ -60,6 +60,7 @@
import * as TjanalysisApi from '@/api/tjanalysis'
import { formatDate } from '@/utils/formatTime'
import { get } from 'http'
import * as PszcCommonApi from '@/api/pszc/pszccommon'
defineOptions({ name: 'Natgasdatahr' })
@ -70,15 +71,13 @@ const route = useRoute() // 路由信息
const routeName = ref()
routeName.value = route.name
const loading = ref(true)
const types = reactive({flagList: [
{name: '热轧108环炉' , value: '1'}
// ,{name: '90' , value: '2'}
]})
const mcodeList = ref([]);
const dataList = reactive({dList: [] , days: 0})
const icode = 'Gas_Data_008'
const queryParams = reactive({
date: formatDate(new Date() , 'YYYY-MM-DD'),
flag: '1'
mcode:'',
icode: icode//
})
const handleQuery = async () => {
@ -103,7 +102,13 @@ const getList = 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()
})
</script>

Loading…
Cancel
Save