Browse Source

统计报表

master
songguoqiang 10 months ago
parent
commit
e389c5505c
  1. 8
      src/utils/dict.ts
  2. 26
      src/views/tjanalysis/hrelongatordata/index.vue
  3. 31
      src/views/tjanalysis/hrpuncherdata/index.vue
  4. 30
      src/views/tjanalysis/hrsizingmilldata/index.vue

8
src/utils/dict.ts

@ -110,8 +110,12 @@ export enum DICT_TYPE {
natgasdatacd = 'natgasdatacd', natgasdatacd = 'natgasdatacd',
//==========================天然气总量字典项=========================== //==========================天然气总量字典项===========================
natgasdatatotal = 'natgasdatatotal', natgasdatatotal = 'natgasdatatotal',
//==========================热轧延伸机日统计字典项===========================
hrelongatordata = 'hrelongatordata',
//==========================热轧定经机日统计字典项===========================
hrsizingmilldata='hrsizingmilldata',
//==========================热轧穿孔机日统计字典项===========================
hrpuncherdata = 'hrpuncherdata',
// ========== SYSTEM 模块 ========== // ========== SYSTEM 模块 ==========
SYSTEM_USER_SEX = 'system_user_sex', SYSTEM_USER_SEX = 'system_user_sex',
SYSTEM_MENU_TYPE = 'system_menu_type', SYSTEM_MENU_TYPE = 'system_menu_type',

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

@ -14,9 +14,9 @@
<el-form-item label="位置" prop="flag"> <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>
@ -49,6 +49,7 @@
<script setup lang="ts"> <script setup lang="ts">
import * as TjanalysisApi from '@/api/tjanalysis' import * as TjanalysisApi from '@/api/tjanalysis'
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
import * as DictApi from '@/utils/dict'
defineOptions({ name: 'HrElongatorData' }) defineOptions({ name: 'HrElongatorData' })
@ -66,12 +67,12 @@ const queryParams = reactive({
flag: '1' flag: '1'
}) })
const types = reactive({flagList: [ const flagList = ref([])
{name: '热轧108延伸' , value: '1'},
{name: '热轧90延伸' , value: '2'}
]})
const handleQuery = async () => { const handleQuery = async () => {
const ll = flagList.value.find(map=>map.value == queryParams.flag);
names.value = ll?.label
dataList.value = [];
getList() getList()
} }
@ -84,12 +85,6 @@ const getList = async () => {
const res = await TjanalysisApi.queryRzcjinfoDay(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'){
names.value = "热轧108延伸"
}else{
names.value = "热轧90延伸"
}
} }
function arraySpanMethod ({ row, column, rowIndex, columnIndex }) { function arraySpanMethod ({ row, column, rowIndex, columnIndex }) {
@ -128,6 +123,13 @@ function tableCellClassName({row, column, rowIndex, columnIndex}) {
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
const res =await DictApi.getStrDictOptions(DICT_TYPE.hrelongatordata);
if (res != null && res.length>0) {
flagList.value = res
queryParams.flag= flagList.value[0].value;
const ll = flagList.value.find(map=>map.value == queryParams.flag);
names.value = ll?.label
}
getList() getList()
}) })

31
src/views/tjanalysis/hrpuncherdata/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
@ -14,9 +14,9 @@
<el-form-item label="位置" prop="flag"> <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>
@ -49,6 +49,7 @@
<script setup lang="ts"> <script setup lang="ts">
import * as TjanalysisApi from '@/api/tjanalysis' import * as TjanalysisApi from '@/api/tjanalysis'
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
import * as DictApi from '@/utils/dict'
defineOptions({ name: 'HrPuncherData' }) defineOptions({ name: 'HrPuncherData' })
@ -60,18 +61,17 @@ const routeName = ref()
routeName.value = route.name routeName.value = route.name
const loading = ref(true) const loading = ref(true)
const dataList = ref([]) const dataList = ref([])
const names = ref("热轧108穿孔"); const names = 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'
}) })
const types = reactive({flagList: [ const flagList =ref([])
{name: '热轧108穿孔' , value: '1'},
{name: '热轧90穿孔' , value: '2'}
]})
const handleQuery = async () => { const handleQuery = async () => {
const ll = flagList.value.find(map=>map.value == queryParams.flag);
names.value = ll?.label
dataList.value = [];
getList() getList()
} }
@ -84,12 +84,6 @@ const getList = async () => {
const res = await TjanalysisApi.queryHrpuncherDay(queryParams) const res = await TjanalysisApi.queryHrpuncherDay(queryParams)
dataList.value = res.dataList dataList.value = res.dataList
loading.value = false loading.value = false
if(queryParams.flag=='1'){
names.value = "热轧108穿孔"
}else{
names.value = "热轧90穿孔"
}
} }
function arraySpanMethod ({ row, column, rowIndex, columnIndex }) { function arraySpanMethod ({ row, column, rowIndex, columnIndex }) {
@ -128,6 +122,13 @@ function tableCellClassName({row, column, rowIndex, columnIndex}) {
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
const res =await DictApi.getStrDictOptions(DICT_TYPE.hrpuncherdata);
if (res != null && res.length>0) {
flagList.value = res
queryParams.flag= flagList.value[0].value;
const ll = flagList.value.find(map=>map.value == queryParams.flag);
names.value = ll?.label
}
getList() getList()
}) })

30
src/views/tjanalysis/hrsizingmilldata/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
@ -15,9 +15,9 @@
<el-form-item label="位置" prop="flag"> <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>
@ -50,6 +50,7 @@
<script setup lang="ts"> <script setup lang="ts">
import * as TjanalysisApi from '@/api/tjanalysis' import * as TjanalysisApi from '@/api/tjanalysis'
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
import * as DictApi from '@/utils/dict'
defineOptions({ name: 'HrSizingMillData' }) defineOptions({ name: 'HrSizingMillData' })
@ -61,18 +62,18 @@ const routeName = ref()
routeName.value = route.name routeName.value = route.name
const loading = ref(true) const loading = ref(true)
const dataList = ref([]) const dataList = ref([])
const names = ref("热轧108定经"); const names = 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'
}) })
const types = reactive({flagList: [ const flagList = ref([])
{name: '热轧108定经' , value: '1'},
{name: '热轧90定经' , value: '2'}
]})
const handleQuery = async () => { const handleQuery = async () => {
const ll = flagList.value.find(map=>map.value == queryParams.flag);
names.value = ll?.label
dataList.value = [];
getList() getList()
} }
@ -85,12 +86,6 @@ const getList = async () => {
const res = await TjanalysisApi.querySizingmillDay(queryParams) const res = await TjanalysisApi.querySizingmillDay(queryParams)
dataList.value = res.dataList dataList.value = res.dataList
loading.value = false loading.value = false
if(queryParams.flag=='1'){
names.value = "热轧108定经"
}else{
names.value = "热轧90定经"
}
} }
function arraySpanMethod ({ row, column, rowIndex, columnIndex }) { function arraySpanMethod ({ row, column, rowIndex, columnIndex }) {
@ -129,6 +124,13 @@ function tableCellClassName({row, column, rowIndex, columnIndex}) {
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
const res =await DictApi.getStrDictOptions(DICT_TYPE.hrsizingmilldata);
if (res != null && res.length>0) {
flagList.value = res
queryParams.flag= flagList.value[0].value;
const ll = flagList.value.find(map=>map.value == queryParams.flag);
names.value = ll?.label
}
getList() getList()
}) })

Loading…
Cancel
Save