diff --git a/src/views/reportData/equipmentStatus/index.vue b/src/views/reportData/equipmentStatus/index.vue index 8245860..5cb96fb 100644 --- a/src/views/reportData/equipmentStatus/index.vue +++ b/src/views/reportData/equipmentStatus/index.vue @@ -339,6 +339,7 @@ export default { // ipDialog, // photoDialog, }, + props: ["statusFlag"], data() { return { roleName: "", @@ -381,12 +382,19 @@ export default { this.roleName = localStorage.getItem("userName"); }, mounted() { - this.getSearchdy(); - this.getProtocol(); - this.getactiveList(); + // if (this.statusFlag) { + // this.getSearchdy(); + // this.getProtocol(); + // this.getactiveList(); + // } }, watch: {}, methods: { + initfn() { + this.getSearchdy(); + this.getProtocol(); + this.getactiveList(); + }, //获取电压信息 getSearchdy() { getSearchInfo({ type: 1 }) diff --git a/src/views/reportData/index.vue b/src/views/reportData/index.vue index 9cfa637..85e79e3 100644 --- a/src/views/reportData/index.vue +++ b/src/views/reportData/index.vue @@ -24,7 +24,10 @@ icon="el-icon-search" > - @@ -66,7 +69,8 @@ export default { this.statusFlag = true; // 调用设备状态列表组件的方法 if (this.$refs.equipmentStatusRef) { - this.$refs.equipmentStatusRef.onSubmit(); // 假设someOtherMethod是你要调用的方法 + this.$refs.equipmentStatusRef.initfn(); // 假设someOtherMethod是你要调用的方法 + //this.$refs.equipmentStatusRef.onSubmit(); // 假设someOtherMethod是你要调用的方法 } } // 可以继续添加其他标签页的逻辑 diff --git a/vue.config.js b/vue.config.js index eeadbb2..71e4f42 100644 --- a/vue.config.js +++ b/vue.config.js @@ -23,8 +23,8 @@ module.exports = defineConfig({ //表示拦截以/api开头的请求路径 //target: "http://192.168.1.190:8080", //190 需要去掉/Api - //target: "http://61.169.135.146:9911/", //运维 覆冰 - target: "http://61.169.135.146:40080/", //dell + target: "http://61.169.135.146:9911/", //运维 覆冰 + // target: "http://61.169.135.146:40080/", //dell //target: "http://192.168.50.198:8093", //java本机 changOrigin: true, //是否开启跨域 pathRewrite: {