浏览代码

Merge branch 'byll' into test

luolei 5 年之前
父节点
当前提交
97795d920c

二进制
src/images/empty1.png


+ 2 - 3
src/js/abnormal.js

@@ -2,7 +2,7 @@ const $ = require('jquery');
 require("../css/abnormal.less");
 require('./modal.js');
 const {api} = require('./api.js')
-const {post,getCookie} = require('./utils.js')
+const {post,getCookie,emptyBox} = require('./utils.js')
 require('./../resource/jquery-ui/jquery-ui.min.js');
 require('./../resource/jquery-ui/jquery-ui.min.css');
 const iconCheck= require("./../images/icon_check.png")
@@ -132,7 +132,7 @@ function renderTab(data,hisId,activePage){
             </tr>
         `
     }
-    $('tbody').html(str?str:'<tr><td colspan="17" style="text-align: center;color: #aaa">暂无数据~</td></tr>')
+    $('tbody').html(str?str:emptyBox())
     bindScoreDetail(hisId)
 }
 
@@ -148,7 +148,6 @@ function bindScoreDetail(hisId){
     })
 }
 
-  
 function midifyMsgBox(item,type){
     const itemCopy = JSON.parse(JSON.stringify(item))
     let msgBox = ''

+ 0 - 1
src/js/api.js

@@ -1,4 +1,3 @@
-
 const api = {
     getMenu:'/sys/user/getUserOrgMenu',     //获取菜单
     midifyPassword:'/sys/user/midifyPassword',     //修改密码

+ 2 - 5
src/js/assertType.js

@@ -2,7 +2,7 @@ const $ = require('jquery');
 require("../css/assertType.less");
 require('./modal.js');
 const {api} = require('./api.js')
-const {post,getCookie,getUrlArgObjectNew} = require('./utils.js')
+const {post,getCookie,getUrlArgObjectNew,emptyBox} = require('./utils.js')
 require('./../resource/jquery-ui/jquery-ui.min.js');
 require('./../resource/jquery-ui/jquery-ui.min.css');
 const iconCheck= require("./../images/icon_check.png")
@@ -202,10 +202,7 @@ function renderTab(data,hisId,activePage){
             </tr>
         `
     }
