Kaynağa Gözat

修改事项库弹窗逻辑

wdq 1 yıl önce
ebeveyn
işleme
c283b39ec4
1 değiştirilmiş dosya ile 56 ekleme ve 33 silme
  1. 56 33
      src/components/Tool.vue

+ 56 - 33
src/components/Tool.vue

@@ -252,8 +252,9 @@
 </template>
 
 <script>
-import { get } from "../utils/request.js";
-import api from "@/api/content";
+import { get,postform } from "../utils/request.js";
+// import api from "@/api/content";
+// import { postform } from "../utils/request.js";
 
 export default {
   data() {
@@ -267,7 +268,7 @@ export default {
       planeShow: false,
       showEventState: false, // 事项库弹窗显示状态
       eventData: {
-        // url: systemConfig.eventUrl,
+        url: systemConfig.eventUrl,
         data: [],
         params: {
           tableName: "ywtb_auditfwzn",
@@ -418,21 +419,39 @@ export default {
       if (params_.page > 0) {
         params_.page -= 1;
       }
-      api.getEventStore(params_).then(
-        (res) => {
-          if (!this.showEventState) {
-            this.showEventState = true;
-          }
-          if (res.code == 200) {
-            this.eventData.data = res.content;
-          } else {
-            this.eventData.message = res.message;
-          }
-        },
-        function (err) {
-          console.log(err);
+      postform(this.eventData.url, params_).then((res) => {
+        if (!this.showEventState) {
+          this.showEventState = true;
         }
-      );
+        if (res.code == 200) {
+          this.eventData.data = [];
+          res.content.forEach((item) => {
+            if (
+              (item.link_ck || item.jsfs_ck) &&
+              (item.link_ws || item.jsfs_ws)
+            ) {
+              this.eventData.data.push(item);
+            }
+          });
+        } else {
+          this.eventData.message = res.message;
+        }
+      });
+      // api.getEventStore(params_).then(
+      //   (res) => {
+      //     if (!this.showEventState) {
+      //       this.showEventState = true;
+      //     }
+      //     if (res.code == 200) {
+      //       this.eventData.data = res.content;
+      //     } else {
+      //       this.eventData.message = res.message;
+      //     }
+      //   },
+      //   function (err) {
+      //     console.log(err);
+      //   }
+      // );
     },
     hideEventListDailog() {
       this.showEventState = false;
@@ -771,22 +790,27 @@ export default {
         tableName: "ywtb_auditfwzn",
         where: "item_code = '" + item.executeNumber + "'",
       };
-      api.getEventStoreJumpUrl(params).then(
-        (res) => {
-          if (res.code == 200) {
-            // window.open(res.content[0].login_url); // 在safari中失效
-            that.setCLJ(res.content[0].login_url);
-          }
-        },
-        function (error) {
-          console.log(error);
-
-          that.tipsShow = true;
-          setTimeout(() => {
-            that.tipsShow = false;
-          }, 1500);
+      postform(this.eventData.url, params).then((res) => {
+        if (res.code == 200) {
+          // window.open(res.content[0].login_url); // 在safari中失效
+          that.setCLJ(res.content[0].login_url);
         }
-      );
+      });
+      // api.getEventStoreJumpUrl(params).then(
+      //   (res) => {
+      //     if (res.code == 200) {
+      //       // window.open(res.content[0].login_url); // 在safari中失效
+      //       that.setCLJ(res.content[0].login_url);
+      //     }
+      //   },
+      //   function (error) {
+      //     console.log(error);
+      //     that.tipsShow = true;
+      //     setTimeout(() => {
+      //       that.tipsShow = false;
+      //     }, 1500);
+      //   }
+      // );
     },
 
     // 页面跳转(为了结局在safari浏览器中无法跳转的问题)
@@ -1218,7 +1242,6 @@ export default {
             100% 100% no-repeat;
         }
 
-
         .list_container {
           width: 100%;
           height: calc(100% - 61px);