Merge branch 'master-dev' into feature-Beta-dev-renpy

# Conflicts:
#	src/views/spectrumAnalysis/components/BetaGammaSpectrumChart.vue
This commit is contained in:
任珮宇 2024-01-17 15:03:57 +08:00
commit 56e618da37
27 changed files with 763 additions and 775 deletions

View File

@ -18,6 +18,7 @@
<CustomChart <CustomChart
ref="chartRef" ref="chartRef"
:option="twoDOption" :option="twoDOption"
:opts="opts"
@zr:mousemove="handleMouseMove" @zr:mousemove="handleMouseMove"
@zr:mousedown="handleMouseDown" @zr:mousedown="handleMouseDown"
@zr:mouseup="handleMouseUp" @zr:mouseup="handleMouseUp"
@ -132,24 +133,16 @@ const twoDOption = {
max: 256, max: 256,
interval: 64, interval: 64,
}, },
series: { series: [
{
type: 'scatterGL', type: 'scatterGL',
symbolSize: 4, symbolSize: 4,
data: [], data: [],
itemStyle: { itemStyle: {
color: '#fff', color: '#fff',
}, },
markLine: {
silent: true,
symbol: 'none',
data: [],
animation: false,
lineStyle: {
type: 'solid',
width: 2,
},
},
}, },
],
brush: {}, brush: {},
animation: false, animation: false,
} }
@ -329,11 +322,18 @@ export default {
threeDSurfaceOption, threeDSurfaceOption,
threeDScatterOption, threeDScatterOption,
showROI: true, showROI: true,
opts: {
notMerge: false,
},
} }
}, },
mounted() { mounted() {
this.opts.notMerge = true
this.$nextTick(() => {
this.opts.notMerge = false
this.twoDOption.brush = { toolbox: [] } this.twoDOption.brush = { toolbox: [] }
})
}, },
methods: { methods: {
@ -357,8 +357,6 @@ export default {
this.twoDOption.yAxis.max = 256 this.twoDOption.yAxis.max = 256
this.emitRangeChange([0, 256, 0, 256]) this.emitRangeChange([0, 256, 0, 256])
this.reDrawRect()
this.buildScatterList() this.buildScatterList()
}, },
@ -436,9 +434,6 @@ export default {
this.twoDOption.yAxis.max = rangeNumberFunc(y2) this.twoDOption.yAxis.max = rangeNumberFunc(y2)
this.emitRangeChange([x1, x2, y1, y2]) this.emitRangeChange([x1, x2, y1, y2])
this.reDrawRect()
this.buildScatterList() this.buildScatterList()
} }
@ -452,7 +447,7 @@ export default {
yAxis: { min: minY, max: maxY }, yAxis: { min: minY, max: maxY },
} = this.twoDOption } = this.twoDOption
this.twoDOption.series.data = this.histogramDataDList this.twoDOption.series[0].data = this.histogramDataDList
.filter(({ b, g, c }) => c && b >= minX && b <= maxX && g >= minY && g <= maxY) .filter(({ b, g, c }) => c && b >= minX && b <= maxX && g >= minY && g <= maxY)
.map(({ b, g, c }) => this.buildScatterItem(b, g, c)) .map(({ b, g, c }) => this.buildScatterItem(b, g, c))
}, },
@ -488,7 +483,6 @@ export default {
this.twoDOption.yAxis.max = x2 this.twoDOption.yAxis.max = x2
} }
this.reDrawRect()
this.buildScatterList() this.buildScatterList()
}, },
@ -498,217 +492,44 @@ export default {
if (this.showROI) { if (this.showROI) {
this.boundaryData.forEach(({ minX, maxX, minY, maxY, color }) => { this.boundaryData.forEach(({ minX, maxX, minY, maxY, color }) => {
// rect // rect
const rect = [ const rect = [
[minX, minY], [minX, minY],
[maxX, minY], [maxX, minY],
[maxX, maxY], [maxX, maxY],
[minX, maxY], [minX, maxY],
[minX, minY],
] ]
rectList.push(...this.drawOneRect(rect, color)) rectList.push(this.drawOneRect(rect, color))
}) })
} }
this.twoDOption.series.markLine.data = rectList const lineSeries = rectList.map((rect) => ({
type: 'line',
...rect,
zlevel: 11,
}))
this.opts.notMerge = true
this.twoDOption.series.splice(1, this.twoDOption.series.length - 1, ...lineSeries)
this.$nextTick(() => {
this.opts.notMerge = false
this.twoDOption.brush = { toolbox: [] }
})
}, },
/** /**
* 绘制一个矩形框区域 * 绘制一个矩形框区域
* 矩形框在这里的实现是由几条线段围起来的但由于线段在超出图表区域显示有问题故作了以下处理 * @param {*} rect 左下 右下 右上 左上 左下 的顺序
* @param {*} rect 左下 右下 右上 左上 的顺序
*/ */
drawOneRect(rect, color) { drawOneRect(rect, color) {
const rectList = [] return {
const { data: rect,
xAxis: { min: minX, max: maxX }, symbol: 'none',
yAxis: { min: minY, max: maxY }, itemStyle: {
} = this.twoDOption
const inchartPoints = this.getInChartPoints(rect)
const outchartPoints = rect.filter((pointItem) => !inchartPoints.includes(pointItem))
//
if (inchartPoints.length == 2) {
const [point1, point2] = inchartPoints
const isVerticleLine = this.isVerticleLine(point1, point2)
// 线
if (isVerticleLine) {
const find = outchartPoints.find((outcharPoint) => point1[1] == outcharPoint[1]) //
//
const isLeft = find[0] <= point1[0]
/**
* 如果在左边推入左边俩点构成矩形
* y
* |________________
* | |
* |________________|
* |
* | x
**/
if (isLeft) {
inchartPoints.forEach((point) => {
rectList.push(this.generateLineDataByTwoPoints([minX, point[1]], point))
})
rectList.push(this.generateLineDataByTwoPoints(point1, point2))
}
//
else {
inchartPoints.forEach((point) => {
rectList.push(this.generateLineDataByTwoPoints([maxX, point[1]], point))
})
rectList.push(this.generateLineDataByTwoPoints(point1, point2))
}
}
// 线
else {
const find = outchartPoints.find((outcharPoint) => point1[0] == outcharPoint[0]) //
//
const isBottom = find[1] <= point1[1]
/**
* 如果在下边推入下边俩点构成矩形
**/
if (isBottom) {
inchartPoints.forEach((point) => {
rectList.push(this.generateLineDataByTwoPoints([point[0], minY], point))
})
rectList.push(this.generateLineDataByTwoPoints(point1, point2))
}
//
else {
inchartPoints.forEach((point) => {
rectList.push(this.generateLineDataByTwoPoints([point[0], maxY], point))
})
rectList.push(this.generateLineDataByTwoPoints(point1, point2))
}
}
}
//
else if (inchartPoints.length == 1) {
const point = inchartPoints[0]
const isLeft = !!outchartPoints.find((outPoint) => outPoint[0] < point[0])
const isBottom = !!outchartPoints.find((outPoint) => outPoint[1] < point[1])
//
if (isLeft && isBottom) {
rectList.push(this.generateLineDataByTwoPoints(point, [minX, point[1]]))
rectList.push(this.generateLineDataByTwoPoints(point, [point[0], minY]))
}
//
if (isLeft && !isBottom) {
rectList.push(this.generateLineDataByTwoPoints(point, [minX, point[1]]))
rectList.push(this.generateLineDataByTwoPoints(point, [point[0], maxY]))
}
//
if (!isLeft && !isBottom) {
rectList.push(this.generateLineDataByTwoPoints(point, [maxX, point[1]]))
rectList.push(this.generateLineDataByTwoPoints(point, [point[0], maxY]))
}
//
if (!isLeft && isBottom) {
rectList.push(this.generateLineDataByTwoPoints(point, [maxX, point[1]]))
rectList.push(this.generateLineDataByTwoPoints(point, [point[0], minY]))
}
}
//
else if (inchartPoints.length == 4) {
//
rect.forEach((point, index) => {
if (index == rect.length - 1) {
rectList.push(this.generateLineDataByTwoPoints(point, rect[0]))
} else {
rectList.push(this.generateLineDataByTwoPoints(point, rect[index + 1]))
}
})
}
//
else {
//
const xAxisList = rect.map((item) => item[0]).filter((xAxis) => xAxis > minX && xAxis < maxX)
const leftBottomPoint = rect[0]
const rightBottomPoint = rect[1]
const rightTopPoint = rect[3]
const minYAxis = rightBottomPoint[1]
const maYAxis = rightTopPoint[1]
// 线
if (xAxisList.length == 4 && minYAxis < minY && maYAxis > maxY) {
const minAxis = Math.min(...xAxisList)
const maxAxis = Math.max(...xAxisList)
rectList.push(this.generateLineDataByTwoPoints([minAxis, minY], [minAxis, maxY]))
rectList.push(this.generateLineDataByTwoPoints([maxAxis, minY], [maxAxis, maxY]))
}
// 线
else if (xAxisList.length == 2 && minYAxis < minY && maYAxis > maxY) {
const xAxis = xAxisList[0]
rectList.push(this.generateLineDataByTwoPoints([xAxis, minY], [xAxis, maxY]))
}
//
const yAxisList = rect.map((item) => item[1]).filter((xAxis) => xAxis > minY && xAxis < maxY)
const minXAxis = leftBottomPoint[0]
const maxXAxis = rightBottomPoint[0]
// 线
if (yAxisList.length == 4 && minXAxis < minX && maxXAxis > maxX) {
const minAxis = Math.min(...yAxisList)
const maxAxis = Math.max(...yAxisList)
rectList.push(this.generateLineDataByTwoPoints([minX, minAxis], [maxX, minAxis]))
rectList.push(this.generateLineDataByTwoPoints([minX, maxAxis], [maxX, maxAxis]))
}
// 线
else if (yAxisList.length == 2 && minXAxis < minX && maxXAxis > maxX) {
const yAxis = yAxisList[0]
rectList.push(this.generateLineDataByTwoPoints([minX, yAxis], [maxX, yAxis]))
}
}
//
rectList.forEach((item) => {
item[0].lineStyle = {
color, color,
},
} }
})
return rectList
},
/**
* 获取在框选范围内的点列表
* @param { Array<Array<number>> } rectInfo
*/
getInChartPoints(rectInfo) {
const {
xAxis: { min: minX, max: maxX },
yAxis: { min: minY, max: maxY },
} = this.twoDOption
return rectInfo.filter((point) => {
const [xAxis, yAxis] = point
return xAxis >= minX && xAxis <= maxX && yAxis >= minY && yAxis <= maxY
})
},
/**
* 根据俩点判断是横向还是纵向
* x坐标相同则是纵向否则横向
*/
isVerticleLine(point1, point2) {
return point1[0] == point2[0] ? true : false
},
/**
* 根据两个点生成一个markLine直线
*/
generateLineDataByTwoPoints(point1, point2) {
return [
{
xAxis: point1[0],
yAxis: point1[1],
},
{
xAxis: point2[0],
yAxis: point2[1],
},
]
}, },
// //

