wankeda
2025-04-07 4da42c12efde190b208f18b7dd51d3e89986837d
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/views/Index.vue
@@ -30,6 +30,7 @@
            </a>
          </div> -->
        </div>
        <!-- <el-button @click="end">1231321</el-button> -->
        <div class="header-info">
          <div class="h-link">
            <a href="javascript:void(0)" @click="to(item)" v-for="(item, index) in links.filter((c) => {
@@ -135,6 +136,7 @@
import { useRouter, useRoute } from "vue-router";
import store from "../store/index";
import http from "@/../src/api/http.js";
import { ElNotification } from 'element-plus'
export default defineComponent({
  components: {
    VolMenu,
@@ -156,7 +158,16 @@
  setup(props, context) {
    // èŽ·å–å…¨å±€å±žæ€§å’Œæ–¹æ³•
    const { proxy } = getCurrentInstance();
    const MsgAction=()=>{
      ElNotification({
          title: ' æ— äººå‰è½¦å¼‚常',
          message: closeNotice,
          position: 'bottom-right',
          type:'error',
          duration: 0
        })
    };
    const closeNotice =true;
    // èœå•导航默认宽度
    const menuWidth = ref(200);
    const contextMenuVisible = ref(false);
@@ -480,7 +491,9 @@
        }
      }
    );
    // const end=()=>{
    //   MsgAction();
    // }
    /**
     * ç³»ç»Ÿåˆ›å»ºå¼€å§‹
     */
@@ -575,6 +588,8 @@
      closeTabsMenu,
      closeTabs,
      currentMenuId,
      MsgAction,
      // end
    };
  },
  /**
@@ -587,11 +602,52 @@
    $interval = setInterval(function () {
      $indexDate.innerText = showTime();
    }, 1000);
      // this.$nextTick(x=>{
          // this.getConfigList();
      // });
      //  setInterval(() => {
       this.getConfigList();
    // }, 5000);
    this.bindRightClickMenu(true);
  },
  methods: {
       getConfigList(){
          http.post("/api/Task/GetConfig").then(x=>{
             console.log(x.status);
             if(x.status==true){
             // this.MsgAction();
                 const message = x.data; // å‡è®¾æŽ¥å£è¿”回的数据是你需要的通知消息
    ElNotification({
           title: ' æ— äººå‰è½¦å¼‚常',
          message: message,
          // position: 'bottom-right',
          type:'error',
          duration: 0
    });
             }
              // if(x.status){
              //     this.configs=[];
              //     x.data.forEach(item => {
              //       for (let index = 0; index < item.layout.length; index++) {
              //           item.layout[index].status=JSON.parse(item.layout[index].status);
              //       }
              //       this.configs.push(item);
              //     });
              // }
              // if(this.isGetConfig){
              //   this.isGetConfig=false;
              //   this.timer=setInterval(()=>{
              //     this.$nextTick(x=>{
              //       this.getConfigList();
              //     });
              //   },3000)
              // }
          }).catch(error=>{
              console.log("出错"+error);
          });
      },
    /**
     * ç»‘定右键事件
     * @param {*} enable æ˜¯å¦å¯ç”¨å³é”®äº‹ä»¶[true:启用;false:禁用;]