From 6946eb359a07fa8f57494abd3cf5d0a9dd384c1f Mon Sep 17 00:00:00 2001 From: hdm Date: Sat, 7 Jan 2023 16:45:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=90=E9=A1=B5=E9=9D=A2=E6=89=93=E5=BC=80ta?= =?UTF-8?q?b=E6=97=B6=EF=BC=8C=E4=BC=9A=E9=87=8D=E5=A4=8D=E6=89=93?= =?UTF-8?q?=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/home/view/index/index.html | 2 +- app/home/view/index/layout_event.html | 14 +++++++------- app/home/view/index/layout_fastentry.html | 4 ++-- public/static/assets/gougu/module/admin.js | 8 +++++--- public/static/assets/gougu/module/tool.js | 12 +++++++++--- 5 files changed, 24 insertions(+), 16 deletions(-) diff --git a/app/home/view/index/index.html b/app/home/view/index/index.html index f0b445f..0d29112 100644 --- a/app/home/view/index/index.html +++ b/app/home/view/index/index.html @@ -43,7 +43,7 @@ - + diff --git a/app/home/view/index/layout_event.html b/app/home/view/index/layout_event.html index cadfa19..8a8cb1e 100644 --- a/app/home/view/index/layout_event.html +++ b/app/home/view/index/layout_event.html @@ -1,7 +1,7 @@
- +

快捷申请

更多
  • @@ -62,37 +62,37 @@
    • - +

      待审审批

      {$handle.approve}

    • - +

      待审报销

      {$handle.expenses}

    • - +

      待审发票

      {$handle.invoice}

    • - +

      待回款

      {$handle.income}

    • - +

      待审合同

      {$handle.contract}

    • - +

      待完成任务

      {$handle.task}

      diff --git a/app/home/view/index/layout_fastentry.html b/app/home/view/index/layout_fastentry.html index 92bb213..f786ff3 100644 --- a/app/home/view/index/layout_fastentry.html +++ b/app/home/view/index/layout_fastentry.html @@ -2,13 +2,13 @@
      • - + 通讯录
      • - + 日程安排 diff --git a/public/static/assets/gougu/module/admin.js b/public/static/assets/gougu/module/admin.js index 6a60300..e9c242f 100644 --- a/public/static/assets/gougu/module/admin.js +++ b/public/static/assets/gougu/module/admin.js @@ -31,9 +31,11 @@ layui.define(['element'], function (exports) { $('#GouguAppBody').append('
        '); this.tabChange(id); }, - //从子页面打开新的Tab页面,防止id重复,使用时间戳作为唯一标识 - sonAdd: function (url, title) { - let id = Date.now(); + //从子页面打开新的Tab页面,如果为传入id,防止id重复,使用时间戳作为唯一标识 + sonAdd: function (url, title, id) { + if (typeof(id) == "undefined") { + id = Date.now(); + } this.tabAdd( id, url,title); }, //根据传入的id传入到指定的tab项,并滚动定位 diff --git a/public/static/assets/gougu/module/tool.js b/public/static/assets/gougu/module/tool.js index a885032..058a4aa 100644 --- a/public/static/assets/gougu/module/tool.js +++ b/public/static/assets/gougu/module/tool.js @@ -240,9 +240,9 @@ layui.define([], function (exports) { console.log('父页面没引用tool模块'); } }, - tabAdd:function(url,title){ + tabAdd:function(url,title,id){ if(parent.layui.admin){ - parent.layui.admin.sonAdd(url,title); + parent.layui.admin.sonAdd(url,title,id); } else{ console.log('父页面没引用admin模块'); @@ -281,14 +281,20 @@ layui.define([], function (exports) { } } }; + $('body').on('click', '.tab-a', function () { + let id = $(this).data('id'); let url = $(this).data('href'); let title = $(this).data('title'); if (url && url !== '') { - tool.tabAdd(url,title); + if (typeof(id) == "undefined" || id == '') { + id = Date.now(); + } + tool.tabAdd(url,title,id); } return false; }); + $('body').on('click', '.side-a', function () { let url = $(this).data('href'); if (url && url !== '') {