-    $('tbody').html(str?str:`<tr><td colspan="17" style="text-align: center;color: #aaa">
-        <img style="margin-top:50px;width:100px;" src="${require('../images/empty.png')}" />
-        <p style="margin-top:20px;margin-bottom:30px;color:#ccc;position:relative;left:5px;">暂无数据~</p>
-    </td></tr>`)
+    $('tbody').html(str?str:emptyBox())
     bindScoreDetail(hisId)
     $(".goHomeDetail").click(function(){
         let docName = $(this).attr("data-doc")

+ 2 - 5
src/js/dayDetail.js

@@ -2,7 +2,7 @@ const $ = require('jquery');
 require("../css/dayDetail.less");
 require('./modal.js');
 const {api} = require('./api.js')
-const {post,getCookie,getUrlArgObjectNew} = require('./utils.js')
+const {post,getCookie,getUrlArgObjectNew,emptyBox} = require('./utils.js')
 require('./../resource/jquery-ui/jquery-ui.min.js');
 require('./../resource/jquery-ui/jquery-ui.min.css');
 const iconCheck= require("./../images/icon_check.png")
@@ -168,10 +168,7 @@ function renderTab(data,hisId,activePage){
         </thead>
         `}
         <tbody>
-            ${str?str:`<tr><td colspan="17" style="text-align: center;color: #aaa">
-                <img style="margin-top:50px;width:100px;" src="${require('../images/empty.png')}" />
-                <p style="margin-top:20px;margin-bottom:30px;color:#ccc;position:relative;left:5px;">暂无数据~</p>
-                </td></tr>`}
+            ${str?str:emptyBox()}
         </tbody>
     `
     $('.tableDay').html(sts)

+ 3 - 10
src/js/deptConsole.js

@@ -61,7 +61,7 @@ function tiaomu(){
         focusMenuItem("YH-BLZK-ZKPFKS");
         let dataC = $(this).attr("data-c")
         let chengdu = dataC == 1?'甲':dataC==2?'乙':'丙'
-        $(parent.document).find("#contentIframe").attr("src","./qcListDept.html?from=1&dateType="+dateType+"&chengdu="+chengdu+"&deptName="+curDept)
+        $(parent.document).find("#contentIframe").attr("src","./qcListDept.html?from=1&dateType="+dateType+"&chengdu="+chengdu+"&deptName="+curDept+"&deptId="+curDeptId)
     });
 }
 //判断有无某一权限
@@ -522,11 +522,7 @@ function emptyCircleB(data){
     let title = '总量';
     let color = ['#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336','#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336'];
     let echartData = data;
-    console.log(echartData,9999)
-    let total = 0;
-    for(let i = 0;i < echartData.length;i++){
-        total += echartData[i].num
-    }
+    let total = echartData.length>0?echartData[0].totleNum:0;
     option = {
         // backgroundColor: bgColor,
         color: color,
@@ -618,10 +614,7 @@ function emptyCircleBc(data){
     let title = '总量';
     let color = ['#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336','#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336'];
     let echartData = data;
-    let total = 0;
-    for(let i = 0;i < echartData.length;i++){
-        total += echartData[i].num
-    }
+    let total = echartData.length>0?echartData[0].totleNum:0;
     option = {
         // backgroundColor: bgColor,
         color: color,

+ 2 - 5
src/js/deptScoreDetail.js

@@ -2,7 +2,7 @@ const $ = require('jquery');
 require("../css/deptScoreDetail.less");
 require('./modal.js');
 const {api} = require('./api.js')
-const {post,getCookie,getUrlArgObjectNew,focusMenuItem} = require('./utils.js')
+const {post,getCookie,getUrlArgObjectNew,focusMenuItem,emptyBox} = require('./utils.js')
 require('./../resource/jquery-ui/jquery-ui.min.js');
 require('./../resource/jquery-ui/jquery-ui.min.css');
 const iconCheck= require("./../images/icon_check.png")
@@ -203,10 +203,7 @@ function renderTab(data,hisId,activePage){
             </tr>
         `
     }
-    $('tbody').html(str?str:`<tr><td colspan="17" style="text-align: center;color: #aaa">
-        <img style="margin-top:50px;width:100px;" src="${require('../images/empty.png')}" />
-        <p style="margin-top:20px;margin-bottom:30px;color:#ccc;position:relative;left:5px;">暂无数据~</p>
-    </td></tr>`)
+    $('tbody').html(str?str:emptyBox())
     bindScoreDetail(hisId)
     $(".goHomeDetail").click(function(){
         let docName = $(this).attr("data-doc")

+ 2 - 5
src/js/deptScoreDetailControl.js

@@ -2,7 +2,7 @@ const $ = require('jquery');
 require("../css/deptScoreDetailControl.less");
 require('./modal.js');
 const {api} = require('./api.js')
-const {post,getCookie,getUrlArgObjectNew,focusMenuItem} = require('./utils.js')
+const {post,getCookie,getUrlArgObjectNew,focusMenuItem,emptyBox} = require('./utils.js')
 require('./../resource/jquery-ui/jquery-ui.min.js');
 require('./../resource/jquery-ui/jquery-ui.min.css');
 const iconCheck= require("./../images/icon_check.png")
@@ -195,10 +195,7 @@ function renderTab(data,hisId,activePage){
             </tr>
         `
     }
-    $('.deptScoreDetailControlTable table').html(str?tHead+'<tbody>'+str+'</tbody>':tHead+`<tbody><tr><td colspan="17" style="text-align: center;color: #aaa">
-        <img style="margin-top:50px;width:100px;" src="${require('../images/empty.png')}" />
-        <p style="margin-top:20px;margin-bottom:30px;color:#ccc;position:relative;left:5px;">暂无数据~</p>
-    </td></tr></tbody>`)
+    $('.deptScoreDetailControlTable table').html(str?tHead+'<tbody>'+str+'</tbody>':tHead+`<tbody>${emptyBox()}</tbody>`)
     bindScoreDetail(hisId)
     $(".goHomeDetailQuexian").click(function(){
         let deptName = $(this).attr("data-dept")

+ 2 - 5
src/js/jiaji.js

@@ -2,7 +2,7 @@ const $ = require('jquery');
 require("../css/jiaji.less");
 require('./modal.js');
 const {api} = require('./api.js')
-const {post,getCookie,getUrlArgObjectNew} = require('./utils.js')
+const {post,getCookie,getUrlArgObjectNew,emptyBox} = require('./utils.js')
 require('./../resource/jquery-ui/jquery-ui.min.js');
 require('./../resource/jquery-ui/jquery-ui.min.css');
 const iconCheck= require("./../images/icon_check.png")
@@ -153,10 +153,7 @@ function renderTab(data,hisId,activePage){
             </tr>
         `
     }
-    $('tbody').html(str?str:`<tr><td colspan="17" style="text-align: center;color: #aaa">
-            <img style="margin-top:50px;width:100px;" src="${require('../images/empty.png')}" />
-            <p style="margin-top:20px;margin-bottom:30px;color:#ccc;position:relative;left:5px;">暂无数据~</p>
-            </td></tr>`)
+    $('tbody').html(str?str:emptyBox())
     bindScoreDetail(hisId)
 }
 

+ 2 - 2
src/js/moduleManager.js

@@ -6,7 +6,7 @@ require('./modal.js');
 
 // const  layui = require('layui-src');
 const {api} = require('./api.js')
-const {post,getCookie} = require('./utils.js')
+const {post,getCookie,emptyBox} = require('./utils.js')
 function setTbaleInfoHei(){
  
     $(".tableInfo").css({
@@ -57,7 +57,7 @@ function renderTab(){
     //     <td class="totalSum"></td>
     // </tr>
     // `
-    $('.tableInfo table').html(str?str:'<tr><td colspan="17" style="text-align: center;color: #aaa">暂无数据~</td></tr>')
+    $('.tableInfo table').html(str?str:emptyBox())
     const tableInfoBox =  $(".tableInfo").height()
     const tableInfoHei =  $(".tableInfo table").height()
     if(tableInfoHei > tableInfoBox){

+ 2 - 5
src/js/mukuai.js

@@ -3,7 +3,7 @@ require("../css/mukuai.less");
 require('./../resource/jquery-ui/jquery-ui.min.js');
 require('./modal.js');
 const {api} = require('./api.js')
-const {post,getCookie,getUrlArgObjectNew} = require('./utils.js')
+const {post,getCookie,getUrlArgObjectNew,emptyBox} = require('./utils.js')
 const switchIconOpen = require("./../images/btn_open.png")
 const switchIconClose = require("./../images/btn_close.png")
 const iconDown= require("./../images/arrow_down.png")
@@ -256,10 +256,7 @@ function renderTab(data,activePage){
             </tr>
         `
     }
-    $('tbody').html(str?str:`<tr><td colspan="17" style="text-align: center;color: #aaa">
-        <img style="margin-top:50px;width:100px;" src="${require('../images/empty.png')}" />
-        <p style="margin-top:20px;margin-bottom:30px;color:#ccc;position:relative;left:5px;">暂无数据~</p>
-    </td></tr>`)
+    $('tbody').html(str?str:emptyBox())
     bindEdit(data,activePage)
 }
 

+ 2 - 5
src/js/mukuaiControl.js

@@ -3,7 +3,7 @@ require("../css/mukuai.less");
 require('./../resource/jquery-ui/jquery-ui.min.js');
 require('./modal.js');
 const {api} = require('./api.js')
-const {post,getCookie,getUrlArgObjectNew} = require('./utils.js')
+const {post,getCookie,getUrlArgObjectNew,emptyBox} = require('./utils.js')
 const switchIconOpen = require("./../images/btn_open.png")
 const switchIconClose = require("./../images/btn_close.png")
 const iconDown= require("./../images/arrow_down.png")
@@ -243,10 +243,7 @@ function renderTab(data,activePage){
             </tr>
         `
     }
-    $('tbody').html(str?str:`<tr><td colspan="17" style="text-align: center;color: #aaa">
-        <img style="margin-top:50px;width:100px;" src="${require('../images/empty.png')}" />
-        <p style="margin-top:20px;margin-bottom:30px;color:#ccc;position:relative;left:5px;">暂无数据~</p>
-    </td></tr>`)
+    $('tbody').html(str?str:emptyBox())
     bindEdit(data,activePage)
 }
 

+ 2 - 5
src/js/partDetail.js

@@ -2,7 +2,7 @@ const $ = require('jquery');
 require("../css/partDetail.less");
 require('./modal.js');
 const {api} = require('./api.js')
-const {post,getCookie,getUrlArgObjectNew} = require('./utils.js')
+const {post,getCookie,getUrlArgObjectNew,emptyBox} = require('./utils.js')
 require('./../resource/jquery-ui/jquery-ui.min.js');
 require('./../resource/jquery-ui/jquery-ui.min.css');
 const iconCheck= require("./../images/icon_check.png")
@@ -198,10 +198,7 @@ function renderTab(data,hisId,activePage){
             </tr>
         `
     }
-    $('tbody').html(str?str:`<tr><td colspan="17" style="text-align: center;color: #aaa">
-        <img style="margin-top:50px;width:100px;" src="${require('../images/empty.png')}" />
-        <p style="margin-top:20px;margin-bottom:30px;color:#ccc;position:relative;left:5px;">暂无数据~</p>
-    </td></tr>`)
+    $('tbody').html(str?str:emptyBox())
     bindScoreDetail(hisId)
     $(".goHomeDetail").click(function(){
         let docName = $(this).attr("data-doc")

+ 2 - 5
src/js/partDetailControl.js

@@ -2,7 +2,7 @@ const $ = require('jquery');
 require("../css/partDetailControl.less");
 require('./modal.js');
 const {api} = require('./api.js')
-const {post,getCookie,getUrlArgObjectNew} = require('./utils.js')
+const {post,getCookie,getUrlArgObjectNew,emptyBox} = require('./utils.js')
 require('./../resource/jquery-ui/jquery-ui.min.js');
 require('./../resource/jquery-ui/jquery-ui.min.css');
 const iconCheck= require("./../images/icon_check.png")
@@ -156,10 +156,7 @@ function renderTab(data,hisId,activePage){
         `
     }
     // console.log(str)
-    $('tbody').html(str?str:`<tr><td colspan="17" style="text-align: center;color: #aaa">
-        <img style="margin-top:50px;width:100px;" src="${require('../images/empty.png')}" />
-        <p style="margin-top:20px;margin-bottom:30px;color:#ccc;position:relative;left:5px;">暂无数据~</p>
-    </td></tr>`)
+    $('tbody').html(str?str:emptyBox())
     bindScoreDetail(hisId)
     $(".goHomeDetail").click(function(){
         let deptName = $(this).attr("data-dept")

+ 2 - 5
src/js/payDetail.js

@@ -2,7 +2,7 @@ const $ = require('jquery');
 require("../css/payDetail.less");
 require('./modal.js');
 const {api} = require('./api.js')
-const {post,getCookie,getUrlArgObjectNew} = require('./utils.js')
+const {post,getCookie,getUrlArgObjectNew,emptyBox} = require('./utils.js')
 require('./../resource/jquery-ui/jquery-ui.min.js');
 require('./../resource/jquery-ui/jquery-ui.min.css');
 const iconCheck= require("./../images/icon_check.png")
@@ -172,10 +172,7 @@ function renderTab(data,hisId,activePage){
         </thead>
         `}
         <tbody>
-            ${str?str:`<tr><td colspan="17" style="text-align: center;color: #aaa">
-            <img style="margin-top:50px;width:100px;" src="${require('../images/empty.png')}" />
-            <p style="margin-top:20px;margin-bottom:30px;color:#ccc;position:relative;left:5px;">暂无数据~</p>
-            </td></tr>`}
+            ${str?str:emptyBox()}
         </tbody>
     `
     $('.tableDay').html(sts)

+ 5 - 1
src/js/qcList.js

@@ -2,7 +2,7 @@ const $ = require('jquery');
 require("../css/qcList.less");
 require('./modal.js');
 const {api} = require('./api.js')
-const {post,getCookie,getUrlArgObjectNew} = require('./utils.js')
+const {post,getCookie,getUrlArgObjectNew,emptyBox} = require('./utils.js')
 require('./../resource/jquery-ui/jquery-ui.min.js');
 require('./../resource/jquery-ui/jquery-ui.min.css');
 const iconCheck= require("./../images/icon_check.png")
@@ -164,10 +164,14 @@ function renderTab(data,hisId){
     let str = ``
     let hasSelectAll = true;
     if(data.length===0){
+<<<<<<< HEAD
       $('tbody').html(`<tr><td colspan="18" style="text-align: center;color: #aaa">
           <img style="margin-top:50px;width:100px;" src="${require('../images/empty.png')}" />
           <p style="margin-top:20px;margin-bottom:30px;color:#ccc;position:relative;left:5px;">暂无数据~</p>
       </td></tr>`)
+=======
+      $('tbody').html(emptyBox())
+>>>>>>> byll
       return;
     }
     for(let i = 0; i < data.length; i++){

+ 5 - 1
src/js/qcListDept.js

@@ -2,7 +2,7 @@ const $ = require('jquery');
 require("../css/qcListDept.less");
 require('./modal.js');
 const {api} = require('./api.js')
-const {post,getCookie,getUrlArgObjectNew} = require('./utils.js')
+const {post,getCookie,getUrlArgObjectNew,emptyBox} = require('./utils.js')
 require('./../resource/jquery-ui/jquery-ui.min.js');
 require('./../resource/jquery-ui/jquery-ui.min.css');
 const iconCheck= require("./../images/icon_check.png")
@@ -184,10 +184,14 @@ function renderTab(data){
     let str = ``
     let hasSelectAll = true;
     if(data.length===0){
+<<<<<<< HEAD
       $('tbody').html(str?str:`<tr><td colspan="18" style="text-align: center;color: #aaa">
           <img style="margin-top:50px;width:100px;" src="${require('../images/empty.png')}" />
           <p style="margin-top:20px;margin-bottom:30px;color:#ccc;position:relative;left:5px;">暂无数据~</p>
       </td></tr>`)
+=======
+      $('tbody').html(str?str:emptyBox())
+>>>>>>> byll
       return;
     }
     for(let i = 0; i < data.length; i++){

+ 5 - 1
src/js/qcListPerson.js

@@ -2,7 +2,7 @@ const $ = require('jquery');
 require("../css/qcListPerson.less");
 require('./modal.js');
 const {api} = require('./api.js')
-const {post,getUrlArgObject,getCookie,getUrlArgObjectNew} = require('./utils.js')
+const {post,getUrlArgObject,getCookie,getUrlArgObjectNew,emptyBox} = require('./utils.js')
 require('./../resource/jquery-ui/jquery-ui.min.js');
 require('./../resource/jquery-ui/jquery-ui.min.css');
 const iconCheck= require("./../images/icon_check.png")
@@ -183,10 +183,14 @@ function renderTab(data){
     let str = ``
     let hasSelectAll = true;
     if(data.length===0){
+<<<<<<< HEAD
         $('tbody').html(str?str:`<tr><td colspan="18" style="text-align: center;color: #aaa">
             <img style="margin-top:50px;width:100px;" src="${require('../images/empty.png')}" />
             <p style="margin-top:20px;margin-bottom:30px;color:#ccc;position:relative;left:5px;">暂无数据~</p>
         </td></tr>`)
+=======
+        $('tbody').html(str?str:emptyBox())
+>>>>>>> byll
         return;
     }
     for(let i = 0; i < data.length; i++){

+ 2 - 5
src/js/quexianDetail.js

@@ -3,7 +3,7 @@ require("../css/quexianDetail.less");
 require('./../resource/jquery-ui/jquery-ui.min.js');
 require('./modal.js');
 const {api} = require('./api.js')
-const {post,getCookie,getUrlArgObjectNew} = require('./utils.js')
+const {post,getCookie,getUrlArgObjectNew,emptyBox} = require('./utils.js')
 const switchIconOpen = require("./../images/btn_open.png")
 const switchIconClose = require("./../images/btn_close.png")
 const iconDown= require("./../images/arrow_down.png")
@@ -294,10 +294,7 @@ function renderTab(data,activePage){
             </tr>
         `
     }
-    $('tbody').html(str?str:`<tr><td colspan="17" style="text-align: center;color: #aaa">
-        <img style="margin-top:50px;width:100px;" src="${require('../images/empty.png')}" />
-        <p style="margin-top:20px;margin-bottom:30px;color:#ccc;position:relative;left:5px;">暂无数据~</p>
-    </td></tr>`)
+    $('tbody').html(str?str:emptyBox())
     bindEdit(data,activePage)
 }
 

+ 2 - 5
src/js/quexianDetailControl.js

@@ -3,7 +3,7 @@ require("../css/quexianDetailControl.less");
 require('./../resource/jquery-ui/jquery-ui.min.js');
 require('./modal.js');
 const {api} = require('./api.js')
-const {post,getCookie,getUrlArgObjectNew} = require('./utils.js')
+const {post,getCookie,getUrlArgObjectNew,emptyBox} = require('./utils.js')
 const switchIconOpen = require("./../images/btn_open.png")
 const switchIconClose = require("./../images/btn_close.png")
 const iconDown= require("./../images/arrow_down.png")
@@ -281,10 +281,7 @@ function renderTab(data,activePage){
             </tr>
         `
     }
-    $('tbody').html(str?str:`<tr><td colspan="17" style="text-align: center;color: #aaa">
-        <img style="margin-top:50px;width:100px;" src="${require('../images/empty.png')}" />
-        <p style="margin-top:20px;margin-bottom:30px;color:#ccc;position:relative;left:5px;">暂无数据~</p>
-    </td></tr>`)
+    $('tbody').html(str?str:emptyBox())
     bindEdit(data,activePage)
 }
 

+ 2 - 5
src/js/quexianDetailControlHome.js

@@ -3,7 +3,7 @@ require("../css/quexianDetailControlHome.less");
 require('./../resource/jquery-ui/jquery-ui.min.js');
 require('./modal.js');
 const {api} = require('./api.js')
-const {post,getCookie,getUrlArgObjectNew} = require('./utils.js')
+const {post,getCookie,getUrlArgObjectNew,emptyBox} = require('./utils.js')
 const switchIconOpen = require("./../images/btn_open.png")
 const switchIconClose = require("./../images/btn_close.png")
 const iconDown= require("./../images/arrow_down.png")
@@ -281,10 +281,7 @@ function renderTab(data,activePage){
             </tr>
         `
     }
-    $('tbody').html(str?str:`<tr><td colspan="17" style="text-align: center;color: #aaa">
-        <img style="margin-top:50px;width:100px;" src="${require('../images/empty.png')}" />
-        <p style="margin-top:20px;margin-bottom:30px;color:#ccc;position:relative;left:5px;">暂无数据~</p>
-    </td></tr>`)
+    $('tbody').html(str?str:emptyBox())
     bindEdit(data,activePage)
 }
 

+ 2 - 5
src/js/quexianDetailHome.js

@@ -3,7 +3,7 @@ require("../css/quexianDetailHome.less");
 require('./../resource/jquery-ui/jquery-ui.min.js');
 require('./modal.js');
 const {api} = require('./api.js')
-const {post,getCookie,getUrlArgObjectNew} = require('./utils.js')
+const {post,getCookie,getUrlArgObjectNew,emptyBox} = require('./utils.js')
 const switchIconOpen = require("./../images/btn_open.png")
 const switchIconClose = require("./../images/btn_close.png")
 const iconDown= require("./../images/arrow_down.png")
@@ -293,10 +293,7 @@ function renderTab(data,activePage){
             </tr>
         `
     }
-    $('tbody').html(str?str:`<tr><td colspan="17" style="text-align: center;color: #aaa">
-        <img style="margin-top:50px;width:100px;" src="${require('../images/empty.png')}" />
-        <p style="margin-top:20px;margin-bottom:30px;color:#ccc;position:relative;left:5px;">暂无数据~</p>
-    </td></tr>`)
+    $('tbody').html(str?str:emptyBox())
     bindEdit(data,activePage)
 }
 

+ 2 - 5
src/js/quexianXQ.js

@@ -2,7 +2,7 @@ const $ = require('jquery');
 require("../css/quexianXQ.less");
 require('./modal.js');
 const {api} = require('./api.js')
-const {post,getCookie} = require('./utils.js')
+const {post,getCookie,emptyBox} = require('./utils.js')
 require('./../resource/jquery-ui/jquery-ui.min.js');
 require('./../resource/jquery-ui/jquery-ui.min.css');
 const iconCheck= require("./../images/icon_check.png")
@@ -126,10 +126,7 @@ function renderTab(data,hisId,activePage){
             </tr>
         `
     }
-    $('tbody').html(str?str:`<tr><td colspan="17" style="text-align: center;color: #aaa">
-        <img style="margin-top:50px;width:100px;" src="${require('../images/empty.png')}" />
-        <p style="margin-top:20px;margin-bottom:30px;color:#ccc;position:relative;left:5px;">暂无数据~</p>
-    </td></tr>`)
+    $('tbody').html(str?str:emptyBox())
     bindScoreDetail(hisId)
 }
 

+ 2 - 5
src/js/tiaomu.js

@@ -3,7 +3,7 @@ require("../css/tiaomu.less");
 require('./../resource/jquery-ui/jquery-ui.min.js');
 require('./modal.js');
 const {api} = require('./api.js')
-const {post,getCookie,getUrlArgObjectNew} = require('./utils.js')
+const {post,getCookie,getUrlArgObjectNew,emptyBox} = require('./utils.js')
 const switchIconOpen = require("./../images/btn_open.png")
 const switchIconClose = require("./../images/btn_close.png")
 const iconDown= require("./../images/arrow_down.png")
@@ -292,10 +292,7 @@ function renderTab(data,activePage){
             </tr>
         `
     }
-    $('tbody').html(str?str:`<tr><td colspan="17" style="text-align: center;color: #aaa">
-        <img style="margin-top:50px;width:100px;" src="${require('../images/empty.png')}" />
-        <p style="margin-top:20px;margin-bottom:30px;color:#ccc;position:relative;left:5px;">暂无数据~</p>
-    </td></tr>`)
+    $('tbody').html(str?str:emptyBox())
     bindEdit(data,activePage)
 }
 

+ 2 - 5
src/js/tiaomuControl.js

@@ -3,7 +3,7 @@ require("../css/tiaomu.less");
 require('./../resource/jquery-ui/jquery-ui.min.js');
 require('./modal.js');
 const {api} = require('./api.js')
-const {post,getCookie,getUrlArgObjectNew} = require('./utils.js')
+const {post,getCookie,getUrlArgObjectNew,emptyBox} = require('./utils.js')
 const switchIconOpen = require("./../images/btn_open.png")
 const switchIconClose = require("./../images/btn_close.png")
 const iconDown= require("./../images/arrow_down.png")
@@ -263,10 +263,7 @@ function renderTab(data,activePage){
             </tr>
         `
     }
-    $('tbody').html(str?str:`<tr><td colspan="17" style="text-align: center;color: #aaa">
-        <img style="margin-top:50px;width:100px;" src="${require('../images/empty.png')}" />
-        <p style="margin-top:20px;margin-bottom:30px;color:#ccc;position:relative;left:5px;">暂无数据~</p>
-    </td></tr>`)
+    $('tbody').html(str?str:emptyBox())
     bindEdit(data,activePage)
 }
 

+ 2 - 5
src/js/userManager.js

@@ -3,7 +3,7 @@ require("../css/itemManager.less");
 require('./../resource/jquery-ui/jquery-ui.min.js');
 require('./modal.js');
 const {api} = require('./api.js')
-const {post} = require('./utils.js')
+const {post,emptyBox} = require('./utils.js')
 const switchIconOpen = require("./../images/btn_open.png")
 const switchIconClose = require("./../images/btn_close.png")
 const iconDown= require("./../images/arrow_down.png")
@@ -122,10 +122,7 @@ function renderTab(data,activePage){
             </tr>
         `
     }
-    $('tbody').html(str?str:`<tr><td colspan="17" style="text-align: center;color: #aaa">
-        <img style="margin-top:50px;width:100px;" src="${require('../images/empty.png')}" />
-        <p style="margin-top:20px;margin-bottom:30px;color:#ccc;position:relative;left:5px;">暂无数据~</p>
-    </td></tr>`)
+    $('tbody').html(str?str:emptyBox())
     bindEdit(data,activePage)
 }
 

+ 10 - 2
src/js/utils.js

@@ -34,7 +34,6 @@ const pageMap={
   "YH-KSZR-BASYHGLZB_XQ":'partDetail.html',
 
   "YH-JCSJWH-ZKLXWH":'assertType.html',
-
 };
 
 //重写assign方法
@@ -117,6 +116,7 @@ const post = function (url, data) {
       },
       error: function (error) {
         if(error.status===403||error.status===401){
+          console.log(url)
           return
           const wd = window.parent.window||window;
           wd.location.href = "../login.html";
@@ -198,6 +198,13 @@ function focusMenuItem(code){
   //console.log($(parent.document).find(".menu .page[code='YH-ZKK-GMKQXZB_XQ']"))
   ele.click();
 }
+function emptyBox(name){
+  let str = `<tr><td colspan="17" style="text-align: center;color: #aaa">
+  <img style="margin-top:50px;width:100px;" src="${require('../images/empty1.png')}" />
+  <p style="margin-top:20px;margin-bottom:30px;color:#ccc;position:relative;left:5px;">${name||'暂无数据~'}</p>
+  </td></tr>`
+  return str
+}
 module.exports = {
   pageMap,
   post,
@@ -209,5 +216,6 @@ module.exports = {
   delCookie,
   setBoxHeight,
   hasData,
-  focusMenuItem
+  focusMenuItem,
+  emptyBox
 };