<template>
|
<ContentWrap>
|
<el-form :inline="true" :model="queryParams" >
|
<el-form-item>
|
<el-date-picker
|
v-model="queryParams.ny"
|
type="month"
|
value-format="yyyy-MM"
|
placeholder="年月"/>
|
</el-form-item>
|
<el-form-item>
|
<el-button @click="handleQuery">
|
<Icon icon="ep:search" class="mr-5px" />
|
查询
|
</el-button>
|
<el-button type="primary" plain @click="openForm('create')">
|
<Icon icon="ep:plus" class="mr-5px" />
|
新增
|
</el-button>
|
<el-button type="warning" plain @click="handleImport">
|
<Icon icon="ep:upload" /> 导出
|
</el-button>
|
</el-form-item>
|
</el-form>
|
<el-table
|
ref="myTable"
|
v-loading="dataListLoading"
|
:data="dataList"
|
border
|
height="400"
|
highlight-current-row
|
@current-change="currentChange"
|
@selection-change="dataListSelectionChangeHandle"
|
@sort-change="dataListSortChangeHandle"
|
style="width: 100%;">
|
<el-table-column prop="code" label="流水号" header-align="center" align="center"
|
width="120"/>
|
<el-table-column prop="ny" label="年月" header-align="center" align="center"
|
width="100"/>
|
<el-table-column prop="typeName" label="实验类别" header-align="center"
|
align="center"/>
|
<el-table-column prop="mzName" label="煤种" header-align="center" align="center"
|
min-width="120"/>
|
<el-table-column prop="syypName" label="实验样品" header-align="center"
|
align="center"/>
|
<el-table-column prop="syrq" label="实验日期" header-align="center" align="center"
|
min-width="120"/>
|
<el-table-column prop="sybz" label="实验班组" header-align="center"
|
align="center"/>
|
<el-table-column prop="syfzr" label="实验负责人" header-align="center"
|
align="center"/>
|
<el-table-column prop="hyy" label="化验员" header-align="center"
|
align="center"/>
|
<el-table-column prop="myzz" label="煤样总重" header-align="center"
|
align="center"/>
|
<el-table-column prop="myzh" label="煤样总灰" header-align="center"
|
align="center"/>
|
<el-table-column prop="myzl" label="煤样总硫" header-align="center"
|
align="center"/>
|
<el-table-column prop="bz" label="备注" header-align="center" align="left"
|
min-width="200"/>
|
</el-table>
|
<Pagination
|
v-model:limit="queryParams.pageSize"
|
v-model:page="queryParams.pageNo"
|
:total="total"
|
@pagination="getList"
|
/>
|
</ContentWrap>
|
<ContentWrap>
|
<FullDet ref="fullDetRef"/>
|
</ContentWrap>
|
<FullForm ref="fullFormRef" />
|
</template>
|
|
<script lang="ts" setup>
|
import * as AnalysisFullApi from '@/api/xmcpms/coal-quality/analysis/full/index'
|
import FullDet from './FullDet.vue'
|
import FullForm from './FullForm.vue'
|
|
const message = useMessage() // 消息弹窗
|
const { t } = useI18n() // 国际化
|
defineOptions({ name: 'Analysis' })
|
const loading = ref(true) // 列表的加载中
|
const total = ref(0) // 列表的总页数
|
const dataList = ref([]) // 字典表格数据
|
const queryParams = reactive({
|
pageNo: 1,
|
pageSize: 10,
|
ny: undefined
|
})
|
const queryFormRef = ref() // 搜索的表单
|
const exportLoading = ref(false) // 导出的加载中
|
|
const getList = async () => {
|
loading.value = true
|
try {
|
const data = await AnalysisFullApi.getAnalysisFullPage(queryParams)
|
dataList.value = data.list
|
total.value = data.total
|
} finally {
|
loading.value = false
|
}
|
}
|
|
/** 搜索按钮操作 */
|
const handleQuery = () => {
|
queryParams.pageNo = 1
|
getList()
|
}
|
|
/** 重置按钮操作 */
|
const resetQuery = () => {
|
queryFormRef.value.resetFields()
|
handleQuery()
|
}
|
|
const fullDetRef = ref()
|
const currentChange = (currentRow) => {
|
fullDetRef.value.open(currentRow)
|
}
|
|
const fullFormRef = ref()
|
const openForm = (type: string) => {
|
fullFormRef.value.open(type)
|
}
|
|
</script>
|