Bläddra i källkod

删除 debugger

huangbin 4 år sedan
förälder
incheckning
d168bfacc8

+ 142 - 140
src/App.vue

@@ -1,163 +1,165 @@
 <template>
-    <div class="app-container" @contextmenu.prevent>
-        <a-spin :tip="tip" :spinning="spinning" size="large">
-            <router-view />
-        </a-spin>
-    </div>
+  <div class="app-container"
+       @contextmenu.prevent>
+    <a-spin :tip="tip"
+            :spinning="spinning"
+            size="large">
+      <router-view />
+    </a-spin>
+  </div>
 </template>
 
 <script lang="ts">
-    import { defineComponent, ref, watchEffect, provide } from 'vue';
-    import { globalDataRefresh } from '@/services/bus/index';
-    import { notice } from '@/services/bus/system';
-    import eventBus from '@/utils/eventBus/index';
-    import TimerUtils from '@/utils/timer/timerUtil';
-    import Router from '@/router';
-    import APP from '@/services';
-    import { Modal } from 'ant-design-vue';
-    import { setLoadComplete } from '@/common/methods';
-    import { isLogin, logout } from '@/services/bus/login';
-    let lastTime = new Date().getTime();
+import { defineComponent, ref, watchEffect, provide } from 'vue';
+import { globalDataRefresh } from '@/services/bus/index';
+import { notice } from '@/services/bus/system';
+import eventBus from '@/utils/eventBus/index';
+import TimerUtils from '@/utils/timer/timerUtil';
+import Router from '@/router';
+import APP from '@/services';
+import { Modal } from 'ant-design-vue';
+import { setLoadComplete } from '@/common/methods';
+import { isLogin, logout } from '@/services/bus/login';
+let lastTime = new Date().getTime();
 
-    function logoutAction() {
-        logout();
-        APP.closeServer();
-        Router.replace('/login');
-    }
+function logoutAction() {
+    logout();
+    APP.closeServer();
+    Router.replace('/login');
+}
 
