Merge branch 'feature-particulate-renpy' of http://git.hivekion.com:3000/xiaoguangbin/AnalysisSystemForRadionuclide_vue into feature-particulate-renpy

This commit is contained in:
orgin 2023-07-04 18:03:46 +08:00
commit 9a580739fd
12 changed files with 253 additions and 119 deletions

View File

@ -0,0 +1,84 @@
<template>
<a-select v-bind="$attrs" v-model="innerValue" show-arrow @change="onChange">
<img slot="suffixIcon" src="@/assets/images/global/select-down.png" alt="" />
<div slot="dropdownRender" slot-scope="menu">
<v-nodes :vnodes="menu" />
<a-divider style="margin: 0;" />
<div
style="padding: 4px 12px; cursor: pointer;"
@mousedown="e => e.preventDefault()"
>
<a-checkbox v-model="allVal" @change="checkedAll"><span @click.prevent="handleClick">ALL</span></a-checkbox>
</div>
</div>
</a-select>
</template>
<script>
export default {
props: {
value: {
type: [String, Number, Array],
},
allChecked: {
type: Boolean,
default:false
}
},
components: {
VNodes: {
functional: true,
render: (h, ctx) => ctx.props.vnodes,
},
},
data() {
return {
innerValue: this.value,
allVal:this.allChecked
}
},
methods: {
checkedAll(val) {
this.$emit('changeAll', val.target.checked)
},
handleClick(e) {
console.log("dfasdfasfad", e);
this.allVal = !this.allVal
this.$emit('changeAll', this.allVal)
},
onChange(val) {
this.$emit('input', val)
this.$emit('change', val)
}
},
watch: {
value: {
handler(val) {
this.innerValue = val
},
deep: true
},
allChecked: {
handler(val) {
this.allVal = val
}
}
}
}
</script>
<style lang="less" scoped>
.ant-select {
width: 100%;
.ant-select-arrow-icon {
transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}
&-open {
.ant-select-arrow-icon {
transform: rotate(180deg);
}
}
}
.ant-select-dropdown-content{
position: relative;
background: #03353f;
}
</style>

View File

