Analysis Monitor --- Avg Nuclide 页面,增加station 和 source type 搜索条件
This commit is contained in:
parent
d6ef68963b
commit
6dbf6f99aa
|
@ -5,13 +5,43 @@
|
|||
<a-col flex="108px">
|
||||
<a-button class="search-btn" type="primary" @click="handleConfig"> Config </a-button>
|
||||
</a-col>
|
||||
<a-col flex="380px">
|
||||
<a-col flex="365px">
|
||||
<span class="item-label">Cacl date</span>
|
||||
<a-range-picker
|
||||
:value="[moment(queryParams.startDate), moment(queryParams.endDate)]"
|
||||
@change="onRangeDateChange"
|
||||
/>
|
||||
</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>
|
||||
</div>
|
||||
<div class="analysis-main">
|
||||
|
@ -130,6 +160,8 @@ export default {
|
|||
dataSource: [],
|
||||
loading: false,
|
||||
queryParams: {
|
||||
stationId: undefined,
|
||||
sourceType: undefined,
|
||||
startDate: dateFormat(new Date(), 'yyyy-MM-dd'),
|
||||
endDate: dateFormat(new Date(), 'yyyy-MM-dd'),
|
||||
},
|
||||
|
@ -153,6 +185,17 @@ export default {
|
|||
index: '',
|
||||
},
|
||||
currId: '',
|
||||
stationOptions: [],
|
||||
sourceOptions: [
|
||||
{
|
||||
label: 'ARMDARR',
|
||||
value: '1',
|
||||
},
|
||||
{
|
||||
label: 'ARMDRRR',
|
||||
value: '2',
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
@ -162,6 +205,30 @@ export default {
|
|||
this.getNuclideAvgList()
|
||||
},
|
||||
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天前的日期
|
||||
getBeforeDate(n) {
|
||||
var n = n
|
||||
|
@ -188,8 +255,7 @@ export default {
|
|||
getNuclideAvgList() {
|
||||
this.loading = true
|
||||
let params = {
|
||||
startDate: this.queryParams.startDate,
|
||||
endDate: this.queryParams.endDate,
|
||||
...this.queryParams,
|
||||
pageNo: this.ipagination.current,
|
||||
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) {
|
||||
this.queryParams.startDate = dateString[0]
|
||||
this.queryParams.endDate = dateString[1]
|
||||
|
|
Loading…
Reference in New Issue
Block a user