diff --git a/app/article/view/index/index.html b/app/article/view/index/index.html index 4d9e536..e96297c 100644 --- a/app/article/view/index/index.html +++ b/app/article/view/index/index.html @@ -36,7 +36,7 @@ title: '文章列表', defaultToolbar: false, url: "/article/index/index", //数据接口 - cellMinWidth: 300, + cellMinWidth: 80, page: true, //开启分页 limit: 20, cols: [ diff --git a/app/article/view/index/list.html b/app/article/view/index/list.html index 6dbe5be..7502428 100644 --- a/app/article/view/index/list.html +++ b/app/article/view/index/list.html @@ -48,7 +48,7 @@ toolbar: '#toolbarDemo', defaultToolbar: false, url: "/article/index/list", //数据接口 - cellMinWidth: 300, + cellMinWidth: 80, page: true, //开启分页 limit: 20, cols: [ diff --git a/app/common.php b/app/common.php index 36f4d15..5c0fd1f 100644 --- a/app/common.php +++ b/app/common.php @@ -1195,17 +1195,50 @@ function time_format($time = NULL, $format = 'Y-m-d H:i:s') return $time != '' ? str_replace('x', $sec, date($format, intval($usec))) : ''; } +/** + * 将秒数转换为时间 (小时、分、秒) + * @param + */ +function getTimeBySec($time,$second=true) +{ + if (is_numeric($time)) { + $value = array( + "hours" => 0, + "minutes" => 0, "seconds" => 0, + ); + $t=''; + if ($time >= 3600) { + $value["hours"] = floor($time / 3600); + $time = ($time % 3600); + $t .= $value["hours"] . "小时"; + } + if ($time >= 60) { + $value["minutes"] = floor($time / 60); + $time = ($time % 60); + $t .= $value["minutes"] . "分钟"; + } + if ($time > 0 && $time < 60 && $second==true) { + $value["seconds"] = floor($time); + $t .= $value["seconds"] . "秒"; + } + return $t; + } else { + return (bool)FALSE; + } +} + /** * 将秒数转换为时间 (年、天、小时、分、秒) * @param */ -function getTimeBySec($time) +function getDateBySec($time,$second=false) { if (is_numeric($time)) { $value = array( "years" => 0, "days" => 0, "hours" => 0, "minutes" => 0, "seconds" => 0, ); + $t=''; if ($time >= 31556926) { $value["years"] = floor($time / 31556926); $time = ($time % 31556926); @@ -1226,7 +1259,7 @@ function getTimeBySec($time) $time = ($time % 60); $t .= $value["minutes"] . "分钟"; } - if ($time < 60) { + if ($time < 60 && $second==true) { $value["seconds"] = floor($time); $t .= $value["seconds"] . "秒"; } diff --git a/app/contract/view/index/archive.html b/app/contract/view/index/archive.html index d3a77ed..b01fe50 100644 --- a/app/contract/view/index/archive.html +++ b/app/contract/view/index/archive.html @@ -40,7 +40,7 @@ elem: '#test', title: '合同归档列表', url: "/contract/index/archive", //数据接口 - cellMinWidth: 200, + cellMinWidth: 80, page: true, //开启分页 limit: 20, cols: [ diff --git a/app/contract/view/index/index.html b/app/contract/view/index/index.html index 2556080..fd3bafb 100644 --- a/app/contract/view/index/index.html +++ b/app/contract/view/index/index.html @@ -58,7 +58,7 @@ toolbar: '#toolbarDemo', defaultToolbar:['filter', {title:'导出EXCEL',layEvent: 'LAYTABLE_EXCEL',icon: 'layui-icon-export'}], url: "/contract/index/index", //数据接口 - cellMinWidth: 200, + cellMinWidth: 80, page: true, //开启分页 limit: 20, cols: [ diff --git a/app/customer/view/chance/index.html b/app/customer/view/chance/index.html index 57e759a..30dc0cb 100644 --- a/app/customer/view/chance/index.html +++ b/app/customer/view/chance/index.html @@ -53,7 +53,7 @@ ,toolbar: '#toolbarDemo' ,title:'销售机会列表' ,url: "/customer/chance/index" - ,cellMinWidth: 200 + ,cellMinWidth: 80 ,page: true //开启分页 ,limit: 20 ,cols: [[ diff --git a/app/customer/view/contact/index.html b/app/customer/view/contact/index.html index 2b9084b..fb10e9b 100644 --- a/app/customer/view/contact/index.html +++ b/app/customer/view/contact/index.html @@ -25,7 +25,7 @@ ,defaultToolbar:['filter', {title:'导出EXCEL',layEvent: 'LAYTABLE_EXCEL',icon: 'layui-icon-export'}] ,title:'联系人列表' ,url: "/customer/contact/index" - ,cellMinWidth: 200 + ,cellMinWidth: 80 ,page: true //开启分页 ,limit: 20 ,cols: [[ diff --git a/app/customer/view/index/index.html b/app/customer/view/index/index.html index aa04475..b368f12 100644 --- a/app/customer/view/index/index.html +++ b/app/customer/view/index/index.html @@ -109,7 +109,7 @@ toolbar: '#toolbarDemo', defaultToolbar:['filter', {title:'导出EXCEL',layEvent: 'LAYTABLE_EXCEL',icon: 'layui-icon-export'}], url: "/customer/index/index", //数据接口 - cellMinWidth: 200, + cellMinWidth: 80, page: true, //开启分页 limit: 20, cols: [ diff --git a/app/customer/view/index/rush.html b/app/customer/view/index/rush.html index c02fc63..80b3b76 100644 --- a/app/customer/view/index/rush.html +++ b/app/customer/view/index/rush.html @@ -35,7 +35,7 @@ toolbar: '#toolbarDemo', defaultToolbar: false, url: "/customer/index/rush", //数据接口 - cellMinWidth: 200, + cellMinWidth: 80, page: false, //开启分页 limit: 10, cols: [ diff --git a/app/customer/view/index/sea.html b/app/customer/view/index/sea.html index 6debf14..895b9d2 100644 --- a/app/customer/view/index/sea.html +++ b/app/customer/view/index/sea.html @@ -56,7 +56,7 @@ defaultToolbar: false, toolbar: '#toolbarDemo', url: "/customer/index/sea", //数据接口 - cellMinWidth: 200, + cellMinWidth: 80, page: true, //开启分页 limit: 20, cols: [ diff --git a/app/customer/view/index/trash.html b/app/customer/view/index/trash.html index cbbd8e4..0157e2a 100644 --- a/app/customer/view/index/trash.html +++ b/app/customer/view/index/trash.html @@ -41,7 +41,7 @@ toolbar: '#toolbarDemo', defaultToolbar: false, url: "/customer/index/trash", //数据接口 - cellMinWidth: 200, + cellMinWidth: 80, page: true, //开启分页 limit: 20, cols: [ diff --git a/app/finance/view/expense/checkedlist.html b/app/finance/view/expense/checkedlist.html index 8673741..1592bad 100644 --- a/app/finance/view/expense/checkedlist.html +++ b/app/finance/view/expense/checkedlist.html @@ -56,7 +56,7 @@ toolbar: '#toolbarDemo', defaultToolbar:['filter', {title:'导出EXCEL',layEvent: 'LAYTABLE_EXCEL',icon: 'layui-icon-export'}], url: "/finance/expense/checkedlist", //数据接口 - cellMinWidth: 200, + cellMinWidth: 80, page: true, //开启分页 limit: 20, cols: [ diff --git a/app/oa/view/approve/copy.html b/app/oa/view/approve/copy.html index 217dcb8..91b13b9 100644 --- a/app/oa/view/approve/copy.html +++ b/app/oa/view/approve/copy.html @@ -24,7 +24,7 @@ ,url: "/oa/approve/copy" ,page: true //开启分页 ,limit: 20 - ,cellMinWidth: 200 + ,cellMinWidth: 80 ,cols: [[ {field:'id',width:80, title: 'ID号', align:'center'} ,{field:'name',title: '申请人',width:90,align:'center'} diff --git a/app/oa/view/approve/list.html b/app/oa/view/approve/list.html index 6ab7dbf..3850e80 100644 --- a/app/oa/view/approve/list.html +++ b/app/oa/view/approve/list.html @@ -41,7 +41,7 @@ ,url: "/oa/approve/list" ,page: true //开启分页 ,limit: 20 - ,cellMinWidth: 200 + ,cellMinWidth: 80 ,cols: [[ {field:'id',width:80, title: 'ID号', align:'center'} ,{field:'name',title: '申请人',width:90,align:'center'} diff --git a/app/project/view/document/index.html b/app/project/view/document/index.html index 896a46c..996db92 100644 --- a/app/project/view/document/index.html +++ b/app/project/view/document/index.html @@ -48,7 +48,7 @@ title: '文档列表', toolbar: '#toolbarDemo', defaultToolbar: false, - cellMinWidth: 200, + cellMinWidth: 80, url: "/project/document/index", page: true, //开启分页 limit: 20, diff --git a/app/project/view/index/index.html b/app/project/view/index/index.html index 16cba8f..e889e3d 100644 --- a/app/project/view/index/index.html +++ b/app/project/view/index/index.html @@ -23,7 +23,7 @@ toolbar: '#toolbarDemo', defaultToolbar:['filter', {title:'导出EXCEL',layEvent: 'LAYTABLE_EXCEL',icon: 'layui-icon-export'}], title: '项目列表', - cellMinWidth: 200, + cellMinWidth: 80, page: true, //开启分页 limit: 20, height: 'full-24', diff --git a/app/project/view/index/view_user.html b/app/project/view/index/view_user.html index f57a0ba..85d89e3 100644 --- a/app/project/view/index/view_user.html +++ b/app/project/view/index/view_user.html @@ -17,7 +17,7 @@ function project_user(){ layui.userTable = table.render({ elem: '#user', title: '项目成员列表', - cellMinWidth: 120, + cellMinWidth: 80, toolbar: '#toolbaruser', url: "/project/api/project_user", //数据接口 where: { 'tid': project_id }, diff --git a/app/project/view/task/index.html b/app/project/view/task/index.html index 8016dac..1142cce 100644 --- a/app/project/view/task/index.html +++ b/app/project/view/task/index.html @@ -81,7 +81,7 @@ title: '任务列表', toolbar: '#toolbarDemo', defaultToolbar:['filter', {title:'导出EXCEL',layEvent: 'LAYTABLE_EXCEL',icon: 'layui-icon-export'}], - cellMinWidth: 200, + cellMinWidth: 80, url: "/project/task/index", //数据接口 page: true, //开启分页 limit: 20, diff --git a/app/project/view/task/task_time.html b/app/project/view/task/task_time.html index d7bd8d1..95a73cb 100644 --- a/app/project/view/task/task_time.html +++ b/app/project/view/task/task_time.html @@ -84,7 +84,7 @@ ,url: "/project/task/task_time" ,page: true //开启分页 ,limit: 20 - ,cellMinWidth: 200 + ,cellMinWidth: 80 ,height: 'full-88' ,cols: [[ //表头 {field: 'id', title: '序号',fixed: 'left', width:80, align:'center'}