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>
|
<template>
|
||||||
<div style="height: 100%;">
|
<div style="height: 100%">
|
||||||
<List :stationList="stationList" :columns="columns" :dataType="dataType" fileName="DETBKPHD" pageType="ACQ"></List>
|
<List :stationList="stationList" :columns="columns" :dataType="dataType" fileName="DETBKPHD" pageType="ACQ"></List>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import List from "../../../list.vue"
|
import List from '../../../list.vue'
|
||||||
import { getAction } from '../../../../../api/manage'
|
import { getAction } from '../../../../../api/manage'
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
|
@ -68,12 +68,11 @@ export default {
|
||||||
},
|
},
|
||||||
stationList: [],
|
stationList: [],
|
||||||
columns,
|
columns,
|
||||||
dataType:"D"
|
dataType: 'D',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
console.log(this.dataType);
|
this.findStationList()
|
||||||
this.findStationList();
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
findStationList() {
|
findStationList() {
|
||||||
|
@ -85,7 +84,7 @@ export default {
|
||||||
this.stationList = []
|
this.stationList = []
|
||||||
}
|
}
|
||||||
} else {
|
} 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>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|
||||||
</style>
|
</style>
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div style="height: 100%;">
|
<div style="height: 100%">
|
||||||
<a-spin :spinning="spinning">
|
<a-spin :spinning="spinning">
|
||||||
<a-card v-if="!isDetail" :bordered="false" style="margin-left: 20px">
|
<a-card v-if="!isDetail" :bordered="false" style="margin-left: 20px">
|
||||||
<search-form :items="formItems" v-model="queryParam" @search="searchQueryData">
|
<search-form :items="formItems" v-model="queryParam" @search="searchQueryData">
|
||||||
|
@ -32,43 +32,56 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||||
import { getAction, getFileAction } from '../../api/manage'
|
import { getAction, getFileAction } from '../../api/manage'
|
||||||
import dateFormat from '../../components/jeecg/JEasyCron/format-date'
|
import dateFormat from '../../components/jeecg/JEasyCron/format-date'
|
||||||
import Detail from "./detail.vue"
|
import Detail from './detail.vue'
|
||||||
export default {
|
export default {
|
||||||
name: 'menuTree',
|
name: 'menuTree',
|
||||||
props: {
|
props: {
|
||||||
stationList: {
|
stationList: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: ()=>[]
|
default: () => [],
|
||||||
},
|
},
|
||||||
columns: {
|
columns: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: ()=>[]
|
default: () => [],
|
||||||
},
|
},
|
||||||
dataType: {
|
dataType: {
|
||||||
type: String,
|
type: String,
|
||||||
default:""
|
default: '',
|
||||||
},
|
},
|
||||||
fileName: {
|
fileName: {
|
||||||
type: String,
|
type: String,
|
||||||
default:""
|
default: '',
|
||||||
},
|
},
|
||||||
spectralQualifie: {
|
spectralQualifie: {
|
||||||
type: String,
|
type: String,
|
||||||
default:""
|
default: '',
|
||||||
},
|
},
|
||||||
pageType: {
|
pageType: {
|
||||||
type: String,
|
type: String,
|
||||||
default:""
|
default: '',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
mixins: [JeecgListMixin],
|
mixins: [JeecgListMixin],
|
||||||
components: {
|
components: {
|
||||||
Detail,
|
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() {
|
data() {
|
||||||
return {
|
return {
|
||||||
spinning: false,
|
spinning: false,
|
||||||
|
@ -79,7 +92,7 @@ export default {
|
||||||
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: [],
|
stationIds: [],
|
||||||
spectralQualifie:this.spectralQualifie
|
spectralQualifie: this.spectralQualifie,
|
||||||
},
|
},
|
||||||
url: {
|
url: {
|
||||||
list: '/webStatistics/findParticulatePage',
|
list: '/webStatistics/findParticulatePage',
|
||||||
|
@ -90,7 +103,7 @@ export default {
|
||||||
dataSource: [],
|
dataSource: [],
|
||||||
detailJson: {},
|
detailJson: {},
|
||||||
allChecked: false,
|
allChecked: false,
|
||||||
currSampleId:""
|
currSampleId: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -98,13 +111,13 @@ export default {
|
||||||
if (this.dataSource.length > 0) {
|
if (this.dataSource.length > 0) {
|
||||||
let params = {
|
let params = {
|
||||||
...this.queryParam,
|
...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) {
|
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 {
|
} 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')
|
let link = document.createElement('a')
|
||||||
link.href = window.URL.createObjectURL(blob)
|
link.href = window.URL.createObjectURL(blob)
|
||||||
link.download = this.fileName
|
link.download = this.fileName
|
||||||
|
@ -115,7 +128,7 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning("No downloadable data")
|
this.$message.warning('No downloadable data')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
searchQueryData() {
|
searchQueryData() {
|
||||||
|
@ -124,7 +137,7 @@ export default {
|
||||||
let params = {
|
let params = {
|
||||||
...this.queryParam,
|
...this.queryParam,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10
|
pageSize: 10,
|
||||||
}
|
}
|
||||||
getAction(this.url.list, params).then((res) => {
|
getAction(this.url.list, params).then((res) => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
@ -134,23 +147,25 @@ export default {
|
||||||
this.ipagination.total = res.result.total
|
this.ipagination.total = res.result.total
|
||||||
this.dataSource = res.result.records
|
this.dataSource = res.result.records
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning("This operation fails. Contact your system administrator")
|
this.$message.warning('This operation fails. Contact your system administrator')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleDetail(record) {
|
handleDetail(record) {
|
||||||
this.spinning = true
|
this.spinning = true
|
||||||
this.currSampleId = record.sampleId
|
this.currSampleId = record.sampleId
|
||||||
getAction("webStatistics/findGeneratedReport", { sampleId: record.sampleId }).then(res => {
|
getAction('webStatistics/findGeneratedReport', { sampleId: record.sampleId })
|
||||||
|
.then((res) => {
|
||||||
this.spinning = false
|
this.spinning = false
|
||||||
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))
|
||||||
this.isDetail = true
|
this.isDetail = true
|
||||||
} else {
|
} 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
|
this.spinning = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -168,15 +183,35 @@ export default {
|
||||||
handleSelectChangeAll(val) {
|
handleSelectChangeAll(val) {
|
||||||
this.allChecked = val
|
this.allChecked = val
|
||||||
if (val) {
|
if (val) {
|
||||||
this.queryParam.stationIds = this.stationList.map(item => item.value)
|
this.queryParam.stationIds = this.stationList.map((item) => item.value)
|
||||||
} else {
|
} else {
|
||||||
this.queryParam.stationIds = []
|
this.queryParam.stationIds = []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
filterOption(input, option) {
|
filterOption(input, option) {
|
||||||
return (
|
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||||
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: {
|
computed: {
|
||||||
|
@ -206,16 +241,14 @@ export default {
|
||||||
placeholder: 'select stations',
|
placeholder: 'select stations',
|
||||||
mode: 'multiple',
|
mode: 'multiple',
|
||||||
maxTagCount: 1,
|
maxTagCount: 1,
|
||||||
options: [
|
options: [...this.stationList],
|
||||||
...this.stationList,
|
|
||||||
],
|
|
||||||
style: {
|
style: {
|
||||||
width: '200px',
|
width: '200px',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
on: {
|
on: {
|
||||||
change: this.handleSelectChange,
|
change: this.handleSelectChange,
|
||||||
changeAll: this.handleSelectChangeAll
|
changeAll: this.handleSelectChangeAll,
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
width: 'auto',
|
width: 'auto',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user