-    // 设置太久没有操作界面,自动退出界面功能
-    function setOvertime() {
-        window.addEventListener('mousemove', () => {
-            lastTime = new Date().getTime(); //更新当前时间
-        });
-        const mimut = 30;
-        const timeOut = mimut * 60 * 1000; //设置超时时间: 5分钟
-        TimerUtils.setInterval(
-            () => {
-                const currentTime = new Date().getTime();
-                if (currentTime - lastTime > timeOut) {
-                    //判断是否超时
-                    if (isLogin()) {
-                        Modal.info({
-                            title: '系统提示:',
-                            content: `您已超过${mimut}分钟没有进行任何操作,已自动退出登录!`,
-                            okType: 'primary',
-                            okText: '确定',
-                            keyboard: false,
-                        });
-                        logoutAction();
-                    }
+// 设置太久没有操作界面,自动退出界面功能
+function setOvertime() {
+    window.addEventListener('mousemove', () => {
+        lastTime = new Date().getTime(); //更新当前时间
+    });
+    const mimut = 30;
+    const timeOut = mimut * 60 * 1000; //设置超时时间: 5分钟
+    TimerUtils.setInterval(
+        () => {
+            const currentTime = new Date().getTime();
+            if (currentTime - lastTime > timeOut) {
+                //判断是否超时
+                if (isLogin()) {
+                    Modal.info({
+                        title: '系统提示:',
+                        content: `您已超过${mimut}分钟没有进行任何操作,已自动退出登录!`,
+                        okType: 'primary',
+                        okText: '确定',
+                        keyboard: false,
+                    });
+                    logoutAction();
                 }
-            },
-            timeOut,
-            'overtimeInterval'
-        );
-    }
-
-    export default defineComponent({
-        name: 'app',
-        components: {},
-        setup() {
-            let spinning = ref<boolean>(false);
-            const tip = ref<string>('');
+            }
+        },
+        timeOut,
+        'overtimeInterval'
+    );
+}
 
-            // 登出状态展示
-            eventBus.$onOnly('logout', () => {
-                // debugger;
-                tip.value = '跳转中...';
-                spinning.value = true;
-                TimerUtils.setTimeout(
-                    () => {
-                        spinning.value = false;
-                        logoutAction();
-                    },
-                    1000,
-                    'logoutTimer'
-                );
-            });
-            // 登录成功
-            // eventBus.$onOnly('loginSuccess', setOvertime);
-            // 监听路由的变化
-            watchEffect(() => Router.currentRoute && provide('current-route', Router.currentRoute));
+export default defineComponent({
+    name: 'app',
+    components: {},
+    setup() {
+        let spinning = ref<boolean>(false);
+        const tip = ref<string>('');
 
-            // 监听刷新事件
-            window.addEventListener(
-                'load',
+        // 登出状态展示
+        eventBus.$onOnly('logout', () => {
+            tip.value = '跳转中...';
+            spinning.value = true;
+            TimerUtils.setTimeout(
                 () => {
-                    tip.value = '数据初始化...';
-                    lastTime = new Date().getTime(); //更新当前时间
-                    spinning.value = true;
-                    // 注册全局loadComplete事件 保证loadComplete变量及时更新
-                    setLoadComplete(false);
-                    globalDataRefresh()
-                        .then((res) => {
-                            setLoadComplete(true);
-                            eventBus.$emit('loadComplete');
-                            spinning.value = false;
-                        })
-                        .catch((err) => {
-                            console.error(err);
-                            spinning.value = false;
-                        });
+                    spinning.value = false;
+                    logoutAction();
                 },
-                true
+                1000,
+                'logoutTimer'
             );
+        });
+        // 登录成功
+        // eventBus.$onOnly('loginSuccess', setOvertime);
+        // 监听路由的变化
+        watchEffect(() => Router.currentRoute && provide('current-route', Router.currentRoute));
+
+        // 监听刷新事件
+        window.addEventListener(
+            'load',
+            () => {
+                tip.value = '数据初始化...';
+                lastTime = new Date().getTime(); //更新当前时间
+                spinning.value = true;
+                // 注册全局loadComplete事件 保证loadComplete变量及时更新
+                setLoadComplete(false);
+                globalDataRefresh()
+                    .then((res) => {
+                        setLoadComplete(true);
+                        eventBus.$emit('loadComplete');
+                        spinning.value = false;
+                    })
+                    .catch((err) => {
+                        console.error(err);
+                        spinning.value = false;
+                    });
+            },
+            true
+        );
 
-            // setOvertime();
-            // 订阅交易通知
-            notice((msg: string) => {
-                Modal.info({
-                    title: '系统提示:',
-                    content: `${msg},请重新登录。`,
-                    okType: 'primary',
-                    okText: '确定',
-                    keyboard: false,
-                    onOk() {
-                        Router.replace('/login');
-                    },
-                });
+        // setOvertime();
+        // 订阅交易通知
+        notice((msg: string) => {
+            Modal.info({
+                title: '系统提示:',
+                content: `${msg},请重新登录。`,
+                okType: 'primary',
+                okText: '确定',
+                keyboard: false,
+                onOk() {
+                    Router.replace('/login');
+                },
             });
+        });
 
-            return {
-                tip,
-                spinning,
-            };
-        },
-    });
+        return {
+            tip,
+            spinning,
+        };
+    },
+});
 </script>
 
 <style lang="less">
-    .app-container {
-        width: 100%;
-        height: auto;
-        min-height: 100%;
-    }
-    #app {
-        width: 100%;
-        height: auto;
-        min-height: 100%;
-        font-family: Avenir, Helvetica, Arial, sans-serif;
-        -webkit-font-smoothing: antialiased;
-        -moz-osx-font-smoothing: grayscale;
-        text-align: center;
-        color: #2c3e50;
-        background-color: #fffefe;
-        display: flex;
-        justify-content: center;
-        overflow-y: hidden;
-        img {
-            cursor: pointer;
-        }
+.app-container {
+    width: 100%;
+    height: auto;
+    min-height: 100%;
+}
+#app {
+    width: 100%;
+    height: auto;
+    min-height: 100%;
+    font-family: Avenir, Helvetica, Arial, sans-serif;
+    -webkit-font-smoothing: antialiased;
+    -moz-osx-font-smoothing: grayscale;
+    text-align: center;
+    color: #2c3e50;
+    background-color: #fffefe;
+    display: flex;
+    justify-content: center;
+    overflow-y: hidden;
+    img {
+        cursor: pointer;
     }
+}
 
-    #nav {
-        padding: 30px;
-        a {
-            font-weight: bold;
-            color: #2c3e50;
-            &.router-link-exact-active {
-                color: #42b983;
-            }
+#nav {
+    padding: 30px;
+    a {
+        font-weight: bold;
+        color: #2c3e50;
+        &.router-link-exact-active {
+            color: #42b983;
         }
     }
+}
 </style>

+ 0 - 1
src/common/setup/contextMenu/index.ts

@@ -28,7 +28,6 @@ function getClassName(val: string): BtnClassName {
 export function getBtnList(menuType: keyof MenuType, hasDetail: boolean) {
     // 获取 数据
     const permissionData = inject('thirdMenuList') as Ref<OperationTabMenu[]>;
-    // debugger
     const name = 'permissionData'
     // 存入sessionStorageUtil 是为了处理页面刷新的情况(这个时候重新从服务获取数据,但页面已经先加载了,vue 中的 依赖注入在异步中不能建立通信)
     const data: OperationTabMenu[] = permissionData.value.length ? permissionData.value : sessionStorageUtil.getItem(name)

+ 0 - 1
src/views/information/custom/list/setup.ts

@@ -45,7 +45,6 @@ export function getFilterTableCB(e: Column, item: ColumnType, filtered: any) {
         item.filteredValue = filtered.userinfotype || null;
     }
     if (e.columntitle === '客户简称') {
-        debugger;
         item.onFilter = (value: string, record: QueryCustomInfoType) => record.nickname.includes(value);
         item.filteredValue = filtered.nickname || null;
     }

+ 0 - 1
src/views/information/custom/list/stop-use/index.vue

@@ -68,7 +68,6 @@ export default defineComponent({
         });
         // 查询
         function search(value: any) {
-            debugger;
             filteredInfo.value = value;
             // 更新表信息
             updateColumn();