|
@@ -952,10 +952,14 @@ export default {
|
|
// 参数封装
|
|
// 参数封装
|
|
let params = JSON.parse(JSON.stringify(this.groupBasicForm))
|
|
let params = JSON.parse(JSON.stringify(this.groupBasicForm))
|
|
params.readMode = this.groupRateForm.readMode
|
|
params.readMode = this.groupRateForm.readMode
|
|
- if (this.groupRateForm.modeValueUnit === '2') { // 分
|
|
|
|
- params.modeValue = parseInt(this.groupRateForm.modeValue) * 60
|
|
|
|
- } else if (this.groupRateForm.modeValueUnit === '3') { // 时
|
|
|
|
- params.modeValue = parseInt(this.groupRateForm.modeValue) * 60 * 60
|
|
|
|
|
|
+ if (params.readMode == 0) {
|
|
|
|
+ if (this.groupRateForm.modeValueUnit === '2') { // 分
|
|
|
|
+ params.modeValue = parseInt(this.groupRateForm.modeValue) * 60
|
|
|
|
+ } else if (this.groupRateForm.modeValueUnit === '3') { // 时
|
|
|
|
+ params.modeValue = parseInt(this.groupRateForm.modeValue) * 60 * 60
|
|
|
|
+ } else {
|
|
|
|
+ params.modeValue = this.groupRateForm.modeValue
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
params.modeValue = this.groupRateForm.modeValue
|
|
params.modeValue = this.groupRateForm.modeValue
|
|
}
|
|
}
|
|
@@ -1061,14 +1065,18 @@ export default {
|
|
this.chooseItemDataView = true
|
|
this.chooseItemDataView = true
|
|
this.groupDialogTitle = '修改数据组'
|
|
this.groupDialogTitle = '修改数据组'
|
|
this.groupRateForm.readMode = item.readMode + ''
|
|
this.groupRateForm.readMode = item.readMode + ''
|
|
- if (parseInt(item.modeValue) % 3600 == 0) { // 时
|
|
|
|
- this.groupRateForm.modeValueUnit = '3'
|
|
|
|
- this.groupRateForm.modeValue = item.modeValue / 3600
|
|
|
|
- } else if (parseInt(item.modeValue) % 60 == 0) { // 分
|
|
|
|
- this.groupRateForm.modeValueUnit = '2'
|
|
|
|
- this.groupRateForm.modeValue = item.modeValue / 60
|
|
|
|
- } else { // 秒
|
|
|
|
- this.groupRateForm.modeValueUnit = '1'
|
|
|
|
|
|
+ if (item.readMode == 0) {
|
|
|
|
+ if (parseInt(item.modeValue) % 3600 == 0) { // 时
|
|
|
|
+ this.groupRateForm.modeValueUnit = '3'
|
|
|
|
+ this.groupRateForm.modeValue = item.modeValue / 3600
|
|
|
|
+ } else if (parseInt(item.modeValue) % 60 == 0) { // 分
|
|
|
|
+ this.groupRateForm.modeValueUnit = '2'
|
|
|
|
+ this.groupRateForm.modeValue = item.modeValue / 60
|
|
|
|
+ } else { // 秒
|
|
|
|
+ this.groupRateForm.modeValueUnit = '1'
|
|
|
|
+ this.groupRateForm.modeValue = item.modeValue
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
this.groupRateForm.modeValue = item.modeValue
|
|
this.groupRateForm.modeValue = item.modeValue
|
|
}
|
|
}
|
|
this.groupRateForm.valueMode = item.valueCondition + ''
|
|
this.groupRateForm.valueMode = item.valueCondition + ''
|
|
@@ -1423,6 +1431,15 @@ export default {
|
|
})
|
|
})
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
|
|
+ } else {
|
|
|
|
+ let regNum = /^(\-)?\d+(\.\d{1,2})?$/
|
|
|
|
+ if (!regNum.test(this.groupRateForm.modeValue)) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '频率设置中阈值不合法!',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ })
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
}
|
|
}
|
|
// if (parseFloat(this.groupRateForm.modeValue) <= 0) {
|
|
// if (parseFloat(this.groupRateForm.modeValue) <= 0) {
|
|
// this.$message({
|
|
// this.$message({
|