提交 | 用户 | 时间
|
443cb7
|
1 |
<template> |
J |
2 |
<ContentWrap> |
|
3 |
<el-form :inline="true" :model="queryParams" > |
|
4 |
<el-form-item> |
|
5 |
<el-date-picker |
|
6 |
v-model="queryParams.ny" |
|
7 |
type="month" |
|
8 |
value-format="yyyy-MM" |
|
9 |
placeholder="年月"/> |
|
10 |
</el-form-item> |
|
11 |
<el-form-item> |
|
12 |
<el-button @click="handleQuery"> |
|
13 |
<Icon icon="ep:search" class="mr-5px" /> |
|
14 |
查询 |
|
15 |
</el-button> |
|
16 |
<el-button type="primary" plain @click="openForm('create')"> |
|
17 |
<Icon icon="ep:plus" class="mr-5px" /> |
|
18 |
新增 |
|
19 |
</el-button> |
|
20 |
<el-button type="warning" plain @click="handleImport"> |
|
21 |
<Icon icon="ep:upload" /> 导出 |
|
22 |
</el-button> |
|
23 |
</el-form-item> |
|
24 |
</el-form> |
|
25 |
<el-table |
|
26 |
ref="myTable" |
|
27 |
v-loading="dataListLoading" |
|
28 |
:data="dataList" |
|
29 |
border |
|
30 |
height="400" |
|
31 |
highlight-current-row |
|
32 |
@current-change="currentChange" |
|
33 |
@selection-change="dataListSelectionChangeHandle" |
|
34 |
@sort-change="dataListSortChangeHandle" |
|
35 |
style="width: 100%;"> |
|
36 |
<el-table-column prop="code" label="流水号" header-align="center" align="center" |
|
37 |
width="120"/> |
|
38 |
<el-table-column prop="ny" label="年月" header-align="center" align="center" |
|
39 |
width="100"/> |
|
40 |
<el-table-column prop="typeName" label="实验类别" header-align="center" |
|
41 |
align="center"/> |
|
42 |
<el-table-column prop="mzName" label="煤种" header-align="center" align="center" |
|
43 |
min-width="120"/> |
|
44 |
<el-table-column prop="syypName" label="实验样品" header-align="center" |
|
45 |
align="center"/> |
|
46 |
<el-table-column prop="syrq" label="实验日期" header-align="center" align="center" |
|
47 |
min-width="120"/> |
|
48 |
<el-table-column prop="sybz" label="实验班组" header-align="center" |
|
49 |
align="center"/> |
|
50 |
<el-table-column prop="syfzr" label="实验负责人" header-align="center" |
|
51 |
align="center"/> |
|
52 |
<el-table-column prop="hyy" label="化验员" header-align="center" |
|
53 |
align="center"/> |
|
54 |
<el-table-column prop="myzz" label="煤样总重" header-align="center" |
|
55 |
align="center"/> |
|
56 |
<el-table-column prop="myzh" label="煤样总灰" header-align="center" |
|
57 |
align="center"/> |
|
58 |
<el-table-column prop="myzl" label="煤样总硫" header-align="center" |
|
59 |
align="center"/> |
|
60 |
<el-table-column prop="bz" label="备注" header-align="center" align="left" |
|
61 |
min-width="200"/> |
|
62 |
</el-table> |
|
63 |
<Pagination |
|
64 |
v-model:limit="queryParams.pageSize" |
|
65 |
v-model:page="queryParams.pageNo" |
|
66 |
:total="total" |
|
67 |
@pagination="getList" |
|
68 |
/> |
|
69 |
</ContentWrap> |
|
70 |
<ContentWrap> |
|
71 |
<FullDet ref="fullDetRef"/> |
|
72 |
</ContentWrap> |
|
73 |
<FullForm ref="fullFormRef" /> |
|
74 |
</template> |
|
75 |
|
|
76 |
<script lang="ts" setup> |
|
77 |
import * as AnalysisFullApi from '@/api/xmcpms/coal-quality/analysis/full/index' |
|
78 |
import FullDet from './FullDet.vue' |
|
79 |
import FullForm from './FullForm.vue' |
|
80 |
|
|
81 |
const message = useMessage() // 消息弹窗 |
|
82 |
const { t } = useI18n() // 国际化 |
|
83 |
defineOptions({ name: 'Analysis' }) |
|
84 |
const loading = ref(true) // 列表的加载中 |
|
85 |
const total = ref(0) // 列表的总页数 |
|
86 |
const dataList = ref([]) // 字典表格数据 |
|
87 |
const queryParams = reactive({ |
|
88 |
pageNo: 1, |
|
89 |
pageSize: 10, |
|
90 |
ny: undefined |
|
91 |
}) |
|
92 |
const queryFormRef = ref() // 搜索的表单 |
|
93 |
const exportLoading = ref(false) // 导出的加载中 |
|
94 |
|
|
95 |
const getList = async () => { |
|
96 |
loading.value = true |
|
97 |
try { |
|
98 |
const data = await AnalysisFullApi.getAnalysisFullPage(queryParams) |
|
99 |
dataList.value = data.list |
|
100 |
total.value = data.total |
|
101 |
} finally { |
|
102 |
loading.value = false |
|
103 |
} |
|
104 |
} |
|
105 |
|
|
106 |
/** 搜索按钮操作 */ |
|
107 |
const handleQuery = () => { |
|
108 |
queryParams.pageNo = 1 |
|
109 |
getList() |
|
110 |
} |
|
111 |
|
|
112 |
/** 重置按钮操作 */ |
|
113 |
const resetQuery = () => { |
|
114 |
queryFormRef.value.resetFields() |
|
115 |
handleQuery() |
|
116 |
} |
|
117 |
|
|
118 |
const fullDetRef = ref() |
|
119 |
const currentChange = (currentRow) => { |
|
120 |
fullDetRef.value.open(currentRow) |
|
121 |
} |
|
122 |
|
|
123 |
const fullFormRef = ref() |
|
124 |
const openForm = (type: string) => { |
|
125 |
fullFormRef.value.open(type) |
|
126 |
} |
|
127 |
|
|
128 |
</script> |