|
|
@ -1,6 +1,6 @@ |
|
|
|
<template> |
|
|
|
<ContentWrap> |
|
|
|
<!-- 搜索工作栏 --> |
|
|
|
<!-- 定经机搜索工作栏 --> |
|
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true"> |
|
|
|
<el-form-item label="日期" prop="date"> |
|
|
|
<el-date-picker |
|
|
@ -15,9 +15,9 @@ |
|
|
|
<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> |
|
|
@ -50,6 +50,7 @@ |
|
|
|
<script setup lang="ts"> |
|
|
|
import * as TjanalysisApi from '@/api/tjanalysis' |
|
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
|
import * as DictApi from '@/utils/dict' |
|
|
|
|
|
|
|
defineOptions({ name: 'HrSizingMillData' }) |
|
|
|
|
|
|
@ -61,18 +62,18 @@ const routeName = ref() |
|
|
|
routeName.value = route.name |
|
|
|
const loading = ref(true) |
|
|
|
const dataList = ref([]) |
|
|
|
const names = ref("热轧108定经"); |
|
|
|
const names = ref(''); |
|
|
|
const queryParams = reactive({ |
|
|
|
date: formatDate(new Date() , 'YYYY-MM-DD'), |
|
|
|
flag: '1' |
|
|
|
}) |
|
|
|
|
|
|
|
const types = reactive({flagList: [ |
|
|
|
{name: '热轧108定经' , value: '1'}, |
|
|
|
{name: '热轧90定经' , value: '2'} |
|
|
|
]}) |
|
|
|
const flagList = ref([]) |
|
|
|
|
|
|
|
const handleQuery = async () => { |
|
|
|
const ll = flagList.value.find(map=>map.value == queryParams.flag); |
|
|
|
names.value = ll?.label |
|
|
|
dataList.value = []; |
|
|
|
getList() |
|
|
|
} |
|
|
|
|
|
|
@ -85,12 +86,6 @@ const getList = async () => { |
|
|
|
const res = await TjanalysisApi.querySizingmillDay(queryParams) |
|
|
|
dataList.value = res.dataList |
|
|
|
loading.value = false |
|
|
|
if(queryParams.flag=='1'){ |
|
|
|
names.value = "热轧108定经" |
|
|
|
}else{ |
|
|
|
names.value = "热轧90定经" |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
function arraySpanMethod ({ row, column, rowIndex, columnIndex }) { |
|
|
@ -129,6 +124,13 @@ function tableCellClassName({row, column, rowIndex, columnIndex}) { |
|
|
|
|
|
|
|
/** 初始化 **/ |
|
|
|
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() |
|
|
|
}) |
|
|
|
|
|
|
|