From f7f24964c37da63fc7d4b502dd6dba3b5e44005d Mon Sep 17 00:00:00 2001 From: Ying Date: Tue, 23 Aug 2022 18:12:37 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E4=B8=80=E9=94=AE=E5=88=A0=E9=99=A4=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/system/Admin.php | 11 ++++------- app/admin/view/system/dictionary/index.html | 2 +- app/admin/view/system/login_log/index.html | 4 ++++ app/admin/view/system/system_log/index.html | 6 ++++++ app/common/model/system/Company.php | 2 ++ app/install/install.sql | 1 + 6 files changed, 18 insertions(+), 8 deletions(-) diff --git a/app/admin/controller/system/Admin.php b/app/admin/controller/system/Admin.php index ed0e32d..a99e4c2 100644 --- a/app/admin/controller/system/Admin.php +++ b/app/admin/controller/system/Admin.php @@ -55,13 +55,6 @@ class Admin extends AdminController { parent::__construct(); $this->model = new AdminModel(); - $this->jobs = Jobs::select()->toArray(); - $this->group = AdminGroupModel::select()->toArray(); - $this->department = Department::getListTree(); - - foreach ($this->group as $k => $v) { - $this->group[$k]['title'] = __($v['title']); - } } /** @@ -123,6 +116,10 @@ class Admin extends AdminController return $this->success('查询成功', null, $list, $count); } + $this->jobs = Jobs::select()->toArray(); + $this->group = AdminGroupModel::select()->toArray(); + $this->department = Department::getListTree(); + return view('/system/admin/index', [ 'jobs' => $this->jobs, 'group' => $this->group, diff --git a/app/admin/view/system/dictionary/index.html b/app/admin/view/system/dictionary/index.html index cb3a5d0..8ef15bc 100644 --- a/app/admin/view/system/dictionary/index.html +++ b/app/admin/view/system/dictionary/index.html @@ -108,7 +108,7 @@ {:__('添加')} - diff --git a/app/admin/view/system/login_log/index.html b/app/admin/view/system/login_log/index.html index b2adf48..708b3d9 100644 --- a/app/admin/view/system/login_log/index.html +++ b/app/admin/view/system/login_log/index.html @@ -87,6 +87,10 @@ + + diff --git a/app/admin/view/system/system_log/index.html b/app/admin/view/system/system_log/index.html index d57b700..1d89ea4 100644 --- a/app/admin/view/system/system_log/index.html +++ b/app/admin/view/system/system_log/index.html @@ -47,6 +47,10 @@ + + @@ -136,6 +140,8 @@ var isTable = table.render({ elem: "#lay-tableList" ,url: "{:url('/system/SystemLog/index')}" + ,toolbar: '#tableButton' + ,defaultToolbar: ['filter', 'exports', 'print', 'search'] ,limit: 18 ,page: true ,cols: [[ diff --git a/app/common/model/system/Company.php b/app/common/model/system/Company.php index cb372aa..176eea7 100644 --- a/app/common/model/system/Company.php +++ b/app/common/model/system/Company.php @@ -4,12 +4,14 @@ declare (strict_types = 1); namespace app\common\model\system; use think\Model; +use think\model\concern\SoftDelete; /** * @mixin \think\Model */ class Company extends Model { + use SoftDelete; // 定义时间戳字段名 protected $createTime = 'create_time'; diff --git a/app/install/install.sql b/app/install/install.sql index 908afa9..c1dd741 100644 --- a/app/install/install.sql +++ b/app/install/install.sql @@ -292,6 +292,7 @@ CREATE TABLE `__PREFIX__company` ( `longitude` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '地图经度', `latitude` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '地图纬度', `create_time` int(11) NULL DEFAULT NULL COMMENT '创建时间', + `delete_time` int(11) NULL DEFAULT NULL COMMENT '创建时间', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '公司信息表' ROW_FORMAT = DYNAMIC;