|
|
@@ -148,6 +148,7 @@
|
|
|
<script>
|
|
|
import NumberRange from '@/views/component/xcomponent/numberRange.vue'
|
|
|
import FacilityDataDialog from './facilityDataDialog.vue'
|
|
|
+import { getSetting } from '@/utils/query'
|
|
|
export default {
|
|
|
components: {
|
|
|
NumberRange,
|
|
|
@@ -174,6 +175,7 @@ export default {
|
|
|
isFirst: true,
|
|
|
forms: [],
|
|
|
multipleSelection: [],
|
|
|
+ baoliuxiaoshu:true,
|
|
|
config: 1
|
|
|
}
|
|
|
},
|
|
|
@@ -208,6 +210,8 @@ export default {
|
|
|
},
|
|
|
async mounted() {
|
|
|
const { setting = {} } = this.$store.getters
|
|
|
+ const { baoliuxiaoshu = true } = (await getSetting('facilityEnv')) || {}
|
|
|
+ this.baoliuxiaoshu = baoliuxiaoshu
|
|
|
if (
|
|
|
this.$utils.isNotEmpty(setting.facilityEnv) &&
|
|
|
this.$utils.isNotEmpty(setting.facilityEnv.precision)
|
|
|
@@ -372,11 +376,15 @@ export default {
|
|
|
culXiuZheng() {
|
|
|
if (!this.isCul) return
|
|
|
if (this.readonly) return
|
|
|
+ const self = this
|
|
|
this.forms.forEach((item) => {
|
|
|
if (item.value) {
|
|
|
if (item.fixValue) {
|
|
|
item.result = (+item.fixValue + +item.value).toFixed(this.config)
|
|
|
- } else {
|
|
|
+ } else if(!self.baoliuxiaoshu && self.formData.leiXing === '纯水机') { //绍兴环境,纯水机不需要保留小数
|
|
|
+ item.result = item.value
|
|
|
+ }
|
|
|
+ else {
|
|
|
item.result = (+item.value).toFixed(this.config)
|
|
|
}
|
|
|
item.status = this.getStatus(item.range, item.result)
|