Merge branch 'feature-particulate-renpy' of http://git.hivekion.com:3000/xiaoguangbin/AnalysisSystemForRadionuclide_vue into feature-particulate-renpy

This commit is contained in:
orgin 2023-07-04 18:03:46 +08:00
commit 9a580739fd
12 changed files with 253 additions and 119 deletions

View File

@ -0,0 +1,84 @@
<template>
<a-select v-bind="$attrs" v-model="innerValue" show-arrow @change="onChange">
<img slot="suffixIcon" src="@/assets/images/global/select-down.png" alt="" />
<div slot="dropdownRender" slot-scope="menu">
<v-nodes :vnodes="menu" />
<a-divider style="margin: 0;" />
<div
style="padding: 4px 12px; cursor: pointer;"
@mousedown="e => e.preventDefault()"
>
<a-checkbox v-model="allVal" @change="checkedAll"><span @click.prevent="handleClick">ALL</span></a-checkbox>
</div>
</div>
</a-select>
</template>
<script>
export default {
props: {
value: {
type: [String, Number, Array],
},
allChecked: {
type: Boolean,
default:false
}
},
components: {
VNodes: {
functional: true,
render: (h, ctx) => ctx.props.vnodes,
},
},
data() {
return {
innerValue: this.value,
allVal:this.allChecked
}
},
methods: {
checkedAll(val) {
this.$emit('changeAll', val.target.checked)
},
handleClick(e) {
console.log("dfasdfasfad", e);
this.allVal = !this.allVal
this.$emit('changeAll', this.allVal)
},
onChange(val) {
this.$emit('input', val)
this.$emit('change', val)
}
},
watch: {
value: {
handler(val) {
this.innerValue = val
},
deep: true
},
allChecked: {
handler(val) {
this.allVal = val
}
}
}
}
</script>
<style lang="less" scoped>
.ant-select {
width: 100%;
.ant-select-arrow-icon {
transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}
&-open {
.ant-select-arrow-icon {
transform: rotate(180deg);
}
}
}
.ant-select-dropdown-content{
position: relative;
background: #03353f;
}
</style>

View File