@ -66,9 +66,15 @@ export default {
} }
}, },
watch: { watch: {
value(val) { value: {
handler(val) {
this.formModel = val this.formModel = val
}, },
deep: true
},
// value(val) {
// this.formModel = val
// },
formModel: { formModel: {
handler(val) { handler(val) {
this.$emit('input', val) this.$emit('input', val)

View File

@ -52,6 +52,7 @@ import { rules } from '@/utils/rules'
import SearchForm from '@/components/SearchForm' import SearchForm from '@/components/SearchForm'
import CustomSelect from '@/components/CustomSelect' import CustomSelect from '@/components/CustomSelect'
import CustomAllSelect from '@/components/CustomAllSelect'
import CustomTable from '@/components/CustomTable' import CustomTable from '@/components/CustomTable'
import CustomModal from '@/components/CustomModal' import CustomModal from '@/components/CustomModal'
import CustomDatePicker from '@/components/CustomDatePicker' import CustomDatePicker from '@/components/CustomDatePicker'
@ -82,6 +83,7 @@ Vue.use(JeecgComponents);
Vue.use(VueAreaLinkage); Vue.use(VueAreaLinkage);
Vue.component('search-form', SearchForm) Vue.component('search-form', SearchForm)
Vue.component('custom-select', CustomSelect) Vue.component('custom-select', CustomSelect)
Vue.component('custom-all-select', CustomAllSelect)
Vue.component('custom-table', CustomTable) Vue.component('custom-table', CustomTable)
Vue.component('custom-modal', CustomModal) Vue.component('custom-modal', CustomModal)
Vue.component('custom-date-picker', CustomDatePicker) Vue.component('custom-date-picker', CustomDatePicker)

View File

@ -53,7 +53,7 @@ export const JeecgListMixin = {
} }
}, },
created() { created() {
if(!this.disableMixinCreated){ if(!this.disableMixinCreated&&!this.isImmediate){
console.log(' -- mixin created -- ') console.log(' -- mixin created -- ')
this.loadData(); this.loadData();
//初始化字典配置 在自己页面定义 //初始化字典配置 在自己页面定义
@ -73,12 +73,10 @@ export const JeecgListMixin = {
}, },
methods:{ methods:{
loadData(arg) { loadData(arg) {
// if(!this.url.list){ if(!this.url.list){
// this.$message.error("请设置url.list属性!") this.$message.error("请设置url.list属性!")
// return return
// } }
if (this.url.list) {
//加载数据 若传入参数1则加载第一页的内容 //加载数据 若传入参数1则加载第一页的内容
if (arg === 1) { if (arg === 1) {
this.ipagination.current = 1; this.ipagination.current = 1;
@ -103,7 +101,6 @@ export const JeecgListMixin = {
}).finally(() => { }).finally(() => {
this.loading = false this.loading = false
}) })
}
}, },
initDictConfig(){ initDictConfig(){
console.log("--这是一个假的方法!") console.log("--这是一个假的方法!")

View File

@ -97,22 +97,26 @@ export default {
}, },
data() { data() {
return { return {
isImmediate:true,
isDetail:false, isDetail:false,
columns, columns,
queryParam: { queryParam: {
dataType: 'B', dataType: 'B',
startTime: dateFormat(new Date(), 'yyyy-MM-dd'), startTime: dateFormat(new Date(), 'yyyy-MM-dd'),
endTime: dateFormat(new Date(), 'yyyy-MM-dd'), endTime: dateFormat(new Date(), 'yyyy-MM-dd'),
stationIds:[]
}, },
url: { url: {
listPage: '/webStatistics/findParticulatePage', list: '/webStatistics/findParticulatePage',
delete: '/gardsSampleData/deleteById', delete: '/gardsSampleData/deleteById',
findStationList: '/webStatistics/findStationList', findStationList: '/webStatistics/findStationList',
findParticulatePage: '/jeecg-web-statistics/webStatistics/findParticulatePage', findParticulatePage: '/jeecg-web-statistics/webStatistics/findParticulatePage',
}, },
stationList: [], stationList: [],
dataSource: [], dataSource: [],
detailJson:{} detailJson: {},
strIds: "",
allChecked:false
} }
}, },
// mounted() { // mounted() {
@ -136,29 +140,29 @@ export default {
// }, // },
methods: { methods: {
searchQueryData() { searchQueryData() {
this.queryParam = { this.isImmediate = false
dataType: "S", // this.queryParam = {
startTime: "2023-05-01", // dataType: "S",
endTime:"2023-05-07", // startTime: "2023-05-01",
} // endTime: "2023-05-07",
console.log("查询数据", this.queryParam); // stationIds: [209, 211, 213]
// }
let params = { let params = {
...this.queryParam, ...this.queryParam,
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10
stationIds: ["209", "211", "213"]
} }
getAction(this.url.listPage, params).then((res) => { getAction(this.url.list, params).then((res) => {
console.log("查询数据结果", res);
if (res.success) { if (res.success) {
this.ipagination.current = res.result.current
this.ipagination.pageSize = res.result.size
this.ipagination.total = res.result.total
this.dataSource = res.result.records this.dataSource = res.result.records
} }
}) })
}, },
handleDetail(record) { handleDetail(record) {
console.log("点击行信息", record);
getAction("webStatistics/findGeneratedReport", { sampleId: "1523651" }).then(res => { getAction("webStatistics/findGeneratedReport", { sampleId: "1523651" }).then(res => {
console.log(res);
if (res.success) { if (res.success) {
this.detailJson = res.result this.detailJson = res.result
this.detailJson = JSON.parse(JSON.stringify(this.detailJson)) this.detailJson = JSON.parse(JSON.stringify(this.detailJson))
@ -171,12 +175,8 @@ export default {
handleBack(flag) { handleBack(flag) {
this.isDetail = flag this.isDetail = flag
}, },
handleTableChange(pagination, filters, sorter, { currentDataSource }) {
console.log(pagination, filters, sorter, { currentDataSource });
},
findStationList() { findStationList() {
getAction(this.url.findStationList, { menuName: 'Particulate' }).then((res) => { getAction(this.url.findStationList, { menuName: 'Particulate' }).then((res) => {
console.log("resdsfsdf", res);
if (res.result.length>0) { if (res.result.length>0) {
this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId })) this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId }))
} else { } else {
@ -184,6 +184,23 @@ export default {
} }
}) })
}, },
handleSelectChange(val) {
console.log(val);
let length = this.stationList.length
if (val.length === length) {
this.allChecked = true
} else {
this.allChecked = false
}
},
handleSelectChangeAll(val) {
this.allChecked = val
if (val) {
this.queryParam.stationIds = this.stationList.map(item => item.value)
} else {
this.queryParam.stationIds =[]
}
}
}, },
computed: { computed: {
formItems() { formItems() {
@ -203,24 +220,25 @@ export default {
}, },
}, },
{ {
type: 'custom-select', type: 'custom-all-select',
label: 'Stations', label: 'Stations',
name: 'stationIds', name: 'stationIds',
props: { props: {
allChecked:this.allChecked,
placeholder: 'select stations', placeholder: 'select stations',
mode: 'multiple', mode: 'multiple',
maxTagCount: 1, maxTagCount: 1,
options: [ options: [
{
label: 'ALL',
value: '',
},
...this.stationList, ...this.stationList,
], ],
style: { style: {
width: '200px', width: '200px',
}, },
}, },
on: {
change: this.handleSelectChange,
changeAll: this.handleSelectChangeAll
},
style: { style: {
width: 'auto', width: 'auto',
}, },

View File

@ -61,6 +61,12 @@ const columns = [
width: 120, width: 120,
dataIndex: 'acquisitionStop', dataIndex: 'acquisitionStop',
}, },
{
title: 'CALIB REPORTS',
align: 'left',
width: 120,
dataIndex: 'calibReports',
},
] ]
export default { export default {
components: { components: {
@ -69,10 +75,7 @@ export default {
data() { data() {
return { return {
url: { url: {
listPage: '/webStatistics/findParticulatePage',
delete: '/gardsSampleData/deleteById',
findStationList: '/webStatistics/findStationList', findStationList: '/webStatistics/findStationList',
findParticulatePage: '/jeecg-web-statistics/webStatistics/findParticulatePage',
}, },
stationList: [], stationList: [],
columns, columns,

View File

@ -2,92 +2,92 @@
<a-card :bordered="false" style="margin-left: 20px;height: 100%;"> <a-card :bordered="false" style="margin-left: 20px;height: 100%;">
<div class="detail-top"> <div class="detail-top">
<div class="top-back" @click="handleback"> <div class="top-back" @click="handleback">
<img src="../../assets/images/web-statistics/return.png" alt=""> <img class="icon-back" src="../../assets/images/web-statistics/return.png" alt="">
<span style="margin-left: 10px;">return</span> <span style="margin-left: 10px;">return</span>
</div> </div>
<div class="top-actions"> <div class="top-actions">
<div class="right-btn"> <div class="right-btn">
<img src="../../assets/images/web-statistics/download.png" alt=""><span>ZIP</span> <img class="icon-download" src="../../assets/images/web-statistics/download.png" alt=""><span style="margin-left: 10px;">ZIP</span>
</div> </div>
<div class="right-btn"> <div class="right-btn">
<img src="../../assets/images/web-statistics/download.png" alt=""><span>TXT</span> <img class="icon-download" src="../../assets/images/web-statistics/download.png" alt=""><span style="margin-left: 10px;">TXT</span>
</div> </div>
<div class="right-btn"> <div class="right-btn">
<img src="../../assets/images/web-statistics/view.png" alt=""><span>View Report</span> <img class="icon-view" src="../../assets/images/web-statistics/view.png" alt=""><span style="margin-left: 10px;">View Report</span>
</div> </div>
</div> </div>
</div> </div>
<a-tabs default-active-key="info" @change="handleTabChange"> <a-tabs default-active-key="info" @change="handleTabChange">
<a-tab-pane key="info" tab="INFO" v-if="allData.headerBlock===null?false:true"> <a-tab-pane key="info" tab="INFO" v-if="allData.headerBlock===null?false:true">
<templete> <template>
<div class="pane-title">GENERAL INFORMATION</div> <div class="pane-title">GENERAL INFORMATION</div>
<a-row> <a-row>
<a-col :span="12">Site Code:</a-col> <a-col :span="12" class="info-key">Site Code:</a-col>
<a-col :span="12">{{ allData.headerBlock.siteCode }}</a-col> <a-col :span="12" class="info-val">{{ allData.headerBlock.siteCode }}</a-col>
</a-row> </a-row>
<a-row> <a-row>
<a-col :span="12">Detector Code:</a-col> <a-col :span="12" class="info-key">Detector Code:</a-col>
<a-col :span="12">{{ allData.headerBlock.detectorCode }}</a-col> <a-col :span="12" class="info-val">{{ allData.headerBlock.detectorCode }}</a-col>
</a-row> </a-row>
<a-row> <a-row>
<a-col :span="12">System Type:</a-col> <a-col :span="12" class="info-key">System Type:</a-col>
<a-col :span="12">{{ allData.headerBlock.systemType }}</a-col> <a-col :span="12" class="info-val">{{ allData.headerBlock.systemType }}</a-col>
</a-row> </a-row>
<a-row> <a-row>
<a-col :span="12">Sample Geometry:</a-col> <a-col :span="12" class="info-key">Sample Geometry:</a-col>
<a-col :span="12">{{ allData.headerBlock.sampleGeometry }}</a-col> <a-col :span="12" class="info-val">{{ allData.headerBlock.sampleGeometry }}</a-col>
</a-row> </a-row>
<a-row> <a-row>
<a-col :span="12">Spectrum Qualifier:</a-col> <a-col :span="12" class="info-key">Spectrum Qualifier:</a-col>
<a-col :span="12">{{ allData.headerBlock.spectrumQualifier }}P</a-col> <a-col :span="12" class="info-val">{{ allData.headerBlock.spectrumQualifier }}P</a-col>
</a-row> </a-row>
<a-row> <a-row>
<a-col :span="12">Sample Reference Identification:</a-col> <a-col :span="12" class="info-key">Sample Reference Identification:</a-col>
<a-col :span="12">{{ allData.headerBlock.sampleReferenceIdentification }}</a-col> <a-col :span="12" class="info-val">{{ allData.headerBlock.sampleReferenceIdentification }}</a-col>
</a-row> </a-row>
<a-row> <a-row>
<a-col :span="12">Measurement Identification:</a-col> <a-col :span="12" class="info-key">Measurement Identification:</a-col>
<a-col :span="12">{{ allData.headerBlock.measurementIdentification }}</a-col> <a-col :span="12" class="info-val">{{ allData.headerBlock.measurementIdentification }}</a-col>
</a-row> </a-row>
<a-row> <a-row>
<a-col :span="12">Detector Background Measurement Identification:</a-col> <a-col :span="12" class="info-key">Detector Background Measurement Identification:</a-col>
<a-col :span="12">{{ allData.headerBlock.detectorBackgroundMeasurementId }}</a-col> <a-col :span="12" class="info-val">{{ allData.headerBlock.detectorBackgroundMeasurementId }}</a-col>
</a-row> </a-row>
<a-row> <a-row>
<a-col :span="12">Gas Background Measurement Identification:</a-col> <a-col :span="12" class="info-key">Gas Background Measurement Identification:</a-col>
<a-col :span="12">{{ allData.headerBlock.gasBackgroundMeasurementId }}</a-col> <a-col :span="12" class="info-val">{{ allData.headerBlock.gasBackgroundMeasurementId }}</a-col>
</a-row> </a-row>
<a-row> <a-row>
<a-col :span="12">Transmit Time:</a-col> <a-col :span="12" class="info-key">Transmit Time:</a-col>
<a-col :span="12">{{ allData.headerBlock.transmitDate }}</a-col> <a-col :span="12" class="info-val">{{ allData.headerBlock.transmitDate }}</a-col>
</a-row> </a-row>
</templete> </template>
<template v-if="allData.commentBlock && allData.commentBlock.text"> <template v-if="allData.commentBlock && allData.commentBlock.text">
<div class="pane-title">COMMENT</div> <div class="pane-title">COMMENT</div>
<a-row> <a-row style="height: auto;">
<a-col class="comment-block" :span="24" v-html="commentText"></a-col> <a-col class="comment-block" :span="24" v-html="commentText"></a-col>
</a-row> </a-row>
</template> </template>
<template v-if="allData.acquisitionBlock"> <template v-if="allData.acquisitionBlock">
<div class="pane-title">ACQUISITION</div> <div class="pane-title">ACQUISITION</div>
<a-row> <a-row>
<a-col :span="12">Acquisition Time:</a-col> <a-col :span="12" class="info-key">Acquisition Time:</a-col>
<a-col :span="12">{{ allData.acquisitionBlock.acquisitionStartDate }}</a-col> <a-col :span="12" class="info-val">{{ allData.acquisitionBlock.acquisitionStartDate }}</a-col>
</a-row> </a-row>
<a-row> <a-row>
<a-col :span="12">Acquisition Real Time:</a-col> <a-col :span="12" class="info-key">Acquisition Real Time:</a-col>
<a-col :span="12">{{ allData.acquisitionBlock.acquisitionRealTime }}</a-col> <a-col :span="12" class="info-val">{{ allData.acquisitionBlock.acquisitionRealTime }}</a-col>
</a-row> </a-row>
<a-row> <a-row>
<a-col :span="12">Acquisition Live Time:</a-col> <a-col :span="12" class="info-key">Acquisition Live Time:</a-col>
<a-col :span="12">{{ allData.acquisitionBlock.acquisitionLiveTime }}</a-col> <a-col :span="12" class="info-val">{{ allData.acquisitionBlock.acquisitionLiveTime }}</a-col>
</a-row> </a-row>
</template> </template>
<template v-if="allData.calibrationBlock"> <template v-if="allData.calibrationBlock">
<div class="pane-title">CALIBRATION</div> <div class="pane-title">CALIBRATION</div>
<a-row> <a-row>
<a-col :span="12">Date of Last Calibration</a-col> <a-col :span="12" class="info-key">Date of Last Calibration</a-col>
<a-col :span="12">{{ allData.calibrationBlock.dateOfLastCalibration }}</a-col> <a-col :span="12" class="info-val">{{ allData.calibrationBlock.dateOfLastCalibration }}</a-col>
</a-row> </a-row>
</template> </template>
</a-tab-pane> </a-tab-pane>
@ -128,8 +128,8 @@
<div class="pane-title" style="margin-bottom: 15px;">GAMMA SPECTRUM</div> <div class="pane-title" style="margin-bottom: 15px;">GAMMA SPECTRUM</div>
<div class="gamma-spectrum-row"> <div class="gamma-spectrum-row">
<div> <div>
<span>Number of Channels</span><span class="row-val">{{ allData.gspectrumBlock.numberGChannels }}</span> <span class="span-key">Number of Channels</span><span class="row-val">{{ allData.gspectrumBlock.numberGChannels }}</span>
<span style="margin-left: 35px;">Energy Span</span><span class="row-val">{{ allData.gspectrumBlock.energySpan }}</span> <span class="span-key" style="margin-left: 35px;">Energy Span</span><span class="row-val">{{ allData.gspectrumBlock.energySpan }}</span>
</div> </div>
<div> <div>
<a-checkbox style="margin-right: 15px;" @change="yLogChange">Y log scale</a-checkbox> <a-checkbox style="margin-right: 15px;" @change="yLogChange">Y log scale</a-checkbox>
@ -141,9 +141,9 @@
<a-tab-pane key="certificate" tab="CERTIFICATE" v-if="allData.certificateBlock===null?false:true"> <a-tab-pane key="certificate" tab="CERTIFICATE" v-if="allData.certificateBlock===null?false:true">
<div class="pane-title" style="margin-bottom: 15px;">CERTIFICATE</div> <div class="pane-title" style="margin-bottom: 15px;">CERTIFICATE</div>
<div class="certificate-row"> <div class="certificate-row">
<span>Total Source Activity [ Bq ]</span><span class="row-val">{{ allData.certificateBlock.totalSourceActivity }}</span> <span class="span-key">Total Source Activity [ Bq ]</span><span class="row-val">{{ allData.certificateBlock.totalSourceActivity }}</span>
<span style="margin-left: 35px;">Assay Date</span><span class="row-val">{{ allData.certificateBlock.assayDate }}</span> <span class="span-key" style="margin-left: 35px;">Assay Date</span><span class="row-val">{{ allData.certificateBlock.assayDate }}</span>
<span style="margin-left: 35px;">Units of Activity</span><span class="row-val">{{ allData.certificateBlock.unitsOfActivity }}</span> <span class="span-key" style="margin-left: 35px;">Units of Activity</span><span class="row-val">{{ allData.certificateBlock.unitsOfActivity }}</span>
</div> </div>
<custom-table <custom-table
size="middle" size="middle"
@ -291,7 +291,6 @@ export default {
} }
}, },
mounted () { mounted () {
console.log(this.allData);
this.commentText = this.allData.commentBlock && this.allData.commentBlock.text?this.allData.commentBlock.text.replace(/\n/g, "<br />"):"" this.commentText = this.allData.commentBlock && this.allData.commentBlock.text?this.allData.commentBlock.text.replace(/\n/g, "<br />"):""
this.dataSourceEnergy=this.allData.genergyBlock this.dataSourceEnergy=this.allData.genergyBlock
this.dataSourceResulution=this.allData.gresolutionBlock this.dataSourceResulution=this.allData.gresolutionBlock
@ -300,7 +299,6 @@ export default {
this.dataSourceSpectrumX = this.allData.gspectrumBlock.gspectrumSubBlock.map((item, index) => { this.dataSourceSpectrumX = this.allData.gspectrumBlock.gspectrumSubBlock.map((item, index) => {
return index return index
}) })
console.log(this.dataSourceSpectrumX);
this.dataSourceCertificate = this.allData.certificateBlock?this.allData.certificateBlock.certificateSubBlock:[] this.dataSourceCertificate = this.allData.certificateBlock?this.allData.certificateBlock.certificateSubBlock:[]
}, },
methods: { methods: {
@ -309,7 +307,6 @@ export default {
this.spectrumChart.setOption({ this.spectrumChart.setOption({
yAxis: { yAxis: {
type: this.yAxisType, type: this.yAxisType,
// type: 'log',
splitLine: { splitLine: {
show: true, show: true,
lineStyle: { lineStyle: {
@ -420,6 +417,11 @@ export default {
font-stretch: normal; font-stretch: normal;
letter-spacing: 0px; letter-spacing: 0px;
color: #69a19f; color: #69a19f;
cursor: pointer;
.icon-back{
width: 28px;
height: 24px;
}
} }
.top-actions{ .top-actions{
.right-btn{ .right-btn{
@ -429,6 +431,14 @@ export default {
padding: 0 12px; padding: 0 12px;
margin-left: 20px; margin-left: 20px;
background-color: #1397a3; background-color: #1397a3;
.icon-download{
width: 16px;
height: 19px;
}
.icon-view{
width: 15px;
height: 16px;
}
} }
} }
} }
@ -440,6 +450,7 @@ export default {
.ant-tabs-tabpane{ .ant-tabs-tabpane{
height: 100%; height: 100%;
overflow: auto; overflow: auto;
background-color: #02282b;
} }
} }
} }
@ -526,11 +537,28 @@ export default {
color: #0cebc9; color: #0cebc9;
padding: 0 0 0 18px; padding: 0 0 0 18px;
} }
.info-key{
font-family: ArialMT;
font-size: 16px;
font-weight: bold;
color: #ffffff;
}
.info-val{
font-family: ArialMT;
font-size: 16px;
color: #ade6ee;
}
.span-key{
font-family: MicrosoftYaHei;
font-size: 16px;
color: #ffffff;
}
.comment-block{ .comment-block{
background-color: rgba(12, 235, 201, 0.05); background-color: #0d6d76;
margin-top: 10px; margin: 10px 0;
padding: 20px; padding: 20px;
line-height: 24px; line-height: 24px;
border-radius: 4px;
} }
.gamma-spectrum-row{ .gamma-spectrum-row{
display: flex; display: flex;
@ -538,6 +566,7 @@ export default {
justify-content: space-between; justify-content: space-between;
.row-val{ .row-val{
font-family: MicrosoftYaHei; font-family: MicrosoftYaHei;
font-size: 16px;
color: #ade6ee; color: #ade6ee;
} }
.row-btn{ .row-btn{

View File

@ -69,10 +69,7 @@ export default {
data() { data() {
return { return {
url: { url: {
listPage: '/webStatistics/findParticulatePage',
delete: '/gardsSampleData/deleteById',
findStationList: '/webStatistics/findStationList', findStationList: '/webStatistics/findStationList',
findParticulatePage: '/jeecg-web-statistics/webStatistics/findParticulatePage',
}, },
stationList: [], stationList: [],
columns, columns,
@ -86,7 +83,6 @@ export default {
methods: { methods: {
findStationList() { findStationList() {
getAction(this.url.findStationList, { menuName: 'Particulate' }).then((res) => { getAction(this.url.findStationList, { menuName: 'Particulate' }).then((res) => {
console.log("resdsfsdf", res);
if (res.result.length>0) { if (res.result.length>0) {
this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId })) this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId }))
} else { } else {

View File

@ -57,11 +57,13 @@ export default {
}, },
data() { data() {
return { return {
isImmediate:true,
isDetail:false, isDetail:false,
queryParam: { queryParam: {
dataType: this.dataType, dataType: this.dataType,
startTime: dateFormat(new Date(), 'yyyy-MM-dd'), startTime: dateFormat(new Date(), 'yyyy-MM-dd'),
endTime: dateFormat(new Date(), 'yyyy-MM-dd'), endTime: dateFormat(new Date(), 'yyyy-MM-dd'),
stationIds:[]
}, },
url: { url: {
list: '/webStatistics/findParticulatePage', list: '/webStatistics/findParticulatePage',
@ -70,37 +72,32 @@ export default {
findParticulatePage: '/jeecg-web-statistics/webStatistics/findParticulatePage', findParticulatePage: '/jeecg-web-statistics/webStatistics/findParticulatePage',
}, },
dataSource: [], dataSource: [],
detailJson:{} detailJson: {},
allChecked:false
} }
}, },
methods: { methods: {
searchQueryData() { searchQueryData() {
console.log("查询数据", this.queryParam); console.log("查询数据", this.queryParam);
console.log(this.dataType); console.log(this.dataType);
this.isImmediate = false
let params = { let params = {
dataType: "S", ...this.queryParam,
startTime: "2023-05-01",
endTime: "2023-05-07",
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10
stationIds: ["209", "211", "213"]
// dataType: this.queryParam.dataType||"S",
// startTime: this.queryParam.startTime,
// endTime:this.queryParam.endTime,
} }
getAction(this.url.list, params).then((res) => { getAction(this.url.list, params).then((res) => {
console.log("查询数据结果", res);
if (res.success) { if (res.success) {
this.ipagination.current = res.result.current
this.ipagination.pageSize = res.result.size
this.ipagination.total = res.result.total
this.dataSource = res.result.records this.dataSource = res.result.records
} }
}) })
}, },
handleDetail(record) { handleDetail(record) {
// this.isDetail = true
console.log("点击行信息", record);
// record.sampleId // record.sampleId
getAction("webStatistics/findGeneratedReport", { sampleId: "1523651" }).then(res => { getAction("webStatistics/findGeneratedReport", { sampleId: "1523651" }).then(res => {
console.log(res);
if (res.success){ if (res.success){
this.detailJson = res.result this.detailJson = res.result
this.detailJson = JSON.parse(JSON.stringify(this.detailJson)) this.detailJson = JSON.parse(JSON.stringify(this.detailJson))
@ -113,8 +110,21 @@ export default {
handleBack(flag) { handleBack(flag) {
this.isDetail = flag this.isDetail = flag
}, },
handleTableChange(pagination, filters, sorter, { currentDataSource }) { handleSelectChange(val) {
console.log(pagination, filters, sorter, { currentDataSource }); let length = this.stationList.length
if (val.length === length) {
this.allChecked = true
} else {
this.allChecked = false
}
},
handleSelectChangeAll(val) {
this.allChecked = val
if (val) {
this.queryParam.stationIds = this.stationList.map(item => item.value)
} else {
this.queryParam.stationIds =[]
}
} }
}, },
computed: { computed: {
@ -135,24 +145,25 @@ export default {
}, },
}, },
{ {
type: 'custom-select', type: 'custom-all-select',
label: 'Stations', label: 'Stations',
name: 'stationIds', name: 'stationIds',
props: { props: {
allChecked:this.allChecked,
placeholder: 'select stations', placeholder: 'select stations',
mode: 'multiple', mode: 'multiple',
maxTagCount: 1, maxTagCount: 1,
options: [ options: [
{
label: 'ALL',
value: '',
},
...this.stationList, ...this.stationList,
], ],
style: { style: {
width: '200px', width: '200px',
}, },
}, },
on: {
change: this.handleSelectChange,
changeAll: this.handleSelectChangeAll
},
style: { style: {
width: 'auto', width: 'auto',
}, },

View File

@ -69,10 +69,7 @@ export default {
data() { data() {
return { return {
url: { url: {
listPage: '/webStatistics/findParticulatePage',
delete: '/gardsSampleData/deleteById',
findStationList: '/webStatistics/findStationList', findStationList: '/webStatistics/findStationList',
findParticulatePage: '/jeecg-web-statistics/webStatistics/findParticulatePage',
}, },
stationList: [], stationList: [],
columns, columns,
@ -86,7 +83,6 @@ export default {
methods: { methods: {
findStationList() { findStationList() {
getAction(this.url.findStationList, { menuName: 'Particulate' }).then((res) => { getAction(this.url.findStationList, { menuName: 'Particulate' }).then((res) => {
console.log("resdsfsdf", res);
if (res.result.length>0) { if (res.result.length>0) {
this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId })) this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId }))
} else { } else {

View File

@ -69,10 +69,7 @@ export default {
data() { data() {
return { return {
url: { url: {
listPage: '/webStatistics/findParticulatePage',
delete: '/gardsSampleData/deleteById',
findStationList: '/webStatistics/findStationList', findStationList: '/webStatistics/findStationList',
findParticulatePage: '/jeecg-web-statistics/webStatistics/findParticulatePage',
}, },
stationList: [], stationList: [],
columns, columns,
@ -86,7 +83,6 @@ export default {
methods: { methods: {
findStationList() { findStationList() {
getAction(this.url.findStationList, { menuName: 'Particulate' }).then((res) => { getAction(this.url.findStationList, { menuName: 'Particulate' }).then((res) => {
console.log("resdsfsdf", res);
if (res.result.length>0) { if (res.result.length>0) {
this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId })) this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId }))
} else { } else {

View File

@ -69,10 +69,7 @@ export default {
data() { data() {
return { return {
url: { url: {
listPage: '/webStatistics/findParticulatePage',
delete: '/gardsSampleData/deleteById',
findStationList: '/webStatistics/findStationList', findStationList: '/webStatistics/findStationList',
findParticulatePage: '/jeecg-web-statistics/webStatistics/findParticulatePage',
}, },
stationList: [], stationList: [],
columns, columns,
@ -86,7 +83,6 @@ export default {
methods: { methods: {
findStationList() { findStationList() {
getAction(this.url.findStationList, { menuName: 'Particulate' }).then((res) => { getAction(this.url.findStationList, { menuName: 'Particulate' }).then((res) => {
console.log("resdsfsdf", res);
if (res.result.length>0) { if (res.result.length>0) {
this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId })) this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId }))
} else { } else {