Browse Source

生产数据导出-增加OA跳转

shaojinzhi 2 years ago
parent
commit
145062fab3

+ 22 - 10
src/pages/main/productionDataExport/cityHome.vue

@@ -446,12 +446,24 @@
             };
         },
         created() {
-            //oa跳转回来显示
-            this.getQueryList();
-            this.getMeDone();
-            this.getMeLaunch();
 
-            this.lable = this.todoBase;
+            let status = JSON.stringify(this.$route.query) == "{}";
+            if (status) {
+                //oa跳转回来显示
+                this.getQueryList();
+                this.getMeDone();
+                this.getMeLaunch();
+                this.lable = this.todoBase;
+
+            } else {
+                let { id, type } = this.$route.query;
+                let list = {
+                    taskId: id,
+                    tableName: this.tableName
+                };
+                this.getQueryList(0, list,0);//代办
+            }
+
         },
         methods: {
             //添加面包屑
@@ -1108,11 +1120,11 @@
             },
             //点击查阅接口
             //获取我的代办列表List
-            getQueryList(e, status) {
-                let list = {
-                    tableName: this.tableName,
-                };
-                getTodoBase(this.totalPage, "", list).then((res) => {
+            getQueryList(e, currentList, status) {
+                getTodoBase(this.totalPage, "", currentList || {tableName: this.tableName}).then((res) => {
+                    if (status === 0) {
+                        this.clickDemand("文件标题", res.data.data[0]);
+                    }
                     this.tabList[0].number = res.data.totalRecord;
                     if (e !== "1") {
                         this.todoBase.data = res.data.data;

+ 22 - 10
src/pages/main/productionDataExport/provinceHome.vue

@@ -448,12 +448,24 @@
             };
         },
         created() {
-            //oa跳转回来显示
-            this.getQueryList();
-            this.getMeDone();
-            this.getMeLaunch();
 
-            this.lable = this.todoBase;
+            let status = JSON.stringify(this.$route.query) == "{}";
+            if (status) {
+                //oa跳转回来显示
+                this.getQueryList();
+                this.getMeDone();
+                this.getMeLaunch();
+                this.lable = this.todoBase;
+
+            } else {
+                let { id, type } = this.$route.query;
+                let list = {
+                    taskId: id,
+                    tableName: this.tableName
+                };
+                this.getQueryList(0, list,0);//代办
+            }
+
         },
         methods: {
             //添加面包屑
@@ -1114,11 +1126,11 @@
             },
             //点击查阅接口
             //获取我的代办列表List
-            getQueryList(e, status) {
-                let list = {
-                    tableName: this.tableName,
-                };
-                getTodoBase(this.totalPage, "", list).then((res) => {
+            getQueryList(e, currentList, status) {
+                getTodoBase(this.totalPage, "", currentList || {tableName: this.tableName}).then((res) => {
+                    if (status === 0) {
+                        this.clickDemand("文件标题", res.data.data[0]);
+                    }
                     this.tabList[0].number = res.data.totalRecord;
                     if (e !== "1") {
                         this.todoBase.data = res.data.data;