处理切换页面后,下拉框显示选项id 的问题
代码优化,删除无用代码
This commit is contained in:
parent
21102c3d0c
commit
c5d177ad72
|
@ -1,35 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div style="height: 100%">
|
<div style="height: 100%">
|
||||||
<List :stationList="stationList" :columns="columns" :dataType="dataType" fileName="BLANKPHD" pageType="ACQ"></List>
|
<List :stationList="stationList" :columns="columns" :dataType="dataType" fileName="BLANKPHD" pageType="ACQ"></List>
|
||||||
<!-- <a-spin :spinning="spinning">
|
|
||||||
<a-card v-if="!isDetail" :bordered="false" style="margin-left: 20px">
|
|
||||||
<search-form :items="formItems" v-model="queryParam" @search="searchQueryData">
|
|
||||||
<a-space style="float: right" class="btn-group" slot="additional">
|
|
||||||
<a-button @click="handleExcel" type="primary">
|
|
||||||
<img class="icon-edit" 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="{ y: 'calc(100vh - 306px)' }"
|
|
||||||
>
|
|
||||||
<template slot="index" slot-scope="{ index }">
|
|
||||||
{{ index + 1 }}
|
|
||||||
</template>
|
|
||||||
</custom-table>
|
|
||||||
</a-card>
|
|
||||||
</a-spin>
|
|
||||||
<Detail v-if="isDetail" type="BLANKPHD" :sampleId="currSampleId" :allData="detailJson" @back="handleBack"></Detail> -->
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
@ -82,113 +53,26 @@ const columns = [
|
||||||
dataIndex: 'acquisitionStop',
|
dataIndex: 'acquisitionStop',
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
// import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
||||||
import { getAction, getFileAction } from '../../../../../api/manage'
|
import { getAction, getFileAction } from '../../../../../api/manage'
|
||||||
import List from '../../../list.vue'
|
import List from '../../../list.vue'
|
||||||
// import dateFormat from '../../../../../components/jeecg/JEasyCron/format-date'
|
|
||||||
// import Detail from '../../../detail.vue'
|
|
||||||
export default {
|
export default {
|
||||||
// name: 'menuTree',
|
|
||||||
// mixins: [JeecgListMixin],
|
|
||||||
components: {
|
components: {
|
||||||
List,
|
List,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// spinning: false,
|
|
||||||
// isImmediate: true,
|
|
||||||
// isDetail: false,
|
|
||||||
columns,
|
columns,
|
||||||
dataType: 'B',
|
dataType: 'B',
|
||||||
// queryParam: {
|
|
||||||
// dataType: 'B',
|
|
||||||
// startTime: dateFormat(new Date(), 'yyyy-MM-dd'),
|
|
||||||
// endTime: dateFormat(new Date(), 'yyyy-MM-dd'),
|
|
||||||
// stationIds: [],
|
|
||||||
// spectralQualifie: '',
|
|
||||||
// },
|
|
||||||
url: {
|
url: {
|
||||||
// list: '/webStatistics/findParticulatePage',
|
|
||||||
findStationList: '/webStatistics/findStationList',
|
findStationList: '/webStatistics/findStationList',
|
||||||
},
|
},
|
||||||
stationList: [],
|
stationList: [],
|
||||||
// dataSource: [],
|
|
||||||
// detailJson: {},
|
|
||||||
// strIds: '',
|
|
||||||
// allChecked: false,
|
|
||||||
// currSampleId: '',
|
|
||||||
// pageType: 'ACQ',
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.findStationList()
|
this.findStationList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// handleExcel() {
|
|
||||||
// if (this.dataSource.length>0) {
|
|
||||||
// let params = {
|
|
||||||
// ...this.queryParam,
|
|
||||||
// pageType:this.pageType
|
|
||||||
// }
|
|
||||||
// getFileAction("/webStatistics/radionuclideExport", params).then(res => {
|
|
||||||
// if (res.code && res.code == 500) {
|
|
||||||
// this.$message.warning("This operation fails. Contact your system administrator")
|
|
||||||
// } else {
|
|
||||||
// const blob = new Blob([res], { type: "application/vnd.ms-excel" })
|
|
||||||
// let link = document.createElement('a')
|
|
||||||
// link.href = window.URL.createObjectURL(blob)
|
|
||||||
// link.download = "BLANKPHD"
|
|
||||||
// document.body.appendChild(link)
|
|
||||||
// link.click()
|
|
||||||
// URL.revokeObjectURL(link.href)
|
|
||||||
// document.body.removeChild(link)
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// } else {
|
|
||||||
// this.$message.warning("No downloadable data")
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// searchQueryData() {
|
|
||||||
// this.isImmediate = false
|
|
||||||
// this.loading = true
|
|
||||||
// let params = {
|
|
||||||
// ...this.queryParam,
|
|
||||||
// pageNo: 1,
|
|
||||||
// pageSize: 10
|
|
||||||
// }
|
|
||||||
// getAction(this.url.list, params).then((res) => {
|
|
||||||
// this.loading = false
|
|
||||||
// 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
|
|
||||||
// } else {
|
|
||||||
// this.$message.warning("This operation fails. Contact your system administrator")
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// },
|
|
||||||
// handleDetail(record) {
|
|
||||||
// this.spinning = true
|
|
||||||
// this.currSampleId = record.sampleId
|
|
||||||
// getAction('webStatistics/findGeneratedReport', { sampleId: record.sampleId })
|
|
||||||
// .then((res) => {
|
|
||||||
// this.spinning = false
|
|
||||||
// if (res.success) {
|
|
||||||
// this.detailJson = res.result
|
|
||||||
// this.detailJson = JSON.parse(JSON.stringify(this.detailJson))
|
|
||||||
// this.isDetail = true
|
|
||||||
// } else {
|
|
||||||
// this.$message.warning('This operation fails. Contact your system administrator')
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// .catch((err) => {
|
|
||||||
// this.spinning = false
|
|
||||||
// })
|
|
||||||
// },
|
|
||||||
// handleBack(flag) {
|
|
||||||
// this.isDetail = flag
|
|
||||||
// },
|
|
||||||
findStationList() {
|
findStationList() {
|
||||||
getAction(this.url.findStationList, { menuName: 'Particulate' }).then((res) => {
|
getAction(this.url.findStationList, { menuName: 'Particulate' }).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
@ -202,103 +86,7 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// handleSelectChange(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 =[]
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// filterOption(input, option) {
|
|
||||||
// return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
||||||
// },
|
|
||||||
},
|
},
|
||||||
// computed: {
|
|
||||||
// formItems() {
|
|
||||||
// return [
|
|
||||||
// {
|
|
||||||
// type: 'a-input',
|
|
||||||
// label: '',
|
|
||||||
// name: 'search',
|
|
||||||
// props: {
|
|
||||||
// placeholder: 'search...',
|
|
||||||
// style: {
|
|
||||||
// width: '166px',
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// style: {
|
|
||||||
// width: 'auto',
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// type: 'custom-all-select',
|
|
||||||
// label: 'Stations',
|
|
||||||
// name: 'stationIds',
|
|
||||||
// props: {
|
|
||||||
// allChecked: this.allChecked,
|
|
||||||
// filterOption:this.filterOption,
|
|
||||||
// placeholder: 'select stations',
|
|
||||||
// mode: 'multiple',
|
|
||||||
// maxTagCount: 1,
|
|
||||||
// options: [
|
|
||||||
// ...this.stationList,
|
|
||||||
// ],
|
|
||||||
// style: {
|
|
||||||
// width: '200px',
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// on: {
|
|
||||||
// change: this.handleSelectChange,
|
|
||||||
// changeAll: this.handleSelectChangeAll
|
|
||||||
// },
|
|
||||||
// style: {
|
|
||||||
// width: 'auto',
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: 'Start date',
|
|
||||||
// type: 'custom-date-picker',
|
|
||||||
// name: 'startTime',
|
|
||||||
// props: {
|
|
||||||
// format: 'YYYY-MM-DD',
|
|
||||||
// valueFormat: 'YYYY-MM-DD',
|
|
||||||
// style: {
|
|
||||||
// minWidth: 'auto',
|
|
||||||
// width: '200px',
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// style: {
|
|
||||||
// width: 'auto',
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: 'End date',
|
|
||||||
// type: 'custom-date-picker',
|
|
||||||
// name: 'endTime',
|
|
||||||
// props: {
|
|
||||||
// format: 'YYYY-MM-DD',
|
|
||||||
// valueFormat: 'YYYY-MM-DD',
|
|
||||||
// style: {
|
|
||||||
// minWidth: 'auto',
|
|
||||||
// width: '200px',
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// style: {
|
|
||||||
// width: 'auto',
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// ]
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|
|
@ -77,18 +77,14 @@ export default {
|
||||||
components: {
|
components: {
|
||||||
Detail,
|
Detail,
|
||||||
},
|
},
|
||||||
// watch: {
|
watch: {
|
||||||
// fileName: {
|
stationList: {
|
||||||
// handler: function (val) {
|
handler(val) {
|
||||||
// // if (val === 'QCPHD' || val === 'SPHDF' || val === 'SPHDP') {
|
let arr = sessionStorage.getItem('selectedSta') ? sessionStorage.getItem('selectedSta').split(',') : []
|
||||||
// this.$nextTick(() => {
|
this.queryParam.stationIds = arr.map((item) => Number(item))
|
||||||
// this.queryParam.startTime = this.getBeforeDate(6)
|
},
|
||||||
// })
|
},
|
||||||
// // }
|
},
|
||||||
// },
|
|
||||||
// immediate: true,
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
excelLoading: false,
|
excelLoading: false,
|
||||||
|
@ -103,7 +99,7 @@ export default {
|
||||||
endTime: sessionStorage.getItem('currEndDate')
|
endTime: sessionStorage.getItem('currEndDate')
|
||||||
? sessionStorage.getItem('currEndDate')
|
? sessionStorage.getItem('currEndDate')
|
||||||
: moment().format('YYYY-MM-DD'),
|
: moment().format('YYYY-MM-DD'),
|
||||||
stationIds: sessionStorage.getItem('selectedSta') ? sessionStorage.getItem('selectedSta').split(',') : [],
|
stationIds: [],
|
||||||
spectralQualifie: this.spectralQualifie,
|
spectralQualifie: this.spectralQualifie,
|
||||||
},
|
},
|
||||||
url: {
|
url: {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user