|
@@ -91,6 +91,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
|
|
|
+import { getSetting } from '@/utils/query'
|
|
|
import NumberRange from '@/views/component/xcomponent/numberRange.vue'
|
|
import NumberRange from '@/views/component/xcomponent/numberRange.vue'
|
|
|
import FacilityDataDialog from './facilityDataDialog.vue'
|
|
import FacilityDataDialog from './facilityDataDialog.vue'
|
|
|
export default {
|
|
export default {
|
|
@@ -117,7 +118,8 @@ export default {
|
|
|
dialogShow: false,
|
|
dialogShow: false,
|
|
|
isFirst: true,
|
|
isFirst: true,
|
|
|
forms: [],
|
|
forms: [],
|
|
|
- multipleSelection: []
|
|
|
|
|
|
|
+ multipleSelection: [],
|
|
|
|
|
+ config: 1
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -150,8 +152,13 @@ export default {
|
|
|
deep: true
|
|
deep: true
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- mounted () {
|
|
|
|
|
|
|
+ async mounted () {
|
|
|
// console.log('mounted', this.formData)
|
|
// console.log('mounted', this.formData)
|
|
|
|
|
+ const config = await getSetting('facilityEnv', 'precision')
|
|
|
|
|
+ if (config) {
|
|
|
|
|
+ console.debug(config)
|
|
|
|
|
+ this.config = config
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
// 弹窗的提交事件
|
|
// 弹窗的提交事件
|
|
@@ -302,9 +309,9 @@ export default {
|
|
|
this.forms.forEach(item => {
|
|
this.forms.forEach(item => {
|
|
|
if (item.value) {
|
|
if (item.value) {
|
|
|
if (item.fixValue) {
|
|
if (item.fixValue) {
|
|
|
- item.result = (+item.fixValue + +item.value).toFixed(2)
|
|
|
|
|
|
|
+ item.result = (+item.fixValue + +item.value).toFixed(this.config)
|
|
|
} else {
|
|
} else {
|
|
|
- item.result = (+item.value).toFixed(2)
|
|
|
|
|
|
|
+ item.result = (+item.value).toFixed(this.config)
|
|
|
}
|
|
}
|
|
|
item.status = this.getStatus(item.range, item.result)
|
|
item.status = this.getStatus(item.range, item.result)
|
|
|
} else {
|
|
} else {
|