Merge branch 'master-dev' of http://git.hivekion.com:3000/xiaoguangbin/AnalysisSystemForRadionuclide_vue into master-dev
This commit is contained in:
commit
9e1377d5df
|
@ -1,11 +1,11 @@
|
|||
<template>
|
||||
<div style="height: 100%;">
|
||||
<div style="height: 100%">
|
||||
<List :stationList="stationList" :columns="columns" :dataType="dataType" fileName="DETBKPHD" pageType="ACQ"></List>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import List from "../../../list.vue"
|
||||
import List from '../../../list.vue'
|
||||
import { getAction } from '../../../../../api/manage'
|
||||
|
||||
const columns = [
|
||||
|
@ -68,12 +68,11 @@ export default {
|
|||
},
|
||||
stationList: [],
|
||||
columns,
|
||||
dataType:"D"
|
||||
dataType: 'D',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log(this.dataType);
|
||||
this.findStationList();
|
||||
this.findStationList()
|
||||
},
|
||||
methods: {
|
||||
findStationList() {
|
||||
|
@ -85,7 +84,7 @@ export default {
|
|||
this.stationList = []
|
||||
}
|
||||
} else {
|
||||
this.$message.warning("This operation fails. Contact your system administrator")
|
||||
this.$message.warning('This operation fails. Contact your system administrator')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -94,5 +93,4 @@ export default {
|
|||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
||||
</style>
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div style="height: 100%;">
|
||||
<div style="height: 100%">
|
||||
<a-spin :spinning="spinning">
|
||||
<a-card v-if="!isDetail" :bordered="false" style="margin-left: 20px">
|
||||
<search-form :items="formItems" v-model="queryParam" @search="searchQueryData">
|
||||
|
@ -32,43 +32,56 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import { getAction, getFileAction } from '../../api/manage'
|
||||
import dateFormat from '../../components/jeecg/JEasyCron/format-date'
|
||||
import Detail from "./detail.vue"
|
||||
import Detail from './detail.vue'
|
||||
export default {
|
||||
name: 'menuTree',
|
||||
props: {
|
||||
stationList: {
|
||||
type: Array,
|
||||
default: ()=>[]
|
||||
default: () => [],
|
||||
},
|
||||
columns: {
|
||||
type: Array,
|
||||
default: ()=>[]
|
||||
default: () => [],
|
||||
},
|
||||
dataType: {
|
||||
type: String,
|
||||
default:""
|
||||
default: '',
|
||||
},
|
||||
fileName: {
|
||||
type: String,
|
||||
default:""
|
||||
default: '',
|
||||
},
|
||||
spectralQualifie: {
|
||||
type: String,
|
||||
default:""
|
||||
default: '',
|
||||
},
|
||||
pageType: {
|
||||
type: String,
|
||||
default:""
|
||||
}
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
mixins: [JeecgListMixin],
|
||||
components: {
|
||||
Detail,
|
||||
},
|
||||
watch: {
|
||||
fileName: {
|
||||
handler: function (val) {
|
||||
if (val === 'QCPHD' || val === 'SPHDF' || val === 'SPHDP') {
|
||||
console.log(56, this)
|
||||
console.log(this.getBeforeDate(6))
|
||||
this.$nextTick(() => {
|
||||
this.queryParam.startTime = this.getBeforeDate(6)
|
||||
})
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
spinning: false,
|
||||
|
@ -79,7 +92,7 @@ export default {
|
|||
startTime: dateFormat(new Date(), 'yyyy-MM-dd'),
|
||||
endTime: dateFormat(new Date(), 'yyyy-MM-dd'),
|
||||
stationIds: [],
|
||||
spectralQualifie:this.spectralQualifie
|
||||
spectralQualifie: this.spectralQualifie,
|
||||
},
|
||||
url: {
|
||||
list: '/webStatistics/findParticulatePage',
|
||||
|
@ -90,7 +103,7 @@ export default {
|
|||
dataSource: [],
|
||||
detailJson: {},
|
||||
allChecked: false,
|
||||
currSampleId:""
|
||||
currSampleId: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -98,13 +111,13 @@ export default {
|
|||
if (this.dataSource.length > 0) {
|
||||
let params = {
|
||||
...this.queryParam,
|
||||
pageType:this.pageType
|
||||
pageType: this.pageType,
|
||||
}
|
||||
getFileAction("/webStatistics/radionuclideExport", params).then(res => {
|
||||
getFileAction('/webStatistics/radionuclideExport', params).then((res) => {
|
||||
if (res.code && res.code == 500) {
|
||||
this.$message.warning("This operation fails. Contact your system administrator")
|
||||
this.$message.warning('This operation fails. Contact your system administrator')
|
||||
} else {
|
||||
const blob = new Blob([res], { type: "application/vnd.ms-excel" })
|
||||
const blob = new Blob([res], { type: 'application/vnd.ms-excel' })
|
||||
let link = document.createElement('a')
|
||||
link.href = window.URL.createObjectURL(blob)
|
||||
link.download = this.fileName
|
||||
|
@ -115,7 +128,7 @@ export default {
|
|||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning("No downloadable data")
|
||||
this.$message.warning('No downloadable data')
|
||||
}
|
||||
},
|
||||
searchQueryData() {
|
||||
|
@ -124,7 +137,7 @@ export default {
|
|||
let params = {
|
||||
...this.queryParam,
|
||||
pageNo: 1,
|
||||
pageSize: 10
|
||||
pageSize: 10,
|
||||
}
|
||||
getAction(this.url.list, params).then((res) => {
|
||||
this.loading = false
|
||||
|
@ -134,23 +147,25 @@ export default {
|
|||
this.ipagination.total = res.result.total
|
||||
this.dataSource = res.result.records
|
||||
} else {
|
||||
this.$message.warning("This operation fails. Contact your system administrator")
|
||||
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 => {
|
||||
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")
|
||||
this.$message.warning('This operation fails. Contact your system administrator')
|
||||
}
|
||||
}).catch(err => {
|
||||
})
|
||||
.catch((err) => {
|
||||
this.spinning = false
|
||||
})
|
||||
},
|
||||
|
@ -168,15 +183,35 @@ export default {
|
|||
handleSelectChangeAll(val) {
|
||||
this.allChecked = val
|
||||
if (val) {
|
||||
this.queryParam.stationIds = this.stationList.map(item => item.value)
|
||||
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
|
||||
);
|
||||
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
},
|
||||
// 获取n天前的日期
|
||||
getBeforeDate(n) {
|
||||
var n = n
|
||||
var d = new Date()
|
||||
var year = d.getFullYear()
|
||||
var mon = d.getMonth() + 1
|
||||
var day = d.getDate()
|
||||
if (day <= n) {
|
||||
if (mon > 1) {
|
||||
mon = mon - 1
|
||||
} else {
|
||||
year = year - 1
|
||||
mon = 12
|
||||
}
|
||||
}
|
||||
d.setDate(d.getDate() - n)
|
||||
year = d.getFullYear()
|
||||
mon = d.getMonth() + 1
|
||||
day = d.getDate()
|
||||
var s = year + '-' + (mon < 10 ? '0' + mon : mon) + '-' + (day < 10 ? '0' + day : day)
|
||||
return s
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
|
@ -206,16 +241,14 @@ export default {
|
|||
placeholder: 'select stations',
|
||||
mode: 'multiple',
|
||||
maxTagCount: 1,
|
||||
options: [
|
||||
...this.stationList,
|
||||
],
|
||||
options: [...this.stationList],
|
||||
style: {
|
||||
width: '200px',
|
||||
},
|
||||
},
|
||||
on: {
|
||||
change: this.handleSelectChange,
|
||||
changeAll: this.handleSelectChangeAll
|
||||
changeAll: this.handleSelectChangeAll,
|
||||
},
|
||||
style: {
|
||||
width: 'auto',
|
||||
|
|
Loading…
Reference in New Issue
Block a user