Merge branch 'master-dev' into feature-Beta-dev-renpy
This commit is contained in:
commit
a76ec933f2
|
@ -6,152 +6,164 @@
|
||||||
:confirmLoading="confirmLoading"
|
:confirmLoading="confirmLoading"
|
||||||
@ok="handleOk"
|
@ok="handleOk"
|
||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
cancelText="关闭"
|
cancelText="Cancel"
|
||||||
>
|
>
|
||||||
<a-spin :spinning="confirmLoading">
|
<a-spin :spinning="confirmLoading">
|
||||||
<a-form :form="form">
|
<a-form :form="form">
|
||||||
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="Old Password">
|
||||||
<a-form-item
|
<a-input
|
||||||
:labelCol="labelCol"
|
type="password"
|
||||||
:wrapperCol="wrapperCol"
|
placeholder="Please enter your old password"
|
||||||
label="旧密码">
|
v-decorator="['oldpassword', validatorRules.oldpassword]"
|
||||||
<a-input type="password" placeholder="请输入旧密码" v-decorator="[ 'oldpassword', validatorRules.oldpassword]" />
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="New Password">
|
||||||
:labelCol="labelCol"
|
<a-input
|
||||||
:wrapperCol="wrapperCol"
|
type="password"
|
||||||
label="新密码">
|
placeholder="Please enter your new password"
|
||||||
<a-input type="password" placeholder="请输入新密码" v-decorator="[ 'password', validatorRules.password]" />
|
v-decorator="['password', validatorRules.password]"
|
||||||
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="Confirm New Password">
|
||||||
:labelCol="labelCol"
|
<a-input
|
||||||
:wrapperCol="wrapperCol"
|
type="password"
|
||||||
label="确认新密码">
|
@blur="handleConfirmBlur"
|
||||||
<a-input type="password" @blur="handleConfirmBlur" placeholder="请确认新密码" v-decorator="[ 'confirmpassword', validatorRules.confirmpassword]"/>
|
placeholder="Please enter your new password"
|
||||||
|
v-decorator="['confirmpassword', validatorRules.confirmpassword]"
|
||||||
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
</a-form>
|
</a-form>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { putAction } from '@/api/manage'
|
||||||
|
|
||||||
import { putAction } from '@/api/manage'
|
export default {
|
||||||
|
name: 'UserPassword',
|
||||||
export default {
|
data() {
|
||||||
name: "UserPassword",
|
return {
|
||||||
data () {
|
title: 'Change Password',
|
||||||
return {
|
modalWidth: 800,
|
||||||
title:"修改密码",
|
visible: false,
|
||||||
modalWidth:800,
|
confirmLoading: false,
|
||||||
visible: false,
|
validatorRules: {
|
||||||
confirmLoading: false,
|
oldpassword: {
|
||||||
validatorRules:{
|
rules: [
|
||||||
oldpassword:{
|
{
|
||||||
rules: [{
|
required: true,
|
||||||
required: true, message: '请输入旧密码!',
|
message: '请输入旧密码!',
|
||||||
}],
|
},
|
||||||
},
|
],
|
||||||
password:{
|
},
|
||||||
rules: [{
|
password: {
|
||||||
required: true, message: '请输入新密码!',
|
rules: [
|
||||||
}, {
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请输入新密码!',
|
||||||
|
},
|
||||||
|
{
|
||||||
validator: this.validateToNextPassword,
|
validator: this.validateToNextPassword,
|
||||||
}],
|
},
|
||||||
},
|
],
|
||||||
confirmpassword:{
|
},
|
||||||
rules: [{
|
confirmpassword: {
|
||||||
required: true, message: '请确认新密码!',
|
rules: [
|
||||||
}, {
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请确认新密码!',
|
||||||
|
},
|
||||||
|
{
|
||||||
validator: this.compareToFirstPassword,
|
validator: this.compareToFirstPassword,
|
||||||
}],
|
},
|
||||||
}
|
],
|
||||||
},
|
|
||||||
confirmDirty:false,
|
|
||||||
labelCol: {
|
|
||||||
xs: { span: 24 },
|
|
||||||
sm: { span: 5 },
|
|
||||||
},
|
|
||||||
wrapperCol: {
|
|
||||||
xs: { span: 24 },
|
|
||||||
sm: { span: 16 },
|
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
confirmDirty: false,
|
||||||
|
labelCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 6 },
|
||||||
|
},
|
||||||
|
wrapperCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 16 },
|
||||||
|
},
|
||||||
|
|
||||||
form:this.$form.createForm(this),
|
form: this.$form.createForm(this),
|
||||||
url: "sys/user/updatePassword",
|
url: 'sys/user/updatePassword',
|
||||||
username:"",
|
username: '',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
show(uname) {
|
||||||
|
if (!uname) {
|
||||||
|
this.$message.warning('当前系统无登录用户!')
|
||||||
|
return
|
||||||
|
} else {
|
||||||
|
this.username = uname
|
||||||
|
this.form.resetFields()
|
||||||
|
this.visible = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
handleCancel() {
|
||||||
show(uname){
|
this.close()
|
||||||
if(!uname){
|
},
|
||||||
this.$message.warning("当前系统无登录用户!");
|
close() {
|
||||||
return
|
this.$emit('close')
|
||||||
}else{
|
this.visible = false
|
||||||
this.username = uname
|
this.disableSubmit = false
|
||||||
this.form.resetFields();
|
this.selectedRole = []
|
||||||
this.visible = true;
|
},
|
||||||
}
|
handleOk() {
|
||||||
},
|
const that = this
|
||||||
handleCancel () {
|
// 触发表单验证
|
||||||
this.close()
|
this.form.validateFields((err, values) => {
|
||||||
},
|
if (!err) {
|
||||||
close () {
|
that.confirmLoading = true
|
||||||
this.$emit('close');
|
let params = Object.assign({ username: this.username }, values)
|
||||||
this.visible = false;
|
console.log('修改密码提交数据', params)
|
||||||
this.disableSubmit = false;
|
putAction(this.url, params)
|
||||||
this.selectedRole = [];
|
.then((res) => {
|
||||||
},
|
if (res.success) {
|
||||||
handleOk () {
|
|
||||||
const that = this;
|
|
||||||
// 触发表单验证
|
|
||||||
this.form.validateFields((err, values) => {
|
|
||||||
if (!err) {
|
|
||||||
that.confirmLoading = true;
|
|
||||||
let params = Object.assign({username:this.username},values)
|
|
||||||
console.log("修改密码提交数据",params)
|
|
||||||
putAction(this.url,params).then((res)=>{
|
|
||||||
if(res.success){
|
|
||||||
console.log(res)
|
console.log(res)
|
||||||
that.$message.success(res.message);
|
that.$message.success(res.message)
|
||||||
that.close();
|
that.close()
|
||||||
}else{
|
} else {
|
||||||
that.$message.warning(res.message);
|
that.$message.warning(res.message)
|
||||||
}
|
}
|
||||||
}).finally(() => {
|
|
||||||
that.confirmLoading = false;
|
|
||||||
})
|
})
|
||||||
}
|
.finally(() => {
|
||||||
})
|
that.confirmLoading = false
|
||||||
},
|
})
|
||||||
validateToNextPassword (rule, value, callback) {
|
|
||||||
const form = this.form;
|
|
||||||
if (value && this.confirmDirty) {
|
|
||||||
form.validateFields(['confirm'], { force: true })
|
|
||||||
}
|
}
|
||||||
callback();
|
})
|
||||||
},
|
},
|
||||||
compareToFirstPassword (rule, value, callback) {
|
validateToNextPassword(rule, value, callback) {
|
||||||
const form = this.form;
|
const form = this.form
|
||||||
if (value && value !== form.getFieldValue('password')) {
|
if (value && this.confirmDirty) {
|
||||||
callback('两次输入的密码不一样!');
|
form.validateFields(['confirm'], { force: true })
|
||||||
} else {
|
|
||||||
callback()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handleConfirmBlur (e) {
|
|
||||||
const value = e.target.value
|
|
||||||
this.confirmDirty = this.confirmDirty || !!value
|
|
||||||
}
|
}
|
||||||
|
callback()
|
||||||
}
|
},
|
||||||
}
|
compareToFirstPassword(rule, value, callback) {
|
||||||
|
const form = this.form
|
||||||
|
if (value && value !== form.getFieldValue('password')) {
|
||||||
|
callback('两次输入的密码不一样!')
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleConfirmBlur(e) {
|
||||||
|
const value = e.target.value
|
||||||
|
this.confirmDirty = this.confirmDirty || !!value
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
|
@ -128,9 +128,24 @@
|
||||||
<span>C to E : </span>
|
<span>C to E : </span>
|
||||||
<span>
|
<span>
|
||||||
E =
|
E =
|
||||||
<a-input-number size="small" v-model="newCalibrationFuncModel.paramA" @change="newCalibrationFuncModelChange"/> +
|
<a-input-number
|
||||||
<a-input-number size="small" v-model="newCalibrationFuncModel.paramB" @change="newCalibrationFuncModelChange"/> *C +
|
size="small"
|
||||||
<a-input-number size="small" v-model="newCalibrationFuncModel.paramC" @change="newCalibrationFuncModelChange" /> *C <sup>2</sup>
|
v-model="newCalibrationFuncModel.paramA"
|
||||||
|
@change="newCalibrationFuncModelChange"
|
||||||
|
/>
|
||||||
|
+
|
||||||
|
<a-input-number
|
||||||
|
size="small"
|
||||||
|
v-model="newCalibrationFuncModel.paramB"
|
||||||
|
@change="newCalibrationFuncModelChange"
|
||||||
|
/>
|
||||||
|
*C +
|
||||||
|
<a-input-number
|
||||||
|
size="small"
|
||||||
|
v-model="newCalibrationFuncModel.paramC"
|
||||||
|
@change="newCalibrationFuncModelChange"
|
||||||
|
/>
|
||||||
|
*C <sup>2</sup>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<div class="func">
|
<div class="func">
|
||||||
|
@ -546,15 +561,15 @@ const newCalibrationFuncModel = {
|
||||||
export default {
|
export default {
|
||||||
mixins: [SampleDataMixin],
|
mixins: [SampleDataMixin],
|
||||||
components: { CustomChart, TitleOverBorder },
|
components: { CustomChart, TitleOverBorder },
|
||||||
props: {
|
props: {
|
||||||
isFirstFitting: {
|
isFirstFitting: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
required: false,
|
required: false,
|
||||||
},
|
},
|
||||||
isBetaReset:{
|
isBetaReset: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
required: false,
|
required: false,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
this.columns = columns
|
this.columns = columns
|
||||||
|
@ -619,7 +634,7 @@ export default {
|
||||||
handler() {
|
handler() {
|
||||||
// this.getData()
|
// this.getData()
|
||||||
},
|
},
|
||||||
immediate: true
|
immediate: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -636,11 +651,20 @@ export default {
|
||||||
sampleId,
|
sampleId,
|
||||||
qcFileName,
|
qcFileName,
|
||||||
sampleFileName: inputFileName,
|
sampleFileName: inputFileName,
|
||||||
fittingBtn: this.isFirstFitting
|
fittingBtn: this.isFirstFitting,
|
||||||
})
|
})
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
const { CToE, EToC, betaEnergy, gammaEnergy, gammaGatedBetaSpectrum, histogramData, oldScatterSeries } =
|
const {
|
||||||
res.result
|
CToE,
|
||||||
|
EToC,
|
||||||
|
betaEnergy,
|
||||||
|
gammaEnergy,
|
||||||
|
gammaGatedBetaSpectrum,
|
||||||
|
histogramData,
|
||||||
|
oldScatterSeries,
|
||||||
|
newCToE,
|
||||||
|
newEToC,
|
||||||
|
} = res.result
|
||||||
this.c2e = CToE
|
this.c2e = CToE
|
||||||
this.e2c = EToC
|
this.e2c = EToC
|
||||||
|
|
||||||
|
@ -669,9 +693,27 @@ export default {
|
||||||
|
|
||||||
// 如果点击过reanalyze则渲染之前fitting的数据,如果没点Reanalyze,数据会在窗口关闭时删掉 20231101:xiao
|
// 如果点击过reanalyze则渲染之前fitting的数据,如果没点Reanalyze,数据会在窗口关闭时删掉 20231101:xiao
|
||||||
// todo 现在能谱数据没有缓存,刷新页面时也会获取到fitting的数据
|
// todo 现在能谱数据没有缓存,刷新页面时也会获取到fitting的数据
|
||||||
if(this.getCache("CALIBRATION_BETA_"+this.newSampleData.inputFileName)) {
|
if (this.getCache('CALIBRATION_BETA_' + this.newSampleData.inputFileName)) {
|
||||||
this.setFirringResult(this.getCache("CALIBRATION_BETA_"+this.newSampleData.inputFileName))
|
this.setFirringResult(this.getCache('CALIBRATION_BETA_' + this.newSampleData.inputFileName))
|
||||||
return false;
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对人工交互的返回数据单独处理
|
||||||
|
*/
|
||||||
|
if (this.sampleData.dbName == 'man') {
|
||||||
|
this.setFirringResult(res.result)
|
||||||
|
if (newCToE) {
|
||||||
|
const [paramA, paramB, paramC] = newCToE
|
||||||
|
this.newCalibrationFuncModel = {
|
||||||
|
paramA: Number(paramA).toPrecision(6),
|
||||||
|
paramB: Number(paramB).toPrecision(6),
|
||||||
|
paramC: Number(paramC).toPrecision(6),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (newEToC) {
|
||||||
|
this.newE2C = newEToC
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(res.message)
|
this.$message.error(res.message)
|
||||||
|
@ -723,7 +765,7 @@ export default {
|
||||||
chartHeight: this.gammaEnergy.length,
|
chartHeight: this.gammaEnergy.length,
|
||||||
channelWidth: this.gammaChannelWidth,
|
channelWidth: this.gammaChannelWidth,
|
||||||
qcFileName,
|
qcFileName,
|
||||||
sampleFileName
|
sampleFileName,
|
||||||
},
|
},
|
||||||
cancelToken
|
cancelToken
|
||||||
)
|
)
|
||||||
|
@ -797,7 +839,7 @@ export default {
|
||||||
}
|
}
|
||||||
this.tooltipVisible = true
|
this.tooltipVisible = true
|
||||||
this.channelAndEnergyModel.channel = xAxis
|
this.channelAndEnergyModel.channel = xAxis
|
||||||
if(!isNullOrUndefined(this.currEnergy)) {
|
if (!isNullOrUndefined(this.currEnergy)) {
|
||||||
this.channelAndEnergyModel.energy = add(661.657, -this.currEnergy)
|
this.channelAndEnergyModel.energy = add(661.657, -this.currEnergy)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -816,12 +858,12 @@ export default {
|
||||||
channel,
|
channel,
|
||||||
energy,
|
energy,
|
||||||
})
|
})
|
||||||
|
|
||||||
// add之后 需要清空chart黄色的线 20231028:Xiao
|
// add之后 需要清空chart黄色的线 20231028:Xiao
|
||||||
if(this.figureChartOption.series[1].data) {
|
if (this.figureChartOption.series[1].data) {
|
||||||
this.figureChartOption.series[1].data = []
|
this.figureChartOption.series[1].data = []
|
||||||
}
|
}
|
||||||
|
|
||||||
this.figureChartOption.series[1].markPoint.data.push({ xAxis: channel, yAxis: energy })
|
this.figureChartOption.series[1].markPoint.data.push({ xAxis: channel, yAxis: energy })
|
||||||
|
|
||||||
const { min, max } = this.getFigureChartMaxAndMin()
|
const { min, max } = this.getFigureChartMaxAndMin()
|
||||||
|
@ -850,10 +892,10 @@ export default {
|
||||||
// 输入内容的时候 需要清空table数据 20231028:Xiao
|
// 输入内容的时候 需要清空table数据 20231028:Xiao
|
||||||
this.list = []
|
this.list = []
|
||||||
// 需要清空chart黄色的线 20231028:Xiao
|
// 需要清空chart黄色的线 20231028:Xiao
|
||||||
if(this.figureChartOption.series[1].data) {
|
if (this.figureChartOption.series[1].data) {
|
||||||
this.figureChartOption.series[1].data = []
|
this.figureChartOption.series[1].data = []
|
||||||
}
|
}
|
||||||
if(this.figureChartOption.series[1].markPoint.data) {
|
if (this.figureChartOption.series[1].markPoint.data) {
|
||||||
this.figureChartOption.series[1].markPoint.data = []
|
this.figureChartOption.series[1].markPoint.data = []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -894,19 +936,22 @@ export default {
|
||||||
// 点击Reset Button 重置
|
// 点击Reset Button 重置
|
||||||
async handleReset() {
|
async handleReset() {
|
||||||
this.$emit('isFitting', false)
|
this.$emit('isFitting', false)
|
||||||
this.removeCache("CALIBRATION_BETA_"+this.newSampleData.inputFileName) // 删除fitting之后缓存的数据 20231101:xiao
|
this.removeCache('CALIBRATION_BETA_' + this.newSampleData.inputFileName) // 删除fitting之后缓存的数据 20231101:xiao
|
||||||
this.newCalibrationFuncModel = cloneDeep(newCalibrationFuncModel)
|
this.newCalibrationFuncModel = cloneDeep(newCalibrationFuncModel)
|
||||||
this.list = []
|
this.list = []
|
||||||
this.newE2C = []
|
this.newE2C = []
|
||||||
|
|
||||||
// 按乔的要求增加请求reset的接口 20231211:xiao
|
// 按乔的要求增加请求reset的接口 20231211:xiao
|
||||||
const res = await postAction('/spectrumAnalysis/resetButton?tabName=beta&sampleFileName='+this.newSampleData.inputFileName, {})
|
const res = await postAction(
|
||||||
|
'/spectrumAnalysis/resetButton?tabName=beta&sampleFileName=' + this.newSampleData.inputFileName,
|
||||||
|
{}
|
||||||
|
)
|
||||||
|
|
||||||
this.figureChartOption = this.oldChartOption
|
this.figureChartOption = this.oldChartOption
|
||||||
|
|
||||||
this.figureChartOption = cloneDeep(this.oldChartOption)
|
this.figureChartOption = cloneDeep(this.oldChartOption)
|
||||||
// this.isFirstFitting = true
|
// this.isFirstFitting = true
|
||||||
|
|
||||||
this.isInverse = false
|
this.isInverse = false
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -918,13 +963,14 @@ export default {
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const { success, result, message } = await postAction('/spectrumAnalysis/fitting', {
|
const { success, result, message } = await postAction('/spectrumAnalysis/fitting', {
|
||||||
...this.list.length <= 0 ? this.newCalibrationFuncModel : [], // 如果list有数据则不传 C to E 表单数据 20231101:xiao
|
...(this.list.length <= 0 ? this.newCalibrationFuncModel : []), // 如果list有数据则不传 C to E 表单数据 20231101:xiao
|
||||||
sampleFileName: this.newSampleData.inputFileName,
|
sampleFileName: this.newSampleData.inputFileName,
|
||||||
tabName: "beta",
|
tabName: 'beta',
|
||||||
// 修改逻辑,如果列表中有数据 以列表的数据优先进行分析 20231028:Xiao
|
// 修改逻辑,如果列表中有数据 以列表的数据优先进行分析 20231028:Xiao
|
||||||
tempPoints: this.list.length > 0
|
tempPoints:
|
||||||
? this.list.map((item) => ({ x: item.channel, y: item.energy }))
|
this.list.length > 0
|
||||||
: this.oldScatterSeries,
|
? this.list.map((item) => ({ x: item.channel, y: item.energy }))
|
||||||
|
: this.oldScatterSeries,
|
||||||
// tempPoints: this.isFirstFitting
|
// tempPoints: this.isFirstFitting
|
||||||
// ? this.oldScatterSeries
|
// ? this.oldScatterSeries
|
||||||
// : this.list.map((item) => ({ x: item.channel, y: item.energy })),
|
// : this.list.map((item) => ({ x: item.channel, y: item.energy })),
|
||||||
|
@ -934,10 +980,9 @@ export default {
|
||||||
this.betaIsFitting = true
|
this.betaIsFitting = true
|
||||||
this.$emit('isFitting', true) // 点击reAnalyze按钮,将isFirstFitting改为true 20231101:xiao
|
this.$emit('isFitting', true) // 点击reAnalyze按钮,将isFirstFitting改为true 20231101:xiao
|
||||||
|
|
||||||
this.setCache("CALIBRATION_BETA_"+this.newSampleData.inputFileName, result) // 缓存数据,如果点击ReAnalyze需要回显数据 20231101:xiao
|
this.setCache('CALIBRATION_BETA_' + this.newSampleData.inputFileName, result) // 缓存数据,如果点击ReAnalyze需要回显数据 20231101:xiao
|
||||||
|
|
||||||
this.setFirringResult(result)
|
this.setFirringResult(result)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(message)
|
this.$message.error(message)
|
||||||
}
|
}
|
||||||
|
@ -947,7 +992,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
// 封装 fitting后数据填充方法,如果点击ReAnalyze需要回显数据 20231101:xiao
|
// 封装 fitting后数据填充方法,如果点击ReAnalyze需要回显数据 20231101:xiao
|
||||||
setFirringResult(result){
|
setFirringResult(result) {
|
||||||
const { EToC, newLineSeries, newScatterSeriesData, tableWidgets, CToE } = result
|
const { EToC, newLineSeries, newScatterSeriesData, tableWidgets, CToE } = result
|
||||||
this.newE2C = EToC
|
this.newE2C = EToC
|
||||||
this.newLineSeries = newLineSeries
|
this.newLineSeries = newLineSeries
|
||||||
|
@ -1032,15 +1077,15 @@ export default {
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
},
|
},
|
||||||
getCache(name){
|
getCache(name) {
|
||||||
return this.$ls.get(name)
|
return this.$ls.get(name)
|
||||||
},
|
},
|
||||||
setCache(name, data){
|
setCache(name, data) {
|
||||||
this.$ls.set(name, data)
|
this.$ls.set(name, data)
|
||||||
},
|
},
|
||||||
removeCache(name){
|
removeCache(name) {
|
||||||
this.$ls.remove(name) // 删除fitting之后缓存的数据 20231101:xiao
|
this.$ls.remove(name) // 删除fitting之后缓存的数据 20231101:xiao
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
rectHeight() {
|
rectHeight() {
|
||||||
|
|
|
@ -95,9 +95,24 @@
|
||||||
<span>C to E : </span>
|
<span>C to E : </span>
|
||||||
<span>
|
<span>
|
||||||
E =
|
E =
|
||||||
<a-input-number size="small" v-model="newCalibrationFuncModel.paramA" @change="newCalibrationFuncModelChange()"/> +
|
<a-input-number
|
||||||
<a-input-number size="small" v-model="newCalibrationFuncModel.paramB" @change="newCalibrationFuncModelChange()"/> *C +
|
size="small"
|
||||||
<a-input-number size="small" v-model="newCalibrationFuncModel.paramC" @change="newCalibrationFuncModelChange()"/> *C <sup>2</sup>
|
v-model="newCalibrationFuncModel.paramA"
|
||||||
|
@change="newCalibrationFuncModelChange()"
|
||||||
|
/>
|
||||||
|
+
|
||||||
|
<a-input-number
|
||||||
|
size="small"
|
||||||
|
v-model="newCalibrationFuncModel.paramB"
|
||||||
|
@change="newCalibrationFuncModelChange()"
|
||||||
|
/>
|
||||||
|
*C +
|
||||||
|
<a-input-number
|
||||||
|
size="small"
|
||||||
|
v-model="newCalibrationFuncModel.paramC"
|
||||||
|
@change="newCalibrationFuncModelChange()"
|
||||||
|
/>
|
||||||
|
*C <sup>2</sup>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<div class="func">
|
<div class="func">
|
||||||
|
@ -494,11 +509,11 @@ export default {
|
||||||
sampleId,
|
sampleId,
|
||||||
qcFileName,
|
qcFileName,
|
||||||
sampleFileName: inputFileName,
|
sampleFileName: inputFileName,
|
||||||
fittingBtn: this.isFirstFitting
|
fittingBtn: this.isFirstFitting,
|
||||||
})
|
})
|
||||||
|
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
const { CToE, EToC, gammaEnergy, gammaSpectrum, max, min, oldScatterSeries } = res.result
|
const { CToE, EToC, gammaEnergy, gammaSpectrum, max, min, oldScatterSeries, newCToE, newEToC } = res.result
|
||||||
|
|
||||||
this.c2e = CToE
|
this.c2e = CToE
|
||||||
this.e2c = EToC
|
this.e2c = EToC
|
||||||
|
@ -530,9 +545,27 @@ export default {
|
||||||
|
|
||||||
// 如果点击过reanalyze则渲染之前fitting的数据,如果没点Reanalyze,数据会在窗口关闭时删掉 20231101:xiao
|
// 如果点击过reanalyze则渲染之前fitting的数据,如果没点Reanalyze,数据会在窗口关闭时删掉 20231101:xiao
|
||||||
// todo 现在能谱数据没有缓存,刷新页面时也会获取到fitting的数据
|
// todo 现在能谱数据没有缓存,刷新页面时也会获取到fitting的数据
|
||||||
if(this.getCache("CALIBRATION_GAMMA_"+this.newSampleData.inputFileName)) {
|
if (this.getCache('CALIBRATION_GAMMA_' + this.newSampleData.inputFileName)) {
|
||||||
this.setFirringResult(this.getCache("CALIBRATION_GAMMA_"+this.newSampleData.inputFileName))
|
this.setFirringResult(this.getCache('CALIBRATION_GAMMA_' + this.newSampleData.inputFileName))
|
||||||
return false;
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对人工交互的返回数据单独处理
|
||||||
|
*/
|
||||||
|
if (this.sampleData.dbName == 'man') {
|
||||||
|
this.setFirringResult(res.result)
|
||||||
|
if (newCToE) {
|
||||||
|
const [paramA, paramB, paramC] = newCToE
|
||||||
|
this.newCalibrationFuncModel = {
|
||||||
|
paramA: Number(paramA).toPrecision(6),
|
||||||
|
paramB: Number(paramB).toPrecision(6),
|
||||||
|
paramC: Number(paramC).toPrecision(6),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (newEToC) {
|
||||||
|
this.newE2C = newEToC
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(res.message)
|
this.$message.error(res.message)
|
||||||
|
@ -588,7 +621,7 @@ export default {
|
||||||
})
|
})
|
||||||
|
|
||||||
// add之后 需要清空chart黄色的线 20231028:Xiao
|
// add之后 需要清空chart黄色的线 20231028:Xiao
|
||||||
if(this.figureChartOption.series[1].data) {
|
if (this.figureChartOption.series[1].data) {
|
||||||
this.figureChartOption.series[1].data = []
|
this.figureChartOption.series[1].data = []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -615,14 +648,14 @@ export default {
|
||||||
this.isInverse = true
|
this.isInverse = true
|
||||||
},
|
},
|
||||||
// 输入框发生变化
|
// 输入框发生变化
|
||||||
newCalibrationFuncModelChange(val,a) {
|
newCalibrationFuncModelChange(val, a) {
|
||||||
// 输入内容的时候 需要清空table数据 20231028:Xiao
|
// 输入内容的时候 需要清空table数据 20231028:Xiao
|
||||||
this.list = []
|
this.list = []
|
||||||
// 需要清空chart黄色的线 20231028:Xiao
|
// 需要清空chart黄色的线 20231028:Xiao
|
||||||
if(this.figureChartOption.series[1].data) {
|
if (this.figureChartOption.series[1].data) {
|
||||||
this.figureChartOption.series[1].data = []
|
this.figureChartOption.series[1].data = []
|
||||||
}
|
}
|
||||||
if(this.figureChartOption.series[1].markPoint.data) {
|
if (this.figureChartOption.series[1].markPoint.data) {
|
||||||
this.figureChartOption.series[1].markPoint.data = []
|
this.figureChartOption.series[1].markPoint.data = []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -655,13 +688,16 @@ export default {
|
||||||
|
|
||||||
// 点击Reset Button 重置
|
// 点击Reset Button 重置
|
||||||
async handleReset() {
|
async handleReset() {
|
||||||
this.$ls.remove("CALIBRATION_GAMMA_"+this.newSampleData.inputFileName) // 删除fitting之后缓存的数据 20231101:xiao
|
this.$ls.remove('CALIBRATION_GAMMA_' + this.newSampleData.inputFileName) // 删除fitting之后缓存的数据 20231101:xiao
|
||||||
this.newCalibrationFuncModel = cloneDeep(newCalibrationFuncModel)
|
this.newCalibrationFuncModel = cloneDeep(newCalibrationFuncModel)
|
||||||
this.list = []
|
this.list = []
|
||||||
this.newE2C = []
|
this.newE2C = []
|
||||||
|
|
||||||
// 按乔的要求增加请求reset的接口 20231211:xiao
|
// 按乔的要求增加请求reset的接口 20231211:xiao
|
||||||
const res = await postAction('/spectrumAnalysis/resetButton?tabName=gamma&sampleFileName='+ this.newSampleData.inputFileName, { })
|
const res = await postAction(
|
||||||
|
'/spectrumAnalysis/resetButton?tabName=gamma&sampleFileName=' + this.newSampleData.inputFileName,
|
||||||
|
{}
|
||||||
|
)
|
||||||
|
|
||||||
this.$emit('isFitting', false)
|
this.$emit('isFitting', false)
|
||||||
|
|
||||||
|
@ -680,32 +716,32 @@ export default {
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const { success, result, message } = await postAction('/spectrumAnalysis/fitting', {
|
const { success, result, message } = await postAction('/spectrumAnalysis/fitting', {
|
||||||
...this.list.length <= 0 ? this.newCalibrationFuncModel : [], // 如果list有数据则不传 C to E 表单数据 20231101:xiao
|
...(this.list.length <= 0 ? this.newCalibrationFuncModel : []), // 如果list有数据则不传 C to E 表单数据 20231101:xiao
|
||||||
sampleFileName: this.newSampleData.inputFileName,
|
sampleFileName: this.newSampleData.inputFileName,
|
||||||
tabName: "gamma",
|
tabName: 'gamma',
|
||||||
// 如果列表中有数据 以列表的数据优先进行分析 20231028:Xiao
|
// 如果列表中有数据 以列表的数据优先进行分析 20231028:Xiao
|
||||||
tempPoints: this.list.length > 0
|
tempPoints:
|
||||||
? this.list.map((item) => ({ x: item.channel, y: item.energy }))
|
this.list.length > 0
|
||||||
: this.oldScatterSeries,
|
? this.list.map((item) => ({ x: item.channel, y: item.energy }))
|
||||||
|
: this.oldScatterSeries,
|
||||||
// tempPoints: this.isFirstFitting
|
|
||||||
// ? this.oldScatterSeries
|
// tempPoints: this.isFirstFitting
|
||||||
// : this.list.map((item) => ({ x: item.channel, y: item.energy })),
|
// ? this.oldScatterSeries
|
||||||
|
// : this.list.map((item) => ({ x: item.channel, y: item.energy })),
|
||||||
count: this.isFirstFitting || !this.isInverse ? undefined : this.count,
|
count: this.isFirstFitting || !this.isInverse ? undefined : this.count,
|
||||||
fittingBtn : this.isFirstFitting
|
fittingBtn: this.isFirstFitting,
|
||||||
})
|
})
|
||||||
if (success) {
|
if (success) {
|
||||||
this.gammaIsFitting = true
|
this.gammaIsFitting = true
|
||||||
this.$emit('isFitting', true) // 点击reAnalyze按钮,将isFirstFitting改为true 20231101:xiao
|
this.$emit('isFitting', true) // 点击reAnalyze按钮,将isFirstFitting改为true 20231101:xiao
|
||||||
|
|
||||||
this.setCache("CALIBRATION_GAMMA_"+this.newSampleData.inputFileName, result) // 缓存数据,如果点击ReAnalyze需要回显数据 20231101:xiao
|
this.setCache('CALIBRATION_GAMMA_' + this.newSampleData.inputFileName, result) // 缓存数据,如果点击ReAnalyze需要回显数据 20231101:xiao
|
||||||
|
|
||||||
this.setFirringResult(result)
|
this.setFirringResult(result)
|
||||||
|
|
||||||
// 通知Beta页清空数据
|
// 通知Beta页清空数据
|
||||||
this.$bus.$emit('betaRefresh', {})
|
this.$bus.$emit('betaRefresh', {})
|
||||||
console.log("betaRefresh>>>");
|
console.log('betaRefresh>>>')
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(message)
|
this.$message.error(message)
|
||||||
}
|
}
|
||||||
|
@ -715,7 +751,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
// 封装 fitting后数据填充方法,如果点击ReAnalyze需要回显数据 20231101:xiao
|
// 封装 fitting后数据填充方法,如果点击ReAnalyze需要回显数据 20231101:xiao
|
||||||
setFirringResult(result){
|
setFirringResult(result) {
|
||||||
const { EToC, newLineSeries, newScatterSeriesData, tableWidgets, CToE } = result
|
const { EToC, newLineSeries, newScatterSeriesData, tableWidgets, CToE } = result
|
||||||
this.newE2C = EToC
|
this.newE2C = EToC
|
||||||
this.newLineSeries = newLineSeries
|
this.newLineSeries = newLineSeries
|
||||||
|
@ -797,15 +833,15 @@ export default {
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
},
|
},
|
||||||
getCache(name){
|
getCache(name) {
|
||||||
return this.$ls.get(name)
|
return this.$ls.get(name)
|
||||||
},
|
},
|
||||||
setCache(name, data){
|
setCache(name, data) {
|
||||||
this.$ls.set(name, data)
|
this.$ls.set(name, data)
|
||||||
},
|
},
|
||||||
removeCache(name){
|
removeCache(name) {
|
||||||
this.$ls.remove(name) // 删除fitting之后缓存的数据 20231101:xiao
|
this.$ls.remove(name) // 删除fitting之后缓存的数据 20231101:xiao
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
<!-- 底部操作栏 -->
|
<!-- 底部操作栏 -->
|
||||||
<template slot="custom-footer">
|
<template slot="custom-footer">
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-radio-group v-model="queryParam.dbName">
|
<a-radio-group v-model="queryParam.dbName" @change="handleSourceChange">
|
||||||
<a-radio value="auto">From Auto DB</a-radio>
|
<a-radio value="auto">From Auto DB</a-radio>
|
||||||
<a-radio value="man">From Interactive DB</a-radio>
|
<a-radio value="man">From Interactive DB</a-radio>
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
|
@ -162,7 +162,6 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadData(arg) {
|
loadData(arg) {
|
||||||
debugger
|
|
||||||
//加载数据 若传入参数1则加载第一页的内容
|
//加载数据 若传入参数1则加载第一页的内容
|
||||||
if (arg === 1) {
|
if (arg === 1) {
|
||||||
this.ipagination.current = 1
|
this.ipagination.current = 1
|
||||||
|
@ -220,6 +219,12 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 来源改变
|
||||||
|
handleSourceChange() {
|
||||||
|
console.log('%c [ ]-226', 'font-size:13px; background:pink; color:#bf2c9f;', this.queryParam.dbName)
|
||||||
|
this.searchQuery()
|
||||||
|
},
|
||||||
|
|
||||||
show() {
|
show() {
|
||||||
this.visible = true
|
this.visible = true
|
||||||
},
|
},
|
||||||
|
|
|
@ -1424,11 +1424,13 @@ export default {
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
type: 'a-menu-item',
|
type: 'a-menu-item',
|
||||||
|
show: this.isGamma,
|
||||||
title: 'Nuclide Library',
|
title: 'Nuclide Library',
|
||||||
handler: () => (this.nuclideLibraryModalVisible = true),
|
handler: () => (this.nuclideLibraryModalVisible = true),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'a-menu-item',
|
type: 'a-menu-item',
|
||||||
|
show: this.isGamma,
|
||||||
title: 'Config User Library',
|
title: 'Config User Library',
|
||||||
handler: () => (this.configUserLibModalVisible = true),
|
handler: () => (this.configUserLibModalVisible = true),
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user