Ver código fonte

提交数据

lvhao 6 dias atrás
pai
commit
0c3d7a0f6b
2 arquivos alterados com 12 adições e 3 exclusões
  1. 4 2
      core/CoreApp/controllers/Power.php
  2. 8 1
      template/erp/power.html

+ 4 - 2
core/CoreApp/controllers/Power.php

@@ -81,8 +81,10 @@ class Power extends Start_Controller {
                 }
                 $final_list[$key]['user_list'] = $str;
                 $final_list[$key]['title'] = $value['title'];
-                $final_list[$key]['powertext'] = mb_strlen($value['powertext']) > 90? mb_substr($value['powertext'],0,90).'...' : $value['powertext'];
-                $final_list[$key]['exceltext'] = mb_strlen($value['exceltext']) > 70? mb_substr($value['exceltext'],0,70).'...' : $value['exceltext'];
+
+				
+                $final_list[$key]['powertext'] = mb_strlen($value['powertext']) > 90? '<i class="method fa fa-list-ul" data-t="'.$value['powertext'].'"></i>'.mb_substr($value['powertext'],0,90) : $value['powertext'];
+                $final_list[$key]['exceltext'] = mb_strlen($value['exceltext']) > 70? '<i class="method fa fa-list-ul" data-t="'.$value['exceltext'].'"></i>'.mb_substr($value['exceltext'],0,70) : $value['exceltext'];
 				$final_list[$key]['sort'] = "<input value=".$value['sort']." onchange='edit_px(this)' data-id= '".$value['id']."' class='px_do' />"; 
             }
 		    $total = $this->power->find_count($where);

+ 8 - 1
template/erp/power.html

@@ -99,7 +99,13 @@ $(this).find('td:eq(6)').css("width","4%");
 });}
 
 
-
+$(".datatext").on('mouseover mouseout',".method",function(event) {
+    if (event.type === "mouseover") {
+        $(this).parent("td").append('<font style="position: absolute;left:0;z-index: 1;border-radius:3px;border: 1px solid #39F;padding:0 10px;background-color: #FFF;box-shadow: rgba(0, 0, 0, 0.3) 1px 1px 24px;">'+$(this).data("t")+'</font>');
+    }else if(event.type == "mouseout"){
+        $(this).siblings("font").remove();
+    }
+});
 $(document).ready(function(){
     $('.select_two').select2({
             placeholder: "请选择",
@@ -110,6 +116,7 @@ $(document).ready(function(){
     $("select[name='perpage']").on("change",function(){
         searchspan(1);
     });
+    
 })
 function edit_px(that){