Browse Source

提交

master
daikun1@bosssoft.com.cn 11 months ago
parent
commit
88393fc968
  1. 5
      src/api/tjanalysis/index.ts
  2. 128
      src/views/tjanalysis/xcqty/index.vue

5
src/api/tjanalysis/index.ts

@ -44,3 +44,8 @@ export const queryNatgasdataDay = async (params) => {
export const queryWaterDay = async (params) => {
return await request.get({ url: `/tjanalysis/queryWaterDay`, params})
}
// 冷拔-拔机日统计报表
export const queryXcqtyDay = async (params) => {
return await request.get({ url: `/tjanalysis/queryXcqtyDay`, params})
}

128
src/views/tjanalysis/xcqty/index.vue

@ -0,0 +1,128 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" :inline="true">
<el-form-item label="日期" prop="date">
<el-date-picker
:clearable="false"
v-model="queryParams.date"
style="width: 240px; height: 30px"
value-format="YYYY-MM-DD"
type="date"
/>
</el-form-item>
<el-form-item label="位置" prop="mcode">
<el-select v-model="queryParams.mcode" :clearable="true" placeholder="请选择">
<el-option
v-for="item in types.flagList"
:key="item.code"
:label="item.label"
:value="item.code" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" size="mini" @click="handleQuery">搜索</el-button>
<el-button size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</ContentWrap>
<!-- 列表 -->
<ContentWrap>
<el-divider content-position="left"><div style="font-size:16px; float: left"><b>拔机</b></div></el-divider>
<el-table
v-loading="loading" :data="dataList.dList" border="true" highlight-current-row="true"
header-row-style="height: 50px; text-align: center">
<!-- <el-table-column label="" prop="mname" align="right" :show-overflow-tooltip="true" width="250" /> -->
<el-table-column label="" prop="name" align="right" :show-overflow-tooltip="true" width="150" />
<!-- <el-table-column label="00:00" prop="num0" align="center" :show-overflow-tooltip="true" width="120" />
<el-table-column label="06:00" prop="num6" align="center" :show-overflow-tooltip="true" width="120" />
<el-table-column label="08:00" prop="num8" align="center" :show-overflow-tooltip="true" width="120" />
<el-table-column label="12:00" prop="num12" align="center" :show-overflow-tooltip="true" width="120" />
<el-table-column label="16:00" prop="num16" align="center" :show-overflow-tooltip="true" width="120" />
<el-table-column label="18:00" prop="num18" align="center" :show-overflow-tooltip="true" width="120" />
<el-table-column label="20:00" prop="num20" align="center" :show-overflow-tooltip="true" width="120" />
<el-table-column label="22:00" prop="num22" align="center" :show-overflow-tooltip="true" width="120" />
<el-table-column label="24:00" prop="num24" align="center" :show-overflow-tooltip="true" width="120" /> -->
<el-table-column label="08:00-00:00" prop="num0008" align="center" :show-overflow-tooltip="true" />
<el-table-column label="16:00-08:00" prop="num0816" align="center" :show-overflow-tooltip="true" />
<el-table-column label="24:00-16:00" prop="num1624" align="center" :show-overflow-tooltip="true" />
<el-table-column label="12:00-00:00" prop="num0012" align="center" :show-overflow-tooltip="true" />
<el-table-column label="24:00-12:00" prop="num1224" align="center" :show-overflow-tooltip="true" />
<el-table-column label="总(24:00-00:00)" prop="num0024" align="center" :show-overflow-tooltip="true" />
<!-- <el-table-column label="电量" prop="numTj" align="center" :show-overflow-tooltip="true" width="100" /> -->
</el-table>
</ContentWrap>
</template>
<script setup lang="ts">
import * as TjanalysisApi from '@/api/tjanalysis'
import { formatDate } from '@/utils/formatTime'
import * as PszcCommonApi from '@/api/pszc/pszccommon'
import { get } from 'http'
defineOptions({ name: 'Natgasdatahr' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const loading = ref(true)
const types = reactive({flagList: []})
const dataList = reactive({dList: [] , days: 0})
const queryParams = reactive({
date: formatDate(new Date() , 'YYYY-MM-DD'),
mcode: ''
})
const handleQuery = async () => {
dataList.dList = []
getList()
}
const resetQuery = async () => {
dataList.dList = []
queryParams.date = formatDate(new Date() , 'YYYY-MM-DD')
getList()
}
const getList = async () => {
const res = await TjanalysisApi.queryXcqtyDay(queryParams)
if (res != null && res.dataList != null) {
dataList.dList = res.dataList
}
loading.value = false
}
const getMnames = async () => {
const data = await PszcCommonApi.selectCdPros({flag: '8' , type: '2'})
if (data != null && data.length > 0) {
types.flagList = data
// queryParams.mcode = data[0].code
getList()
}
}
/** 初始化 **/
onMounted(async () => {
getMnames()
// getList()
})
</script>
<style>
.el-table .success-row {
background: #f0f9eb;
}
.el-table .success-cols {
font-weight: bold;
}
</style>
Loading…
Cancel
Save