Browse Source

处理项目详情页面科研预算模块页面二次调用接口的问题

ljb 10 months ago
parent
commit
a297fed38c

+ 6 - 2
src/views/project-manage/components/design-cost.vue

@@ -92,6 +92,12 @@ export default window.$crudCommon({
       printTitle: "",
     };
   },
+  watch: {
+    "params.xmId"() {
+      this.page.currentPage = 1;
+      this.getList(this.page);
+    },
+  },
   created() {
     this.params.xmId = this.projectId;
     this.option.height = window.innerHeight - 340;
@@ -116,8 +122,6 @@ export default window.$crudCommon({
     },
     handleProjectChange(data) {
       this.selProject = data;
-      this.page.currentPage = 1;
-      this.getList(this.page);
     },
     handleImport() {
       this.$refs.uploadExcelDialog.open('/api/kd-scientific/ys-sjfy/import');

+ 6 - 2
src/views/project-manage/components/other-cost.vue

@@ -94,6 +94,12 @@ export default window.$crudCommon({
       printTitle: "",
     };
   },
+  watch: {
+    "params.xmId"() {
+      this.page.currentPage = 1;
+      this.getList(this.page);
+    },
+  },
   created() {
     this.params.xmId = this.projectId;
     this.option.height = window.innerHeight - 340;
@@ -119,8 +125,6 @@ export default window.$crudCommon({
     },
     handleProjectChange(data) {
       this.selProject = data;
-      this.page.currentPage = 1;
-      this.getList(this.page);
     },
     uploadAfter() {
       this.page.currentPage = 1;

+ 6 - 2
src/views/project-manage/components/outsourcing-cost.vue

@@ -94,6 +94,12 @@ export default window.$crudCommon({
       printTitle: "",
     };
   },
+  watch: {
+    "params.xmId"() {
+      this.page.currentPage = 1;
+      this.getList(this.page);
+    },
+  },
   created() {
     this.params.xmId = this.projectId;
     this.option.height = window.innerHeight - 340;
@@ -118,8 +124,6 @@ export default window.$crudCommon({
     },
     handleProjectChange(data) {
       this.selProject = data;
-      this.page.currentPage = 1;
-      this.getList(this.page);
     },
     handleImport() {
       this.$refs.uploadExcelDialog.open('/api/kd-scientific/ys-wtwbyjkffy/import');

+ 6 - 2
src/views/project-manage/components/person-cost.vue

@@ -104,6 +104,12 @@ export default window.$crudCommon({
     this.params.xmId = this.projectId;
     this.option.height = window.innerHeight - 340;
   },
+  watch: {
+    "params.xmId"() {
+      this.page.currentPage = 1;
+      this.getList(this.page);
+    }
+  },
   methods: {
     handleBeforeOpen(done, type) {
       if (!this.params.xmId) {
@@ -131,8 +137,6 @@ export default window.$crudCommon({
     },
     handleProjectChange(data) {
       this.selProject = data;
-      this.page.currentPage = 1;
-      this.getList(this.page);
     },
     handleImport() {
       let excelParams = { yearAndMonth: this.params.yearAndMonth };

+ 6 - 2
src/views/project-manage/components/wxzctx-cost.vue

@@ -118,6 +118,12 @@ export default window.$crudCommon({
     });
     this.option = { ...newOption };
   },
+  watch: {
+    "params.xmId"() {
+      this.page.currentPage = 1;
+      this.getList(this.page);
+    },
+  },
   methods: {
     validCustom() {
       const { sysm, ysysm } = this.currZcObj;
@@ -177,8 +183,6 @@ export default window.$crudCommon({
     },
     handleProjectChange(data) {
       this.selProject = data;
-      this.page.currentPage = 1;
-      this.getList(this.page);
     },
     handleImport() {
       this.$refs.uploadExcelDialog.open('/api/kd-scientific/ys-wxzctxfy/import');

+ 6 - 2
src/views/project-manage/components/zb-cost.vue

@@ -94,6 +94,12 @@ export default window.$crudCommon({
       printTitle: "",
     };
   },
+  watch: {
+    "params.xmId"() {
+      this.page.currentPage = 1;
+      this.getList(this.page);
+    },
+  },
   created() {
     this.params.xmId = this.projectId;
     this.option.height = window.innerHeight - 340;
@@ -118,8 +124,6 @@ export default window.$crudCommon({
     },
     handleProjectChange(data) {
       this.selProject = data;
-      this.page.currentPage = 1;
-      this.getList(this.page);
     },
     handleImport() {
       this.$refs.uploadExcelDialog.open('/api/kd-scientific/ys-zbtsysyfy/import');

+ 6 - 2
src/views/project-manage/components/zjfyycqdtfy-cost.vue

@@ -101,6 +101,12 @@ export default window.$crudCommon({
       currZcObj: {},
     };
   },
+  watch: {
+    "params.xmId"() {
+      this.page.currentPage = 1;
+      this.getList(this.page);
+    },
+  },
   created() {
     this.params.xmId = this.projectId;
     this.option.height = window.innerHeight - 340;
@@ -177,8 +183,6 @@ export default window.$crudCommon({
     },
     handleProjectChange(data) {
       this.selProject = data;
-      this.page.currentPage = 1;
-      this.getList(this.page);
     },
     handleImport() {
       this.$refs.uploadExcelDialog.open('/api/kd-scientific/ys-zjfyycqdtfy/import');

+ 6 - 2
src/views/project-manage/components/zztl-cost.vue

@@ -93,6 +93,12 @@ export default window.$crudCommon({
       printTitle: "",
     };
   },
+  watch: {
+    "params.xmId"() {
+      this.page.currentPage = 1;
+      this.getList(this.page);
+    },
+  },
   created() {
     this.params.xmId = this.projectId;
     this.option.height = window.innerHeight - 340;
@@ -117,8 +123,6 @@ export default window.$crudCommon({
     },
     handleProjectChange(data) {
       this.selProject = data;
-      this.page.currentPage = 1;
-      this.getList(this.page);
     },
     handleImport() {
       let excelParams = { yearAndMonth: this.params.yearAndMonth };