View File

@ -127,6 +127,7 @@
<a-input-number <a-input-number
v-model="model.tolerance" v-model="model.tolerance"
:step="0.1" :step="0.1"
:min="0"
@change="handleToleranceChange" @change="handleToleranceChange"
></a-input-number> ></a-input-number>
</a-form-model-item> </a-form-model-item>
@ -762,6 +763,7 @@ export default {
async getSelPosNuclide(row) { async getSelPosNuclide(row) {
this.model.possibleNuclide = '' this.model.possibleNuclide = ''
this.model.identifiedNuclide = '' this.model.identifiedNuclide = ''
this.model.tolerance = 0.5
if (!row._possible) { if (!row._possible) {
this.$set(row, '_loading', true) this.$set(row, '_loading', true)

View File

@ -108,6 +108,7 @@ export default {
this.columns = cloneDeep(columns) this.columns = cloneDeep(columns)
this.disableMixinCreated = true this.disableMixinCreated = true
return { return {
searchSampleType: 'All',
visible: false, visible: false,
loadType: 'compare', loadType: 'compare',
queryParam: { queryParam: {
@ -252,6 +253,7 @@ export default {
const { success, result, message } = await getAction('/spectrumAnalysis/getDBSearchList', { const { success, result, message } = await getAction('/spectrumAnalysis/getDBSearchList', {
AllUsers: this.allUsersValue, AllUsers: this.allUsersValue,
sampleType: this.searchSampleType,
}) })
if (success) { if (success) {
this.stationList = result.stationCode.map((item) => ({ label: item, value: item })) this.stationList = result.stationCode.map((item) => ({ label: item, value: item }))
@ -342,16 +344,22 @@ export default {
}, },
] ]
if (event == 'B') { if (event == 'B') {
this.searchSampleType = 'Beta'
this.getStationAndDetectorList()
this.sampleTypeOption = arr_B this.sampleTypeOption = arr_B
this.$nextTick(() => { this.$nextTick(() => {
this.queryParam.sampleType = 'B' this.queryParam.sampleType = 'B'
}) })
} else if (event == 'G') { } else if (event == 'G') {
this.searchSampleType = 'Gamma'
this.getStationAndDetectorList()
this.sampleTypeOption = arr_G this.sampleTypeOption = arr_G
this.$nextTick(() => { this.$nextTick(() => {
this.queryParam.sampleType = 'P' this.queryParam.sampleType = 'P'
}) })
} else { } else {
this.searchSampleType = 'All'
this.getStationAndDetectorList()
this.sampleTypeOption = arr_A this.sampleTypeOption = arr_A
this.$nextTick(() => { this.$nextTick(() => {
this.queryParam.sampleType = '' this.queryParam.sampleType = ''

View File

@ -254,7 +254,7 @@ export default {
try { try {
this.isGettingDataList = true this.isGettingDataList = true
const res = await getAction('/jeecg-station-operation/stationOperation/findList') const res = await getAction('/jeecg-station-operation/stationOperation/findList')
res.forEach(item => { res.forEach((item) => {
const { stationId, stationName, stationType } = item const { stationId, stationName, stationType } = item
item._stationId = `${stationId}${stationName}${stationType}` item._stationId = `${stationId}${stationName}${stationType}`
}) })
@ -548,7 +548,10 @@ export default {
// //
onMarkerClick(stationInfo) { onMarkerClick(stationInfo) {
const { stationType } = stationInfo
if (stationType !== 'NRL' && stationType !== 'Nuclear Facility') {
this.$refs.mapPane.handleOpenAnalyzeModal(stationInfo) this.$refs.mapPane.handleOpenAnalyzeModal(stationInfo)
}
}, },
/** /**

View File

@ -99,7 +99,7 @@ const columns = [
import { compareDate } from '../../commom' import { compareDate } from '../../commom'
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 moment from 'moment'
export default { export default {
name: 'menuTree', name: 'menuTree',
mixins: [JeecgListMixin], mixins: [JeecgListMixin],
@ -109,8 +109,12 @@ export default {
isImmediate: true, isImmediate: true,
columns, columns,
queryParam: { queryParam: {
startTime: dateFormat(new Date(), 'yyyy-MM-dd'), startTime: sessionStorage.getItem('currStartDate_sta')
endTime: dateFormat(new Date(), 'yyyy-MM-dd'), ? sessionStorage.getItem('currStartDate_sta')
: moment().subtract(6, 'days').format('YYYY-MM-DD'),
endTime: sessionStorage.getItem('currEndDate_sta')
? sessionStorage.getItem('currEndDate_sta')
: moment().format('YYYY-MM-DD'),
stationIds: [], stationIds: [],
}, },
url: { url: {
@ -184,13 +188,19 @@ export default {
getAction(this.url.findStationList, { menuName: '' }).then((res) => { getAction(this.url.findStationList, { menuName: '' }).then((res) => {
if (res.result.length > 0) { if (res.result.length > 0) {
this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId })) this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId }))
//
let arr = sessionStorage.getItem('selectedSta_sta')
? sessionStorage.getItem('selectedSta_sta').split(',')
: []
this.queryParam.stationIds = arr.map((item) => Number(item))
this.searchQueryData()
} else { } else {
this.stationList = [] this.stationList = []
} }
}) })
}, },
handleSelectChange(val) { handleSelectChange(val) {
console.log(val) window.sessionStorage.setItem('selectedSta_sta', val)
let length = this.stationList.length let length = this.stationList.length
if (val.length === length) { if (val.length === length) {
this.allChecked = true this.allChecked = true
@ -202,31 +212,39 @@ export default {
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)
window.sessionStorage.setItem('selectedSta_sta', this.queryParam.stationIds)
} else { } else {
this.queryParam.stationIds = [] this.queryParam.stationIds = []
window.sessionStorage.setItem('selectedSta_sta', [])
} }
}, },
filterOption(input, option) { 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
}, },
handleStartDateChange(date) {
window.sessionStorage.setItem('currStartDate_sta', date)
},
handleEndDateChange(date) {
window.sessionStorage.setItem('currEndDate_sta', date)
},
}, },
computed: { computed: {
formItems() { formItems() {
return [ return [
{ // {
type: 'a-input', // type: 'a-input',
label: '', // label: '',
name: 'search', // name: 'search',
props: { // props: {
placeholder: 'search...', // placeholder: 'search...',
style: { // style: {
width: '166px', // width: '166px',
}, // },
}, // },
style: { // style: {
width: 'auto', // width: 'auto',
}, // },
}, // },
{ {
type: 'custom-all-select', type: 'custom-all-select',
label: 'Stations', label: 'Stations',
@ -262,6 +280,9 @@ export default {
width: '200px', width: '200px',
}, },
}, },
on: {
change: this.handleStartDateChange,
},
style: { style: {
width: 'auto', width: 'auto',
}, },
@ -278,6 +299,9 @@ export default {
width: '200px', width: '200px',
}, },
}, },
on: {
change: this.handleEndDateChange,
},
style: { style: {
width: 'auto', width: 'auto',
}, },

View File

@ -1,18 +1,25 @@
<template> <template>
<div style="height: 100%;"> <div style="height: 100%">
<List :stationList="stationList" :columns="columns" :dataType="dataType" fileName="CALIBPHD" pageType="CALIB"></List> <List
:stationList="stationList"
:columns="columns"
:dataType="dataType"
fileName="CALIBPHD"
pageType="CALIB"
menuType="beta"
></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 = [
{ {
title: 'NO', title: 'NO',
align: 'left', align: 'left',
width:80, width: 80,
scopedSlots: { scopedSlots: {
customRender: 'index', customRender: 'index',
}, },
@ -73,26 +80,25 @@ export default {
}, },
stationList: [], stationList: [],
columns, columns,
dataType:"C" dataType: 'C',
} }
}, },
mounted() { mounted() {
console.log(this.dataType); console.log(this.dataType)
this.findStationList(); this.findStationList()
}, },
methods: { methods: {
findStationList() { findStationList() {
getAction(this.url.findStationList, { menuName: 'Noble Gas Beta-Gamma' }).then((res) => { getAction(this.url.findStationList, { menuName: 'Noble Gas Beta-Gamma' }).then((res) => {
if (res.success) { if (res.success) {
if (res.result.length>0) { if (res.result.length > 0) {
this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId })) this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId }))
} else { } else {
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')
} }
}) })
}, },
}, },
@ -100,5 +106,4 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
</style> </style>

View File

@ -1,18 +1,25 @@
<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"
menuType="beta"
></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 = [
{ {
title: 'NO', title: 'NO',
align: 'left', align: 'left',
width:80, width: 80,
scopedSlots: { scopedSlots: {
customRender: 'index', customRender: 'index',
}, },
@ -55,7 +62,7 @@ const columns = [
title: 'ACQUISITION STOP TIME', title: 'ACQUISITION STOP TIME',
align: 'left', align: 'left',
dataIndex: 'acquisitionStop', dataIndex: 'acquisitionStop',
} },
] ]
export default { export default {
components: { components: {
@ -68,24 +75,24 @@ export default {
}, },
stationList: [], stationList: [],
columns, columns,
dataType:"D" dataType: 'D',
} }
}, },
mounted() { mounted() {
console.log(this.dataType); console.log(this.dataType)
this.findStationList(); this.findStationList()
}, },
methods: { methods: {
findStationList() { findStationList() {
getAction(this.url.findStationList, { menuName: 'Noble Gas Beta-Gamma' }).then((res) => { getAction(this.url.findStationList, { menuName: 'Noble Gas Beta-Gamma' }).then((res) => {
if (res.success) { if (res.success) {
if (res.result.length>0) { if (res.result.length > 0) {
this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId })) this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId }))
} else { } else {
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 +101,4 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
</style> </style>

View File

@ -1,18 +1,25 @@
<template> <template>
<div style="height: 100%;"> <div style="height: 100%">
<List :stationList="stationList" :columns="columns" :dataType="dataType" fileName="QCPHD" pageType="ACQ"></List> <List
:stationList="stationList"
:columns="columns"
:dataType="dataType"
fileName="QCPHD"
pageType="ACQ"
menuType="beta"
></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 = [
{ {
title: 'NO', title: 'NO',
align: 'left', align: 'left',
width:80, width: 80,
scopedSlots: { scopedSlots: {
customRender: 'index', customRender: 'index',
}, },
@ -55,7 +62,7 @@ const columns = [
title: 'ACQUISITION STOP TIME', title: 'ACQUISITION STOP TIME',
align: 'left', align: 'left',
dataIndex: 'acquisitionStop', dataIndex: 'acquisitionStop',
} },
] ]
export default { export default {
components: { components: {
@ -68,24 +75,24 @@ export default {
}, },
stationList: [], stationList: [],
columns, columns,
dataType:"Q" dataType: 'Q',
} }
}, },
mounted() { mounted() {
console.log(this.dataType); console.log(this.dataType)
this.findStationList(); this.findStationList()
}, },
methods: { methods: {
findStationList() { findStationList() {
getAction(this.url.findStationList, { menuName: 'Noble Gas Beta-Gamma' }).then((res) => { getAction(this.url.findStationList, { menuName: 'Noble Gas Beta-Gamma' }).then((res) => {
if (res.success) { if (res.success) {
if (res.result.length>0) { if (res.result.length > 0) {
this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId })) this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId }))
} else { } else {
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 +101,4 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
</style> </style>

View File

@ -1,18 +1,26 @@
<template> <template>
<div style="height: 100%;"> <div style="height: 100%">
<List :stationList="stationList" :spectralQualifie="spectralQualifie" :columns="columns" :dataType="dataType" fileName="SPHDF" pageType="COLL"></List> <List
:stationList="stationList"
:spectralQualifie="spectralQualifie"
:columns="columns"
:dataType="dataType"
fileName="SPHDF"
pageType="COLL"
menuType="beta"
></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 = [
{ {
title: 'NO', title: 'NO',
align: 'left', align: 'left',
width:80, width: 80,
scopedSlots: { scopedSlots: {
customRender: 'index', customRender: 'index',
}, },
@ -55,7 +63,7 @@ const columns = [
title: 'COLLECTION STOP TIME', title: 'COLLECTION STOP TIME',
align: 'left', align: 'left',
dataIndex: 'collectStop', dataIndex: 'collectStop',
} },
] ]
export default { export default {
components: { components: {
@ -68,25 +76,25 @@ export default {
}, },
stationList: [], stationList: [],
columns, columns,
dataType: "S", dataType: 'S',
spectralQualifie:"FULL" spectralQualifie: 'FULL',
} }
}, },
mounted() { mounted() {
console.log(this.dataType); console.log(this.dataType)
this.findStationList(); this.findStationList()
}, },
methods: { methods: {
findStationList() { findStationList() {
getAction(this.url.findStationList, { menuName: 'Noble Gas Beta-Gamma' }).then((res) => { getAction(this.url.findStationList, { menuName: 'Noble Gas Beta-Gamma' }).then((res) => {
if (res.success) { if (res.success) {
if (res.result.length>0) { if (res.result.length > 0) {
this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId })) this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId }))
} else { } else {
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')
} }
}) })
}, },
@ -95,5 +103,4 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
</style> </style>

View File

@ -1,18 +1,26 @@
<template> <template>
<div style="height: 100%;"> <div style="height: 100%">
<List :stationList="stationList" :spectralQualifie="spectralQualifie" :columns="columns" :dataType="dataType" fileName="SPHDP" pageType="COLL"></List> <List
:stationList="stationList"
:spectralQualifie="spectralQualifie"
:columns="columns"
:dataType="dataType"
fileName="SPHDP"
pageType="COLL"
menuType="beta"
></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 = [
{ {
title: 'NO', title: 'NO',
align: 'left', align: 'left',
width:80, width: 80,
scopedSlots: { scopedSlots: {
customRender: 'index', customRender: 'index',
}, },
@ -55,7 +63,7 @@ const columns = [
title: 'COLLECTION STOP TIME', title: 'COLLECTION STOP TIME',
align: 'left', align: 'left',
dataIndex: 'collectStop', dataIndex: 'collectStop',
} },
] ]
export default { export default {
components: { components: {
@ -68,25 +76,25 @@ export default {
}, },
stationList: [], stationList: [],
columns, columns,
dataType: "S", dataType: 'S',
spectralQualifie:"PREL" spectralQualifie: 'PREL',
} }
}, },
mounted() { mounted() {
console.log(this.dataType); console.log(this.dataType)
this.findStationList(); this.findStationList()
}, },
methods: { methods: {
findStationList() { findStationList() {
getAction(this.url.findStationList, { menuName: 'Noble Gas Beta-Gamma' }).then((res) => { getAction(this.url.findStationList, { menuName: 'Noble Gas Beta-Gamma' }).then((res) => {
if (res.success) { if (res.success) {
if (res.result.length>0) { if (res.result.length > 0) {
this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId })) this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId }))
} else { } else {
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')
} }
}) })
}, },
@ -95,5 +103,4 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
</style> </style>

View File

@ -1,18 +1,25 @@
<template> <template>
<div style="height: 100%;"> <div style="height: 100%">
<List :stationList="stationList" :columns="columns" :dataType="dataType" fileName="CALIBPHD" pageType="CALIB"></List> <List
:stationList="stationList"
:columns="columns"
:dataType="dataType"
fileName="CALIBPHD"
pageType="CALIB"
menuType="gamma"
></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 = [
{ {
title: 'NO', title: 'NO',
align: 'left', align: 'left',
width:80, width: 80,
scopedSlots: { scopedSlots: {
customRender: 'index', customRender: 'index',
}, },
@ -73,24 +80,24 @@ export default {
}, },
stationList: [], stationList: [],
columns, columns,
dataType:"C" dataType: 'C',
} }
}, },
mounted() { mounted() {
console.log(this.dataType); console.log(this.dataType)
this.findStationList(); this.findStationList()
}, },
methods: { methods: {
findStationList() { findStationList() {
getAction(this.url.findStationList, { menuName: 'Noble Gas HPGe' }).then((res) => { getAction(this.url.findStationList, { menuName: 'Noble Gas HPGe' }).then((res) => {
if (res.success) { if (res.success) {
if (res.result.length>0) { if (res.result.length > 0) {
this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId })) this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId }))
} else { } else {
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')
} }
}) })
}, },
@ -99,5 +106,4 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
</style> </style>

View File

@ -1,18 +1,25 @@
<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"
menuType="gamma"
></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 = [
{ {
title: 'NO', title: 'NO',
align: 'left', align: 'left',
width:80, width: 80,
scopedSlots: { scopedSlots: {
customRender: 'index', customRender: 'index',
}, },
@ -55,7 +62,7 @@ const columns = [
title: 'ACQUISITION STOP TIME', title: 'ACQUISITION STOP TIME',
align: 'left', align: 'left',
dataIndex: 'acquisitionStop', dataIndex: 'acquisitionStop',
} },
] ]
export default { export default {
components: { components: {
@ -68,24 +75,24 @@ export default {
}, },
stationList: [], stationList: [],
columns, columns,
dataType:"D" dataType: 'D',
} }
}, },
mounted() { mounted() {
console.log(this.dataType); console.log(this.dataType)
this.findStationList(); this.findStationList()
}, },
methods: { methods: {
findStationList() { findStationList() {
getAction(this.url.findStationList, { menuName: 'Noble Gas HPGe' }).then((res) => { getAction(this.url.findStationList, { menuName: 'Noble Gas HPGe' }).then((res) => {
if (res.success) { if (res.success) {
if (res.result.length>0) { if (res.result.length > 0) {
this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId })) this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId }))
} else { } else {
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 +101,4 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
</style> </style>

View File

@ -1,18 +1,25 @@
<template> <template>
<div style="height: 100%;"> <div style="height: 100%">
<List :stationList="stationList" :columns="columns" :dataType="dataType" fileName="QCPHD" pageType="ACQ"></List> <List
:stationList="stationList"
:columns="columns"
:dataType="dataType"
fileName="QCPHD"
pageType="ACQ"
menuType="gamma"
></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 = [
{ {
title: 'NO', title: 'NO',
align: 'left', align: 'left',
width:80, width: 80,
scopedSlots: { scopedSlots: {
customRender: 'index', customRender: 'index',
}, },
@ -55,7 +62,7 @@ const columns = [
title: 'ACQUISITION STOP TIME', title: 'ACQUISITION STOP TIME',
align: 'left', align: 'left',
dataIndex: 'acquisitionStop', dataIndex: 'acquisitionStop',
} },
] ]
export default { export default {
components: { components: {
@ -68,24 +75,24 @@ export default {
}, },
stationList: [], stationList: [],
columns, columns,
dataType:"Q" dataType: 'Q',
} }
}, },
mounted() { mounted() {
console.log(this.dataType); console.log(this.dataType)
this.findStationList(); this.findStationList()
}, },
methods: { methods: {
findStationList() { findStationList() {
getAction(this.url.findStationList, { menuName: 'Noble Gas HPGe' }).then((res) => { getAction(this.url.findStationList, { menuName: 'Noble Gas HPGe' }).then((res) => {
if (res.success) { if (res.success) {
if (res.result.length>0) { if (res.result.length > 0) {
this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId })) this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId }))
} else { } else {
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 +101,4 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
</style> </style>

View File

@ -1,18 +1,26 @@
<template> <template>
<div style="height: 100%;"> <div style="height: 100%">
<List :stationList="stationList" :spectralQualifie="spectralQualifie" :columns="columns" :dataType="dataType" fileName="SPHDF" pageType="COLL"></List> <List
:stationList="stationList"
:spectralQualifie="spectralQualifie"
:columns="columns"
:dataType="dataType"
fileName="SPHDF"
pageType="COLL"
menuType="gamma"
></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 = [
{ {
title: 'NO', title: 'NO',
align: 'left', align: 'left',
width:80, width: 80,
scopedSlots: { scopedSlots: {
customRender: 'index', customRender: 'index',
}, },
@ -55,7 +63,7 @@ const columns = [
title: 'COLLECTION STOP TIME', title: 'COLLECTION STOP TIME',
align: 'left', align: 'left',
dataIndex: 'collectStop', dataIndex: 'collectStop',
} },
] ]
export default { export default {
components: { components: {
@ -68,25 +76,25 @@ export default {
}, },
stationList: [], stationList: [],
columns, columns,
dataType: "S", dataType: 'S',
spectralQualifie:"FULL" spectralQualifie: 'FULL',
} }
}, },
mounted() { mounted() {
console.log(this.dataType); console.log(this.dataType)
this.findStationList(); this.findStationList()
}, },
methods: { methods: {
findStationList() { findStationList() {
getAction(this.url.findStationList, { menuName: 'Noble Gas HPGe' }).then((res) => { getAction(this.url.findStationList, { menuName: 'Noble Gas HPGe' }).then((res) => {
if (res.success) { if (res.success) {
if (res.result.length>0) { if (res.result.length > 0) {
this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId })) this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId }))
} else { } else {
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')
} }
}) })
}, },
@ -95,5 +103,4 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
</style> </style>

View File

@ -1,18 +1,26 @@
<template> <template>
<div style="height: 100%;"> <div style="height: 100%">
<List :stationList="stationList" :spectralQualifie="spectralQualifie" :columns="columns" :dataType="dataType" fileName="SPHDP" pageType="COLL"></List> <List
:stationList="stationList"
:spectralQualifie="spectralQualifie"
:columns="columns"
:dataType="dataType"
fileName="SPHDP"
pageType="COLL"
menuType="gamma"
></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 = [
{ {
title: 'NO', title: 'NO',
align: 'left', align: 'left',
width:80, width: 80,
scopedSlots: { scopedSlots: {
customRender: 'index', customRender: 'index',
}, },
@ -55,7 +63,7 @@ const columns = [
title: 'COLLECTION STOP TIME', title: 'COLLECTION STOP TIME',
align: 'left', align: 'left',
dataIndex: 'collectStop', dataIndex: 'collectStop',
} },
] ]
export default { export default {
components: { components: {
@ -68,25 +76,25 @@ export default {
}, },
stationList: [], stationList: [],
columns, columns,
dataType: "S", dataType: 'S',
spectralQualifie:"PREL" spectralQualifie: 'PREL',
} }
}, },
mounted() { mounted() {
console.log(this.dataType); console.log(this.dataType)
this.findStationList(); this.findStationList()
}, },
methods: { methods: {
findStationList() { findStationList() {
getAction(this.url.findStationList, { menuName: 'Noble Gas HPGe' }).then((res) => { getAction(this.url.findStationList, { menuName: 'Noble Gas HPGe' }).then((res) => {
if (res.success) { if (res.success) {
if (res.result.length>0) { if (res.result.length > 0) {
this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId })) this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId }))
} else { } else {
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')
} }
}) })
}, },
@ -95,5 +103,4 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
</style> </style>

View File

@ -1,35 +1,13 @@
<template> <template>
<div style="height: 100%"> <div style="height: 100%">
<List :stationList="stationList" :columns="columns" :dataType="dataType" fileName="BLANKPHD" pageType="ACQ"></List> <List
<!-- <a-spin :spinning="spinning"> :stationList="stationList"
<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" :columns="columns"
:list="dataSource" :dataType="dataType"
:pagination="ipagination" fileName="BLANKPHD"
:loading="loading" pageType="ACQ"
@change="handleTableChange" menuType="par"
@detail="handleDetail" ></List>
: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 +60,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 +93,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>

View File

@ -1,18 +1,25 @@
<template> <template>
<div style="height: 100%;"> <div style="height: 100%">
<List :stationList="stationList" :columns="columns" :dataType="dataType" fileName="CALIBPHD" pageType="CALIB"></List> <List
:stationList="stationList"
:columns="columns"
:dataType="dataType"
fileName="CALIBPHD"
pageType="CALIB"
menuType="par"
></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 = [
{ {
title: 'NO', title: 'NO',
align: 'left', align: 'left',
width:80, width: 80,
scopedSlots: { scopedSlots: {
customRender: 'index', customRender: 'index',
}, },
@ -73,24 +80,24 @@ export default {
}, },
stationList: [], stationList: [],
columns, columns,
dataType:"C" dataType: 'C',
} }
}, },
mounted() { mounted() {
console.log(this.dataType); console.log(this.dataType)
this.findStationList(); this.findStationList()
}, },
methods: { methods: {
findStationList() { findStationList() {
getAction(this.url.findStationList, { menuName: 'Particulate' }).then((res) => { getAction(this.url.findStationList, { menuName: 'Particulate' }).then((res) => {
if (res.success) { if (res.success) {
if (res.result.length>0) { if (res.result.length > 0) {
this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId })) this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId }))
} else { } else {
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')
} }
}) })
}, },
@ -99,5 +106,4 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
</style> </style>

View File

@ -1,6 +1,13 @@
<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"
menuType="par"
></List>
</div> </div>
</template> </template>

View File

@ -1,18 +1,25 @@
<template> <template>
<div style="height: 100%;"> <div style="height: 100%">
<List :stationList="stationList" :columns="columns" :dataType="dataType" fileName="QCPHD" pageType="ACQ"></List> <List
:stationList="stationList"
:columns="columns"
:dataType="dataType"
fileName="QCPHD"
pageType="ACQ"
menuType="par"
></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 = [
{ {
title: 'NO', title: 'NO',
align: 'left', align: 'left',
width:80, width: 80,
scopedSlots: { scopedSlots: {
customRender: 'index', customRender: 'index',
}, },
@ -68,24 +75,24 @@ export default {
}, },
stationList: [], stationList: [],
columns, columns,
dataType:"Q" dataType: 'Q',
} }
}, },
mounted() { mounted() {
console.log(this.dataType); console.log(this.dataType)
this.findStationList(); this.findStationList()
}, },
methods: { methods: {
findStationList() { findStationList() {
getAction(this.url.findStationList, { menuName: 'Particulate' }).then((res) => { getAction(this.url.findStationList, { menuName: 'Particulate' }).then((res) => {
if (res.success) { if (res.success) {
if (res.result.length>0) { if (res.result.length > 0) {
this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId })) this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId }))
} else { } else {
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 +101,4 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
</style> </style>

View File

@ -1,18 +1,26 @@
<template> <template>
<div style="height: 100%;"> <div style="height: 100%">
<List :stationList="stationList" :spectralQualifie="spectralQualifie" :columns="columns" :dataType="dataType" fileName="SPHDF" pageType="COLL"></List> <List
:stationList="stationList"
:spectralQualifie="spectralQualifie"
:columns="columns"
:dataType="dataType"
fileName="SPHDF"
pageType="COLL"
menuType="par"
></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 = [
{ {
title: 'NO', title: 'NO',
align: 'left', align: 'left',
width:80, width: 80,
scopedSlots: { scopedSlots: {
customRender: 'index', customRender: 'index',
}, },
@ -68,25 +76,25 @@ export default {
}, },
stationList: [], stationList: [],
columns, columns,
dataType: "S", dataType: 'S',
spectralQualifie:"FULL" spectralQualifie: 'FULL',
} }
}, },
mounted() { mounted() {
console.log(this.dataType); console.log(this.dataType)
this.findStationList(); this.findStationList()
}, },
methods: { methods: {
findStationList() { findStationList() {
getAction(this.url.findStationList, { menuName: 'Particulate' }).then((res) => { getAction(this.url.findStationList, { menuName: 'Particulate' }).then((res) => {
if (res.success) { if (res.success) {
if (res.result.length>0) { if (res.result.length > 0) {
this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId })) this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId }))
} else { } else {
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')
} }
}) })
}, },
@ -95,5 +103,4 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
</style> </style>

View File

@ -1,18 +1,26 @@
<template> <template>
<div style="height: 100%;"> <div style="height: 100%">
<List :stationList="stationList" :spectralQualifie="spectralQualifie" :columns="columns" :dataType="dataType" fileName="SPHDP" pageType="COLL"></List> <List
:stationList="stationList"
:spectralQualifie="spectralQualifie"
:columns="columns"
:dataType="dataType"
fileName="SPHDP"
pageType="COLL"
menuType="par"
></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 = [
{ {
title: 'NO', title: 'NO',
align: 'left', align: 'left',
width:80, width: 80,
scopedSlots: { scopedSlots: {
customRender: 'index', customRender: 'index',
}, },
@ -55,7 +63,7 @@ const columns = [
title: 'COLLECTION STOP TIME', title: 'COLLECTION STOP TIME',
align: 'left', align: 'left',
dataIndex: 'collectStop', dataIndex: 'collectStop',
} },
] ]
export default { export default {
components: { components: {
@ -68,25 +76,25 @@ export default {
}, },
stationList: [], stationList: [],
columns, columns,
dataType: "S", dataType: 'S',
spectralQualifie:"PREL" spectralQualifie: 'PREL',
} }
}, },
mounted() { mounted() {
console.log(this.dataType); console.log(this.dataType)
this.findStationList(); this.findStationList()
}, },
methods: { methods: {
findStationList() { findStationList() {
getAction(this.url.findStationList, { menuName: 'Particulate' }).then((res) => { getAction(this.url.findStationList, { menuName: 'Particulate' }).then((res) => {
if (res.success) { if (res.success) {
if (res.result.length>0) { if (res.result.length > 0) {
this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId })) this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId }))
} else { } else {
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')
} }
}) })
}, },
@ -95,5 +103,4 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
</style> </style>

View File

@ -79,7 +79,7 @@ const columns = [
import { compareDate } from '../../commom' import { compareDate } from '../../commom'
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 moment from 'moment'
export default { export default {
name: 'menuTree', name: 'menuTree',
mixins: [JeecgListMixin], mixins: [JeecgListMixin],
@ -89,8 +89,12 @@ export default {
isImmediate: true, isImmediate: true,
columns, columns,
queryParam: { queryParam: {
startTime: dateFormat(new Date(), 'yyyy-MM-dd'), startTime: sessionStorage.getItem('currStartDate_sta')
endTime: dateFormat(new Date(), 'yyyy-MM-dd'), ? sessionStorage.getItem('currStartDate_sta')
: moment().subtract(6, 'days').format('YYYY-MM-DD'),
endTime: sessionStorage.getItem('currEndDate_sta')
? sessionStorage.getItem('currEndDate_sta')
: moment().format('YYYY-MM-DD'),
stationIds: [], stationIds: [],
}, },
url: { url: {
@ -112,11 +116,6 @@ export default {
handleExcel() { handleExcel() {
if (this.dataSource.length > 0) { if (this.dataSource.length > 0) {
this.excelLoading = true this.excelLoading = true
// this.queryParam = {
// startTime: "2023-07-17",
// endTime: "2023-07-17",
// stationIds: [1]
// }
let params = { let params = {
...this.queryParam, ...this.queryParam,
} }
@ -144,11 +143,6 @@ export default {
let days = compareDate(this.queryParam.startTime, this.queryParam.endTime) let days = compareDate(this.queryParam.startTime, this.queryParam.endTime)
if (days <= 10) { if (days <= 10) {
this.isImmediate = false this.isImmediate = false
// this.queryParam = {
// startTime: "2023-01-01",
// endTime: "2023-07-10",
// stationIds: [209, 210]
// }
let params = { let params = {
...this.queryParam, ...this.queryParam,
pageNo: 1, pageNo: 1,
@ -175,6 +169,12 @@ export default {
if (res.success) { if (res.success) {
if (res.result.length > 0) { if (res.result.length > 0) {
this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId })) this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId }))
//
let arr = sessionStorage.getItem('selectedSta_sta')
? sessionStorage.getItem('selectedSta_sta').split(',')
: []
this.queryParam.stationIds = arr.map((item) => Number(item))
this.searchQueryData()
} else { } else {
this.stationList = [] this.stationList = []
} }
@ -184,7 +184,7 @@ export default {
}) })
}, },
handleSelectChange(val) { handleSelectChange(val) {
console.log(val) window.sessionStorage.setItem('selectedSta_sta', val)
let length = this.stationList.length let length = this.stationList.length
if (val.length === length) { if (val.length === length) {
this.allChecked = true this.allChecked = true
@ -196,31 +196,39 @@ export default {
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)
window.sessionStorage.setItem('selectedSta_sta', this.queryParam.stationIds)
} else { } else {
this.queryParam.stationIds = [] this.queryParam.stationIds = []
window.sessionStorage.setItem('selectedSta_sta', [])
} }
}, },
filterOption(input, option) { 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
}, },
handleStartDateChange(date) {
window.sessionStorage.setItem('currStartDate_sta', date)
},
handleEndDateChange(date) {
window.sessionStorage.setItem('currEndDate_sta', date)
},
}, },
computed: { computed: {
formItems() { formItems() {
return [ return [
{ // {
type: 'a-input', // type: 'a-input',
label: '', // label: '',
name: 'search', // name: 'search',
props: { // props: {
placeholder: 'search...', // placeholder: 'search...',
style: { // style: {
width: '166px', // width: '166px',
}, // },
}, // },
style: { // style: {
width: 'auto', // width: 'auto',
}, // },
}, // },
{ {
type: 'custom-all-select', type: 'custom-all-select',
label: 'Stations', label: 'Stations',
@ -256,6 +264,9 @@ export default {
width: '200px', width: '200px',
}, },
}, },
on: {
change: this.handleStartDateChange,
},
style: { style: {
width: 'auto', width: 'auto',
}, },
@ -272,6 +283,9 @@ export default {
width: '200px', width: '200px',
}, },
}, },
on: {
change: this.handleEndDateChange,
},
style: { style: {
width: 'auto', width: 'auto',
}, },

View File

@ -78,6 +78,7 @@ 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 FileDetail from '../../fileDetail.vue' import FileDetail from '../../fileDetail.vue'
import moment from 'moment'
export default { export default {
name: 'menuTree', name: 'menuTree',
mixins: [JeecgListMixin], mixins: [JeecgListMixin],
@ -90,8 +91,12 @@ export default {
isImmediate: true, isImmediate: true,
columns, columns,
queryParam: { queryParam: {
startTime: dateFormat(new Date(), 'yyyy-MM-dd'), startTime: sessionStorage.getItem('currStartDate_sta')
endTime: dateFormat(new Date(), 'yyyy-MM-dd'), ? sessionStorage.getItem('currStartDate_sta')
: moment().subtract(6, 'days').format('YYYY-MM-DD'),
endTime: sessionStorage.getItem('currEndDate_sta')
? sessionStorage.getItem('currEndDate_sta')
: moment().format('YYYY-MM-DD'),
stationIds: [], stationIds: [],
}, },
url: { url: {
@ -150,11 +155,6 @@ export default {
let days = compareDate(this.queryParam.startTime, this.queryParam.endTime) let days = compareDate(this.queryParam.startTime, this.queryParam.endTime)
if (days <= 10) { if (days <= 10) {
this.isImmediate = false this.isImmediate = false
// this.queryParam = {
// startTime: "2023-01-01",
// endTime: "2023-07-10",
// stationIds: [209, 210]
// }
let params = { let params = {
...this.queryParam, ...this.queryParam,
pageNo: 1, pageNo: 1,
@ -181,6 +181,12 @@ export default {
if (res.success) { if (res.success) {
if (res.result.length > 0) { if (res.result.length > 0) {
this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId })) this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId }))
//
let arr = sessionStorage.getItem('selectedSta_sta')
? sessionStorage.getItem('selectedSta_sta').split(',')
: []
this.queryParam.stationIds = arr.map((item) => Number(item))
this.searchQueryData()
} else { } else {
this.stationList = [] this.stationList = []
} }
@ -190,7 +196,7 @@ export default {
}) })
}, },
handleSelectChange(val) { handleSelectChange(val) {
console.log(val) window.sessionStorage.setItem('selectedSta_sta', val)
let length = this.stationList.length let length = this.stationList.length
if (val.length === length) { if (val.length === length) {
this.allChecked = true this.allChecked = true
@ -202,31 +208,39 @@ export default {
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)
window.sessionStorage.setItem('selectedSta_sta', this.queryParam.stationIds)
} else { } else {
this.queryParam.stationIds = [] this.queryParam.stationIds = []
window.sessionStorage.setItem('selectedSta_sta', [])
} }
}, },
filterOption(input, option) { 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
}, },
handleStartDateChange(date) {
window.sessionStorage.setItem('currStartDate_sta', date)
},
handleEndDateChange(date) {
window.sessionStorage.setItem('currEndDate_sta', date)
},
}, },
computed: { computed: {
formItems() { formItems() {
return [ return [
{ // {
type: 'a-input', // type: 'a-input',
label: '', // label: '',
name: 'search', // name: 'search',
props: { // props: {
placeholder: 'search...', // placeholder: 'search...',
style: { // style: {
width: '166px', // width: '166px',
}, // },
}, // },
style: { // style: {
width: 'auto', // width: 'auto',
}, // },
}, // },
{ {
type: 'custom-all-select', type: 'custom-all-select',
label: 'Stations', label: 'Stations',
@ -262,6 +276,9 @@ export default {
width: '200px', width: '200px',
}, },
}, },
on: {
change: this.handleStartDateChange,
},
style: { style: {
width: 'auto', width: 'auto',
}, },
@ -278,6 +295,9 @@ export default {
width: '200px', width: '200px',
}, },
}, },
on: {
change: this.handleEndDateChange,
},
style: { style: {
width: 'auto', width: 'auto',
}, },

View File

@ -72,12 +72,22 @@ const columns = [
align: 'left', align: 'left',
dataIndex: 'sampleId', dataIndex: 'sampleId',
}, },
{
title: 'Qualifie',
align: 'left',
dataIndex: 'spectralQualifie',
},
{
title: 'Analyst',
align: 'left',
dataIndex: 'analyst',
},
] ]
import { compareDate } from '../../commom' import { compareDate } from '../../commom'
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 FileDetail from '../../fileDetail.vue' import FileDetail from '../../fileDetail.vue'
import moment from 'moment'
export default { export default {
name: 'menuTree', name: 'menuTree',
mixins: [JeecgListMixin], mixins: [JeecgListMixin],
@ -90,9 +100,14 @@ export default {
isImmediate: true, isImmediate: true,
columns, columns,
queryParam: { queryParam: {
startTime: dateFormat(new Date(), 'yyyy-MM-dd'), startTime: sessionStorage.getItem('currStartDate_pro')
endTime: dateFormat(new Date(), 'yyyy-MM-dd'), ? sessionStorage.getItem('currStartDate_pro')
: moment().subtract(6, 'days').format('YYYY-MM-DD'),
endTime: sessionStorage.getItem('currEndDate_pro')
? sessionStorage.getItem('currEndDate_pro')
: moment().format('YYYY-MM-DD'),
stationIds: [], stationIds: [],
qualifie: undefined,
}, },
url: { url: {
list: '/radionuclide/findAutoPage', list: '/radionuclide/findAutoPage',
@ -109,7 +124,7 @@ export default {
} }
}, },
created() { created() {
this.queryParam.startTime = this.getBeforeDate(9) // this.queryParam.startTime = this.getBeforeDate(9)
this.findStationList() this.findStationList()
}, },
methods: { methods: {
@ -150,11 +165,6 @@ export default {
let days = compareDate(this.queryParam.startTime, this.queryParam.endTime) let days = compareDate(this.queryParam.startTime, this.queryParam.endTime)
if (days <= 10) { if (days <= 10) {
this.isImmediate = false this.isImmediate = false
// this.queryParam = {
// startTime: "2023-01-01",
// endTime: "2023-07-10",
// stationIds: [209, 210]
// }
let params = { let params = {
...this.queryParam, ...this.queryParam,
pageNo: 1, pageNo: 1,
@ -182,8 +192,13 @@ export default {
if (res.result.length > 0) { if (res.result.length > 0) {
this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId })) this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId }))
// //
this.queryParam.stationIds = this.stationList.map((item) => item.value) let arr = sessionStorage.getItem('selectedSta_pro')
this.allChecked = true ? sessionStorage.getItem('selectedSta_pro').split(',')
: []
this.queryParam.stationIds = arr.map((item) => Number(item))
this.queryParam.qualifie = sessionStorage.getItem('qualifie')
? sessionStorage.getItem('qualifie')
: undefined
this.searchQueryData() this.searchQueryData()
} else { } else {
this.stationList = [] this.stationList = []
@ -194,7 +209,7 @@ export default {
}) })
}, },
handleSelectChange(val) { handleSelectChange(val) {
console.log(val) window.sessionStorage.setItem('selectedSta_pro', val)
let length = this.stationList.length let length = this.stationList.length
if (val.length === length) { if (val.length === length) {
this.allChecked = true this.allChecked = true
@ -206,10 +221,22 @@ export default {
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)
window.sessionStorage.setItem('selectedSta_pro', this.queryParam.stationIds)
} else { } else {
this.queryParam.stationIds = [] this.queryParam.stationIds = []
window.sessionStorage.setItem('selectedSta_pro', [])
} }
}, },
handleQualifieChange(val) {
this.queryParam.qualifie = val
sessionStorage.setItem('qualifie', val)
},
handleStartDateChange(date) {
window.sessionStorage.setItem('currStartDate_pro', date)
},
handleEndDateChange(date) {
window.sessionStorage.setItem('currEndDate_pro', date)
},
getBeforeDate(n) { getBeforeDate(n) {
var n = n var n = n
var d = new Date() var d = new Date()
@ -238,7 +265,7 @@ export default {
computed: { computed: {
formItems() { formItems() {
return [ return [
{ /*{
type: 'a-input', type: 'a-input',
label: '', label: '',
name: 'search', name: 'search',
@ -251,7 +278,7 @@ export default {
style: { style: {
width: 'auto', width: 'auto',
}, },
}, },*/
{ {
type: 'custom-all-select', type: 'custom-all-select',
label: 'Stations', label: 'Stations',
@ -287,6 +314,9 @@ export default {
width: '200px', width: '200px',
}, },
}, },
on: {
change: this.handleStartDateChange,
},
style: { style: {
width: 'auto', width: 'auto',
}, },
@ -303,6 +333,31 @@ export default {
width: '200px', width: '200px',
}, },
}, },
on: {
change: this.handleEndDateChange,
},
style: {
width: 'auto',
},
},
{
type: 'a-select',
label: 'Qualifie',
name: 'qualifie',
props: {
allowClear: true,
placeholder: 'Select qualifie',
options: [
{ label: 'FULL', value: 'FULL' },
{ label: 'PREL', value: 'PREL' },
],
style: {
width: '200px',
},
},
on: {
change: this.handleQualifieChange,
},
style: { style: {
width: 'auto', width: 'auto',
}, },

View File

@ -72,12 +72,22 @@ const columns = [
align: 'left', align: 'left',
dataIndex: 'sampleId', dataIndex: 'sampleId',
}, },
{
title: 'Qualifie',
align: 'left',
dataIndex: 'spectralQualifie',
},
{
title: 'Analyst',
align: 'left',
dataIndex: 'analyst',
},
] ]
import { compareDate } from '../../commom' import { compareDate } from '../../commom'
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 FileDetail from '../../fileDetail.vue' import FileDetail from '../../fileDetail.vue'
import moment from 'moment'
export default { export default {
name: 'menuTree', name: 'menuTree',
mixins: [JeecgListMixin], mixins: [JeecgListMixin],
@ -90,9 +100,14 @@ export default {
isImmediate: true, isImmediate: true,
columns, columns,
queryParam: { queryParam: {
startTime: dateFormat(new Date(), 'yyyy-MM-dd'), startTime: sessionStorage.getItem('currStartDate_pro')
endTime: dateFormat(new Date(), 'yyyy-MM-dd'), ? sessionStorage.getItem('currStartDate_pro')
: moment().subtract(6, 'days').format('YYYY-MM-DD'),
endTime: sessionStorage.getItem('currEndDate_pro')
? sessionStorage.getItem('currEndDate_pro')
: moment().format('YYYY-MM-DD'),
stationIds: [], stationIds: [],
qualifie: undefined,
}, },
url: { url: {
list: '/radionuclide/findReviewedPage', list: '/radionuclide/findReviewedPage',
@ -109,7 +124,7 @@ export default {
} }
}, },
created() { created() {
this.queryParam.startTime = this.getBeforeDate(9) // this.queryParam.startTime = this.getBeforeDate(9)
this.findStationList() this.findStationList()
}, },
methods: { methods: {
@ -182,8 +197,13 @@ export default {
if (res.result.length > 0) { if (res.result.length > 0) {
this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId })) this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId }))
// //
this.queryParam.stationIds = this.stationList.map((item) => item.value) let arr = sessionStorage.getItem('selectedSta_pro')
this.allChecked = true ? sessionStorage.getItem('selectedSta_pro').split(',')
: []
this.queryParam.stationIds = arr.map((item) => Number(item))
this.queryParam.qualifie = sessionStorage.getItem('qualifie')
? sessionStorage.getItem('qualifie')
: undefined
this.searchQueryData() this.searchQueryData()
} else { } else {
this.stationList = [] this.stationList = []
@ -194,7 +214,7 @@ export default {
}) })
}, },
handleSelectChange(val) { handleSelectChange(val) {
console.log(val) window.sessionStorage.setItem('selectedSta_pro', val)
let length = this.stationList.length let length = this.stationList.length
if (val.length === length) { if (val.length === length) {
this.allChecked = true this.allChecked = true
@ -206,10 +226,22 @@ export default {
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)
window.sessionStorage.setItem('selectedSta_pro', this.queryParam.stationIds)
} else { } else {
this.queryParam.stationIds = [] this.queryParam.stationIds = []
window.sessionStorage.setItem('selectedSta_pro', [])
} }
}, },
handleQualifieChange(val) {
this.queryParam.qualifie = val
sessionStorage.setItem('qualifie', val)
},
handleStartDateChange(date) {
window.sessionStorage.setItem('currStartDate_pro', date)
},
handleEndDateChange(date) {
window.sessionStorage.setItem('currEndDate_pro', date)
},
getBeforeDate(n) { getBeforeDate(n) {
var n = n var n = n
var d = new Date() var d = new Date()
@ -238,7 +270,7 @@ export default {
computed: { computed: {
formItems() { formItems() {
return [ return [
{ /*{
type: 'a-input', type: 'a-input',
label: '', label: '',
name: 'search', name: 'search',
@ -251,7 +283,7 @@ export default {
style: { style: {
width: 'auto', width: 'auto',
}, },
}, },*/
{ {
type: 'custom-all-select', type: 'custom-all-select',
label: 'Stations', label: 'Stations',
@ -287,6 +319,9 @@ export default {
width: '200px', width: '200px',
}, },
}, },
on: {
change: this.handleStartDateChange,
},
style: { style: {
width: 'auto', width: 'auto',
}, },
@ -303,6 +338,31 @@ export default {
width: '200px', width: '200px',
}, },
}, },
on: {
change: this.handleEndDateChange,
},
style: {
width: 'auto',
},
},
{
type: 'a-select',
label: 'Qualifie',
name: 'qualifie',
props: {
allowClear: true,
placeholder: 'Select qualifie',
options: [
{ label: 'FULL', value: 'FULL' },
{ label: 'PREL', value: 'PREL' },
],
style: {
width: '200px',
},
},
on: {
change: this.handleQualifieChange,
},
style: { style: {
width: 'auto', width: 'auto',
}, },

View File

@ -44,6 +44,7 @@ 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'
import moment from 'moment'
export default { export default {
name: 'menuTree', name: 'menuTree',
props: { props: {
@ -71,24 +72,34 @@ export default {
type: String, type: String,
default: '', default: '',
}, },
menuType: {
type: String,
default: '',
},
}, },
mixins: [JeecgListMixin], mixins: [JeecgListMixin],
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_${this.menuType}`)
this.$nextTick(() => { ? sessionStorage.getItem(`selectedSta_${this.menuType}`).split(',')
this.queryParam.startTime = this.getBeforeDate(6) : []
}) this.queryParam.stationIds = arr.map((item) => Number(item))
} ;(this.queryParam.startTime = sessionStorage.getItem(`currStartDate_${this.menuType}`)
? sessionStorage.getItem(`currStartDate_${this.menuType}`)
: moment().subtract(6, 'days').format('YYYY-MM-DD')),
(this.queryParam.endTime = sessionStorage.getItem(`currEndDate_${this.menuType}`)
? sessionStorage.getItem(`currEndDate_${this.menuType}`)
: moment().format('YYYY-MM-DD')),
this.loadData()
}, },
immediate: true,
}, },
}, },
data() { data() {
this.disableMixinCreated = true
return { return {
excelLoading: false, excelLoading: false,
spinning: false, spinning: false,
@ -96,8 +107,8 @@ export default {
isDetail: false, isDetail: false,
queryParam: { queryParam: {
dataType: this.dataType, dataType: this.dataType,
startTime: dateFormat(new Date(), 'yyyy-MM-dd'), startTime: '',
endTime: dateFormat(new Date(), 'yyyy-MM-dd'), endTime: '',
stationIds: [], stationIds: [],
spectralQualifie: this.spectralQualifie, spectralQualifie: this.spectralQualifie,
}, },
@ -185,6 +196,8 @@ export default {
this.isDetail = flag this.isDetail = flag
}, },
handleSelectChange(val) { handleSelectChange(val) {
console.log(val)
window.sessionStorage.setItem(`selectedSta_${this.menuType}`, val)
let length = this.stationList.length let length = this.stationList.length
if (val.length === length) { if (val.length === length) {
this.allChecked = true this.allChecked = true
@ -196,34 +209,20 @@ export default {
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)
window.sessionStorage.setItem(`selectedSta_${this.menuType}`, this.queryParam.stationIds)
} else { } else {
this.queryParam.stationIds = [] this.queryParam.stationIds = []
window.sessionStorage.setItem(`selectedSta_${this.menuType}`, [])
} }
}, },
filterOption(input, option) { 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 handleStartDateChange(date) {
getBeforeDate(n) { window.sessionStorage.setItem(`currStartDate_${this.menuType}`, date)
var n = n },
var d = new Date() handleEndDateChange(date) {
var year = d.getFullYear() window.sessionStorage.setItem(`currEndDate_${this.menuType}`, date)
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: {
@ -278,6 +277,9 @@ export default {
width: '200px', width: '200px',
}, },
}, },
on: {
change: this.handleStartDateChange,
},
style: { style: {
width: 'auto', width: 'auto',
}, },
@ -294,6 +296,9 @@ export default {
width: '200px', width: '200px',
}, },
}, },
on: {
change: this.handleEndDateChange,
},
style: { style: {
width: 'auto', width: 'auto',
}, },

View File

@ -43,52 +43,92 @@
</div> </div>
<!-- 列表结束 --> <!-- 列表结束 -->
<!-- 新增/编辑 --> <!-- 新增/编辑 -->
<custom-modal :title="isAdd ? 'Add' : 'Edit'" v-model="visible" :width="475" :okHandler="submit"> <custom-modal :title="isAdd ? 'Add' : 'Edit'" v-model="visible" :width="650" :okHandler="submit">
<a-form-model <a-form-model
ref="form" ref="form"
layout="horizontal"
:model="model" :model="model"
:rules="rules" :rules="rules"
:colon="false" :colon="false"
:labelCol="{ style: { width: '115px' } }" :labelCol="{ style: { width: '115px' } }"
:wrapperCol="{ style: { width: '300px' } }" :wrapperCol="{ style: { width: '150px' } }"
> >
<a-row :gutter="24">
<!-- <a-col :span="12">
<a-form-model-item label="Detector Id" prop="detectorId"> <a-form-model-item label="Detector Id" prop="detectorId">
<a-input v-model="model.detectorId" type="number"></a-input> <a-input :disabled='!isAdd' v-model="model.detectorId" type="number"></a-input>
</a-form-model-item> </a-form-model-item>
</a-col>-->
<a-col :span="12">
<a-form-model-item label="Station" prop="stationId">
<a-select showSearch allowClear
:disabled='!isAdd'
:filterOption = this.filterOption
:options="stationOptions"
v-model="model.stationId">
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="Detector Code" prop="detectorCode"> <a-form-model-item label="Detector Code" prop="detectorCode">
<a-input v-model="model.detectorCode"></a-input> <a-input :disabled='!isAdd' @input='enterCode' v-model="model.detectorCode"></a-input>
</a-form-model-item>
<a-form-model-item label="Lon" prop="lon">
<a-input v-model="model.lon" type="number"></a-input>
</a-form-model-item>
<a-form-model-item label="Lat" prop="lat">
<a-input v-model="model.lat" type="number"></a-input>
</a-form-model-item>
<a-form-model-item label="Type" prop="type">
<a-input v-model="model.type"></a-input>
</a-form-model-item>
<a-form-model-item label="Channels" prop="channels">
<a-input v-model="model.channels" type="number"></a-input>
</a-form-model-item>
<a-form-model-item label="Rated Efficiency" prop="ratedEfficiency">
<a-input v-model="model.ratedEfficiency" type="number"></a-input>
</a-form-model-item>
<a-form-model-item label="Rated Resolution" prop="ratedResolution">
<a-input v-model="model.ratedResolution" type="number"></a-input>
</a-form-model-item>
<a-form-model-item label="Ecal Range Max" prop="ecalRangeMax">
<a-input v-model="model.ecalRangeMax" type="number"></a-input>
</a-form-model-item>
<a-form-model-item label="Description" prop="description">
<a-textarea v-model="model.description" :rows="3"></a-textarea>
</a-form-model-item>
<a-form-model-item label="Moddate" prop="moddate">
<a-date-picker v-model="model.moddate" :rows="3"></a-date-picker>
</a-form-model-item> </a-form-model-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<a-form-model-item label="Status" prop="status"> <a-form-model-item label="Status" prop="status">
<j-dict-select-tag v-model="model.status" dictCode="STATION_STATUS"></j-dict-select-tag> <j-dict-select-tag v-model="model.status" dictCode="STATION_STATUS"></j-dict-select-tag>
</a-form-model-item> </a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="Type" prop="type">
<a-input v-model="model.type"></a-input>
</a-form-model-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<a-form-model-item label="Lon" prop="lon">
<a-input v-model="model.lon" type="number"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="Lat" prop="lat">
<a-input v-model="model.lat" type="number"></a-input>
</a-form-model-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<a-form-model-item label="Channels" prop="channels">
<a-input v-model="model.channels" type="number"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="Rated Efficiency" prop="ratedEfficiency">
<a-input v-model="model.ratedEfficiency" type="number"></a-input>
</a-form-model-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<a-form-model-item label="Rated Resolution" prop="ratedResolution">
<a-input v-model="model.ratedResolution" type="number"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="Ecal Range Max" prop="ecalRangeMax">
<a-input v-model="model.ecalRangeMax" type="number"></a-input>
</a-form-model-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<a-form-model-item label="Description" prop="description" :wrapperCol="{ style: { width: '77%' } }">
<a-textarea v-model="model.description" :rows="2"></a-textarea>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model> </a-form-model>
</custom-modal> </custom-modal>
<!-- 新增/编辑 结束 --> <!-- 新增/编辑 结束 -->
@ -198,23 +238,28 @@ export default {
data() { data() {
this.columns = columns this.columns = columns
const validateDetectorCode = (_, value, callback) => { const validateDetectorCode = (_, value, callback) => {
if (!value) { if(this.model.stationId){
callback(new Error('Please Enter Detector Code')) if (value) {
} else {
if (value.length > 9) { if (value.length > 9) {
callback(new Error('Detector Code Limit 9')) callback(new Error('Detector Code Limit 9'))
} else { } else {
callback() callback()
} }
} else {
callback(new Error('Please Enter Code'))
}
}else {
callback('Select Station First');
} }
} }
return { return {
queryParam: {}, queryParam: {},
rules: { rules: {
detectorId: [{ required: true, message: 'Please Enter Detector Id' }], // detectorId: [{ required: true, message: 'Please Enter Id' }, { validator: this.checkId }],
detectorCode: [{ required: true, validator: validateDetectorCode }], detectorCode: [{ required: true, validator: validateDetectorCode }],
moddate: [{ required: true, message: 'Please Select Moddate' }] stationId: [{ required: true, message: 'Please Select Station' }],
status: [{ required: true, message: 'Please Select Status' }]
}, },
url: { url: {
list: '/gardsDetectors/findPage', list: '/gardsDetectors/findPage',
@ -222,7 +267,8 @@ export default {
add: '/gardsDetectors/create', add: '/gardsDetectors/create',
edit: '/gardsDetectors/update' edit: '/gardsDetectors/update'
}, },
typeList: [] typeList: [],
stationOptions: [],
} }
}, },
created() { created() {
@ -231,7 +277,7 @@ export default {
methods: { methods: {
async getTypeList() { async getTypeList() {
try { try {
const res = await getAction('/gardsDetectors/findType') const res = await getAction( '/gardsDetectors/findType')
this.typeList = res.filter(item => item).map(item => ({ label: item, value: item })) this.typeList = res.filter(item => item).map(item => ({ label: item, value: item }))
} catch (error) { } catch (error) {
console.error(error) console.error(error)
@ -244,13 +290,15 @@ export default {
onAdd() { onAdd() {
this.isAdd = true this.isAdd = true
this.model = {} this.model = { status: 'Operating' }
this.getStationList()
this.visible = true this.visible = true
}, },
onEdit() { onEdit() {
if (this.selectedRowKeys && this.selectedRowKeys.length) { if (this.selectedRowKeys && this.selectedRowKeys.length) {
this.isAdd = false this.isAdd = false
this.visible = true this.visible = true
this.getStationList()
const find = this.dataSource.find(item => item.detectorId === this.selectedRowKeys[0]) const find = this.dataSource.find(item => item.detectorId === this.selectedRowKeys[0])
this.model = cloneDeep(find) this.model = cloneDeep(find)
} else { } else {
@ -274,6 +322,43 @@ export default {
beforeSubmit() { beforeSubmit() {
this.model.moddate = moment(this.model.moddate).format('yyyy-MM-DD HH:mm:ss') this.model.moddate = moment(this.model.moddate).format('yyyy-MM-DD HH:mm:ss')
},
async getStationList() {
await 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')
}
})
},
enterCode(){
let stationId = this.model.stationId
if (stationId){
let current = this.model.detectorCode
let stationCode = this.stationOptions.find(option => option.value === stationId).label;
let prefix = stationCode + "_"
if (!current.startsWith(prefix)){
this.model.detectorCode = prefix + current
}else {
if (prefix === current){
this.model.detectorCode = ''
}
}
}else {
this.model.detectorCode = ''
}
} }
}, },
computed: { computed: {