2023-06-08 19:44:39 +08:00
|
|
|
<template>
|
2023-06-29 17:58:11 +08:00
|
|
|
<div style="height: 100%;">
|
2023-06-30 18:12:32 +08:00
|
|
|
<a-card v-if="!isDetail" :bordered="false" style="margin-left: 20px">
|
2023-06-29 17:58:11 +08:00
|
|
|
<!-- <search-form :items="formItems" v-model="queryParam" @search="searchQuery"> -->
|
|
|
|
<search-form :items="formItems" v-model="queryParam" @search="searchQueryData">
|
|
|
|
<a-space style="float: right" class="btn-group" slot="additional">
|
|
|
|
<a-button @click="handleEdit" type="primary">
|
|
|
|
<img src="@/assets/images/global/edit.png" alt="" />
|
|
|
|
Excel
|
|
|
|
</a-button>
|
|
|
|
</a-space>
|
|
|
|
</search-form>
|
|
|
|
<custom-table
|
|
|
|
size="middle"
|
|
|
|
rowKey="sampleId"
|
|
|
|
:columns="columns"
|
|
|
|
:list="dataSource"
|
|
|
|
:pagination="ipagination"
|
|
|
|
:loading="loading"
|
|
|
|
@change="handleTableChange"
|
|
|
|
@detail="handleDetail"
|
|
|
|
:selectedRowKeys.sync="selectedRowKeys"
|
|
|
|
:scroll="{ x: true, y: 'calc(100vh - 410px)' }"
|
|
|
|
>
|
|
|
|
<template slot="index" slot-scope="{ index }">
|
|
|
|
{{ index + 1 }}
|
|
|
|
</template>
|
|
|
|
</custom-table>
|
|
|
|
</a-card>
|
2023-06-30 18:12:32 +08:00
|
|
|
<Detail v-if="isDetail" :allData="detailJson" @back="handleBack"></Detail>
|
2023-06-29 17:58:11 +08:00
|
|
|
</div>
|
2023-06-08 19:44:39 +08:00
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
const columns = [
|
|
|
|
{
|
|
|
|
title: 'NO',
|
|
|
|
align: 'left',
|
|
|
|
width: 50,
|
|
|
|
scopedSlots: {
|
|
|
|
customRender: 'index',
|
|
|
|
},
|
|
|
|
customHeaderCell: () => {
|
|
|
|
return {
|
|
|
|
style: {
|
|
|
|
'padding-left': '26px !important',
|
|
|
|
},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
customCell: () => {
|
|
|
|
return {
|
|
|
|
style: {
|
|
|
|
'padding-left': '26px !important',
|
|
|
|
},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: 'STATION',
|
|
|
|
align: 'left',
|
2023-06-12 14:29:57 +08:00
|
|
|
dataIndex: 'stationName',
|
2023-06-08 19:44:39 +08:00
|
|
|
width: 130,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: 'DETECTOR CODE',
|
|
|
|
align: 'left',
|
|
|
|
width: 100,
|
2023-06-12 14:29:57 +08:00
|
|
|
dataIndex: 'siteDetCode',
|
2023-06-08 19:44:39 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: 'SPECTRAL QUALIFIER',
|
|
|
|
align: 'left',
|
|
|
|
width: 100,
|
2023-06-12 14:29:57 +08:00
|
|
|
dataIndex: 'spectralQualifie',
|
2023-06-08 19:44:39 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: 'ACQUISITION START TIME',
|
|
|
|
align: 'left',
|
|
|
|
width: 100,
|
2023-06-12 14:29:57 +08:00
|
|
|
dataIndex: 'acquisitionStart',
|
2023-06-08 19:44:39 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: 'ACQUISITION STOP TIME',
|
|
|
|
align: 'left',
|
|
|
|
width: 120,
|
2023-06-12 14:29:57 +08:00
|
|
|
dataIndex: 'acquisitionStop',
|
2023-06-08 19:44:39 +08:00
|
|
|
},
|
|
|
|
]
|
|
|
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
2023-06-12 14:29:57 +08:00
|
|
|
import { getAction } from '../../api/manage'
|
|
|
|
import dateFormat from '../../components/jeecg/JEasyCron/format-date'
|
2023-06-29 17:58:11 +08:00
|
|
|
import Detail from "./detail.vue"
|
2023-06-08 19:44:39 +08:00
|
|
|
export default {
|
|
|
|
name: 'menuTree',
|
|
|
|
mixins: [JeecgListMixin],
|
2023-06-29 17:58:11 +08:00
|
|
|
components: {
|
|
|
|
Detail,
|
|
|
|
},
|
2023-06-08 19:44:39 +08:00
|
|
|
data() {
|
|
|
|
return {
|
2023-06-29 17:58:11 +08:00
|
|
|
isDetail:false,
|
2023-06-08 19:44:39 +08:00
|
|
|
columns,
|
2023-06-12 14:29:57 +08:00
|
|
|
queryParam: {
|
|
|
|
dataType: 'B',
|
|
|
|
startTime: dateFormat(new Date(), 'yyyy-MM-dd'),
|
|
|
|
endTime: dateFormat(new Date(), 'yyyy-MM-dd'),
|
|
|
|
},
|
2023-06-08 19:44:39 +08:00
|
|
|
url: {
|
2023-06-30 18:12:32 +08:00
|
|
|
listPage: '/webStatistics/findParticulatePage',
|
2023-06-08 19:44:39 +08:00
|
|
|
delete: '/gardsSampleData/deleteById',
|
2023-06-12 14:29:57 +08:00
|
|
|
findStationList: '/webStatistics/findStationList',
|
|
|
|
findParticulatePage: '/jeecg-web-statistics/webStatistics/findParticulatePage',
|
2023-06-08 19:44:39 +08:00
|
|
|
},
|
2023-06-12 14:29:57 +08:00
|
|
|
stationList: [],
|
2023-06-30 18:12:32 +08:00
|
|
|
dataSource: [],
|
|
|
|
detailJson:{}
|
2023-06-08 19:44:39 +08:00
|
|
|
}
|
|
|
|
},
|
2023-06-30 18:12:32 +08:00
|
|
|
// mounted() {
|
|
|
|
// console.log("this.$route.meta",this.$route.meta);
|
|
|
|
// this.queryParam.dataType = this.$route.meta.title
|
|
|
|
// },
|
2023-06-12 14:29:57 +08:00
|
|
|
created() {
|
|
|
|
this.findStationList()
|
|
|
|
},
|
2023-06-30 18:12:32 +08:00
|
|
|
// watch: {
|
|
|
|
// '$route.meta.title'(val) {
|
|
|
|
// if(val === 'SPHDF'){
|
|
|
|
// this.queryParam.dataType = 'FULL'
|
|
|
|
// } else if(val === 'SPHDP'){
|
|
|
|
// this.queryParam.dataType = 'PREL'
|
|
|
|
// } else{
|
|
|
|
// this.queryParam.dataType = val.substring(0, 1)
|
|
|
|
// }
|
|
|
|
// // this.searchQuery()
|
|
|
|
// },
|
|
|
|
// },
|
2023-06-08 19:44:39 +08:00
|
|
|
methods: {
|
2023-06-29 17:58:11 +08:00
|
|
|
searchQueryData() {
|
|
|
|
this.queryParam = {
|
|
|
|
dataType: "S",
|
|
|
|
startTime: "2023-05-01",
|
|
|
|
endTime:"2023-05-07",
|
|
|
|
}
|
|
|
|
console.log("查询数据", this.queryParam);
|
|
|
|
let params = {
|
|
|
|
...this.queryParam,
|
|
|
|
pageNo: 1,
|
|
|
|
pageSize: 10,
|
|
|
|
stationIds: ["209", "211", "213"]
|
|
|
|
}
|
2023-06-30 18:12:32 +08:00
|
|
|
getAction(this.url.listPage, params).then((res) => {
|
2023-06-29 17:58:11 +08:00
|
|
|
console.log("查询数据结果", res);
|
|
|
|
if (res.success) {
|
|
|
|
this.dataSource = res.result.records
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
handleDetail(record) {
|
2023-06-30 18:12:32 +08:00
|
|
|
console.log("点击行信息", record);
|
|
|
|
getAction("webStatistics/findGeneratedReport", { sampleId: "1523651" }).then(res => {
|
|
|
|
console.log(res);
|
|
|
|
if (res.success) {
|
|
|
|
this.detailJson = res.result
|
|
|
|
this.detailJson = JSON.parse(JSON.stringify(this.detailJson))
|
|
|
|
this.isDetail = true
|
|
|
|
} else {
|
|
|
|
this.$message.warning(res.message)
|
|
|
|
}
|
|
|
|
})
|
2023-06-29 17:58:11 +08:00
|
|
|
},
|
|
|
|
handleBack(flag) {
|
|
|
|
this.isDetail = flag
|
|
|
|
},
|
|
|
|
handleTableChange(pagination, filters, sorter, { currentDataSource }) {
|
|
|
|
console.log(pagination, filters, sorter, { currentDataSource });
|
|
|
|
},
|
2023-06-12 14:29:57 +08:00
|
|
|
findStationList() {
|
|
|
|
getAction(this.url.findStationList, { menuName: 'Particulate' }).then((res) => {
|
2023-06-29 17:58:11 +08:00
|
|
|
console.log("resdsfsdf", res);
|
|
|
|
if (res.result.length>0) {
|
|
|
|
this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId }))
|
|
|
|
} else {
|
|
|
|
this.stationList=[]
|
|
|
|
}
|
2023-06-12 14:29:57 +08:00
|
|
|
})
|
|
|
|
},
|
2023-06-08 19:44:39 +08:00
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
formItems() {
|
|
|
|
return [
|
|
|
|
{
|
|
|
|
type: 'a-input',
|
|
|
|
label: '',
|
2023-06-12 14:29:57 +08:00
|
|
|
name: 'search',
|
2023-06-08 19:44:39 +08:00
|
|
|
props: {
|
2023-06-12 14:29:57 +08:00
|
|
|
placeholder: 'search...',
|
2023-06-08 19:44:39 +08:00
|
|
|
style: {
|
|
|
|
width: '166px',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
style: {
|
|
|
|
width: 'auto',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: 'custom-select',
|
|
|
|
label: 'Stations',
|
2023-06-12 14:29:57 +08:00
|
|
|
name: 'stationIds',
|
2023-06-08 19:44:39 +08:00
|
|
|
props: {
|
2023-06-12 14:29:57 +08:00
|
|
|
placeholder: 'select stations',
|
|
|
|
mode: 'multiple',
|
|
|
|
maxTagCount: 1,
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
label: 'ALL',
|
|
|
|
value: '',
|
|
|
|
},
|
|
|
|
...this.stationList,
|
|
|
|
],
|
2023-06-08 19:44:39 +08:00
|
|
|
style: {
|
|
|
|
width: '200px',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
style: {
|
|
|
|
width: 'auto',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Start date',
|
|
|
|
type: 'custom-date-picker',
|
2023-06-12 14:29:57 +08:00
|
|
|
name: 'startTime',
|
2023-06-08 19:44:39 +08:00
|
|
|
props: {
|
|
|
|
showTime: { format: 'HH:mm' },
|
2023-06-12 14:29:57 +08:00
|
|
|
format: 'YYYY-MM-DD',
|
|
|
|
valueFormat: 'YYYY-MM-DD:ss',
|
2023-06-08 19:44:39 +08:00
|
|
|
style: {
|
|
|
|
minWidth: 'auto',
|
|
|
|
width: '200px',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
style: {
|
|
|
|
width: 'auto',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'End date',
|
|
|
|
type: 'custom-date-picker',
|
2023-06-12 14:29:57 +08:00
|
|
|
name: 'endTime',
|
2023-06-08 19:44:39 +08:00
|
|
|
props: {
|
|
|
|
showTime: { format: 'HH:mm' },
|
2023-06-12 14:29:57 +08:00
|
|
|
format: 'YYYY-MM-DD',
|
|
|
|
valueFormat: 'YYYY-MM-DD:ss',
|
2023-06-08 19:44:39 +08:00
|
|
|
style: {
|
|
|
|
minWidth: 'auto',
|
|
|
|
width: '200px',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
style: {
|
|
|
|
width: 'auto',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
2023-06-29 17:58:11 +08:00
|
|
|
|
2023-06-08 19:44:39 +08:00
|
|
|
</style>
|
|
|
|
|