From 6c76e7bdba80eb1317a08af2a5930b13e5f9ea34 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 26 二月 2025 11:03:13 +0800
Subject: [PATCH] 质量监控计划联调
---
src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/power-supply-stability.vue | 47 +++++++++++++++++++++++++++++++----------------
1 files changed, 31 insertions(+), 16 deletions(-)
diff --git a/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/power-supply-stability.vue b/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/power-supply-stability.vue
index 0cd9c6d..b17f95d 100644
--- a/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/power-supply-stability.vue
+++ b/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/power-supply-stability.vue
@@ -191,11 +191,20 @@
</template>
<script>
+import {
+ getLaboratoryFacilityPowerStablePage,
+ deviceScopeSearch,
+ treeDevice,
+ selectUserCondition,
+ addLaboratoryFacilityPowerStable,
+ deleteFeMeasuredQuantity
+} from '@/api/cnas/resourceDemand/facilitiesEnvironment/facilitiesAndEnvironment'
+
export default {
data() {
return {
search: {
- size: 20,
+ size: 10,
current: 1,
total: 0
},
@@ -235,11 +244,14 @@
methods: {
// 鍒濆鍖栬皟鐢�
initData() {
- this.$axios.get(this.$api.facilitiesAndEnvironment.getLaboratoryFacilityPowerStablePage + '?size=' + this.search.size + '¤t=' + this.search.current).then(res => {
- if (res.code === 201) return;
- this.tableData = res.data.records;
- this.search.total = res.data.total;
- });
+ getLaboratoryFacilityPowerStablePage({
+ ...this.search
+ }).then(res => {
+ if (res.code === 200){
+ this.tableData = res.data.records;
+ this.search.total = res.data.total;
+ }
+ })
},
handleSizeChange(val) {
this.search.size = val;
@@ -269,7 +281,7 @@
// 鑾峰彇鎵�鏈夎澶�
getEquipOptions() {
this.equipOptions = []
- this.$axios.get(this.$api.deviceScope.deviceScopeSearch+'?status=0').then(res => {
+ deviceScopeSearch({status:'0'}).then(res => {
if (res.code === 200 && res.data) {
this.equipOptions = res.data
}
@@ -279,9 +291,9 @@
},
// 鐢垫簮绋冲畾鎬�-鎵撳紑寮规璋冪敤璁惧鎺ュ彛锛屾煡璇娇鐢ㄧ殑璁惧
openDialog() {
- this.$axios.get(this.$api.deviceScope.treeDevice).then(res => {
+ treeDevice().then(res => {
this.cascaderList = res.data;
- });
+ })
this.$nextTick(() => {
this.$refs['form'].clearValidate()
})
@@ -324,11 +336,7 @@
this.submitLoading = true
this.$refs.form.validate((valid) => {
if (valid) {
- this.$axios.post(this.$api.facilitiesAndEnvironment.addLaboratoryFacilityPowerStable, this.form, {
- headers: {
- 'Content-Type': 'application/json'
- }
- }).then(res => {
+ addLaboratoryFacilityPowerStable(this.form).then(res => {
this.submitLoading = false
if (res.code === 200) {
this.initData()
@@ -383,9 +391,16 @@
},
// 鑾峰彇璐熻矗浜轰俊鎭帴鍙�
getUserList() {
- this.$axios.get(this.$api.deviceScope.selectUserList).then(res => {
+ selectUserCondition().then(res => {
if (res.code == 200) {
- this.responsibleOptions = res.data
+ let data = []
+ res.data.forEach(a => {
+ data.push({
+ id: a.id,
+ name: a.name
+ })
+ })
+ this.responsibleOptions = data
}
})
},
--
Gitblit v1.9.3