Analysis Monitor --- Avg Nuclide 页面,增加station 和 source type 搜索条件

This commit is contained in:
任珮宇 2024-02-19 14:32:14 +08:00
parent d6ef68963b
commit 6dbf6f99aa

View File

@ -5,13 +5,43 @@
<a-col flex="108px"> <a-col flex="108px">
<a-button class="search-btn" type="primary" @click="handleConfig"> Config </a-button> <a-button class="search-btn" type="primary" @click="handleConfig"> Config </a-button>
</a-col> </a-col>
<a-col flex="380px"> <a-col flex="365px">
<span class="item-label">Cacl date</span> <span class="item-label">Cacl date</span>
<a-range-picker <a-range-picker
:value="[moment(queryParams.startDate), moment(queryParams.endDate)]" :value="[moment(queryParams.startDate), moment(queryParams.endDate)]"
@change="onRangeDateChange" @change="onRangeDateChange"
/> />
</a-col> </a-col>
<a-col flex="265px">
<span class="item-label">Station</span>
<a-select
style="width: 180px"
v-model="queryParams.stationId"
placeholder="select..."
:filter-option="filterOption"
show-arrow
allowClear
:options="stationOptions"
@change="onStationChange"
>
<img slot="suffixIcon" src="@/assets/images/global/select-down.png" alt="" />
</a-select>
</a-col>
<a-col flex="285px">
<span class="item-label">Source Type</span>
<a-select
style="width: 180px"
v-model="queryParams.sourceType"
placeholder="select..."
:filter-option="filterOption"
show-arrow
allowClear
:options="sourceOptions"
@change="onSourceChange"
>
<img slot="suffixIcon" src="@/assets/images/global/select-down.png" alt="" />
</a-select>
</a-col>
</a-row> </a-row>
</div> </div>
<div class="analysis-main"> <div class="analysis-main">
@ -130,6 +160,8 @@ export default {
dataSource: [], dataSource: [],
loading: false, loading: false,
queryParams: { queryParams: {
stationId: undefined,
sourceType: undefined,
startDate: dateFormat(new Date(), 'yyyy-MM-dd'), startDate: dateFormat(new Date(), 'yyyy-MM-dd'),
endDate: dateFormat(new Date(), 'yyyy-MM-dd'), endDate: dateFormat(new Date(), 'yyyy-MM-dd'),
}, },
@ -153,6 +185,17 @@ export default {
index: '', index: '',
}, },
currId: '', currId: '',
stationOptions: [],
sourceOptions: [
{
label: 'ARMDARR',
value: '1',
},
{
label: 'ARMDRRR',
value: '2',
},
],
} }
}, },
created() { created() {
@ -162,6 +205,30 @@ export default {
this.getNuclideAvgList() this.getNuclideAvgList()
}, },
methods: { methods: {
onSourceChange(val) {
console.log(val)
},
getStationList() {
getAction('/webStatistics/findStationList', { menuName: '' }).then((res) => {
if (res.success) {
if (res.result.length > 0) {
this.stationOptions = res.result.map((item) => {
return {
label: item.stationCode,
value: `${item.stationId}`,
}
})
} else {
this.stationOptions = []
}
} else {
this.$message.warning('This operation fails. Contact your system administrator')
}
})
},
filterOption(input, option) {
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
// n // n
getBeforeDate(n) { getBeforeDate(n) {
var n = n var n = n
@ -188,8 +255,7 @@ export default {
getNuclideAvgList() { getNuclideAvgList() {
this.loading = true this.loading = true
let params = { let params = {
startDate: this.queryParams.startDate, ...this.queryParams,
endDate: this.queryParams.endDate,
pageNo: this.ipagination.current, pageNo: this.ipagination.current,
pageSize: this.ipagination.pageSize, pageSize: this.ipagination.pageSize,
} }
@ -203,6 +269,14 @@ export default {
} }
}) })
}, },
onStationChange(val) {
this.queryParams.stationId = val
this.getNuclideAvgList()
},
onSourceChange(val) {
this.queryParams.sourceType = val
this.getNuclideAvgList()
},
onRangeDateChange(date, dateString) { onRangeDateChange(date, dateString) {
this.queryParams.startDate = dateString[0] this.queryParams.startDate = dateString[0]
this.queryParams.endDate = dateString[1] this.queryParams.endDate = dateString[1]