@ -66,9 +66,15 @@ export default {
}
},
watch: {
value(val) {
value: {
handler(val) {
this.formModel = val
},
deep: true
},
// value(val) {
// this.formModel = val
// },
formModel: {
handler(val) {
this.$emit('input', val)

View File

@ -52,6 +52,7 @@ import { rules } from '@/utils/rules'
import SearchForm from '@/components/SearchForm'
import CustomSelect from '@/components/CustomSelect'
import CustomAllSelect from '@/components/CustomAllSelect'
import CustomTable from '@/components/CustomTable'
import CustomModal from '@/components/CustomModal'
import CustomDatePicker from '@/components/CustomDatePicker'
@ -82,6 +83,7 @@ Vue.use(JeecgComponents);
Vue.use(VueAreaLinkage);
Vue.component('search-form', SearchForm)
Vue.component('custom-select', CustomSelect)
Vue.component('custom-all-select', CustomAllSelect)
Vue.component('custom-table', CustomTable)
Vue.component('custom-modal', CustomModal)
Vue.component('custom-date-picker', CustomDatePicker)

View File

@ -53,7 +53,7 @@ export const JeecgListMixin = {
}
},
created() {
if(!this.disableMixinCreated){
if(!this.disableMixinCreated&&!this.isImmediate){
console.log(' -- mixin created -- ')
this.loadData();
//初始化字典配置 在自己页面定义
@ -73,12 +73,10 @@ export const JeecgListMixin = {
},
methods:{
loadData(arg) {
// if(!this.url.list){
// this.$message.error("请设置url.list属性!")
// return
// }
if (this.url.list) {
if(!this.url.list){
this.$message.error("请设置url.list属性!")
return
}
//加载数据 若传入参数1则加载第一页的内容
if (arg === 1) {
this.ipagination.current = 1;
@ -103,7 +101,6 @@ export const JeecgListMixin = {
}).finally(() => {
this.loading = false
})
}
},
initDictConfig(){
console.log("--这是一个假的方法!")

View File

@ -97,22 +97,26 @@ export default {
},
data() {
return {
isImmediate:true,
isDetail:false,
columns,
queryParam: {
dataType: 'B',
startTime: dateFormat(new Date(), 'yyyy-MM-dd'),
endTime: dateFormat(new Date(), 'yyyy-MM-dd'),
stationIds:[]
},
url: {
listPage: '/webStatistics/findParticulatePage',
list: '/webStatistics/findParticulatePage',
delete: '/gardsSampleData/deleteById',
findStationList: '/webStatistics/findStationList',
findParticulatePage: '/jeecg-web-statistics/webStatistics/findParticulatePage',
},
stationList: [],
dataSource: [],
detailJson:{}
detailJson: {},
strIds: "",
allChecked:false
}
},
// mounted() {
@ -136,29 +140,29 @@ export default {
// },
methods: {
searchQueryData() {
this.queryParam = {
dataType: "S",
startTime: "2023-05-01",
endTime:"2023-05-07",
}
console.log("查询数据", this.queryParam);
this.isImmediate = false
// this.queryParam = {
// dataType: "S",
// startTime: "2023-05-01",
// endTime: "2023-05-07",
// stationIds: [209, 211, 213]
// }
let params = {
...this.queryParam,
pageNo: 1,
pageSize: 10,
stationIds: ["209", "211", "213"]
pageSize: 10
}
getAction(this.url.listPage, params).then((res) => {
console.log("查询数据结果", res);
getAction(this.url.list, params).then((res) => {
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
}
})
},
handleDetail(record) {
console.log("点击行信息", record);
getAction("webStatistics/findGeneratedReport", { sampleId: "1523651" }).then(res => {
console.log(res);
if (res.success) {
this.detailJson = res.result
this.detailJson = JSON.parse(JSON.stringify(this.detailJson))
@ -171,12 +175,8 @@ export default {
handleBack(flag) {
this.isDetail = flag
},
handleTableChange(pagination, filters, sorter, { currentDataSource }) {
console.log(pagination, filters, sorter, { currentDataSource });
},
findStationList() {
getAction(this.url.findStationList, { menuName: 'Particulate' }).then((res) => {
console.log("resdsfsdf", res);
if (res.result.length>0) {
this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId }))
} else {
@ -184,6 +184,23 @@ export default {
}
})
},
handleSelectChange(val) {
console.log(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 =[]
}
}
},
computed: {
formItems() {
@ -203,24 +220,25 @@ export default {
},
},
{
type: 'custom-select',
type: 'custom-all-select',
label: 'Stations',
name: 'stationIds',
props: {
allChecked:this.allChecked,
placeholder: 'select stations',
mode: 'multiple',
maxTagCount: 1,
options: [
{
label: 'ALL',
value: '',
},
...this.stationList,
],
style: {
width: '200px',
},
},
on: {
change: this.handleSelectChange,
changeAll: this.handleSelectChangeAll
},
style: {
width: 'auto',
},

View File

@ -61,6 +61,12 @@ const columns = [
width: 120,
dataIndex: 'acquisitionStop',
},
{
title: 'CALIB REPORTS',
align: 'left',
width: 120,
dataIndex: 'calibReports',
},
]
export default {
components: {
@ -69,10 +75,7 @@ export default {
data() {
return {
url: {
listPage: '/webStatistics/findParticulatePage',
delete: '/gardsSampleData/deleteById',
findStationList: '/webStatistics/findStationList',
findParticulatePage: '/jeecg-web-statistics/webStatistics/findParticulatePage',
},
stationList: [],
columns,

View File

@ -2,92 +2,92 @@
<a-card :bordered="false" style="margin-left: 20px;height: 100%;">
<div class="detail-top">
<div class="top-back" @click="handleback">
<img src="../../assets/images/web-statistics/return.png" alt="">
<img class="icon-back" src="../../assets/images/web-statistics/return.png" alt="">
<span style="margin-left: 10px;">return</span>
</div>
<div class="top-actions">
<div class="right-btn">
<img src="../../assets/images/web-statistics/download.png" alt=""><span>ZIP</span>
<img class="icon-download" src="../../assets/images/web-statistics/download.png" alt=""><span style="margin-left: 10px;">ZIP</span>
</div>
<div class="right-btn">
<img src="../../assets/images/web-statistics/download.png" alt=""><span>TXT</span>
<img class="icon-download" src="../../assets/images/web-statistics/download.png" alt=""><span style="margin-left: 10px;">TXT</span>
</div>
<div class="right-btn">
<img src="../../assets/images/web-statistics/view.png" alt=""><span>View Report</span>
<img class="icon-view" src="../../assets/images/web-statistics/view.png" alt=""><span style="margin-left: 10px;">View Report</span>
</div>
</div>
</div>
<a-tabs default-active-key="info" @change="handleTabChange">
<a-tab-pane key="info" tab="INFO" v-if="allData.headerBlock===null?false:true">
<templete>
<template>
<div class="pane-title">GENERAL INFORMATION</div>
<a-row>
<a-col :span="12">Site Code:</a-col>
<a-col :span="12">{{ allData.headerBlock.siteCode }}</a-col>
<a-col :span="12" class="info-key">Site Code:</a-col>
<a-col :span="12" class="info-val">{{ allData.headerBlock.siteCode }}</a-col>
</a-row>
<a-row>
<a-col :span="12">Detector Code:</a-col>
<a-col :span="12">{{ allData.headerBlock.detectorCode }}</a-col>
<a-col :span="12" class="info-key">Detector Code:</a-col>
<a-col :span="12" class="info-val">{{ allData.headerBlock.detectorCode }}</a-col>
</a-row>
<a-row>
<a-col :span="12">System Type:</a-col>
<a-col :span="12">{{ allData.headerBlock.systemType }}</a-col>
<a-col :span="12" class="info-key">System Type:</a-col>
<a-col :span="12" class="info-val">{{ allData.headerBlock.systemType }}</a-col>
</a-row>
<a-row>
<a-col :span="12">Sample Geometry:</a-col>
<a-col :span="12">{{ allData.headerBlock.sampleGeometry }}</a-col>
<a-col :span="12" class="info-key">Sample Geometry:</a-col>
<a-col :span="12" class="info-val">{{ allData.headerBlock.sampleGeometry }}</a-col>
</a-row>
<a-row>
<a-col :span="12">Spectrum Qualifier:</a-col>
<a-col :span="12">{{ allData.headerBlock.spectrumQualifier }}P</a-col>
<a-col :span="12" class="info-key">Spectrum Qualifier:</a-col>
<a-col :span="12" class="info-val">{{ allData.headerBlock.spectrumQualifier }}P</a-col>
</a-row>
<a-row>
<a-col :span="12">Sample Reference Identification:</a-col>
<a-col :span="12">{{ allData.headerBlock.sampleReferenceIdentification }}</a-col>
<a-col :span="12" class="info-key">Sample Reference Identification:</a-col>
<a-col :span="12" class="info-val">{{ allData.headerBlock.sampleReferenceIdentification }}</a-col>
</a-row>
<a-row>
<a-col :span="12">Measurement Identification:</a-col>
<a-col :span="12">{{ allData.headerBlock.measurementIdentification }}</a-col>
<a-col :span="12" class="info-key">Measurement Identification:</a-col>
<a-col :span="12" class="info-val">{{ allData.headerBlock.measurementIdentification }}</a-col>
</a-row>
<a-row>
<a-col :span="12">Detector Background Measurement Identification:</a-col>
<a-col :span="12">{{ allData.headerBlock.detectorBackgroundMeasurementId }}</a-col>
<a-col :span="12" class="info-key">Detector Background Measurement Identification:</a-col>
<a-col :span="12" class="info-val">{{ allData.headerBlock.detectorBackgroundMeasurementId }}</a-col>
</a-row>
<a-row>
<a-col :span="12">Gas Background Measurement Identification:</a-col>
<a-col :span="12">{{ allData.headerBlock.gasBackgroundMeasurementId }}</a-col>
<a-col :span="12" class="info-key">Gas Background Measurement Identification:</a-col>
<a-col :span="12" class="info-val">{{ allData.headerBlock.gasBackgroundMeasurementId }}</a-col>
</a-row>
<a-row>
<a-col :span="12">Transmit Time:</a-col>
<a-col :span="12">{{ allData.headerBlock.transmitDate }}</a-col>
<a-col :span="12" class="info-key">Transmit Time:</a-col>
<a-col :span="12" class="info-val">{{ allData.headerBlock.transmitDate }}</a-col>
</a-row>
</templete>
</template>
<template v-if="allData.commentBlock && allData.commentBlock.text">
<div class="pane-title">COMMENT</div>
<a-row>
<a-row style="height: auto;">
<a-col class="comment-block" :span="24" v-html="commentText"></a-col>
</a-row>
</template>
<template v-if="allData.acquisitionBlock">
<div class="pane-title">ACQUISITION</div>
<a-row>
<a-col :span="12">Acquisition Time:</a-col>
<a-col :span="12">{{ allData.acquisitionBlock.acquisitionStartDate }}</a-col>
<a-col :span="12" class="info-key">Acquisition Time:</a-col>
<a-col :span="12" class="info-val">{{ allData.acquisitionBlock.acquisitionStartDate }}</a-col>
</a-row>
<a-row>
<a-col :span="12">Acquisition Real Time:</a-col>
<a-col :span="12">{{ allData.acquisitionBlock.acquisitionRealTime }}</a-col>
<a-col :span="12" class="info-key">Acquisition Real Time:</a-col>
<a-col :span="12" class="info-val">{{ allData.acquisitionBlock.acquisitionRealTime }}</a-col>
</a-row>
<a-row>
<a-col :span="12">Acquisition Live Time:</a-col>
<a-col :span="12">{{ allData.acquisitionBlock.acquisitionLiveTime }}</a-col>
<a-col :span="12" class="info-key">Acquisition Live Time:</a-col>
<a-col :span="12" class="info-val">{{ allData.acquisitionBlock.acquisitionLiveTime }}</a-col>
</a-row>
</template>
<template v-if="allData.calibrationBlock">
<div class="pane-title">CALIBRATION</div>
<a-row>
<a-col :span="12">Date of Last Calibration</a-col>
<a-col :span="12">{{ allData.calibrationBlock.dateOfLastCalibration }}</a-col>
<a-col :span="12" class="info-key">Date of Last Calibration</a-col>
<a-col :span="12" class="info-val">{{ allData.calibrationBlock.dateOfLastCalibration }}</a-col>
</a-row>
</template>
</a-tab-pane>
@ -128,8 +128,8 @@
<div class="pane-title" style="margin-bottom: 15px;">GAMMA SPECTRUM</div>
<div class="gamma-spectrum-row">
<div>
<span>Number of Channels</span><span class="row-val">{{ allData.gspectrumBlock.numberGChannels }}</span>
<span style="margin-left: 35px;">Energy Span</span><span class="row-val">{{ allData.gspectrumBlock.energySpan }}</span>
<span class="span-key">Number of Channels</span><span class="row-val">{{ allData.gspectrumBlock.numberGChannels }}</span>
<span class="span-key" style="margin-left: 35px;">Energy Span</span><span class="row-val">{{ allData.gspectrumBlock.energySpan }}</span>
</div>
<div>
<a-checkbox style="margin-right: 15px;" @change="yLogChange">Y log scale</a-checkbox>
@ -141,9 +141,9 @@
<a-tab-pane key="certificate" tab="CERTIFICATE" v-if="allData.certificateBlock===null?false:true">
<div class="pane-title" style="margin-bottom: 15px;">CERTIFICATE</div>
<div class="certificate-row">
<span>Total Source Activity [ Bq ]</span><span class="row-val">{{ allData.certificateBlock.totalSourceActivity }}</span>
<span style="margin-left: 35px;">Assay Date</span><span class="row-val">{{ allData.certificateBlock.assayDate }}</span>
<span style="margin-left: 35px;">Units of Activity</span><span class="row-val">{{ allData.certificateBlock.unitsOfActivity }}</span>
<span class="span-key">Total Source Activity [ Bq ]</span><span class="row-val">{{ allData.certificateBlock.totalSourceActivity }}</span>
<span class="span-key" style="margin-left: 35px;">Assay Date</span><span class="row-val">{{ allData.certificateBlock.assayDate }}</span>
<span class="span-key" style="margin-left: 35px;">Units of Activity</span><span class="row-val">{{ allData.certificateBlock.unitsOfActivity }}</span>
</div>
<custom-table
size="middle"
@ -291,7 +291,6 @@ export default {
}
},
mounted () {
console.log(this.allData);
this.commentText = this.allData.commentBlock && this.allData.commentBlock.text?this.allData.commentBlock.text.replace(/\n/g, "<br />"):""
this.dataSourceEnergy=this.allData.genergyBlock
this.dataSourceResulution=this.allData.gresolutionBlock
@ -300,7 +299,6 @@ export default {
this.dataSourceSpectrumX = this.allData.gspectrumBlock.gspectrumSubBlock.map((item, index) => {
return index
})
console.log(this.dataSourceSpectrumX);
this.dataSourceCertificate = this.allData.certificateBlock?this.allData.certificateBlock.certificateSubBlock:[]
},
methods: {
@ -309,7 +307,6 @@ export default {
this.spectrumChart.setOption({
yAxis: {
type: this.yAxisType,
// type: 'log',
splitLine: {
show: true,
lineStyle: {
@ -420,6 +417,11 @@ export default {
font-stretch: normal;
letter-spacing: 0px;
color: #69a19f;
cursor: pointer;
.icon-back{
width: 28px;
height: 24px;
}
}
.top-actions{
.right-btn{
@ -429,6 +431,14 @@ export default {
padding: 0 12px;
margin-left: 20px;
background-color: #1397a3;
.icon-download{
width: 16px;
height: 19px;
}
.icon-view{
width: 15px;
height: 16px;
}
}
}
}
@ -440,6 +450,7 @@ export default {
.ant-tabs-tabpane{
height: 100%;
overflow: auto;
background-color: #02282b;
}
}
}
@ -526,11 +537,28 @@ export default {
color: #0cebc9;
padding: 0 0 0 18px;
}
.info-key{
font-family: ArialMT;
font-size: 16px;
font-weight: bold;
color: #ffffff;
}
.info-val{
font-family: ArialMT;
font-size: 16px;
color: #ade6ee;
}
.span-key{
font-family: MicrosoftYaHei;
font-size: 16px;
color: #ffffff;
}
.comment-block{
background-color: rgba(12, 235, 201, 0.05);
margin-top: 10px;
background-color: #0d6d76;
margin: 10px 0;
padding: 20px;
line-height: 24px;
border-radius: 4px;
}
.gamma-spectrum-row{
display: flex;
@ -538,6 +566,7 @@ export default {
justify-content: space-between;
.row-val{
font-family: MicrosoftYaHei;
font-size: 16px;
color: #ade6ee;
}
.row-btn{

View File

@ -69,10 +69,7 @@ export default {
data() {
return {
url: {
listPage: '/webStatistics/findParticulatePage',
delete: '/gardsSampleData/deleteById',
findStationList: '/webStatistics/findStationList',
findParticulatePage: '/jeecg-web-statistics/webStatistics/findParticulatePage',
},
stationList: [],
columns,
@ -86,7 +83,6 @@ export default {
methods: {
findStationList() {
getAction(this.url.findStationList, { menuName: 'Particulate' }).then((res) => {
console.log("resdsfsdf", res);
if (res.result.length>0) {
this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId }))
} else {

View File

@ -57,11 +57,13 @@ export default {
},
data() {
return {
isImmediate:true,
isDetail:false,
queryParam: {
dataType: this.dataType,
startTime: dateFormat(new Date(), 'yyyy-MM-dd'),
endTime: dateFormat(new Date(), 'yyyy-MM-dd'),
stationIds:[]
},
url: {
list: '/webStatistics/findParticulatePage',
@ -70,37 +72,32 @@ export default {
findParticulatePage: '/jeecg-web-statistics/webStatistics/findParticulatePage',
},
dataSource: [],
detailJson:{}
detailJson: {},
allChecked:false
}
},
methods: {
searchQueryData() {
console.log("查询数据", this.queryParam);
console.log(this.dataType);
this.isImmediate = false
let params = {
dataType: "S",
startTime: "2023-05-01",
endTime: "2023-05-07",
...this.queryParam,
pageNo: 1,
pageSize: 10,
stationIds: ["209", "211", "213"]
// dataType: this.queryParam.dataType||"S",
// startTime: this.queryParam.startTime,
// endTime:this.queryParam.endTime,
pageSize: 10
}
getAction(this.url.list, params).then((res) => {
console.log("查询数据结果", res);
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
}
})
},
handleDetail(record) {
// this.isDetail = true
console.log("点击行信息", record);
// record.sampleId
getAction("webStatistics/findGeneratedReport", { sampleId: "1523651" }).then(res => {
console.log(res);
if (res.success){
this.detailJson = res.result
this.detailJson = JSON.parse(JSON.stringify(this.detailJson))
@ -113,8 +110,21 @@ export default {
handleBack(flag) {
this.isDetail = flag
},
handleTableChange(pagination, filters, sorter, { currentDataSource }) {
console.log(pagination, filters, sorter, { currentDataSource });
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 =[]
}
}
},
computed: {
@ -135,24 +145,25 @@ export default {
},
},
{
type: 'custom-select',
type: 'custom-all-select',
label: 'Stations',
name: 'stationIds',
props: {
allChecked:this.allChecked,
placeholder: 'select stations',
mode: 'multiple',
maxTagCount: 1,
options: [
{
label: 'ALL',
value: '',
},
...this.stationList,
],
style: {
width: '200px',
},
},
on: {
change: this.handleSelectChange,
changeAll: this.handleSelectChangeAll
},
style: {
width: 'auto',
},

View File

@ -69,10 +69,7 @@ export default {
data() {
return {
url: {
listPage: '/webStatistics/findParticulatePage',
delete: '/gardsSampleData/deleteById',
findStationList: '/webStatistics/findStationList',
findParticulatePage: '/jeecg-web-statistics/webStatistics/findParticulatePage',
},
stationList: [],
columns,
@ -86,7 +83,6 @@ export default {
methods: {
findStationList() {
getAction(this.url.findStationList, { menuName: 'Particulate' }).then((res) => {
console.log("resdsfsdf", res);
if (res.result.length>0) {
this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId }))
} else {

View File

@ -69,10 +69,7 @@ export default {
data() {
return {
url: {
listPage: '/webStatistics/findParticulatePage',
delete: '/gardsSampleData/deleteById',
findStationList: '/webStatistics/findStationList',
findParticulatePage: '/jeecg-web-statistics/webStatistics/findParticulatePage',
},
stationList: [],
columns,
@ -86,7 +83,6 @@ export default {
methods: {
findStationList() {
getAction(this.url.findStationList, { menuName: 'Particulate' }).then((res) => {
console.log("resdsfsdf", res);
if (res.result.length>0) {
this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId }))
} else {

View File

@ -69,10 +69,7 @@ export default {
data() {
return {
url: {
listPage: '/webStatistics/findParticulatePage',
delete: '/gardsSampleData/deleteById',
findStationList: '/webStatistics/findStationList',
findParticulatePage: '/jeecg-web-statistics/webStatistics/findParticulatePage',
},
stationList: [],
columns,
@ -86,7 +83,6 @@ export default {
methods: {
findStationList() {
getAction(this.url.findStationList, { menuName: 'Particulate' }).then((res) => {
console.log("resdsfsdf", res);
if (res.result.length>0) {
this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId }))
} else {