mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-05 19:41:44 +08:00
更新代码
This commit is contained in:
parent
c385201fdf
commit
969b45e69f
@ -31,7 +31,7 @@ class Service extends Plugin
|
|||||||
* 定义插件名称
|
* 定义插件名称
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $appName = '系统配置管理';
|
protected $appName = '系统后台管理';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定义安装包名
|
* 定义安装包名
|
||||||
@ -60,7 +60,7 @@ class Service extends Plugin
|
|||||||
[
|
[
|
||||||
'name' => '权限管理',
|
'name' => '权限管理',
|
||||||
'subs' => [
|
'subs' => [
|
||||||
['name' => '访问权限管理', 'icon' => 'layui-icon layui-icon-vercode', 'node' => 'admin/auth/index'],
|
['name' => '系统权限管理', 'icon' => 'layui-icon layui-icon-vercode', 'node' => 'admin/auth/index'],
|
||||||
['name' => '系统用户管理', 'icon' => 'layui-icon layui-icon-username', 'node' => 'admin/user/index'],
|
['name' => '系统用户管理', 'icon' => 'layui-icon layui-icon-username', 'node' => 'admin/user/index'],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
@ -96,16 +96,18 @@ class Auth extends Controller
|
|||||||
$map = $this->_vali(['auth.require#id' => '权限ID不能为空!']);
|
$map = $this->_vali(['auth.require#id' => '权限ID不能为空!']);
|
||||||
if (input('action') === 'get') {
|
if (input('action') === 'get') {
|
||||||
if ($this->app->isDebug()) AdminService::clear();
|
if ($this->app->isDebug()) AdminService::clear();
|
||||||
$nodes = AdminService::getTree(SystemNode::mk()->where($map)->column('node'));
|
$nodes = SystemNode::mk()->where($map)->column('node');
|
||||||
usort($nodes, static function ($a, $b) {
|
foreach ($nodes as &$node) $node['title'] = lang($node['title']);
|
||||||
|
$ztree = AdminService::getTree($nodes);
|
||||||
|
usort($ztree, static function ($a, $b) {
|
||||||
if (explode('-', $a['node'])[0] !== explode('-', $b['node'])[0]) {
|
if (explode('-', $a['node'])[0] !== explode('-', $b['node'])[0]) {
|
||||||
if (stripos($a['node'], 'plugin-') === 0) return 1;
|
if (stripos($a['node'], 'plugin-') === 0) return 1;
|
||||||
}
|
}
|
||||||
return $a['node'] === $b['node'] ? 0 : ($a['node'] > $b['node'] ? 1 : -1);
|
return $a['node'] === $b['node'] ? 0 : ($a['node'] > $b['node'] ? 1 : -1);
|
||||||
});
|
});
|
||||||
[$ps, $cs] = [Plugin::get(), (array)$this->app->config->get('app.app_names', [])];
|
[$ps, $cs] = [Plugin::get(), (array)$this->app->config->get('app.app_names', [])];
|
||||||
foreach ($nodes as &$t) $t['title'] = $cs[$t['node']] ?? (($ps[$t['node']] ?? [])['name'] ?? $t['title']);
|
foreach ($ztree as &$n) $n['title'] = lang($cs[$n['node']] ?? (($ps[$n['node']] ?? [])['name'] ?? $n['title']));
|
||||||
$this->success('获取权限节点成功!', $nodes);
|
$this->success('获取权限节点成功!', $ztree);
|
||||||
} elseif (input('action') === 'save') {
|
} elseif (input('action') === 'save') {
|
||||||
[$post, $data] = [$this->request->post(), []];
|
[$post, $data] = [$this->request->post(), []];
|
||||||
foreach ($post['nodes'] ?? [] as $node) {
|
foreach ($post['nodes'] ?? [] as $node) {
|
||||||
|
@ -74,7 +74,7 @@ class Base extends Controller
|
|||||||
{
|
{
|
||||||
if ($this->request->isGet()) {
|
if ($this->request->isGet()) {
|
||||||
$this->types = SystemBase::types();
|
$this->types = SystemBase::types();
|
||||||
$this->types[] = '--- 新增类型 ---';
|
$this->types[] = '--- ' . lang('新增类型') . ' ---';
|
||||||
$this->type = $this->get['type'] ?? ($this->types[0] ?? '-');
|
$this->type = $this->get['type'] ?? ($this->types[0] ?? '-');
|
||||||
} else {
|
} else {
|
||||||
$map = [];
|
$map = [];
|
||||||
@ -83,7 +83,7 @@ class Base extends Controller
|
|||||||
$map[] = ['type', '=', $data['type']];
|
$map[] = ['type', '=', $data['type']];
|
||||||
$map[] = ['id', '<>', $data['id'] ?? 0];
|
$map[] = ['id', '<>', $data['id'] ?? 0];
|
||||||
if (SystemBase::mk()->where($map)->count() > 0) {
|
if (SystemBase::mk()->where($map)->count() > 0) {
|
||||||
$this->error("同类型的数据编码已经存在!");
|
$this->error("数据编码已经存在!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,6 @@ class Config extends Controller
|
|||||||
*/
|
*/
|
||||||
public function system()
|
public function system()
|
||||||
{
|
{
|
||||||
$this->_applyFormToken();
|
|
||||||
if ($this->request->isGet()) {
|
if ($this->request->isGet()) {
|
||||||
$this->title = '修改系统参数';
|
$this->title = '修改系统参数';
|
||||||
$this->themes = static::themes;
|
$this->themes = static::themes;
|
||||||
@ -83,10 +82,12 @@ class Config extends Controller
|
|||||||
// 修改网站后台入口路径
|
// 修改网站后台入口路径
|
||||||
if (!empty($post['xpath'])) {
|
if (!empty($post['xpath'])) {
|
||||||
if (!preg_match('/^[a-zA-Z_][a-zA-Z0-9_]*$/', $post['xpath'])) {
|
if (!preg_match('/^[a-zA-Z_][a-zA-Z0-9_]*$/', $post['xpath'])) {
|
||||||
$this->error('后台入口名称需要是由英文字母开头!');
|
$this->error('后台入口格式错误!');
|
||||||
}
|
}
|
||||||
if ($post['xpath'] !== 'admin' && file_exists($this->app->getBasePath() . $post['xpath'])) {
|
if ($post['xpath'] !== 'admin') {
|
||||||
$this->error("后台入口名称{$post['xpath']}已经存在应用!");
|
if (is_dir(syspath("app/{$post['xpath']}")) || !empty(Plugin::get($post['xpath']))) {
|
||||||
|
$this->error(lang('已存在 %s 应用!', [$post['xpath']]));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
RuntimeService::set(null, [$post['xpath'] => 'admin']);
|
RuntimeService::set(null, [$post['xpath'] => 'admin']);
|
||||||
}
|
}
|
||||||
@ -99,7 +100,7 @@ class Config extends Controller
|
|||||||
// 数据数据到系统配置表
|
// 数据数据到系统配置表
|
||||||
foreach ($post as $k => $v) sysconf($k, $v);
|
foreach ($post as $k => $v) sysconf($k, $v);
|
||||||
sysoplog('系统配置管理', "修改系统参数成功");
|
sysoplog('系统配置管理', "修改系统参数成功");
|
||||||
$this->success('修改系统参数成功!', admuri('admin/config/index'));
|
$this->success('数据保存成功!', admuri('admin/config/index'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,7 +99,6 @@ class File extends Controller
|
|||||||
* 清理重复文件
|
* 清理重复文件
|
||||||
* @auth true
|
* @auth true
|
||||||
* @return void
|
* @return void
|
||||||
* @throws \think\db\exception\DbException
|
|
||||||
*/
|
*/
|
||||||
public function distinct()
|
public function distinct()
|
||||||
{
|
{
|
||||||
|
@ -126,7 +126,7 @@ class Index extends Controller
|
|||||||
{
|
{
|
||||||
$this->_applyFormToken();
|
$this->_applyFormToken();
|
||||||
if (AdminService::getUserId() !== intval($id)) {
|
if (AdminService::getUserId() !== intval($id)) {
|
||||||
$this->error('只能修改当前用户的密码!');
|
$this->error('禁止修改他人密码!');
|
||||||
}
|
}
|
||||||
if ($this->app->request->isGet()) {
|
if ($this->app->request->isGet()) {
|
||||||
$this->verify = true;
|
$this->verify = true;
|
||||||
|
@ -78,7 +78,7 @@ class Oplog extends Controller
|
|||||||
throw $exception;
|
throw $exception;
|
||||||
} catch (\Exception $exception) {
|
} catch (\Exception $exception) {
|
||||||
trace_file($exception);
|
trace_file($exception);
|
||||||
$this->error("日志清理失败,{$exception->getMessage()}");
|
$this->error(lang("日志清理失败,%s", [$exception->getMessage()]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,14 +90,15 @@ class Queue extends Controller
|
|||||||
if (AdminService::isSuper()) try {
|
if (AdminService::isSuper()) try {
|
||||||
$message = $this->app->console->call('xadmin:queue', ['status'])->fetch();
|
$message = $this->app->console->call('xadmin:queue', ['status'])->fetch();
|
||||||
if (preg_match('/process.*?\d+.*?running/', $message)) {
|
if (preg_match('/process.*?\d+.*?running/', $message)) {
|
||||||
echo "<span class='color-green pointer' data-tips-text='{$message}'>已启动</span>";
|
echo "<span class='color-green pointer' data-tips-text='{$message}'>{$this->app->lang->get('已启动')}</span>";
|
||||||
} else {
|
} else {
|
||||||
echo "<span class='color-red pointer' data-tips-text='{$message}'>未启动</span>";
|
echo "<span class='color-red pointer' data-tips-text='{$message}'>{$this->app->lang->get('未启动')}</span>";
|
||||||
}
|
}
|
||||||
} catch (\Error|\Exception $exception) {
|
} catch (\Error|\Exception $exception) {
|
||||||
echo "<span class='color-red pointer' data-tips-text='{$exception->getMessage()}'>异 常</span>";
|
echo "<span class='color-red pointer' data-tips-text='{$exception->getMessage()}'>{$this->app->lang->get('异 常')}</span>";
|
||||||
} else {
|
} else {
|
||||||
echo "<span class='color-red pointer' data-tips-text='只有超级管理员才能操作!'>无权限</span>";
|
$message = lang('只有超级管理员才能操作!');
|
||||||
|
echo "<span class='color-red pointer' data-tips-text='{$message}'>{$this->app->lang->get('无权限')}</span>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
195
app/admin/lang/en-us.php
Normal file
195
app/admin/lang/en-us.php
Normal file
@ -0,0 +1,195 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | Admin Plugin for ThinkAdmin
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | 版权所有 2014~2023 ThinkAdmin [ thinkadmin.top ]
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | 官方网站: https://thinkadmin.top
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | 开源协议 ( https://mit-license.org )
|
||||||
|
// | 免责声明 ( https://thinkadmin.top/disclaimer )
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | gitee 代码仓库:https://gitee.com/zoujingli/think-plugs-admin
|
||||||
|
// | github 代码仓库:https://github.com/zoujingli/think-plugs-admin
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
|
$extra = [];
|
||||||
|
$extra['开发人员或在功能调试时使用,系统异常时会显示详细的错误信息,同时还会记录操作日志及数据库 SQL 语句信息。'] = 'Developers may use it during functional debugging. When there are system exceptions, detailed error messages will be displayed, and operation logs and database SQL statement information will also be recorded.';
|
||||||
|
$extra['项目正式部署上线后使用,系统异常时统一显示 “%s”,只记录重要的异常日志信息,强烈推荐上线后使用此模式。'] = 'After the project is officially deployed and launched, it will be used. When there are system exceptions, " %s " will be displayed uniformly, and only important exception log information will be recorded. It is strongly recommended to use this mode after launch.';
|
||||||
|
$extra['旧版本编辑器,对浏览器兼容较好,但内容编辑体验稍有不足。'] = 'The old version of the editor is compatible with browsers, but the content editing experience is slightly insufficient.';
|
||||||
|
$extra['新版本编辑器,只支持新特性浏览器,对内容编辑体验较好,推荐使用。'] = 'The new version of the editor only supports the new feature browser and has a good experience in content editing. It is recommended to use it.';
|
||||||
|
$extra['优先使用新版本编辑器,若浏览器不支持新版本时自动降级为旧版本编辑器。'] = 'Priority should be given to using the new version of the editor. If the browser does not support the new version, it will automatically be downgraded to the old version of the editor.';
|
||||||
|
$extra['文件上传到本地服务器的 `static/upload` 目录,不支持大文件上传,占用服务器磁盘空间,访问时消耗服务器带宽流量。'] = 'Uploading files to the `static/upload` directory of the local server does not support uploading large files, occupying server disk space, and consuming server bandwidth traffic during access.';
|
||||||
|
$extra['文件上传到 Alist 存储的服务器或云存储空间,根据服务配置可支持大文件上传,不占用本身服务器空间及服务器带宽流量。'] = 'Files can be uploaded to the Alist storage server or Cloud storage space. According to the service configuration, large file upload can be supported without occupying the server space and server bandwidth traffic.';
|
||||||
|
$extra['文件上传到七牛云存储空间,支持大文件上传,不占用服务器空间及服务器带宽流量,支持 CDN 加速访问,访问量大时推荐使用。'] = 'Files can be uploaded to Qiniu Cloud storage space. It supports large file upload, does not occupy server space and server bandwidth traffic, and supports CDN accelerated access. It is recommended when there is a large amount of access.';
|
||||||
|
$extra['文件上传到又拍云 USS 存储空间,支持大文件上传,不占用服务器空间及服务器带宽流量,支持 CDN 加速访问,访问量大时推荐使用。'] = "Uploading files to Upyun Cloud's USS storage space supports large file uploads without occupying server space or bandwidth traffic. It supports CDN accelerated access and is recommended for high traffic.";
|
||||||
|
$extra['文件上传到阿里云 OSS 存储空间,支持大文件上传,不占用服务器空间及服务器带宽流量,支持 CDN 加速访问,访问量大时推荐使用。'] = "Uploading files to Aliyun Cloud's OSS storage space supports large file uploads without occupying server space or bandwidth traffic. It supports CDN accelerated access and is recommended for high traffic.";
|
||||||
|
$extra['文件上传到腾讯云 COS 存储空间,支持大文件上传,不占用服务器空间及服务器带宽流量,支持 CDN 加速访问,访问量大时推荐使用。'] = "Uploading files to Tencent Cloud's COS storage space supports large file uploads without occupying server space or bandwidth traffic. It supports CDN accelerated access and is recommended for high traffic.";
|
||||||
|
$extra['网站名称及网站图标,将显示在浏览器的标签上。'] = "The website name and icon will be displayed on the browser's label.";
|
||||||
|
$extra['管理程序名称,将显示在后台左上角标题。'] = 'The name of the management program will be displayed in the header in the upper left corner of the background.';
|
||||||
|
$extra['管理程序版本,将显示在后台左上角标题。'] = 'The management program version will be displayed in the top left corner of the background with a title.';
|
||||||
|
$extra['网站版权信息,在后台登录页面显示版本信息并链接到备案到信息备案管理系统。'] = 'Website copyright information is displayed on the backend login page and linked to the information filing management system.';
|
||||||
|
$extra['网站备案号,可以在 %s 查询获取,将显示在登录页面下面。'] = 'The website registration number can be found at %s and will be displayed below the login page.';
|
||||||
|
$extra['公安备案号,可以在 %s 查询获取,将在登录页面下面显示。'] = 'The public security registration number can be obtained by searching at %s and will be displayed below the login page.';
|
||||||
|
$extra['点击可复制【服务启动指令】'] = "Click to copy the 'Service Start Command'";
|
||||||
|
$extra['待处理 %s 个任务,处理中 %s 个任务,已完成 %s 个任务,已失败 %s 个任务。'] = 'There are %s tasks to be processed, %s tasks in progress, %s tasks completed, and %s tasks failed.';
|
||||||
|
$extra['确定要切换到生产模式运行吗?'] = 'Are you sure you want to switch to Production mode?';
|
||||||
|
$extra['确定要切换到开发模式运行吗?'] = 'Are you sure you want to switch to Development mode?';
|
||||||
|
|
||||||
|
$extra['等待处理'] = 'Pending';
|
||||||
|
$extra['正在处理'] = 'Processing';
|
||||||
|
$extra['处理完成'] = 'Completed';
|
||||||
|
$extra['处理失败'] = 'Failed';
|
||||||
|
|
||||||
|
$extra['上传进度 %s'] = 'Upload progress %s';
|
||||||
|
$extra['文件上传出错!'] = 'File upload error.';
|
||||||
|
$extra['文件上传失败!'] = 'File upload failed.';
|
||||||
|
$extra['大小超出限制!'] = 'Size exceeds limit.';
|
||||||
|
$extra['文件秒传成功!'] = 'Successfully transmitted the file in seconds.';
|
||||||
|
$extra['上传接口异常!'] = 'Abnormal upload interface.';
|
||||||
|
$extra['文件上传成功!'] = 'File uploaded successfully.';
|
||||||
|
$extra['图片压缩失败!'] = 'Image compression failed.';
|
||||||
|
$extra['无效的文件上传对象!'] = 'Invalid file upload object.';
|
||||||
|
|
||||||
|
return array_merge($extra, [
|
||||||
|
// 系统操作
|
||||||
|
'基本资料' => 'Basic information',
|
||||||
|
'安全设置' => 'Security setting',
|
||||||
|
'缓存加速' => 'Cache acceleration',
|
||||||
|
'清理缓存' => 'Clean cache',
|
||||||
|
'配色方案' => 'Color scheme',
|
||||||
|
'立即登录' => 'Login',
|
||||||
|
'退出登录' => 'Logout',
|
||||||
|
'清空日志缓存成功!' => 'Successfully cleared the log cache.',
|
||||||
|
'获取任务进度成功!' => 'Successfully obtained task progress.',
|
||||||
|
'网站缓存加速成功!' => 'Website cache acceleration successful.',
|
||||||
|
'请使用超管账号操作!' => 'Please use a super managed account to operate.',
|
||||||
|
'停止任务监听服务成功!' => 'Successfully stopped task listening service.',
|
||||||
|
'任务监听服务启动成功!' => 'Task monitoring service started successfully.',
|
||||||
|
'任务监听服务已经启动!' => 'The task monitoring service has started.',
|
||||||
|
'没有找到需要停止的服务!' => 'No services found that need to be stopped.',
|
||||||
|
'已切换后台编辑器!' => 'Switched to background editor.',
|
||||||
|
// 其他搜索器提示
|
||||||
|
'请选择登录时间' => 'Please select the Login time',
|
||||||
|
'请选择创建时间' => 'Please select the creation time',
|
||||||
|
'请输入账号或名称' => 'Please enter an account or name',
|
||||||
|
'请输入权限名称' => 'Please enter the permission name',
|
||||||
|
'请输入数据编码' => 'Please enter the data code',
|
||||||
|
'请输入数据名称' => 'Please enter the data name',
|
||||||
|
'请输入文件名称' => 'Please enter the file name',
|
||||||
|
'请输入文件哈希' => 'Please enter the file hash',
|
||||||
|
'请输入操作节点' => 'Please enter the operate node',
|
||||||
|
'请输入操作内容' => 'Please enter the operate content',
|
||||||
|
'请输入访问地址' => 'Please enter the access Geoip',
|
||||||
|
// 系统配置
|
||||||
|
'运行模式' => 'Running Mode',
|
||||||
|
'生产模式' => 'Production mode',
|
||||||
|
'开发模式' => 'Development mode',
|
||||||
|
'以开发模式运行' => 'Running in Development mode',
|
||||||
|
'以生产模式运行' => 'Running in Production mode',
|
||||||
|
'清理无效配置' => 'Clean up Invalid Configurations',
|
||||||
|
'修改系统参数' => 'Modify System Parameters',
|
||||||
|
'清理系统配置成功!' => 'Successfully cleaned.',
|
||||||
|
'自适应模式' => 'Adaptive Mode',
|
||||||
|
'富编辑器' => 'RichText Editor',
|
||||||
|
'存储引擎' => 'Storage Engine',
|
||||||
|
'系统参数' => 'System Parameter',
|
||||||
|
'网站名称' => 'Site Name',
|
||||||
|
'管理程序名称' => 'Program Name',
|
||||||
|
'管理程序版本' => 'Program Version',
|
||||||
|
'公安备案号' => 'Public security registration number',
|
||||||
|
'网站备案号' => 'Website registration number',
|
||||||
|
'网站版权信息' => 'Website copyright information',
|
||||||
|
'系统信息' => 'System Information',
|
||||||
|
'应用插件' => 'Plugin Information',
|
||||||
|
'核心框架' => 'Core Framework',
|
||||||
|
'平台框架' => 'Platform Framework',
|
||||||
|
'操作系统' => 'Operating System',
|
||||||
|
'运行环境' => 'Runtime Environment',
|
||||||
|
'仅开发模式可见' => 'Visible only in Development mode',
|
||||||
|
'仅生产模式可见' => 'Visible only in Production mode',
|
||||||
|
'插件名称' => 'Plugin Name',
|
||||||
|
'应用名称' => 'App Name',
|
||||||
|
'插件包名' => 'Package Name',
|
||||||
|
'插件版本' => 'Plugin Version',
|
||||||
|
'授权协议' => 'License',
|
||||||
|
'文件默认存储方式' => 'Default storage method for file upload',
|
||||||
|
'当前系统配置参数' => 'Current system configuration parameters',
|
||||||
|
'仅超级管理员可配置' => 'Only super administrators can configure',
|
||||||
|
|
||||||
|
// 系统任务管理
|
||||||
|
'优化数据库' => 'Optimize Database',
|
||||||
|
'开启服务' => 'Start Service',
|
||||||
|
'关闭服务' => 'Shutdown Service',
|
||||||
|
'定时清理' => 'Regular cleaning',
|
||||||
|
'服务状态' => 'Service',
|
||||||
|
'任务统计' => 'Total',
|
||||||
|
'编号名称' => 'Name',
|
||||||
|
'任务指令' => 'Command',
|
||||||
|
'任务状态' => 'Status',
|
||||||
|
'计划时间' => 'scheduled time',
|
||||||
|
'任务名称' => 'Name',
|
||||||
|
'检查中' => 'Checking',
|
||||||
|
'任务计划' => 'Scheduled',
|
||||||
|
'重 置' => 'Reset',
|
||||||
|
'日 志' => 'Logs',
|
||||||
|
'异 常' => 'Abnormal',
|
||||||
|
'无权限' => 'Denied',
|
||||||
|
'已启动' => 'Started',
|
||||||
|
'未启动' => 'Stopped',
|
||||||
|
// 数据字典管理
|
||||||
|
'数据编码' => 'Code',
|
||||||
|
'数据名称' => 'Name',
|
||||||
|
'操作账号' => 'User',
|
||||||
|
'操作节点' => "Node",
|
||||||
|
'操作行为' => 'Action',
|
||||||
|
'操作内容' => "Content",
|
||||||
|
'访问地址' => 'Geo IP',
|
||||||
|
'网络服务商' => 'ISP.',
|
||||||
|
'日志清理成功!' => 'Logger Clear Complate.',
|
||||||
|
'成功清理所有日志' => 'Successfully cleared all logs.',
|
||||||
|
// 系统文件管理
|
||||||
|
'文件名称' => 'Name',
|
||||||
|
'文件哈希' => "HASH",
|
||||||
|
'文件大小' => "Size",
|
||||||
|
'文件后缀' => 'Exts',
|
||||||
|
'存储方式' => 'Storage Type',
|
||||||
|
'清理重复' => 'Clear Replace',
|
||||||
|
'上传方式' => 'Upload Type',
|
||||||
|
'查看文件' => 'View',
|
||||||
|
'文件链接' => 'Link',
|
||||||
|
'秒传' => 'Speedy',
|
||||||
|
'普通' => 'Normal',
|
||||||
|
// 系统菜单管理
|
||||||
|
'图 标' => "Icon",
|
||||||
|
'添加菜单' => 'Add',
|
||||||
|
'禁用菜单' => 'Forbid',
|
||||||
|
'激活菜单' => "Resume",
|
||||||
|
'系统菜单' => 'Menus',
|
||||||
|
'菜单名称' => 'Name',
|
||||||
|
'跳转链接' => 'Link',
|
||||||
|
'上级菜单' => 'Parent',
|
||||||
|
'菜单链接' => 'Link',
|
||||||
|
'链接参数' => 'Params',
|
||||||
|
'权限节点' => "Node",
|
||||||
|
'菜单图标' => 'Icon',
|
||||||
|
'选择图标' => 'Select Icon',
|
||||||
|
// 系统权限管理
|
||||||
|
"授 权" => 'Auth',
|
||||||
|
'添加权限' => 'Add',
|
||||||
|
'权限名称' => "Name",
|
||||||
|
'权限描述' => 'Description',
|
||||||
|
'请输入权限描述' => 'Please enter a permission description',
|
||||||
|
// 系统用户管理
|
||||||
|
'账号名称' => 'Username',
|
||||||
|
'添加用户' => 'Add User',
|
||||||
|
'最后登录' => "Last Login Time",
|
||||||
|
'头像' => "Head",
|
||||||
|
'登录账号' => 'Username',
|
||||||
|
'用户名称' => 'Nickname',
|
||||||
|
'登录次数' => 'Login Times',
|
||||||
|
'系统用户' => 'System User',
|
||||||
|
'密 码' => 'Password',
|
||||||
|
'系统用户管理' => 'Users',
|
||||||
|
]);
|
@ -20,33 +20,33 @@ use think\admin\service\RuntimeService;
|
|||||||
/*! 演示环境禁止操作路由绑定 */
|
/*! 演示环境禁止操作路由绑定 */
|
||||||
if (RuntimeService::check('demo')) {
|
if (RuntimeService::check('demo')) {
|
||||||
Library::$sapp->route->post('index/pass', function () {
|
Library::$sapp->route->post('index/pass', function () {
|
||||||
return json(['code' => 0, 'info' => '演示环境禁止修改用户密码!']);
|
return json(['code' => 0, 'info' => lang('演示环境禁止修改用户密码!')]);
|
||||||
});
|
});
|
||||||
Library::$sapp->route->post('config/system', function () {
|
Library::$sapp->route->post('config/system', function () {
|
||||||
return json(['code' => 0, 'info' => '演示环境禁止修改系统配置!']);
|
return json(['code' => 0, 'info' => lang('演示环境禁止修改系统配置!')]);
|
||||||
});
|
});
|
||||||
Library::$sapp->route->post('config/storage', function () {
|
Library::$sapp->route->post('config/storage', function () {
|
||||||
return json(['code' => 0, 'info' => '演示环境禁止修改系统配置!']);
|
return json(['code' => 0, 'info' => lang('演示环境禁止修改系统配置!')]);
|
||||||
});
|
});
|
||||||
Library::$sapp->route->post('menu', function () {
|
Library::$sapp->route->post('menu', function () {
|
||||||
return json(['code' => 0, 'info' => '演示环境禁止给菜单排序!']);
|
return json(['code' => 0, 'info' => lang('演示环境禁止给菜单排序!')]);
|
||||||
});
|
});
|
||||||
Library::$sapp->route->post('menu/index', function () {
|
Library::$sapp->route->post('menu/index', function () {
|
||||||
return json(['code' => 0, 'info' => '演示环境禁止给菜单排序!']);
|
return json(['code' => 0, 'info' => lang('演示环境禁止给菜单排序!')]);
|
||||||
});
|
});
|
||||||
Library::$sapp->route->post('menu/add', function () {
|
Library::$sapp->route->post('menu/add', function () {
|
||||||
return json(['code' => 0, 'info' => '演示环境禁止添加菜单!']);
|
return json(['code' => 0, 'info' => lang('演示环境禁止添加菜单!')]);
|
||||||
});
|
});
|
||||||
Library::$sapp->route->post('menu/edit', function () {
|
Library::$sapp->route->post('menu/edit', function () {
|
||||||
return json(['code' => 0, 'info' => '演示环境禁止编辑菜单!']);
|
return json(['code' => 0, 'info' => lang('演示环境禁止编辑菜单!')]);
|
||||||
});
|
});
|
||||||
Library::$sapp->route->post('menu/state', function () {
|
Library::$sapp->route->post('menu/state', function () {
|
||||||
return json(['code' => 0, 'info' => '演示环境禁止禁用菜单!']);
|
return json(['code' => 0, 'info' => lang('演示环境禁止禁用菜单!')]);
|
||||||
});
|
});
|
||||||
Library::$sapp->route->post('menu/remove', function () {
|
Library::$sapp->route->post('menu/remove', function () {
|
||||||
return json(['code' => 0, 'info' => '演示环境禁止删除菜单!']);
|
return json(['code' => 0, 'info' => lang('演示环境禁止删除菜单!')]);
|
||||||
});
|
});
|
||||||
Library::$sapp->route->post('user/pass', function () {
|
Library::$sapp->route->post('user/pass', function () {
|
||||||
return json(['code' => 0, 'info' => '演示环境禁止修改用户密码!']);
|
return json(['code' => 0, 'info' => lang('演示环境禁止修改密码!')]);
|
||||||
});
|
});
|
||||||
}
|
}
|
@ -2,10 +2,10 @@ define(['md5', 'notify'], function (SparkMD5, Notify, allowMime) {
|
|||||||
allowMime = JSON.parse('{$exts|raw}');
|
allowMime = JSON.parse('{$exts|raw}');
|
||||||
|
|
||||||
function UploadAdapter(elem, done) {
|
function UploadAdapter(elem, done) {
|
||||||
return new (function (elem, done, that) {
|
return new (function (elem, done) {
|
||||||
|
let that = this;
|
||||||
|
|
||||||
/*! 初始化变量 */
|
/*! 初始化变量 */
|
||||||
that = this;
|
|
||||||
this.option = {elem: $(elem), exts: [], mimes: []};
|
this.option = {elem: $(elem), exts: [], mimes: []};
|
||||||
this.option.size = this.option.elem.data('size') || 0;
|
this.option.size = this.option.elem.data('size') || 0;
|
||||||
this.option.safe = this.option.elem.data('safe') ? 1 : 0;
|
this.option.safe = this.option.elem.data('safe') ? 1 : 0;
|
||||||
@ -69,21 +69,22 @@ define(['md5', 'notify'], function (SparkMD5, Notify, allowMime) {
|
|||||||
|
|
||||||
// 文件推送
|
// 文件推送
|
||||||
Adapter.prototype.upload = function (files, done) {
|
Adapter.prototype.upload = function (files, done) {
|
||||||
var that = this.init();
|
let that = this.init();
|
||||||
layui.each(files, function (index, file) {
|
layui.each(files, function (index, file) {
|
||||||
that.count.total++, file.index = index, that.files[index] = file;
|
that.count.total++, file.index = index, that.files[index] = file;
|
||||||
if (!that.option.hide && !file.notify) {
|
if (!that.option.hide && !file.notify) {
|
||||||
file.notify = new NotifyExtend(file);
|
file.notify = new NotifyExtend(file);
|
||||||
}
|
}
|
||||||
if (that.option.size && file.size > that.option.size) {
|
if (that.option.size && file.size > that.option.size) {
|
||||||
that.event('upload.error', {file: file}, file, '大小超出限制!');
|
that.event('upload.error', {file: file}, file, '{:lang("大小超出限制!")}');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
layui.each(files, function (index, file) {
|
layui.each(files, function (index, file) {
|
||||||
// 禁传异常状态文件
|
// 禁传异常状态文件
|
||||||
if (typeof file.xstate === 'number' && file.xstate === -1) return;
|
if (typeof file.xstate === 'number' && file.xstate === -1) return;
|
||||||
// 图片限宽限高压缩
|
// 图片限宽限高压缩
|
||||||
if (/^image\//.test(file.type) && (file.maxWidth + file.maxHeight + file.cutWidth + file.cutHeight > 0 || file.quality !== 1)) {
|
let isGif = /^image\/gif/.test(file.type);
|
||||||
|
if (!isGif && /^image\//.test(file.type) && (file.maxWidth + file.maxHeight + file.cutWidth + file.cutHeight > 0 || file.quality !== 1)) {
|
||||||
require(['compressor'], function (Compressor) {
|
require(['compressor'], function (Compressor) {
|
||||||
let options = {quality: file.quality, resize: 'cover'};
|
let options = {quality: file.quality, resize: 'cover'};
|
||||||
if (file.cutWidth) options.width = file.cutWidth;
|
if (file.cutWidth) options.width = file.cutWidth;
|
||||||
@ -97,7 +98,7 @@ define(['md5', 'notify'], function (SparkMD5, Notify, allowMime) {
|
|||||||
that.event('upload.hash', file).request(file, done);
|
that.event('upload.hash', file).request(file, done);
|
||||||
});
|
});
|
||||||
}, error: function () {
|
}, error: function () {
|
||||||
that.event('upload.error', {file: file}, file, '压缩失败');
|
that.event('upload.error', {file: file}, file, '{:lang("图片压缩失败!")}');
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
@ -111,14 +112,14 @@ define(['md5', 'notify'], function (SparkMD5, Notify, allowMime) {
|
|||||||
|
|
||||||
// 文件上传
|
// 文件上传
|
||||||
Adapter.prototype.request = function (file, done) {
|
Adapter.prototype.request = function (file, done) {
|
||||||
var that = this, data = {key: file.xkey, safe: that.option.safe, uptype: that.option.type};
|
let that = this, data = {key: file.xkey, safe: that.option.safe, uptype: that.option.type};
|
||||||
data.size = file.size, data.name = file.name, data.hash = file.xmd5, data.mime = file.type, data.xext = file.xext;
|
data.size = file.size, data.name = file.name, data.hash = file.xmd5, data.mime = file.type, data.xext = file.xext;
|
||||||
jQuery.ajax("{:url('admin/api.upload/state',[],false,true)}", {
|
jQuery.ajax("{:url('admin/api.upload/state',[],false,true)}", {
|
||||||
data: data, method: 'post', success: function (ret) {
|
data: data, method: 'post', success: function (ret) {
|
||||||
file.id = ret.data.id || 0, file.xurl = ret.data.url;
|
file.id = ret.data.id || 0, file.xurl = ret.data.url;
|
||||||
file.xsafe = ret.data.safe, file.xpath = ret.data.key, file.xtype = ret.data.uptype;
|
file.xsafe = ret.data.safe, file.xpath = ret.data.key, file.xtype = ret.data.uptype;
|
||||||
if (parseInt(ret.code) === 404) {
|
if (parseInt(ret.code) === 404) {
|
||||||
var uploader = {};
|
let uploader = {};
|
||||||
uploader.uptype = ret.data.uptype;
|
uploader.uptype = ret.data.uptype;
|
||||||
uploader.url = ret.data.server;
|
uploader.url = ret.data.server;
|
||||||
uploader.head = {};
|
uploader.head = {};
|
||||||
@ -157,15 +158,14 @@ define(['md5', 'notify'], function (SparkMD5, Notify, allowMime) {
|
|||||||
uploader.form.append('Content-Disposition', 'inline;filename=' + encodeURIComponent(file.name));
|
uploader.form.append('Content-Disposition', 'inline;filename=' + encodeURIComponent(file.name));
|
||||||
}
|
}
|
||||||
uploader.form.append('file', file, file.name), jQuery.ajax({
|
uploader.form.append('file', file, file.name), jQuery.ajax({
|
||||||
xhrFields: {withCredentials: ret.data.uptype === 'local'}, headers: uploader.head,
|
xhrFields: {withCredentials: ret.data.uptype === 'local'}, headers: uploader.head, url: uploader.url, data: uploader.form, type: uploader.type || 'post', xhr: function (xhr) {
|
||||||
url: uploader.url, data: uploader.form, type: uploader.type || 'post', xhr: function (xhr) {
|
|
||||||
xhr = new XMLHttpRequest();
|
xhr = new XMLHttpRequest();
|
||||||
return xhr.upload.addEventListener('progress', function (event) {
|
return xhr.upload.addEventListener('progress', function (event) {
|
||||||
file.xtotal = event.total, file.xloaded = event.loaded || 0;
|
file.xtotal = event.total, file.xloaded = event.loaded || 0;
|
||||||
that.progress((file.xloaded / file.xtotal * 100).toFixed(2), file)
|
that.progress((file.xloaded / file.xtotal * 100).toFixed(2), file)
|
||||||
}), xhr;
|
}), xhr;
|
||||||
}, contentType: false, error: function () {
|
}, contentType: false, error: function () {
|
||||||
that.event('upload.error', {file: file}, file, '接口异常');
|
that.event('upload.error', {file: file}, file, '{:lang("上传接口异常!")}');
|
||||||
}, processData: false, success: function (ret) {
|
}, processData: false, success: function (ret) {
|
||||||
// 兼容数据格式
|
// 兼容数据格式
|
||||||
if (typeof ret === 'string' && ret.length > 0) try {
|
if (typeof ret === 'string' && ret.length > 0) try {
|
||||||
@ -174,23 +174,23 @@ define(['md5', 'notify'], function (SparkMD5, Notify, allowMime) {
|
|||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
if (typeof ret !== 'object') {
|
if (typeof ret !== 'object') {
|
||||||
ret = {code: 1, url: file.xurl, info: '上传成功'};
|
ret = {code: 1, url: file.xurl, info: '{:lang("文件上传成功!")}'};
|
||||||
}
|
}
|
||||||
/*! 检查单个文件上传返回的结果 */
|
/*! 检查单个文件上传返回的结果 */
|
||||||
if (typeof ret === 'object' && ret.code < 1) {
|
if (typeof ret === 'object' && ret.code < 1) {
|
||||||
that.event('upload.error', {file: file}, file, ret.info || '上传失败');
|
that.event('upload.error', {file: file}, file, ret.info || '{:lang("文件上传失败!")}');
|
||||||
} else if (uploader.uptype === 'alist' && parseInt(ret.code) !== 200) {
|
} else if (uploader.uptype === 'alist' && parseInt(ret.code) !== 200) {
|
||||||
that.event('upload.error', {file: file}, file, ret.message || '上传失败');
|
that.event('upload.error', {file: file}, file, ret.message || '{:lang("文件上传失败!")}');
|
||||||
} else {
|
} else {
|
||||||
that.done(ret, file.index, file, done, '上传成功');
|
that.done(ret, file.index, file, done, '{:lang("文件上传成功!")}');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (parseInt(ret.code) === 200) {
|
} else if (parseInt(ret.code) === 200) {
|
||||||
(file.xurl = ret.data.url), that.progress('100.00', file);
|
(file.xurl = ret.data.url), that.progress('100.00', file);
|
||||||
that.done({code: 1, url: file.xurl, info: file.xstats}, file.index, file, done, '秒传成功');
|
that.done({code: 1, url: file.xurl, info: file.xstats}, file.index, file, done, '{:lang("文件秒传成功!")}');
|
||||||
} else {
|
} else {
|
||||||
that.event('upload.error', {file: file}, file, ret.info || ret.error.message || '上传出错!');
|
that.event('upload.error', {file: file}, file, ret.info || ret.error.message || '{:lang("文件上传出错!")}');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -205,8 +205,8 @@ define(['md5', 'notify'], function (SparkMD5, Notify, allowMime) {
|
|||||||
// 上传结果
|
// 上传结果
|
||||||
Adapter.prototype.done = function (ret, idx, file, done, message) {
|
Adapter.prototype.done = function (ret, idx, file, done, message) {
|
||||||
/*! 检查单个文件上传返回的结果 */
|
/*! 检查单个文件上传返回的结果 */
|
||||||
if (ret.code < 1) return $.msg.tips(ret.info || '文件上传失败!');
|
if (ret.code < 1) return $.msg.tips(ret.info || '{:lang("文件上传失败!")}');
|
||||||
if (typeof file.xurl !== 'string') return $.msg.tips('无效的文件上传对象!');
|
if (typeof file.xurl !== 'string') return $.msg.tips('{:lang("无效的文件上传对象!")}');
|
||||||
jQuery.post("{:url('admin/api.upload/done',[],false,true)}", {id: file.id, hash: file.xmd5});
|
jQuery.post("{:url('admin/api.upload/done',[],false,true)}", {id: file.id, hash: file.xmd5});
|
||||||
/*! 单个文件上传成功结果处理 */
|
/*! 单个文件上传成功结果处理 */
|
||||||
if (typeof done === 'function') {
|
if (typeof done === 'function') {
|
||||||
@ -220,9 +220,9 @@ define(['md5', 'notify'], function (SparkMD5, Notify, allowMime) {
|
|||||||
if (this.count.success + this.count.error >= this.count.total) {
|
if (this.count.success + this.count.error >= this.count.total) {
|
||||||
this.option.hide || $.msg.close(this.loader);
|
this.option.hide || $.msg.close(this.loader);
|
||||||
if (this.option.mult > 0 && this.option.elem.data('input')) {
|
if (this.option.mult > 0 && this.option.elem.data('input')) {
|
||||||
var urls = this.option.elem.data('input').value || [];
|
let urls = this.option.elem.data('input').value || [];
|
||||||
if (typeof urls === 'string') urls = urls.split('|');
|
if (typeof urls === 'string') urls = urls.split('|');
|
||||||
for (var i in this.files) urls.push(this.files[i].xurl);
|
for (let i in this.files) urls.push(this.files[i].xurl);
|
||||||
$(this.option.elem.data('input')).val(urls.join('|')).trigger('change', this.files);
|
$(this.option.elem.data('input')).val(urls.join('|')).trigger('change', this.files);
|
||||||
}
|
}
|
||||||
this.event('upload.complete', {file: this.files}, file).init().uploader && this.uploader.reload();
|
this.event('upload.complete', {file: this.files}, file).init().uploader && this.uploader.reload();
|
||||||
@ -250,11 +250,11 @@ define(['md5', 'notify'], function (SparkMD5, Notify, allowMime) {
|
|||||||
* @return {Promise}
|
* @return {Promise}
|
||||||
*/
|
*/
|
||||||
Adapter.prototype.hash = function (file) {
|
Adapter.prototype.hash = function (file) {
|
||||||
var defer = jQuery.Deferred();
|
let defer = jQuery.Deferred();
|
||||||
file.xext = file.name.indexOf('.') > -1 ? file.name.split('.').pop() : 'tmp';
|
file.xext = file.name.indexOf('.') > -1 ? file.name.split('.').pop() : 'tmp';
|
||||||
|
|
||||||
/*! 兼容不能计算文件 HASH 的情况 */
|
/*! 兼容不能计算文件 HASH 的情况 */
|
||||||
var IsDate = '{$nameType|default=""}'.indexOf('date') > -1;
|
let IsDate = '{$nameType|default=""}'.indexOf('date') > -1;
|
||||||
if (!window.FileReader || IsDate) return jQuery.when((function (xmd5, chars) {
|
if (!window.FileReader || IsDate) return jQuery.when((function (xmd5, chars) {
|
||||||
while (xmd5.length < 32) xmd5 += chars.charAt(Math.floor(Math.random() * chars.length));
|
while (xmd5.length < 32) xmd5 += chars.charAt(Math.floor(Math.random() * chars.length));
|
||||||
return SetFileXdata(file, xmd5, 6), defer.promise();
|
return SetFileXdata(file, xmd5, 6), defer.promise();
|
||||||
@ -271,8 +271,8 @@ define(['md5', 'notify'], function (SparkMD5, Notify, allowMime) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function LoadNextChunk(file) {
|
function LoadNextChunk(file) {
|
||||||
var that = this, reader = new FileReader(), spark = new SparkMD5.ArrayBuffer();
|
let that = this, reader = new FileReader(), spark = new SparkMD5.ArrayBuffer();
|
||||||
var slice = File.prototype.slice || File.prototype.mozSlice || File.prototype.webkitSlice;
|
let slice = File.prototype.slice || File.prototype.mozSlice || File.prototype.webkitSlice;
|
||||||
this.chunkIdx = 0, this.chunkSize = 2097152, this.chunkTotal = Math.ceil(file.size / this.chunkSize);
|
this.chunkIdx = 0, this.chunkSize = 2097152, this.chunkTotal = Math.ceil(file.size / this.chunkSize);
|
||||||
reader.onload = function (event) {
|
reader.onload = function (event) {
|
||||||
spark.append(event.target.result);
|
spark.append(event.target.result);
|
||||||
@ -297,8 +297,8 @@ define(['md5', 'notify'], function (SparkMD5, Notify, allowMime) {
|
|||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function NotifyExtend(file) {
|
function NotifyExtend(file) {
|
||||||
var that = this;
|
let that = this, message = "{:lang('上传进度 %s', ['<span data-upload-progress>0%</span>'])}";
|
||||||
this.notify = Notify.notify({width: 260, title: file.name, showProgress: true, description: '上传进度 <span data-upload-progress>0%</span>', type: 'default', position: 'top-right', closeTimeout: 0});
|
this.notify = Notify.notify({width: 260, title: file.name, showProgress: true, description: message, type: 'default', position: 'top-right', closeTimeout: 0});
|
||||||
this.$elem = $(this.notify.notification.nodes);
|
this.$elem = $(this.notify.notification.nodes);
|
||||||
this.$elem.find('.growl-notification__progress').addClass('is-visible');
|
this.$elem.find('.growl-notification__progress').addClass('is-visible');
|
||||||
this.$elem.find('.growl-notification__progress-bar').addClass('transition');
|
this.$elem.find('.growl-notification__progress-bar').addClass('transition');
|
||||||
@ -307,12 +307,12 @@ define(['md5', 'notify'], function (SparkMD5, Notify, allowMime) {
|
|||||||
this.$elem.find('.growl-notification__progress-bar').css({width: number + '%'});
|
this.$elem.find('.growl-notification__progress-bar').css({width: number + '%'});
|
||||||
return this;
|
return this;
|
||||||
}, this.setError = function (message) {
|
}, this.setError = function (message) {
|
||||||
this.$elem.find('.growl-notification__desc').html(message || '文件上传失败!');
|
this.$elem.find('.growl-notification__desc').html(message || '{:lang("文件上传失败!")}');
|
||||||
this.$elem.removeClass('growl-notification--default').addClass('growl-notification--error')
|
this.$elem.removeClass('growl-notification--default').addClass('growl-notification--error')
|
||||||
return this.close();
|
return this.close();
|
||||||
}, this.setSuccess = function (message) {
|
}, this.setSuccess = function (message) {
|
||||||
this.setProgress('100.00');
|
this.setProgress('100.00');
|
||||||
this.$elem.find('.growl-notification__desc').html(message || '文件上传成功!');
|
this.$elem.find('.growl-notification__desc').html(message || '{:lang("文件上传成功!")}');
|
||||||
this.$elem.removeClass('growl-notification--default').addClass('growl-notification--success');
|
this.$elem.removeClass('growl-notification--default').addClass('growl-notification--success');
|
||||||
return this.close();
|
return this.close();
|
||||||
}, this.close = function (timeout) {
|
}, this.close = function (timeout) {
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<div class="image-dialog" id="ImageDialog">
|
<div class="image-dialog" id="ImageDialog">
|
||||||
<div class="image-dialog-head">
|
<div class="image-dialog-head">
|
||||||
<label class="pull-left flex">
|
<label class="pull-left flex">
|
||||||
<input class="layui-input margin-right-5" v-model="keys" style="height:30px;line-height:30px" placeholder="请输入搜索关键词">
|
<input class="layui-input margin-right-5" v-model="keys" style="height:30px;line-height:30px" placeholder="{:lang('请输入搜索关键词')}">
|
||||||
<a class="layui-btn layui-btn-sm layui-btn-normal" @click="search">搜 索</a>
|
<a class="layui-btn layui-btn-sm layui-btn-normal" @click="search">{:lang('搜 索')}</a>
|
||||||
</label>
|
</label>
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<a class="layui-btn layui-btn-sm layui-btn-normal" @click="uploadImage">上传图片</a>
|
<a class="layui-btn layui-btn-sm layui-btn-normal" @click="uploadImage">{:lang('上传图片')}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="image-dialog-body">
|
<div class="image-dialog-body">
|
||||||
@ -19,7 +19,8 @@
|
|||||||
<div class="image-dialog-foot">
|
<div class="image-dialog-foot">
|
||||||
<div id="ImageDialogPage" class="image-dialog-page"></div>
|
<div id="ImageDialogPage" class="image-dialog-page"></div>
|
||||||
<div id="ImageDialogButton layui-hide" class="image-dialog-button layui-btn layui-btn-normal" v-if="data.length>0" @click="confirm">
|
<div id="ImageDialogButton layui-hide" class="image-dialog-button layui-btn layui-btn-normal" v-if="data.length>0" @click="confirm">
|
||||||
已选 {{ data.length }} 张,确认
|
{php} $tag = '{{data.length}}'; {/php}
|
||||||
|
{:lang('已选 %s 张,确认', [$tag])}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
<ul id="zTree" class="ztree notselect"></ul>
|
<ul id="zTree" class="ztree notselect"></ul>
|
||||||
<div class="hr-line-dashed"></div>
|
<div class="hr-line-dashed"></div>
|
||||||
<div class="layui-form-item text-center">
|
<div class="layui-form-item text-center">
|
||||||
<button class="layui-btn" data-submit-role type='button'>保存数据</button>
|
<button class="layui-btn" data-submit-role type='button'>{:lang('保存数据')}</button>
|
||||||
<button class="layui-btn layui-btn-danger" type='button' onclick="window.history.back()">取消编辑</button>
|
<button class="layui-btn layui-btn-danger" type='button' onclick="window.history.back()">{:lang('取消编辑')}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/block}
|
{/block}
|
||||||
|
@ -3,14 +3,14 @@
|
|||||||
<div class="layui-card-body padding-left-40">
|
<div class="layui-card-body padding-left-40">
|
||||||
|
|
||||||
<label class="layui-form-item relative block">
|
<label class="layui-form-item relative block">
|
||||||
<span class="help-label"><b>权限名称</b>Permission Name</span>
|
<span class="help-label"><b>{:lang('权限名称')}</b>Permission Name</span>
|
||||||
<input maxlength="100" class="layui-input" name="title" value='{$vo.title|default=""}' required vali-name="权限名称" placeholder="请输入权限名称">
|
<input maxlength="100" class="layui-input" name="title" value='{$vo.title|default=""}' required vali-name="{:lang('权限名称')}" placeholder="{:lang('请输入权限名称')}">
|
||||||
<span class="help-block">访问权限名称需要保持不重复,在给用户授权时需要根据名称选择!</span>
|
<span class="help-block">{:lang('访问权限名称需要保持不重复,在给用户授权时需要根据名称选择!')}</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label class="layui-form-item relative block">
|
<label class="layui-form-item relative block">
|
||||||
<span class="help-label"><b>权限描述</b>Permission Description</span>
|
<span class="help-label"><b>{:lang('权限描述')}</b>Permission Description</span>
|
||||||
<textarea placeholder="请输入权限描述" maxlength="200" class="layui-textarea" name="desc">{$vo.desc|default=""}</textarea>
|
<textarea placeholder="{:lang('请输入权限描述')}" maxlength="200" class="layui-textarea" name="desc">{$vo.desc|default=""}</textarea>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -19,7 +19,7 @@
|
|||||||
{notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
|
{notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
|
||||||
|
|
||||||
<div class="layui-form-item text-center">
|
<div class="layui-form-item text-center">
|
||||||
<button class="layui-btn" type='submit'>保存数据</button>
|
<button class="layui-btn" type='submit'>{:lang('保存数据')}</button>
|
||||||
<button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗?" data-close>取消编辑</button>
|
<button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗?" data-close>{:lang('取消编辑')}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
{block name="button"}
|
{block name="button"}
|
||||||
<!--{if auth("add")}-->
|
<!--{if auth("add")}-->
|
||||||
<button data-modal='{:url("add")}' data-width="600px" data-table-id="RoleTable" class='layui-btn layui-btn-sm layui-btn-primary'>添加权限</button>
|
<button data-modal='{:url("add")}' data-width="600px" data-table-id="RoleTable" class='layui-btn layui-btn-sm layui-btn-primary'>{:lang('添加权限')}</button>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
|
|
||||||
<!--{if auth("remove")}-->
|
<!--{if auth("remove")}-->
|
||||||
<button data-action='{:url("remove")}' data-rule="id#{id}" data-table-id="RoleTable" data-confirm="确定要批量删除权限吗?" class='layui-btn layui-btn-sm layui-btn-primary'>批量删除</button>
|
<button data-action='{:url("remove")}' data-rule="id#{id}" data-table-id="RoleTable" data-confirm="{:lang('确定要批量删除权限吗?')}" class='layui-btn layui-btn-sm layui-btn-primary'>{:lang('批量删除')}</button>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
@ -26,12 +26,12 @@
|
|||||||
sort: {field: 'sort desc,id', type: 'desc'},
|
sort: {field: 'sort desc,id', type: 'desc'},
|
||||||
cols: [[
|
cols: [[
|
||||||
{checkbox: true, fixed: true},
|
{checkbox: true, fixed: true},
|
||||||
{field: 'sort', title: '排序权重', align: 'center', width: 100, sort: true, templet: '#SortInputRoleTableTpl'},
|
{field: 'sort', title: '{:lang("排序权重")}', align: 'center', width: 100, sort: true, templet: '#SortInputRoleTableTpl'},
|
||||||
{field: 'title', title: '权限名称', align: 'center', minWidth: 140},
|
{field: 'title', title: '{:lang("权限名称")}', align: 'center', minWidth: 140},
|
||||||
{field: 'desc', title: '权限描述', align: 'center', minWidth: 110, templet: '<div>{{d.desc||"-"}}</div>'},
|
{field: 'desc', title: '{:lang("权限描述")}', align: 'center', minWidth: 110, templet: '<div>{{d.desc||"-"}}</div>'},
|
||||||
{field: 'status', title: '权限状态', align: 'center', minWidth: 110, templet: '#StatusSwitchRoleTableTpl'},
|
{field: 'status', title: '{:lang("使用状态")}', align: 'center', minWidth: 110, templet: '#StatusSwitchRoleTableTpl'},
|
||||||
{field: 'create_at', title: '创建时间', align: 'center', minWidth: 170, sort: true},
|
{field: 'create_at', title: '{:lang("创建时间")}', align: 'center', minWidth: 170, sort: true},
|
||||||
{toolbar: '#ToolbarRoleTableTpl', title: '操作面板', align: 'center', minWidth: 210, fixed: 'right'},
|
{toolbar: '#ToolbarRoleTableTpl', title: '{:lang("操作面板")}', align: 'center', minWidth: 210, fixed: 'right'},
|
||||||
]]
|
]]
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -57,24 +57,24 @@
|
|||||||
<!-- 数据状态切换模板 -->
|
<!-- 数据状态切换模板 -->
|
||||||
<script type="text/html" id="StatusSwitchRoleTableTpl">
|
<script type="text/html" id="StatusSwitchRoleTableTpl">
|
||||||
<!--{if auth("state")}-->
|
<!--{if auth("state")}-->
|
||||||
<input type="checkbox" value="{{d.id}}" lay-skin="switch" lay-text="已激活|已禁用" lay-filter="StatusSwitchRoleTable" {{-d.status>0?'checked':''}}>
|
<input type="checkbox" value="{{d.id}}" lay-skin="switch" lay-text="{:lang('已激活')}|{:lang('已禁用')}" lay-filter="StatusSwitchRoleTable" {{-d.status>0?'checked':''}}>
|
||||||
<!--{else}-->
|
<!--{else}-->
|
||||||
{{-d.status ? '<b class="color-green">已启用</b>' : '<b class="color-red">已禁用</b>'}}
|
{{-d.status ? '<b class="color-green">{:lang("已启用")}</b>' : '<b class="color-red">{:lang("已禁用")}</b>'}}
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- 数据操作工具条模板 -->
|
<!-- 数据操作工具条模板 -->
|
||||||
<script type="text/html" id="ToolbarRoleTableTpl">
|
<script type="text/html" id="ToolbarRoleTableTpl">
|
||||||
<!--{if auth('edit')}-->
|
<!--{if auth('edit')}-->
|
||||||
<a class="layui-btn layui-btn-primary layui-btn-sm" data-event-dbclick data-width="600px" data-title="编辑权限" data-modal='{:url("edit")}?id={{d.id}}'>编 辑</a>
|
<a class="layui-btn layui-btn-primary layui-btn-sm" data-event-dbclick data-width="600px" data-title="{:lang('编辑权限')}" data-modal='{:url("edit")}?id={{d.id}}'>{:lang("编 辑")}</a>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
|
|
||||||
<!--{if auth("apply")}-->
|
<!--{if auth("apply")}-->
|
||||||
<a class="layui-btn layui-btn-normal layui-btn-sm" data-open='{:url("apply")}?id={{d.id}}'>授 权</a>
|
<a class="layui-btn layui-btn-normal layui-btn-sm" data-open='{:url("apply")}?id={{d.id}}'>{:lang('授 权')}</a>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
|
|
||||||
<!--{if auth("remove")}-->
|
<!--{if auth("remove")}-->
|
||||||
<a class="layui-btn layui-btn-danger layui-btn-sm" data-confirm="确定要删除权限吗?" data-action="{:url('remove')}" data-value="id#{{d.id}}">删 除</a>
|
<a class="layui-btn layui-btn-danger layui-btn-sm" data-confirm="{:lang('确定要删除权限吗?')}" data-action="{:url('remove')}" data-value="id#{{d.id}}">{:lang("删 除")}</a>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
</script>
|
</script>
|
||||||
{/block}
|
{/block}
|
@ -1,27 +1,27 @@
|
|||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>条件搜索</legend>
|
<legend>{:lang('条件搜索')}</legend>
|
||||||
<form class="layui-form layui-form-pane form-search" action="{:sysuri()}" onsubmit="return false" method="get" autocomplete="off">
|
<form class="layui-form layui-form-pane form-search" action="{:sysuri()}" onsubmit="return false" method="get" autocomplete="off">
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline">
|
<div class="layui-form-item layui-inline">
|
||||||
<label class="layui-form-label">权限名称</label>
|
<label class="layui-form-label">{:lang('权限名称')}</label>
|
||||||
<div class="layui-input-inline">
|
<div class="layui-input-inline">
|
||||||
<input name="title" value="{$get.title|default=''}" placeholder="请输入权限名称" class="layui-input">
|
<input name="title" value="{$get.title|default=''}" placeholder="{:lang('请输入权限名称')}" class="layui-input">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline">
|
<div class="layui-form-item layui-inline">
|
||||||
<label class="layui-form-label">权限描述</label>
|
<label class="layui-form-label">{:lang('权限描述')}</label>
|
||||||
<div class="layui-input-inline">
|
<div class="layui-input-inline">
|
||||||
<input name="desc" value="{$get.desc|default=''}" placeholder="请输入权限描述" class="layui-input">
|
<input name="desc" value="{$get.desc|default=''}" placeholder="{:lang('请输入权限描述')}" class="layui-input">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline">
|
<div class="layui-form-item layui-inline">
|
||||||
<label class="layui-form-label">使用状态</label>
|
<label class="layui-form-label">{:lang('使用状态')}</label>
|
||||||
<div class="layui-input-inline">
|
<div class="layui-input-inline">
|
||||||
<select class="layui-select" name="status">
|
<select class="layui-select" name="status">
|
||||||
<option value=''>-- 全部状态 --</option>
|
<option value=''>-- {:lang('全部')} --</option>
|
||||||
{foreach ['已禁用的权限','已激活的权限'] as $k=>$v}
|
{foreach [lang('已禁用记录'),lang('已激活记录')] as $k=>$v}
|
||||||
{if isset($get.status) and $get.status eq $k.""}
|
{if isset($get.status) and $get.status eq $k.""}
|
||||||
<option selected value="{$k}">{$v}</option>
|
<option selected value="{$k}">{$v}</option>
|
||||||
{else}
|
{else}
|
||||||
@ -32,14 +32,14 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline">
|
<div class="layui-form-item layui-inline">
|
||||||
<label class="layui-form-label">创建时间</label>
|
<label class="layui-form-label">{:lang('创建时间')}</label>
|
||||||
<div class="layui-input-inline">
|
<div class="layui-input-inline">
|
||||||
<input data-date-range name="create_at" value="{$get.create_at|default=''}" placeholder="请选择创建时间" class="layui-input">
|
<input data-date-range name="create_at" value="{$get.create_at|default=''}" placeholder="{:lang('请选择创建时间')}" class="layui-input">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline">
|
<div class="layui-form-item layui-inline">
|
||||||
<button class="layui-btn layui-btn-primary"><i class="layui-icon"></i> 搜 索</button>
|
<button class="layui-btn layui-btn-primary"><i class="layui-icon"></i> {:lang('搜 索')}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</fieldset>
|
</fieldset>
|
@ -36,7 +36,7 @@
|
|||||||
where: {type: '{$type|default=""}'},
|
where: {type: '{$type|default=""}'},
|
||||||
cols: [[
|
cols: [[
|
||||||
{checkbox: true, fixed: true},
|
{checkbox: true, fixed: true},
|
||||||
{field: 'sort', title: '排序权重', width: 100, align: 'center', sort: true, templet: '#SortInputTpl'},
|
{field: 'sort', title: '{:lang("排序权重")}', width: 100, align: 'center', sort: true, templet: '#SortInputTpl'},
|
||||||
// {field: 'type', title: '数据类型', minWidth: 140, align: 'center'},
|
// {field: 'type', title: '数据类型', minWidth: 140, align: 'center'},
|
||||||
{field: 'code', title: '数据编码', width: '20%', align: 'left'},
|
{field: 'code', title: '数据编码', width: '20%', align: 'left'},
|
||||||
{field: 'name', title: '数据名称', width: '30%', align: 'left'},
|
{field: 'name', title: '数据名称', width: '30%', align: 'left'},
|
||||||
|
@ -1,25 +1,25 @@
|
|||||||
<form class="layui-form layui-form-pane form-search" action="{:sysuri()}" onsubmit="return false" method="get" autocomplete="off">
|
<form class="layui-form layui-form-pane form-search" action="{:sysuri()}" onsubmit="return false" method="get" autocomplete="off">
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline">
|
<div class="layui-form-item layui-inline">
|
||||||
<label class="layui-form-label">数据编码</label>
|
<label class="layui-form-label">{:lang('数据编码')}</label>
|
||||||
<div class="layui-input-inline">
|
<div class="layui-input-inline">
|
||||||
<input name="code" value="{$get.code|default=''}" placeholder="请输入数据编码" class="layui-input">
|
<input name="code" value="{$get.code|default=''}" placeholder="{:lang('请输入数据编码')}" class="layui-input">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline">
|
<div class="layui-form-item layui-inline">
|
||||||
<label class="layui-form-label">数据名称</label>
|
<label class="layui-form-label">{:lang('数据名称')}</label>
|
||||||
<div class="layui-input-inline">
|
<div class="layui-input-inline">
|
||||||
<input name="name" value="{$get.name|default=''}" placeholder="请输入数据名称" class="layui-input">
|
<input name="name" value="{$get.name|default=''}" placeholder="{:lang('请输入数据名称')}" class="layui-input">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline">
|
<div class="layui-form-item layui-inline">
|
||||||
<label class="layui-form-label">使用状态</label>
|
<label class="layui-form-label">{:lang('使用状态')}</label>
|
||||||
<div class="layui-input-inline">
|
<div class="layui-input-inline">
|
||||||
<select class="layui-select" name="status">
|
<select class="layui-select" name="status">
|
||||||
<option value=''>-- 状态 --</option>
|
<option value=''>-- {:lang('全部')} --</option>
|
||||||
{foreach ['已禁用的权限','已激活的权限'] as $k=>$v}
|
{foreach [lang('已禁用记录'),lang('已激活记录')] as $k=>$v}
|
||||||
{if isset($get.status) and $get.status eq $k.""}
|
{if isset($get.status) and $get.status eq $k.""}
|
||||||
<option selected value="{$k}">{$v}</option>
|
<option selected value="{$k}">{$v}</option>
|
||||||
{else}
|
{else}
|
||||||
@ -30,13 +30,13 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline">
|
<div class="layui-form-item layui-inline">
|
||||||
<label class="layui-form-label">创建时间</label>
|
<label class="layui-form-label">{:lang('创建时间')}</label>
|
||||||
<div class="layui-input-inline">
|
<div class="layui-input-inline">
|
||||||
<input data-date-range name="create_at" value="{$get.create_at|default=''}" placeholder="请选择创建时间" class="layui-input">
|
<input data-date-range name="create_at" value="{$get.create_at|default=''}" placeholder="{:lang('请选择创建时间')}" class="layui-input">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline">
|
<div class="layui-form-item layui-inline">
|
||||||
<button class="layui-btn layui-btn-primary"><i class="layui-icon"></i> 搜 索</button>
|
<button class="layui-btn layui-btn-primary"><i class="layui-icon"></i> {:lang('搜 索')}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
{block name="button"}
|
{block name="button"}
|
||||||
<!--{if isset($super) and $super}-->
|
<!--{if isset($super) and $super}-->
|
||||||
<a class="layui-btn layui-btn-sm layui-btn-primary" data-load="{:url('admin/api.system/config')}">清理无效配置</a>
|
<a class="layui-btn layui-btn-sm layui-btn-primary" data-load="{:url('admin/api.system/config')}">{:lang('清理无效配置')}</a>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
|
|
||||||
<!--{if auth('system')}-->
|
<!--{if auth('system')}-->
|
||||||
<a class="layui-btn layui-btn-sm layui-btn-primary" data-modal="{:url('system')}">修改系统参数</a>
|
<a class="layui-btn layui-btn-sm layui-btn-primary" data-modal="{:url('system')}">{:lang('修改系统参数')}</a>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
@ -14,42 +14,42 @@
|
|||||||
<!--{notempty name='super'}-->
|
<!--{notempty name='super'}-->
|
||||||
<div class="layui-card padding-20 shadow">
|
<div class="layui-card padding-20 shadow">
|
||||||
<div class="layui-card-header notselect">
|
<div class="layui-card-header notselect">
|
||||||
<b>运行模式</b><span class="color-desc font-s12 padding-left-5">Run Mode</span>
|
<span class="help-label"><b style="color:#333!important;">{:lang('运行模式')}</b> ( {:lang('仅超级管理员可配置')} )</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-card-body">
|
<div class="layui-card-body">
|
||||||
<div class="layui-btn-group shadow-mini nowrap">
|
<div class="layui-btn-group shadow-mini nowrap">
|
||||||
<!--{if $app->isDebug()}-->
|
<!--{if $app->isDebug()}-->
|
||||||
<a class="layui-btn layui-btn-sm layui-btn-active">以开发模式运行</a>
|
<a class="layui-btn layui-btn-sm layui-btn-active">{:lang('以开发模式运行')}</a>
|
||||||
<a class="layui-btn layui-btn-sm layui-btn-primary" data-confirm="确定要切换到生产模式运行吗?" data-load="{:url('admin/api.system/debug')}?state=1">以生产模式运行</a>
|
<a class="layui-btn layui-btn-sm layui-btn-primary" data-confirm="{:lang('确定要切换到生产模式运行吗?')}" data-load="{:url('admin/api.system/debug')}?state=1">{:lang('以生产模式运行')}</a>
|
||||||
<!--{else}-->
|
<!--{else}-->
|
||||||
<a class="layui-btn layui-btn-sm layui-btn-primary" data-confirm="确定要切换到开发模式运行吗?" data-load="{:url('admin/api.system/debug')}?state=0">以开发模式运行</a>
|
<a class="layui-btn layui-btn-sm layui-btn-primary" data-confirm="{:lang('确定要切换到开发模式运行吗?')}" data-load="{:url('admin/api.system/debug')}?state=0">{:lang('以开发模式运行')}</a>
|
||||||
<a class="layui-btn layui-btn-sm layui-btn-active">以生产模式运行</a>
|
<a class="layui-btn layui-btn-sm layui-btn-active">{:lang('以生产模式运行')}</a>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
</div>
|
</div>
|
||||||
<div class="margin-top-20">
|
<div class="margin-top-20">
|
||||||
<p><b>开发模式</b>:开发人员或在功能调试时使用,系统异常时会显示详细的错误信息,同时还会记录操作日志及数据库 SQL 语句信息。</p>
|
<p><b>{:lang('开发模式')}</b>:{:lang('开发人员或在功能调试时使用,系统异常时会显示详细的错误信息,同时还会记录操作日志及数据库 SQL 语句信息。')}</p>
|
||||||
<p><b>生产模式</b>:项目正式部署上线后使用,系统异常时统一显示 “{:config('app.error_message')}”,只记录重要的异常日志信息,强烈推荐上线后使用此模式。</p>
|
<p><b>{:lang('生产模式')}</b>:{:lang('项目正式部署上线后使用,系统异常时统一显示 “%s”,只记录重要的异常日志信息,强烈推荐上线后使用此模式。',[config('app.error_message')])}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-card padding-20 shadow">
|
<div class="layui-card padding-20 shadow">
|
||||||
<div class="layui-card-header notselect">
|
<div class="layui-card-header notselect">
|
||||||
<b>富编辑器</b><span class="color-desc font-s12 padding-left-5">Rich Text Editor</span>
|
<span class="help-label"><b style="color:#333!important;">{:lang('富编辑器')}</b> ( {:lang('仅超级管理员可配置')} )</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-card-body layui-clear">
|
<div class="layui-card-body layui-clear">
|
||||||
<div class="layui-btn-group shadow-mini nowrap">
|
<div class="layui-btn-group shadow-mini">
|
||||||
{if !in_array(sysconf('base.editor'),['ckeditor4','ckeditor5','auto'])}{php}sysconf('base.editor','ckeditor4');{/php}{/if}
|
{if !in_array(sysconf('base.editor'),['ckeditor4','ckeditor5','auto'])}{php}sysconf('base.editor','ckeditor4');{/php}{/if}
|
||||||
{foreach ['ckeditor4'=>'CKEditor4','ckeditor5'=>'CKEditor5','auto'=>'自适应模式'] as $k => $v}{if sysconf('base.editor') eq $k}
|
{foreach ['ckeditor4'=>'CKEditor4','ckeditor5'=>'CKEditor5','auto'=>lang('自适应模式')] as $k => $v}{if sysconf('base.editor') eq $k}
|
||||||
{if auth('storage')}<a data-title="配置{$v}" class="layui-btn layui-btn-sm layui-btn-active">{$v}</a>{else}<a class="layui-btn layui-btn-sm layui-btn-active">{$v}</a>{/if}
|
{if auth('storage')}<a data-title="配置{$v}" class="layui-btn layui-btn-sm layui-btn-active">{$v}</a>{else}<a class="layui-btn layui-btn-sm layui-btn-active">{$v}</a>{/if}
|
||||||
{else}
|
{else}
|
||||||
{if auth('storage')}<a data-title="配置{$v}" data-action="{:url('admin/api.system/editor')}" data-value="editor#{$k}" class="layui-btn layui-btn-sm layui-btn-primary">{$v}</a>{else}<a class="layui-btn layui-btn-sm layui-btn-primary">{$v}</a>{/if}
|
{if auth('storage')}<a data-title="配置{$v}" data-action="{:url('admin/api.system/editor')}" data-value="editor#{$k}" class="layui-btn layui-btn-sm layui-btn-primary">{$v}</a>{else}<a class="layui-btn layui-btn-sm layui-btn-primary">{$v}</a>{/if}
|
||||||
{/if}{/foreach}
|
{/if}{/foreach}
|
||||||
</div>
|
</div>
|
||||||
<div class="margin-top-20 nowrap full-width pull-left">
|
<div class="margin-top-20 full-width pull-left">
|
||||||
<p><b>CKEditor4</b>:旧版本编辑器,对浏览器兼容较好,但内容编辑体验稍有不足。</p>
|
<p><b>CKEditor4</b>:{:lang('旧版本编辑器,对浏览器兼容较好,但内容编辑体验稍有不足。')}</p>
|
||||||
<p><b>CKEditor5</b>:新版本编辑器,只支持新特性浏览器,对内容编辑体验较好,推荐使用。</p>
|
<p><b>CKEditor5</b>:{:lang('新版本编辑器,只支持新特性浏览器,对内容编辑体验较好,推荐使用。')}</p>
|
||||||
<p><b>自适应模式</b>:优先使用新版本编辑器,若浏览器不支持新版本时自动降级为旧版本编辑器。</p>
|
<p><b>{:lang('自适应模式')}</b>:{:lang('优先使用新版本编辑器,若浏览器不支持新版本时自动降级为旧版本编辑器。')}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -57,7 +57,7 @@
|
|||||||
|
|
||||||
<div class="layui-card padding-20 shadow">
|
<div class="layui-card padding-20 shadow">
|
||||||
<div class="layui-card-header notselect">
|
<div class="layui-card-header notselect">
|
||||||
<b>存储引擎</b><span class="color-desc font-s12 padding-left-5">Storage Engine</span>
|
<span class="help-label"><b style="color:#333!important;">{:lang('存储引擎')}</b> ( {:lang('文件默认存储方式')} )</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- 初始化存储配置 -->
|
<!-- 初始化存储配置 -->
|
||||||
{if !sysconf('storage.type')}{php}sysconf('storage.type','local');{/php}{/if}
|
{if !sysconf('storage.type')}{php}sysconf('storage.type','local');{/php}{/if}
|
||||||
@ -73,69 +73,73 @@
|
|||||||
{if auth('storage')}<a data-title="配置{$v}" data-modal="{:url('storage')}?type={$k}" class="layui-btn layui-btn-sm layui-btn-primary">{$v}</a>{else}<a class="layui-btn layui-btn-sm layui-btn-primary">{$v}</a>{/if}
|
{if auth('storage')}<a data-title="配置{$v}" data-modal="{:url('storage')}?type={$k}" class="layui-btn layui-btn-sm layui-btn-primary">{$v}</a>{else}<a class="layui-btn layui-btn-sm layui-btn-primary">{$v}</a>{/if}
|
||||||
{/if}{/foreach}
|
{/if}{/foreach}
|
||||||
</div>
|
</div>
|
||||||
<div class="margin-top-20 nowrap full-width pull-left">
|
<div class="margin-top-20 full-width pull-left">
|
||||||
<p><b>本地服务器存储</b>:文件上传到本地服务器的 `static/upload` 目录,不支持大文件上传,占用服务器磁盘空间,访问时消耗服务器带宽流量。</p>
|
<p><b>{:lang('本地服务器存储')}</b>:{:lang('文件上传到本地服务器的 `static/upload` 目录,不支持大文件上传,占用服务器磁盘空间,访问时消耗服务器带宽流量。')}</p>
|
||||||
<p><b>自建<code>Alist</code>存储</b>:文件上传到 Alist 存储的服务器或云存储空间,根据服务配置可支持大文件上传,不占用本身服务器空间及服务器带宽流量。</p>
|
<p><b>{:lang('自建Alist存储')}</b>:{:lang('文件上传到 Alist 存储的服务器或云存储空间,根据服务配置可支持大文件上传,不占用本身服务器空间及服务器带宽流量。')}</p>
|
||||||
<p><b>七牛云对象存储</b>:文件上传到七牛云存储空间,支持大文件上传,不占用服务器空间及服务器带宽流量,支持 CDN 加速访问,访问量大时推荐使用。</p>
|
<p><b>{:lang('七牛云对象存储')}</b>:{:lang('文件上传到七牛云存储空间,支持大文件上传,不占用服务器空间及服务器带宽流量,支持 CDN 加速访问,访问量大时推荐使用。')}</p>
|
||||||
<p><b>又拍云<code>USS</code>存储</b>:文件上传到又拍云 USS 存储空间,支持大文件上传,不占用服务器空间及服务器带宽流量,支持 CDN 加速访问,访问量大时推荐使用。</p>
|
<p><b>{:lang('又拍云USS存储')}</b>:{:lang('文件上传到又拍云 USS 存储空间,支持大文件上传,不占用服务器空间及服务器带宽流量,支持 CDN 加速访问,访问量大时推荐使用。')}</p>
|
||||||
<p><b>阿里云<code>OSS</code>存储</b>:文件上传到阿里云 OSS 存储空间,支持大文件上传,不占用服务器空间及服务器带宽流量,支持 CDN 加速访问,访问量大时推荐使用。</p>
|
<p><b>{:lang('阿里云OSS存储')}</b>:{:lang('文件上传到阿里云 OSS 存储空间,支持大文件上传,不占用服务器空间及服务器带宽流量,支持 CDN 加速访问,访问量大时推荐使用。')}</p>
|
||||||
<p><b>腾讯云<code>COS</code>存储</b>:文件上传到腾讯云 COS 存储空间,支持大文件上传,不占用服务器空间及服务器带宽流量,支持 CDN 加速访问,访问量大时推荐使用。</p>
|
<p><b>{:lang('腾讯云COS存储')}</b>:{:lang('文件上传到腾讯云 COS 存储空间,支持大文件上传,不占用服务器空间及服务器带宽流量,支持 CDN 加速访问,访问量大时推荐使用。')}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-card padding-20 shadow">
|
<div class="layui-card padding-20 shadow">
|
||||||
<div class="layui-card-header notselect">
|
<div class="layui-card-header notselect">
|
||||||
<b>系统参数</b><span class="color-desc font-s12 padding-left-5">System Parameter</span>
|
<span class="help-label"><b style="color:#333!important;">{:lang('系统参数')}</b> ( {:lang('当前系统配置参数')} )</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-card-body">
|
<div class="layui-card-body">
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<div class="help-label"><b>网站名称</b>Website</div>
|
<div class="help-label"><b>{:lang('网站名称')}</b>Website</div>
|
||||||
<label class="relative block">
|
<label class="relative block">
|
||||||
<input readonly value="{:sysconf('site_name')}" class="layui-input layui-bg-gray">
|
<input readonly value="{:sysconf('site_name')}" class="layui-input layui-bg-gray">
|
||||||
<a data-copy="{:sysconf('site_name')}" class="layui-icon layui-icon-release input-right-icon"></a>
|
<a data-copy="{:sysconf('site_name')}" class="layui-icon layui-icon-release input-right-icon"></a>
|
||||||
</label>
|
</label>
|
||||||
<div class="help-block">网站名称及网站图标,将显示在浏览器的标签上。</div>
|
<div class="help-block">{:lang('网站名称及网站图标,将显示在浏览器的标签上。')}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<div class="help-label"><b>管理程序名称</b>Name</div>
|
<div class="help-label"><b>{:lang('管理程序名称')}</b>Name</div>
|
||||||
<label class="relative block">
|
<label class="relative block">
|
||||||
<input readonly value="{:sysconf('app_name')}" class="layui-input layui-bg-gray">
|
<input readonly value="{:sysconf('app_name')}" class="layui-input layui-bg-gray">
|
||||||
<a data-copy="{:sysconf('app_name')}" class="layui-icon layui-icon-release input-right-icon"></a>
|
<a data-copy="{:sysconf('app_name')}" class="layui-icon layui-icon-release input-right-icon"></a>
|
||||||
</label>
|
</label>
|
||||||
<div class="help-block">管理程序名称,将显示在后台左上角标题。</div>
|
<div class="help-block">{:lang('管理程序名称,将显示在后台左上角标题。')}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<div class="help-label"><b>管理程序版本</b>Version</div>
|
<div class="help-label"><b>{:lang('管理程序版本')}</b>Version</div>
|
||||||
<label class="relative block">
|
<label class="relative block">
|
||||||
<input readonly value="{:sysconf('app_version')}" class="layui-input layui-bg-gray">
|
<input readonly value="{:sysconf('app_version')}" class="layui-input layui-bg-gray">
|
||||||
<a data-copy="{:sysconf('app_version')}" class="layui-icon layui-icon-release input-right-icon"></a>
|
<a data-copy="{:sysconf('app_version')}" class="layui-icon layui-icon-release input-right-icon"></a>
|
||||||
</label>
|
</label>
|
||||||
<div class="help-block">管理程序版本,将显示在后台左上角标题。</div>
|
<div class="help-block">{:lang('管理程序版本,将显示在后台左上角标题。')}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<div class="help-label"><b>公网备案号</b>Beian</div>
|
<div class="help-label"><b>{:lang('公安备案号')}</b>Beian</div>
|
||||||
<label class="relative block">
|
<label class="relative block">
|
||||||
<input readonly value="{:sysconf('beian')?:'-'}" class="layui-input layui-bg-gray">
|
<input readonly value="{:sysconf('beian')?:'-'}" class="layui-input layui-bg-gray">
|
||||||
<a data-copy="{:sysconf('beian')}" class="layui-icon layui-icon-release input-right-icon"></a>
|
<a data-copy="{:sysconf('beian')}" class="layui-icon layui-icon-release input-right-icon"></a>
|
||||||
</label>
|
</label>
|
||||||
<p class="help-block">公网备案号,可以在 <a target="_blank" href="https://beian.miit.gov.cn">备案管理中心</a> 查询获取,将在登录页面下面显示。</p>
|
<p class="help-block">
|
||||||
|
{:lang('公安备案号,可以在 %s 查询获取,将在登录页面下面显示。',['<a target="_blank" href="https://www.beian.gov.cn/portal/registerSystemInfo">www.beian.gov.cn</a>'])}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<div class="help-label"><b>网站备案号</b>Miitbeian</div>
|
<div class="help-label"><b>{:lang('网站备案号')}</b>Miitbeian</div>
|
||||||
<label class="relative block">
|
<label class="relative block">
|
||||||
<input readonly value="{:sysconf('miitbeian')?:'-'}" class="layui-input layui-bg-gray">
|
<input readonly value="{:sysconf('miitbeian')?:'-'}" class="layui-input layui-bg-gray">
|
||||||
<a data-copy="{:sysconf('miitbeian')}" class="layui-icon layui-icon-release input-right-icon"></a>
|
<a data-copy="{:sysconf('miitbeian')}" class="layui-icon layui-icon-release input-right-icon"></a>
|
||||||
</label>
|
</label>
|
||||||
<div class="help-block">网站备案号,可以在 <a target="_blank" href="https://beian.miit.gov.cn">备案管理中心</a> 查询获取,将显示在登录页面下面。</div>
|
<div class="help-block">
|
||||||
|
{:lang('网站备案号,可以在 %s 查询获取,将显示在登录页面下面。',['<a target="_blank" href="https://beian.miit.gov.cn">beian.miit.gov.cn</a>'])}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<div class="help-label"><b>网站版权信息</b>Copyright</div>
|
<div class="help-label"><b>{:lang('网站版权信息')}</b>Copyright</div>
|
||||||
<label class="relative block">
|
<label class="relative block">
|
||||||
<input readonly value="{:sysconf('site_copy')}" class="layui-input layui-bg-gray">
|
<input readonly value="{:sysconf('site_copy')}" class="layui-input layui-bg-gray">
|
||||||
<a data-copy="{:sysconf('site_copy')}" class="layui-icon layui-icon-release input-right-icon"></a>
|
<a data-copy="{:sysconf('site_copy')}" class="layui-icon layui-icon-release input-right-icon"></a>
|
||||||
</label>
|
</label>
|
||||||
<div class="help-block">网站版权信息,在后台登录页面显示版本信息并链接到备案到信息备案管理系统。</div>
|
<div class="help-block">{:lang('网站版权信息,在后台登录页面显示版本信息并链接到备案到信息备案管理系统。')}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -143,25 +147,25 @@
|
|||||||
<!--{if $app->isDebug()}-->
|
<!--{if $app->isDebug()}-->
|
||||||
<div class="layui-card padding-20 shadow">
|
<div class="layui-card padding-20 shadow">
|
||||||
<div class="layui-card-header notselect">
|
<div class="layui-card-header notselect">
|
||||||
<b>系统信息</b><span class="color-desc font-s12 padding-left-5">System Information</span>
|
<span class="help-label"><b style="color:#333!important;">{:lang('系统信息')}</b> ( {:lang('仅开发模式可见')} )</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-card-body">
|
<div class="layui-card-body">
|
||||||
<table class="layui-table" lay-even>
|
<table class="layui-table" lay-even>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="nowrap text-center" style="max-width:20%">核心框架</th>
|
<td class="nowrap text-center">{:lang('核心框架')}</td>
|
||||||
<td><a target="_blank" href="https://www.thinkphp.cn">ThinkPHP Version {$app->version()}</a></td>
|
<td><a target="_blank" href="https://www.thinkphp.cn">ThinkPHP Version {$app->version()}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="nowrap text-center">基础程序</th>
|
<td class="nowrap text-center">{:lang('平台框架')}</td>
|
||||||
<td><a target="_blank" href="https://thinkadmin.top">ThinkAdmin Version {$version|default='6.0.0'}</a></td>
|
<td><a target="_blank" href="https://thinkadmin.top">ThinkAdmin Version {$version|default='6.0.0'}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="nowrap text-center">操作系统</th>
|
<td class="nowrap text-center">{:lang('操作系统')}</td>
|
||||||
<td>{:php_uname()}</td>
|
<td>{:php_uname()}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="nowrap text-center">运行环境</th>
|
<td class="nowrap text-center">{:lang('运行环境')}</td>
|
||||||
<td>{:ucfirst($request->server('SERVER_SOFTWARE',php_sapi_name()))} & PHP {$Think.const.PHP_VERSION} & {:ucfirst(app()->db->connect()->getConfig('type'))}</td>
|
<td>{:ucfirst($request->server('SERVER_SOFTWARE',php_sapi_name()))} & PHP {$Think.const.PHP_VERSION} & {:ucfirst(app()->db->connect()->getConfig('type'))}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -169,26 +173,27 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{notempty name='plugins'}
|
||||||
<div class="layui-card padding-20 shadow">
|
<div class="layui-card padding-20 shadow">
|
||||||
<div class="layui-card-header notselect">
|
<div class="layui-card-header notselect">
|
||||||
<b>插件信息</b><span class="color-desc font-s12 padding-left-5">Plugin Information</span>
|
<span class="help-label"><b style="color:#333!important;">{:lang('应用插件')}</b> ( {:lang('仅开发模式可见')} )</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-card-body">
|
<div class="layui-card-body">
|
||||||
<table class="layui-table" lay-even>
|
<table class="layui-table" lay-even>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="nowrap text-center">插件名称</th>
|
<th class="nowrap text-center">{:lang('应用名称')}</th>
|
||||||
<th class="nowrap text-left">插件ID</th>
|
<th class="nowrap text-center">{:lang('插件名称')}</th>
|
||||||
<th class="nowrap text-left">插件包名</th>
|
<th class="nowrap text-left">{:lang('插件包名')}</th>
|
||||||
<th class="nowrap text-center">插件版本</th>
|
<th class="nowrap text-center">{:lang('插件版本')}</th>
|
||||||
<th class="nowrap text-center">授权协议</th>
|
<th class="nowrap text-center">{:lang('授权协议')}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{foreach $plugins as $key=>$plugin}
|
{foreach $plugins as $key=>$plugin}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="nowrap text-center">{$plugin.name}</td>
|
<td class="nowrap text-center">{$key}</td>
|
||||||
<td class="nowrap text-left">{$key}</td>
|
<td class="nowrap text-center">{$plugin.name|lang}</td>
|
||||||
<td class="nowrap text-left">
|
<td class="nowrap text-left">
|
||||||
{if empty($plugin.install.document)}{$plugin.package}
|
{if empty($plugin.install.document)}{$plugin.package}
|
||||||
{else}<a target="_blank" href="{$plugin.install.document}">{$plugin.package}</a>{/if}
|
{else}<a target="_blank" href="{$plugin.install.document}">{$plugin.package}</a>{/if}
|
||||||
@ -205,5 +210,6 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{/notempty}
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
{/block}
|
{/block}
|
@ -83,8 +83,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="layui-col-xs4 padding-top-0 padding-bottom-0">
|
<div class="layui-col-xs4 padding-top-0 padding-bottom-0">
|
||||||
<label class="relative block">
|
<label class="relative block">
|
||||||
<span class="help-label"><b>公网安备号</b>Beian</span>
|
<span class="help-label"><b>公安安备号</b>Beian</span>
|
||||||
<input name="beian" placeholder="请输入公网安备号" value="{:sysconf('beian')}" class="layui-input">
|
<input name="beian" placeholder="请输入公安安备号" value="{:sysconf('beian')}" class="layui-input">
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-col-xs4 padding-top-0 padding-bottom-0">
|
<div class="layui-col-xs4 padding-top-0 padding-bottom-0">
|
||||||
|
@ -3,27 +3,27 @@
|
|||||||
<div class="layui-card-body padding-left-40">
|
<div class="layui-card-body padding-left-40">
|
||||||
|
|
||||||
<label class="layui-form-item relative block">
|
<label class="layui-form-item relative block">
|
||||||
<span class="help-label"><b>文件名称</b>Name</span>
|
<span class="help-label"><b>{:lang('文件名称')}</b>Name</span>
|
||||||
<input maxlength="100" class="layui-input" name="name" value='{$vo.name|default=""}' required vali-name="文件名称" placeholder="请输入文件名称">
|
<input maxlength="100" class="layui-input" name="name" value='{$vo.name|default=""}' required vali-name="文件名称" placeholder="请输入文件名称">
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label class="layui-form-item relative block">
|
<label class="layui-form-item relative block">
|
||||||
<span class="help-label"><b>文件大小</b>Size</span>
|
<span class="help-label"><b>{:lang('文件大小')}</b>Size</span>
|
||||||
<input maxlength="100" class="layui-input layui-bg-gray" value='{$vo.size|default=0|format_bytes}' readonly>
|
<input maxlength="100" class="layui-input layui-bg-gray" value='{$vo.size|default=0|format_bytes}' readonly>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label class="layui-form-item relative block">
|
<label class="layui-form-item relative block">
|
||||||
<span class="help-label"><b>存储方式</b>Type</span>
|
<span class="help-label"><b>{:lang('存储方式')}</b>Type</span>
|
||||||
<input maxlength="100" class="layui-input layui-bg-gray" value='{$types[$vo.type]??""}' readonly>
|
<input maxlength="100" class="layui-input layui-bg-gray" value='{$types[$vo.type]??""}' readonly>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label class="layui-form-item relative block">
|
<label class="layui-form-item relative block">
|
||||||
<span class="help-label"><b>文件哈希</b>Hash</span>
|
<span class="help-label"><b>{:lang('文件哈希')}</b>Hash</span>
|
||||||
<input maxlength="100" class="layui-input layui-bg-gray" value='{$vo.hash|default=""}' readonly>
|
<input maxlength="100" class="layui-input layui-bg-gray" value='{$vo.hash|default=""}' readonly>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label class="layui-form-item relative block">
|
<label class="layui-form-item relative block">
|
||||||
<span class="help-label"><b>文件链接</b>Link</span>
|
<span class="help-label"><b>{:lang('文件链接')}</b>Link</span>
|
||||||
<input maxlength="100" class="layui-input layui-bg-gray" value='{$vo.xurl|default=""}' readonly>
|
<input maxlength="100" class="layui-input layui-bg-gray" value='{$vo.xurl|default=""}' readonly>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
@ -34,7 +34,7 @@
|
|||||||
{notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
|
{notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
|
||||||
|
|
||||||
<div class="layui-form-item text-center">
|
<div class="layui-form-item text-center">
|
||||||
<button class="layui-btn" type='submit'>保存数据</button>
|
<button class="layui-btn" type='submit'>{:lang('保存数据')}</button>
|
||||||
<button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗?" data-close>取消编辑</button>
|
<button class="layui-btn layui-btn-danger" type='button' data-confirm="{:lang('确定要取消编辑吗?')}" data-close>{:lang('取消编辑')}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
{block name="button"}
|
{block name="button"}
|
||||||
<!--{if auth("distinct")}-->
|
<!--{if auth("distinct")}-->
|
||||||
<a data-table-id="FileTable" data-load='{:url("distinct")}' class='layui-btn layui-btn-sm layui-btn-primary'>清理重复</a>
|
<a data-table-id="FileTable" data-load='{:url("distinct")}' class='layui-btn layui-btn-sm layui-btn-primary'>{:lang('清理重复')}</a>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
<!--{if auth("remove")}-->
|
<!--{if auth("remove")}-->
|
||||||
<a data-confirm="确定删除这些记录吗?" data-table-id="FileTable" data-action='{:url("remove")}' data-rule="id#{id}" class='layui-btn layui-btn-sm layui-btn-primary'>批量删除</a>
|
<a data-confirm="{:lang('确定删除这些记录吗?')}" data-table-id="FileTable" data-action='{:url("remove")}' data-rule="id#{id}" class='layui-btn layui-btn-sm layui-btn-primary'>{:lang('批量删除')}</a>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
@ -22,32 +22,32 @@
|
|||||||
cols: [[
|
cols: [[
|
||||||
{checkbox: true, fixed: true},
|
{checkbox: true, fixed: true},
|
||||||
{field: 'id', title: 'ID', width: 80, align: 'center', sort: true},
|
{field: 'id', title: 'ID', width: 80, align: 'center', sort: true},
|
||||||
{field: 'name', title: '文件名称', width: '12%', align: 'center'},
|
{field: 'name', title: '{:lang("文件名称")}', width: '12%', align: 'center'},
|
||||||
{field: 'hash', title: '文件哈希', width: '15%', align: 'center', templet: '<div><code>{{d.hash}}</code></div>'},
|
{field: 'hash', title: '{:lang("文件哈希")}', width: '15%', align: 'center', templet: '<div><code>{{d.hash}}</code></div>'},
|
||||||
{field: 'size', title: '文件大小', align: 'center', width: '7%', sort: true, templet: '<div>{{-$.formatFileSize(d.size)}}</div>'},
|
{field: 'size', title: '{:lang("文件大小")}', align: 'center', width: '7%', sort: true, templet: '<div>{{-$.formatFileSize(d.size)}}</div>'},
|
||||||
{field: 'xext', title: '文件后缀', align: 'center', width: '7%', sort: true},
|
{field: 'xext', title: '{:lang("文件后缀")}', align: 'center', width: '7%', sort: true},
|
||||||
{
|
{
|
||||||
field: 'xurl', title: '查看文件', width: '7%', align: 'center', templet: function (d) {
|
field: 'xurl', title: '{:lang("查看文件")}', width: '7%', align: 'center', templet: function (d) {
|
||||||
if (typeof d.mime === 'string' && /^image\//.test(d.mime)) {
|
if (typeof d.mime === 'string' && /^image\//.test(d.mime)) {
|
||||||
return laytpl('<div><a target="_blank" data-tips-hover data-tips-image="{{d.xurl}}"><i class="layui-icon layui-icon-picture"></i></a></div>').render(d)
|
return laytpl('<div><a target="_blank" data-tips-hover data-tips-image="{{d.xurl}}"><i class="layui-icon layui-icon-picture"></i></a></div>').render(d)
|
||||||
}
|
}
|
||||||
if (typeof d.mime === 'string' && /^video\//.test(d.mime)) {
|
if (typeof d.mime === 'string' && /^video\//.test(d.mime)) {
|
||||||
return laytpl('<div><a target="_blank" data-video-player="{{d.xurl}}" data-tips-text="播放视频"><i class="layui-icon layui-icon-video"></i></a></div>').render(d);
|
return laytpl('<div><a target="_blank" data-video-player="{{d.xurl}}" data-tips-text="{:lang(\'播放视频\')}"><i class="layui-icon layui-icon-video"></i></a></div>').render(d);
|
||||||
}
|
}
|
||||||
if (typeof d.mime === 'string' && /^audio\//.test(d.mime)) {
|
if (typeof d.mime === 'string' && /^audio\//.test(d.mime)) {
|
||||||
return laytpl('<div><a target="_blank" data-video-player="{{d.xurl}}" data-tips-text="播放音频"><i class="layui-icon layui-icon-headset"></i></a></div>').render(d);
|
return laytpl('<div><a target="_blank" data-video-player="{{d.xurl}}" data-tips-text="{:lang(\'播放音频\')}"><i class="layui-icon layui-icon-headset"></i></a></div>').render(d);
|
||||||
}
|
}
|
||||||
return laytpl('<div><a target="_blank" href="{{d.xurl}}" data-tips-text="查看下载"><i class="layui-icon layui-icon-file"></i></a></div>').render(d);
|
return laytpl('<div><a target="_blank" href="{{d.xurl}}" data-tips-text="{:lang(\'查看下载\')}"><i class="layui-icon layui-icon-file"></i></a></div>').render(d);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'isfast', title: '上传方式', align: 'center', width: '8%', templet: function (d) {
|
field: 'isfast', title: '{:lang("上传方式")}', align: 'center', width: '8%', templet: function (d) {
|
||||||
return d.isfast ? '<b class="color-green">秒传</b>' : '<b class="color-blue">普通</b>';
|
return d.isfast ? '<b class="color-green">{:lang("秒传")}</b>' : '<b class="color-blue">{:lang("普通")}</b>';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: 'ctype', title: '存储方式', align: 'center', width: '10%'},
|
{field: 'ctype', title: '{:lang("存储方式")}', align: 'center', width: '10%'},
|
||||||
{field: 'create_at', title: '上传时间', align: 'center', width: '15%', sort: true},
|
{field: 'create_at', title: '{:lang("创建时间")}', align: 'center', width: '15%', sort: true},
|
||||||
{toolbar: '#toolbar', title: '操作面板', align: 'center', minWidth: 150, fixed: 'right'}
|
{toolbar: '#toolbar', title: '{:lang("操作面板")}', align: 'center', minWidth: 150, fixed: 'right'}
|
||||||
]]
|
]]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -55,10 +55,10 @@
|
|||||||
|
|
||||||
<script type="text/html" id="toolbar">
|
<script type="text/html" id="toolbar">
|
||||||
<!--{if auth("remove")}-->
|
<!--{if auth("remove")}-->
|
||||||
<a class="layui-btn layui-btn-sm" data-modal="{:url('edit')}?id={{d.id}}" data-title="编辑文件信息">编 辑</a>
|
<a class="layui-btn layui-btn-sm" data-modal="{:url('edit')}?id={{d.id}}" data-title="编辑文件信息">{:lang("编 辑")}</a>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
<!--{if auth("remove")}-->
|
<!--{if auth("remove")}-->
|
||||||
<a class="layui-btn layui-btn-sm layui-btn-danger" data-action="{:url('remove')}" data-value="id#{{d.id}}">删 除</a>
|
<a class="layui-btn layui-btn-sm layui-btn-danger" data-action="{:url('remove')}" data-value="id#{{d.id}}">{:lang("删 除")}</a>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
</script>
|
</script>
|
||||||
{/block}
|
{/block}
|
||||||
|
@ -1,26 +1,26 @@
|
|||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>条件搜索</legend>
|
<legend>{:lang('条件搜索')}</legend>
|
||||||
<form class="layui-form layui-form-pane form-search" action="{:sysuri()}" onsubmit="return false" method="get" autocomplete="off">
|
<form class="layui-form layui-form-pane form-search" action="{:sysuri()}" onsubmit="return false" method="get" autocomplete="off">
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline">
|
<div class="layui-form-item layui-inline">
|
||||||
<label class="layui-form-label">文件名称</label>
|
<label class="layui-form-label">{:lang('文件名称')}</label>
|
||||||
<label class="layui-input-inline">
|
<label class="layui-input-inline">
|
||||||
<input name="name" value="{$get.name|default=''}" placeholder="请输入文件名称" class="layui-input">
|
<input name="name" value="{$get.name|default=''}" placeholder="{:lang('请输入文件名称')}" class="layui-input">
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline">
|
<div class="layui-form-item layui-inline">
|
||||||
<label class="layui-form-label">文件哈希</label>
|
<label class="layui-form-label">{:lang('文件哈希')}</label>
|
||||||
<label class="layui-input-inline">
|
<label class="layui-input-inline">
|
||||||
<input name="hash" value="{$get.hash|default=''}" placeholder="请输入文件哈希" class="layui-input">
|
<input name="hash" value="{$get.hash|default=''}" placeholder="{:lang('请输入文件哈希')}" class="layui-input">
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline">
|
<div class="layui-form-item layui-inline">
|
||||||
<label class="layui-form-label">文件后缀</label>
|
<label class="layui-form-label">{:lang('文件后缀')}</label>
|
||||||
<div class="layui-input-inline">
|
<div class="layui-input-inline">
|
||||||
<select name="xext" lay-search class="layui-select">
|
<select name="xext" lay-search class="layui-select">
|
||||||
<option value=''>-- 全部后缀 --</option>
|
<option value=''>-- {:lang('全部')} --</option>
|
||||||
{foreach $xexts as $v}{if isset($get.xext) and $k eq $get.xext}
|
{foreach $xexts as $v}{if isset($get.xext) and $k eq $get.xext}
|
||||||
<option selected value="{$v}">{$v}</option>
|
<option selected value="{$v}">{$v}</option>
|
||||||
{else}
|
{else}
|
||||||
@ -31,10 +31,10 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline">
|
<div class="layui-form-item layui-inline">
|
||||||
<label class="layui-form-label">存储方式</label>
|
<label class="layui-form-label">{:lang('存储方式')}</label>
|
||||||
<div class="layui-input-inline">
|
<div class="layui-input-inline">
|
||||||
<select name="type" lay-search class="layui-select">
|
<select name="type" lay-search class="layui-select">
|
||||||
<option value=''>-- 全部方式 --</option>
|
<option value=''>-- {:lang('全部')} --</option>
|
||||||
{foreach $types as $k=>$v}{if isset($get.type) and $k eq $get.type}
|
{foreach $types as $k=>$v}{if isset($get.type) and $k eq $get.type}
|
||||||
<option selected value="{$k}">{$v}</option>
|
<option selected value="{$k}">{$v}</option>
|
||||||
{else}
|
{else}
|
||||||
@ -45,14 +45,14 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline">
|
<div class="layui-form-item layui-inline">
|
||||||
<label class="layui-form-label">上传时间</label>
|
<label class="layui-form-label">{:lang('创建时间')}</label>
|
||||||
<div class="layui-input-inline">
|
<div class="layui-input-inline">
|
||||||
<input data-date-range name="create_at" value="{$get.create_at|default=''}" placeholder="请选择上传时间" class="layui-input">
|
<input data-date-range name="create_at" value="{$get.create_at|default=''}" placeholder="{:lang('请选择创建时间')}" class="layui-input">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline">
|
<div class="layui-form-item layui-inline">
|
||||||
<button class="layui-btn layui-btn-primary"><i class="layui-icon"></i> 搜 索</button>
|
<button class="layui-btn layui-btn-primary"><i class="layui-icon"></i> {:lang('搜 索')}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</fieldset>
|
</fieldset>
|
@ -21,23 +21,23 @@
|
|||||||
{if session('user.username')}
|
{if session('user.username')}
|
||||||
<li class="layui-nav-item">
|
<li class="layui-nav-item">
|
||||||
<dl class="layui-nav-child">
|
<dl class="layui-nav-child">
|
||||||
<dd lay-unselect><a data-modal="{:sysuri('admin/index/info',['id'=>session('user.id')])}"><i class="layui-icon layui-icon-set-fill"></i> 基本资料</a></dd>
|
<dd lay-unselect><a data-modal="{:sysuri('admin/index/info',['id'=>session('user.id')])}"><i class="layui-icon layui-icon-set-fill"></i> {:lang('基本资料')}</a></dd>
|
||||||
<dd lay-unselect><a data-modal="{:sysuri('admin/index/pass',['id'=>session('user.id')])}"><i class="layui-icon layui-icon-component"></i> 安全设置</a></dd>
|
<dd lay-unselect><a data-modal="{:sysuri('admin/index/pass',['id'=>session('user.id')])}"><i class="layui-icon layui-icon-component"></i> {:lang('安全设置')}</a></dd>
|
||||||
{if isset($super) and $super}
|
{if isset($super) and $super}
|
||||||
<dd lay-unselect><a data-load="{:sysuri('admin/api.system/push')}"><i class="layui-icon layui-icon-template-1"></i> 缓存加速</a></dd>
|
<dd lay-unselect><a data-load="{:sysuri('admin/api.system/push')}"><i class="layui-icon layui-icon-template-1"></i> {:lang('缓存加速')}</a></dd>
|
||||||
<dd lay-unselect><a data-load="{:sysuri('admin/api.system/clear')}"><i class="layui-icon layui-icon-fonts-clear"></i> 清理缓存</a></dd>
|
<dd lay-unselect><a data-load="{:sysuri('admin/api.system/clear')}"><i class="layui-icon layui-icon-fonts-clear"></i> {:lang('清理缓存')}</a></dd>
|
||||||
{/if}
|
{/if}
|
||||||
<dd lay-unselect><a data-width="520px" data-modal="{:sysuri('admin/index/theme')}"><i class="layui-icon layui-icon-theme"></i> 配色方案</a></dd>
|
<dd lay-unselect><a data-width="520px" data-modal="{:sysuri('admin/index/theme')}"><i class="layui-icon layui-icon-theme"></i> {:lang('配色方案')}</a></dd>
|
||||||
<dd lay-unselect><a data-load="{:sysuri('admin/login/out')}" data-confirm="确定要退出登录吗?"><i class="layui-icon layui-icon-release"></i> 退出登录</a></dd>
|
<dd lay-unselect><a data-load="{:sysuri('admin/login/out')}" data-confirm="{:lang('确定要退出登录吗?')}"><i class="layui-icon layui-icon-release"></i> {:lang('退出登录')}</a></dd>
|
||||||
</dl>
|
</dl>
|
||||||
<a class="layui-elip">
|
<a class="layui-elip">
|
||||||
<span class="headimg" data-lazy-src="{:htmlentities(session('user.headimg'))}"></span>
|
<span class="headimg" data-lazy-src="{:htmlentities(session('user.headimg'))}"></span>
|
||||||
<span>{:htmlentities(session('user.nickname')?:session('user.username'))}</span>
|
<span>{:lang(htmlentities(session('user.nickname')?:session('user.username')))}</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{else}
|
{else}
|
||||||
<li class="layui-nav-item">
|
<li class="layui-nav-item">
|
||||||
<a data-href="{:sysuri('admin/login/index')}"><i class="layui-icon layui-icon-username"></i> 立即登录</a>
|
<a data-href="{:sysuri('admin/login/index')}"><i class="layui-icon layui-icon-username"></i> {:lang('立即登录')}</a>
|
||||||
</li>
|
</li>
|
||||||
{/if}
|
{/if}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
{block name='header'}
|
{block name='header'}
|
||||||
{notempty name='title'}
|
{notempty name='title'}
|
||||||
<div class="layui-card-header">
|
<div class="layui-card-header">
|
||||||
<span class="layui-icon font-s10 color-desc margin-right-5"></span>{$title|default=''}
|
<span class="layui-icon font-s10 color-desc margin-right-5"></span>{$title|default=''|lang}
|
||||||
<div class="pull-right">{block name='button'}{/block}</div>
|
<div class="pull-right">{block name='button'}{/block}</div>
|
||||||
</div>
|
</div>
|
||||||
{/notempty}
|
{/notempty}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<div class="layui-card-body">
|
<div class="layui-card-body">
|
||||||
|
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label label-required-next">上级菜单</label>
|
<label class="layui-form-label label-required-next">{:lang('上级菜单')}</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<select name='pid' class='layui-select' lay-search>
|
<select name='pid' class='layui-select' lay-search>
|
||||||
{foreach $menus as $menu}{eq name='menu.id' value='$vo.pid|default=0'}
|
{foreach $menus as $menu}{eq name='menu.id' value='$vo.pid|default=0'}
|
||||||
@ -17,7 +17,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">菜单名称</label>
|
<label class="layui-form-label">{:lang('菜单名称')}</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input name="title" value='{$vo.title|default=""}' required vali-name="菜单名称" placeholder="请输入菜单名称" class="layui-input">
|
<input name="title" value='{$vo.title|default=""}' required vali-name="菜单名称" placeholder="请输入菜单名称" class="layui-input">
|
||||||
<p class="help-block"><b>必选</b>,请填写菜单名称 ( 如:系统管理 ),建议字符不要太长,一般 4-6 个汉字</p>
|
<p class="help-block"><b>必选</b>,请填写菜单名称 ( 如:系统管理 ),建议字符不要太长,一般 4-6 个汉字</p>
|
||||||
@ -25,7 +25,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">菜单链接</label>
|
<label class="layui-form-label">{:lang('菜单链接')}</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input onblur="this.value=this.value === ''?'#':this.value" name="url" required vali-name="菜单链接" placeholder="请输入菜单链接" value="{$vo.url|default='#'}" class="layui-input">
|
<input onblur="this.value=this.value === ''?'#':this.value" name="url" required vali-name="菜单链接" placeholder="请输入菜单链接" value="{$vo.url|default='#'}" class="layui-input">
|
||||||
<p class="help-block">
|
<p class="help-block">
|
||||||
@ -36,7 +36,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">链接参数</label>
|
<label class="layui-form-label">{:lang('链接参数')}</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input name="params" placeholder="请输入链接参数" value="{$vo.params|default=''}" class="layui-input">
|
<input name="params" placeholder="请输入链接参数" value="{$vo.params|default=''}" class="layui-input">
|
||||||
<p class="help-block"><b>可选</b>,设置菜单链接的 GET 访问参数 ( 如:name=1&age=3 )</p>
|
<p class="help-block"><b>可选</b>,设置菜单链接的 GET 访问参数 ( 如:name=1&age=3 )</p>
|
||||||
@ -44,7 +44,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">权限节点</label>
|
<label class="layui-form-label">{:lang('权限节点')}</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input name="node" placeholder="请输入权限节点" value="{$vo.node|default=''}" class="layui-input">
|
<input name="node" placeholder="请输入权限节点" value="{$vo.node|default=''}" class="layui-input">
|
||||||
<p class="help-block"><b>可选</b>,请填写系统权限节点 ( 如:admin/user/index ),未填写时默认解释"菜单链接"判断是否拥有访问权限;</p>
|
<p class="help-block"><b>可选</b>,请填写系统权限节点 ( 如:admin/user/index ),未填写时默认解释"菜单链接"判断是否拥有访问权限;</p>
|
||||||
@ -52,7 +52,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">菜单图标</label>
|
<label class="layui-form-label">{:lang('菜单图标')}</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<div class="layui-input-inline">
|
<div class="layui-input-inline">
|
||||||
<input placeholder="请输入或选择图标" name="icon" value='{$vo.icon|default=""}' class="layui-input">
|
<input placeholder="请输入或选择图标" name="icon" value='{$vo.icon|default=""}' class="layui-input">
|
||||||
@ -60,7 +60,7 @@
|
|||||||
<span style="padding:0 12px;min-width:45px" class='layui-btn layui-btn-primary'>
|
<span style="padding:0 12px;min-width:45px" class='layui-btn layui-btn-primary'>
|
||||||
<i style="font-size:1.2em;margin:0;float:none" class='{$vo.icon|default=""}'></i>
|
<i style="font-size:1.2em;margin:0;float:none" class='{$vo.icon|default=""}'></i>
|
||||||
</span>
|
</span>
|
||||||
<button data-icon='icon' type='button' class='layui-btn layui-btn-primary'>选择图标</button>
|
<button data-icon='icon' type='button' class='layui-btn layui-btn-primary'>{:lang('选择图标')}</button>
|
||||||
<p class="help-block"><b>可选</b>,设置菜单选项前置图标,目前支持 layui 字体图标及 iconfont 定制字体图标。</p>
|
<p class="help-block"><b>可选</b>,设置菜单选项前置图标,目前支持 layui 字体图标及 iconfont 定制字体图标。</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -71,8 +71,8 @@
|
|||||||
{notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
|
{notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
|
||||||
|
|
||||||
<div class="layui-form-item text-center">
|
<div class="layui-form-item text-center">
|
||||||
<button class="layui-btn" type='submit'>保存数据</button>
|
<button class="layui-btn" type='submit'>{:lang('保存数据')}</button>
|
||||||
<button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗?" data-close>取消编辑</button>
|
<button class="layui-btn layui-btn-danger" type='button' data-confirm="{:lang('确定要取消编辑吗?')}" data-close>{:lang('取消编辑')}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
@ -2,22 +2,22 @@
|
|||||||
|
|
||||||
{block name="button"}
|
{block name="button"}
|
||||||
<!--{if $type eq 'index' and auth("add")}-->
|
<!--{if $type eq 'index' and auth("add")}-->
|
||||||
<button data-modal='{:url("add")}' data-table-id="MenuTable" class='layui-btn layui-btn-sm layui-btn-primary'>添加菜单</button>
|
<button data-modal='{:url("add")}' data-table-id="MenuTable" class='layui-btn layui-btn-sm layui-btn-primary'>{:lang('添加菜单')}</button>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
|
|
||||||
<!--{if $type eq 'index' and auth("state")}-->
|
<!--{if $type eq 'index' and auth("state")}-->
|
||||||
<button data-action='{:url("state")}' data-table-id="MenuTable" data-rule="id#{sps};status#0" class='layui-btn layui-btn-sm layui-btn-primary'>禁用菜单</button>
|
<button data-action='{:url("state")}' data-table-id="MenuTable" data-rule="id#{sps};status#0" class='layui-btn layui-btn-sm layui-btn-primary'>{:lang('禁用菜单')}</button>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
|
|
||||||
<!--{if $type eq 'recycle' and auth("state")}-->
|
<!--{if $type eq 'recycle' and auth("state")}-->
|
||||||
<button data-action='{:url("state")}' data-table-id="MenuTable" data-rule="id#{spp};status#1" class='layui-btn layui-btn-sm layui-btn-primary'>激活菜单</button>
|
<button data-action='{:url("state")}' data-table-id="MenuTable" data-rule="id#{spp};status#1" class='layui-btn layui-btn-sm layui-btn-primary'>{:lang('激活菜单')}</button>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block name="content"}
|
{block name="content"}
|
||||||
<div class="layui-tab layui-tab-card">
|
<div class="layui-tab layui-tab-card">
|
||||||
<ul class="layui-tab-title">
|
<ul class="layui-tab-title">
|
||||||
{foreach ['index'=>'系统菜单','recycle'=>'回 收 站'] as $k=>$v}
|
{foreach ['index'=>lang('系统菜单'),'recycle'=>lang('回 收 站')] as $k=>$v}
|
||||||
{if isset($type) and $type eq $k}
|
{if isset($type) and $type eq $k}
|
||||||
<li class="layui-this" data-open="{:url('index')}?type={$k}">{$v}</li>
|
<li class="layui-this" data-open="{:url('index')}?type={$k}">{$v}</li>
|
||||||
{else}
|
{else}
|
||||||
@ -43,12 +43,12 @@
|
|||||||
},
|
},
|
||||||
cols: [[
|
cols: [[
|
||||||
{checkbox: true, field: 'sps'},
|
{checkbox: true, field: 'sps'},
|
||||||
{field: 'sort', title: '排序权重', width: 100, align: 'center', templet: '#SortInputTpl'},
|
{field: 'sort', title: '{:lang("排序权重")}', width: 100, align: 'center', templet: '#SortInputTpl'},
|
||||||
{field: 'icon', title: '图 标', width: 80, align: 'center', templet: '<div><i class="{{d.icon}} font-s18"></i></div>'},
|
{field: 'icon', title: '{:lang("图 标")}', width: 80, align: 'center', templet: '<div><i class="{{d.icon}} font-s18"></i></div>'},
|
||||||
{field: 'title', title: '菜单名称', minWidth: 220, templet: '<div><span class="color-desc">{{d.spl}}</span>{{d.title}}</div>'},
|
{field: 'title', title: '{:lang("菜单名称")}', minWidth: 220, templet: '<div><span class="color-desc">{{d.spl}}</span>{{d.title}}</div>'},
|
||||||
{field: 'url', title: '跳转链接', minWidth: 200},
|
{field: 'url', title: '{:lang("跳转链接")}', minWidth: 200},
|
||||||
{field: 'status', title: '菜单状态', minWidth: 120, align: 'center', templet: '#StatusSwitchTpl'},
|
{field: 'status', title: '{:lang("使用状态")}', minWidth: 120, align: 'center', templet: '#StatusSwitchTpl'},
|
||||||
{toolbar: '#toolbar', title: '操作面板', minWidth: 150, align: 'center', fixed: 'right'},
|
{toolbar: '#toolbar', title: '{:lang("操作面板")}', minWidth: 150, align: 'center', fixed: 'right'},
|
||||||
]]
|
]]
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -72,12 +72,12 @@
|
|||||||
<script type="text/html" id="StatusSwitchTpl">
|
<script type="text/html" id="StatusSwitchTpl">
|
||||||
<!--{if auth("state")}-->
|
<!--{if auth("state")}-->
|
||||||
{{# if( "{$type|default='index'}"==='index' || (d.spc<1 || d.status<1)){ }}
|
{{# if( "{$type|default='index'}"==='index' || (d.spc<1 || d.status<1)){ }}
|
||||||
<input type="checkbox" value="{{d.sps}}|{{d.spp}}" lay-text="已激活|已禁用" lay-filter="StatusSwitch" lay-skin="switch" {{-d.status>0?'checked':''}}>
|
<input type="checkbox" value="{{d.sps}}|{{d.spp}}" lay-text="{:lang('已激活')}|{:lang('已禁用')}" lay-filter="StatusSwitch" lay-skin="switch" {{-d.status>0?'checked':''}}>
|
||||||
{{# }else{ }}
|
{{# }else{ }}
|
||||||
{{-d.status ? '<b class="color-green">已激活</b>' : '<b class="color-red">已禁用</b>'}}
|
{{-d.status ? '<b class="color-green">{:lang('已激活')}</b>' : '<b class="color-red">{:lang('已禁用')}</b>'}}
|
||||||
{{# } }}
|
{{# } }}
|
||||||
<!--{else}-->
|
<!--{else}-->
|
||||||
{{-d.status ? '<b class="color-green">已激活</b>' : '<b class="color-red">已禁用</b>'}}
|
{{-d.status ? '<b class="color-green">{:lang('已激活')}</b>' : '<b class="color-red">{:lang('已禁用')}</b>'}}
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -92,13 +92,13 @@
|
|||||||
<!-- {if isset($type) and $type eq 'index'} -->
|
<!-- {if isset($type) and $type eq 'index'} -->
|
||||||
<!-- {if auth('add')} -->
|
<!-- {if auth('add')} -->
|
||||||
{{# if(d.spt<2){ }}
|
{{# if(d.spt<2){ }}
|
||||||
<a class="layui-btn layui-btn-sm layui-btn-primary" data-title="添加系统菜单" data-modal='{:url("add")}?pid={{d.id}}'>添 加</a>
|
<a class="layui-btn layui-btn-sm layui-btn-primary" data-title="添加系统菜单" data-modal='{:url("add")}?pid={{d.id}}'>{:lang('添 加')}</a>
|
||||||
{{# }else{ }}
|
{{# }else{ }}
|
||||||
<a class="layui-btn layui-btn-sm layui-btn-disabled">添 加</a>
|
<a class="layui-btn layui-btn-sm layui-btn-disabled">{:lang('添 加')}</a>
|
||||||
{{# } }}
|
{{# } }}
|
||||||
<!-- {/if} -->
|
<!-- {/if} -->
|
||||||
{if auth('edit')}
|
{if auth('edit')}
|
||||||
<a class="layui-btn layui-btn-sm" data-event-dbclick data-title="编辑系统菜单" data-modal='{:url("edit")}?id={{d.id}}'>编 辑</a>
|
<a class="layui-btn layui-btn-sm" data-event-dbclick data-title="编辑系统菜单" data-modal='{:url("edit")}?id={{d.id}}'>{:lang('编 辑')}</a>
|
||||||
{/if}
|
{/if}
|
||||||
<!-- {else} -->
|
<!-- {else} -->
|
||||||
{if auth('remove')}
|
{if auth('remove')}
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
{block name="button"}
|
{block name="button"}
|
||||||
<!--{if auth("remove")}-->
|
<!--{if auth("remove")}-->
|
||||||
<button data-table-id="OplogTable" data-action='{:url("remove")}' data-rule="id#{id}" data-confirm="确定要删除选中的日志吗?" class='layui-btn layui-btn-sm layui-btn-primary'>批量删除</button>
|
<button data-table-id="OplogTable" data-action='{:url("remove")}' data-rule="id#{id}" data-confirm="确定要删除选中的日志吗?" class='layui-btn layui-btn-sm layui-btn-primary'>{:lang('批量删除')}</button>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
|
|
||||||
<!--{if auth("clear")}-->
|
<!--{if auth("clear")}-->
|
||||||
<button data-table-id="OplogTable" data-load='{:url("clear")}' data-confirm="确定要清空所有日志吗?" class='layui-btn layui-btn-sm layui-btn-primary'>清空日志</button>
|
<button data-table-id="OplogTable" data-load='{:url("clear")}' data-confirm="确定要清空所有日志吗?" class='layui-btn layui-btn-sm layui-btn-primary'>{:lang('清空数据')}</button>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
@ -26,14 +26,14 @@
|
|||||||
cols: [[
|
cols: [[
|
||||||
{checkbox: true},
|
{checkbox: true},
|
||||||
{field: 'id', title: 'ID', width: 80, sort: true, align: 'center'},
|
{field: 'id', title: 'ID', width: 80, sort: true, align: 'center'},
|
||||||
{field: 'username', title: '操作账号', minWidth: 100, sort: true, align: 'center'},
|
{field: 'username', title: '{:lang("操作账号")}', minWidth: 100, sort: true, align: 'center'},
|
||||||
{field: 'node', title: '操作节点', minWidth: 120},
|
{field: 'node', title: '{:lang("操作节点")}', minWidth: 120},
|
||||||
{field: 'action', title: '操作行为', minWidth: 120},
|
{field: 'action', title: '{:lang("操作行为")}', minWidth: 120},
|
||||||
{field: 'content', title: '操作描述', minWidth: 150},
|
{field: 'content', title: '{:lang("操作内容")}', minWidth: 150},
|
||||||
{field: 'geoip', title: '访问地址', minWidth: 100},
|
{field: 'geoip', title: '{:lang("访问地址")}', minWidth: 100},
|
||||||
{field: 'geoisp', title: '网络服务商', minWidth: 100},
|
{field: 'geoisp', title: '{:lang("网络服务商")}', minWidth: 100},
|
||||||
{field: 'create_at', title: '操作时间', minWidth: 170, align: 'center', sort: true},
|
{field: 'create_at', title: '{:lang("创建时间")}', minWidth: 170, align: 'center', sort: true},
|
||||||
{toolbar: '#toolbar', title: '操作面板', align: 'center', minWidth: 80, fixed: 'right'}
|
{toolbar: '#toolbar', title: '{:lang("操作面板")}', align: 'center', minWidth: 80, fixed: 'right'}
|
||||||
]]
|
]]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
<script type="text/html" id="toolbar">
|
<script type="text/html" id="toolbar">
|
||||||
<!--{if auth('remove')}-->
|
<!--{if auth('remove')}-->
|
||||||
<a data-action='{:url("remove")}' data-value="id#{{d.id}}" data-confirm="确认要删除这条记录吗?" class="layui-btn layui-btn-sm layui-btn-danger">删 除</a>
|
<a data-action='{:url("remove")}' data-value="id#{{d.id}}" data-confirm="确认要删除这条记录吗?" class="layui-btn layui-btn-sm layui-btn-danger">{:lang('删 除')}</a>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
</script>
|
</script>
|
||||||
{/block}
|
{/block}
|
@ -1,12 +1,12 @@
|
|||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>条件搜索</legend>
|
<legend>{:lang('条件搜索')}</legend>
|
||||||
<form class="layui-form layui-form-pane form-search" action="{:sysuri()}" onsubmit="return false" method="get" autocomplete="off">
|
<form class="layui-form layui-form-pane form-search" action="{:sysuri()}" onsubmit="return false" method="get" autocomplete="off">
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline">
|
<div class="layui-form-item layui-inline">
|
||||||
<label class="layui-form-label">操作账号</label>
|
<label class="layui-form-label">{:lang('操作账号')}</label>
|
||||||
<div class="layui-input-inline">
|
<div class="layui-input-inline">
|
||||||
<select name='username' lay-search class="layui-select">
|
<select name='username' lay-search class="layui-select">
|
||||||
<option value=''>-- 全部账号 --</option>
|
<option value=''>-- {:lang('全部')} --</option>
|
||||||
{foreach $users as $user}{if $user eq input('get.username')}
|
{foreach $users as $user}{if $user eq input('get.username')}
|
||||||
<option selected value="{$user}">{$user}</option>
|
<option selected value="{$user}">{$user}</option>
|
||||||
{else}
|
{else}
|
||||||
@ -17,10 +17,10 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline">
|
<div class="layui-form-item layui-inline">
|
||||||
<label class="layui-form-label">操作行为</label>
|
<label class="layui-form-label">{:lang('操作行为')}</label>
|
||||||
<div class="layui-input-inline">
|
<div class="layui-input-inline">
|
||||||
<select name="action" lay-search class="layui-select">
|
<select name="action" lay-search class="layui-select">
|
||||||
<option value=''>-- 全部行为 --</option>
|
<option value=''>-- {:lang('全部')} --</option>
|
||||||
{foreach $actions as $action}{if $action eq input('get.action')}
|
{foreach $actions as $action}{if $action eq input('get.action')}
|
||||||
<option selected value="{$action}">{$action}</option>
|
<option selected value="{$action}">{$action}</option>
|
||||||
{else}
|
{else}
|
||||||
@ -31,37 +31,37 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline">
|
<div class="layui-form-item layui-inline">
|
||||||
<label class="layui-form-label">操作节点</label>
|
<label class="layui-form-label">{:lang('操作节点')}</label>
|
||||||
<label class="layui-input-inline">
|
<label class="layui-input-inline">
|
||||||
<input name="node" value="{$get.node|default=''}" placeholder="请输入操作内容" class="layui-input">
|
<input name="node" value="{$get.node|default=''}" placeholder="{:lang('请输入操作节点')}" class="layui-input">
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline">
|
<div class="layui-form-item layui-inline">
|
||||||
<label class="layui-form-label">操作描述</label>
|
<label class="layui-form-label">{:lang('操作内容')}</label>
|
||||||
<label class="layui-input-inline">
|
<label class="layui-input-inline">
|
||||||
<input name="content" value="{$get.content|default=''}" placeholder="请输入操作内容" class="layui-input">
|
<input name="content" value="{$get.content|default=''}" placeholder="{:lang('请输入操作内容')}" class="layui-input">
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline">
|
<div class="layui-form-item layui-inline">
|
||||||
<label class="layui-form-label">访问地址</label>
|
<label class="layui-form-label">{:lang('访问地址')}</label>
|
||||||
<label class="layui-input-inline">
|
<label class="layui-input-inline">
|
||||||
<input name="geoip" value="{$get.geoip|default=''}" placeholder="请输入访问地址" class="layui-input">
|
<input name="geoip" value="{$get.geoip|default=''}" placeholder="{:lang('请输入访问地址')}" class="layui-input">
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline">
|
<div class="layui-form-item layui-inline">
|
||||||
<label class="layui-form-label">操作时间</label>
|
<label class="layui-form-label">{:lang('创建时间')}</label>
|
||||||
<label class="layui-input-inline">
|
<label class="layui-input-inline">
|
||||||
<input data-date-range name="create_at" value="{$get.create_at|default=''}" placeholder="请选择操作时间" class="layui-input">
|
<input data-date-range name="create_at" value="{$get.create_at|default=''}" placeholder="{:lang('请选择创建时间')}" class="layui-input">
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline">
|
<div class="layui-form-item layui-inline">
|
||||||
<button type="submit" class="layui-btn layui-btn-primary"><i class="layui-icon"></i> 搜 索</button>
|
<button type="submit" class="layui-btn layui-btn-primary"><i class="layui-icon"></i> {:lang('搜 索')}</button>
|
||||||
<button type="button" data-form-export="{:url('index')}?type={$type|default=''}" class="layui-btn layui-btn-primary">
|
<button type="button" data-form-export="{:url('index')}?type={$type|default=''}" class="layui-btn layui-btn-primary">
|
||||||
<i class="layui-icon layui-icon-export"></i> 导 出
|
<i class="layui-icon layui-icon-export"></i> {:lang('导 出')}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@ -77,11 +77,11 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
// 设置表头内容
|
// 设置表头内容
|
||||||
data.unshift(['ID', '操作账号', '访问节点', '访问IP地址', '访问地理区域', '访问操作', '操作内容', '操作时间']);
|
data.unshift(['ID', '{:lang("操作账号")}', '{:lang("操作节点")}', '{:lang("访问地址")}', '{:lang("网络服务商")}', '{:lang("操作行为")}', '{:lang("操作内容")}', '{:lang("创建时间")}']);
|
||||||
|
|
||||||
// 应用表格样式
|
// 应用表格样式
|
||||||
return this.withStyle(data, {A: 60, B: 80, C: 99, E: 120, G: 120});
|
return this.withStyle(data, {A: 60, B: 80, C: 99, E: 120, G: 120});
|
||||||
|
|
||||||
}, '操作日志' + layui.util.toDateString(Date.now(), '_yyyyMMdd_HHmmss'));
|
}, '{:lang("操作日志")}' + layui.util.toDateString(Date.now(), '_yyyyMMdd_HHmmss'));
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
@ -4,21 +4,21 @@
|
|||||||
|
|
||||||
{if isset($super) and $super}
|
{if isset($super) and $super}
|
||||||
|
|
||||||
<a data-table-id="QueueTable" class="layui-btn layui-btn-sm layui-btn-primary" data-queue="{:url('admin/api.plugs/optimize')}">优化数据库</a>
|
<a data-table-id="QueueTable" class="layui-btn layui-btn-sm layui-btn-primary" data-queue="{:url('admin/api.plugs/optimize')}">{:lang('优化数据库')}</a>
|
||||||
|
|
||||||
{if isset($iswin) and ($iswin or php_sapi_name() eq 'cli')}
|
{if isset($iswin) and ($iswin or php_sapi_name() eq 'cli')}
|
||||||
<button data-load='{:url("admin/api.queue/start")}' class='layui-btn layui-btn-sm layui-btn-primary'>开启服务</button>
|
<button data-load='{:url("admin/api.queue/start")}' class='layui-btn layui-btn-sm layui-btn-primary'>{:lang('开启服务')}</button>
|
||||||
<button data-load='{:url("admin/api.queue/stop")}' class='layui-btn layui-btn-sm layui-btn-primary'>关闭服务</button>
|
<button data-load='{:url("admin/api.queue/stop")}' class='layui-btn layui-btn-sm layui-btn-primary'>{:lang('关闭服务')}</button>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{if auth("clean")}
|
{if auth("clean")}
|
||||||
<button data-table-id="QueueTable" data-queue='{:url("clean")}' class='layui-btn layui-btn-sm layui-btn-primary'>定时清理</button>
|
<button data-table-id="QueueTable" data-queue='{:url("clean")}' class='layui-btn layui-btn-sm layui-btn-primary'>{:lang('定时清理')}</button>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{if auth("remove")}
|
{if auth("remove")}
|
||||||
<button data-table-id="QueueTable" data-action='{:url("remove")}' data-rule="id#{id}" data-confirm="确定批量删除记录吗?" class='layui-btn layui-btn-sm layui-btn-primary'>批量删除</button>
|
<button data-table-id="QueueTable" data-action='{:url("remove")}' data-rule="id#{id}" data-confirm="{:lang('确定批量删除记录吗?')}" class='layui-btn layui-btn-sm layui-btn-primary'>{:lang('批量删除')}</button>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{/block}
|
{/block}
|
||||||
@ -26,11 +26,18 @@
|
|||||||
{block name="content"}
|
{block name="content"}
|
||||||
<div class="think-box-notify">
|
<div class="think-box-notify">
|
||||||
<!--{if isset($super) and $super}-->
|
<!--{if isset($super) and $super}-->
|
||||||
<b>服务状态:</b><b class="margin-right-5" data-queue-message><span class="color-desc">检查中</span></b>
|
<b>{:lang('服务状态')}:</b><b class="margin-right-5" data-queue-message><span class="color-desc">{:lang('检查中')}</span></b>
|
||||||
<b data-tips-text="点击可复制【服务启动指令】" class="layui-icon pointer margin-right-20" data-copy="{$command|default=''}"></b>
|
<b data-tips-text="{:lang('点击可复制【服务启动指令】')}" class="layui-icon pointer margin-right-20" data-copy="{$command|default=''}"></b>
|
||||||
<script>$('[data-queue-message]').load('{:sysuri("admin/api.queue/status")}');</script>
|
<script>$('[data-queue-message]').load('{:sysuri("admin/api.queue/status")}');</script>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
<b>任务统计:</b>待处理 <b class="color-text" data-extra="pre">{$total.pre|default=0}</b> 个任务,处理中 <b class="color-blue" data-extra="dos">{$total.dos|default=0}</b> 个任务,已完成 <b class="color-green" data-extra="oks">{$total.oks|default=0}</b> 个任务,已失败 <b class="color-red" data-extra="ers">{$total.ers|default=0}</b> 个任务。
|
|
||||||
|
<b>{:lang('任务统计')}:</b>{:lang('待处理 %s 个任务,处理中 %s 个任务,已完成 %s 个任务,已失败 %s 个任务。', [
|
||||||
|
'<b class="color-text" data-extra="pre">..</b>',
|
||||||
|
'<b class="color-blue" data-extra="dos">..</b>',
|
||||||
|
'<b class="color-green" data-extra="oks">..</b>',
|
||||||
|
'<b class="color-red" data-extra="ers">..</b>'
|
||||||
|
])}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="think-box-shadow">
|
<div class="think-box-shadow">
|
||||||
{include file='queue/index_search'}
|
{include file='queue/index_search'}
|
||||||
@ -53,7 +60,7 @@
|
|||||||
cols: [[
|
cols: [[
|
||||||
{checkbox: true, fixed: 'left'},
|
{checkbox: true, fixed: 'left'},
|
||||||
{
|
{
|
||||||
field: 'id', title: '任务名称', width: '25%', sort: true, templet: function (d) {
|
field: 'id', title: '{:lang("任务名称")}', width: '25%', sort: true, templet: function (d) {
|
||||||
if (d.loops_time > 0) {
|
if (d.loops_time > 0) {
|
||||||
d.one = '<span class="layui-badge think-bg-blue">循</span>';
|
d.one = '<span class="layui-badge think-bg-blue">循</span>';
|
||||||
} else {
|
} else {
|
||||||
@ -68,7 +75,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'exec_time', title: '任务计划', width: '25%', templet: function (d) {
|
field: 'exec_time', title: '{:lang("任务计划")}', width: '25%', templet: function (d) {
|
||||||
d.html = '执行指令:' + d.command + '<br>计划执行:' + d.exec_time;
|
d.html = '执行指令:' + d.command + '<br>计划执行:' + d.exec_time;
|
||||||
if (d.loops_time > 0) {
|
if (d.loops_time > 0) {
|
||||||
return d.html + ' ( 每 <b class="color-blue">' + d.loops_time + '</b> 秒 ) ';
|
return d.html + ' ( 每 <b class="color-blue">' + d.loops_time + '</b> 秒 ) ';
|
||||||
@ -78,7 +85,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'loops_time', title: '执行状态', width: '30%', templet: function (d) {
|
field: 'loops_time', title: '{:lang("任务状态")}', width: '30%', templet: function (d) {
|
||||||
d.html = ([
|
d.html = ([
|
||||||
'<span class="pull-left layui-badge layui-badge-middle layui-bg-gray">未知</span>',
|
'<span class="pull-left layui-badge layui-badge-middle layui-bg-gray">未知</span>',
|
||||||
'<span class="pull-left layui-badge layui-badge-middle layui-bg-black">等待</span>',
|
'<span class="pull-left layui-badge layui-badge-middle layui-bg-black">等待</span>',
|
||||||
@ -97,7 +104,7 @@
|
|||||||
return d.html + '<br>执行结果:<span class="color-blue">' + (d.exec_desc || '<span class="color-desc">未获取到执行结果</span>') + '</span>';
|
return d.html + '<br>执行结果:<span class="color-blue">' + (d.exec_desc || '<span class="color-desc">未获取到执行结果</span>') + '</span>';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{toolbar: '#toolbar', title: '操作面板', align: 'center', minWidth: 210, fixed: 'right'}
|
{toolbar: '#toolbar', title: '{:lang("操作面板")}', align: 'center', minWidth: 210, fixed: 'right'}
|
||||||
]]
|
]]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -107,16 +114,16 @@
|
|||||||
|
|
||||||
<!--{if auth('redo')}-->
|
<!--{if auth('redo')}-->
|
||||||
{{# if(d.status===4||d.status===3){ }}
|
{{# if(d.status===4||d.status===3){ }}
|
||||||
<a class="layui-btn layui-btn-sm" data-confirm="确定要重置该任务吗?" data-queue="{:url('redo')}?code={{d.code}}">重 置</a>
|
<a class="layui-btn layui-btn-sm" data-confirm="确定要重置该任务吗?" data-queue="{:url('redo')}?code={{d.code}}">{:lang('重 置')}</a>
|
||||||
{{# }else{ }}
|
{{# }else{ }}
|
||||||
<a class="layui-btn layui-btn-sm layui-btn-disabled">重 置</a>
|
<a class="layui-btn layui-btn-sm layui-btn-disabled">{:lang('重 置')}</a>
|
||||||
{{# } }}
|
{{# } }}
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
|
|
||||||
<!--{if auth('remove')}-->
|
<!--{if auth('remove')}-->
|
||||||
<a class='layui-btn layui-btn-sm layui-btn-danger' data-confirm="确定要删除该任务吗?" data-action='{:url("remove")}' data-value="id#{{d.id}}">删 除</a>
|
<a class='layui-btn layui-btn-sm layui-btn-danger' data-confirm="{:lang('确定要删除该记录吗?')}" data-action='{:url("remove")}' data-value="id#{{d.id}}">{:lang('删 除')}</a>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
|
|
||||||
<a class='layui-btn layui-btn-sm layui-btn-normal' onclick="$.loadQueue('{{d.code}}',false,this)">日 志</a>
|
<a class='layui-btn layui-btn-sm layui-btn-normal' onclick="$.loadQueue('{{d.code}}',false,this)">{:lang('日 志')}</a>
|
||||||
</script>
|
</script>
|
||||||
{/block}
|
{/block}
|
||||||
|
@ -1,27 +1,27 @@
|
|||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>条件搜索</legend>
|
<legend>{:lang('条件搜索')}</legend>
|
||||||
<form class="layui-form layui-form-pane form-search" action="{:sysuri()}" onsubmit="return false" method="get" autocomplete="off">
|
<form class="layui-form layui-form-pane form-search" action="{:sysuri()}" onsubmit="return false" method="get" autocomplete="off">
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline">
|
<div class="layui-form-item layui-inline">
|
||||||
<label class="layui-form-label">编号名称</label>
|
<label class="layui-form-label">{:lang('编号名称')}</label>
|
||||||
<label class="layui-input-inline">
|
<label class="layui-input-inline">
|
||||||
<input name="title" value="{$get.title|default=''}" placeholder="请输入名称或编号" class="layui-input">
|
<input name="title" value="{$get.title|default=''}" placeholder="{:lang('请输入名称或编号')}" class="layui-input">
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline">
|
<div class="layui-form-item layui-inline">
|
||||||
<label class="layui-form-label">任务指令</label>
|
<label class="layui-form-label">{:lang('任务指令')}</label>
|
||||||
<label class="layui-input-inline">
|
<label class="layui-input-inline">
|
||||||
<input name="command" value="{$get.command|default=''}" placeholder="请输入任务指令" class="layui-input">
|
<input name="command" value="{$get.command|default=''}" placeholder="{:lang('请输入任务指令')}" class="layui-input">
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline">
|
<div class="layui-form-item layui-inline">
|
||||||
<label class="layui-form-label">任务状态</label>
|
<label class="layui-form-label">{:lang('任务状态')}</label>
|
||||||
<label class="layui-input-inline">
|
<label class="layui-input-inline">
|
||||||
<select name="status" class="layui-select">
|
<select name="status" class="layui-select">
|
||||||
<option value=''>-- 全部任务 --</option>
|
<option value=''>-- {:lang('全部')} --</option>
|
||||||
{foreach ['1'=>'等待处理','2'=>'正在处理','3'=>'处理完成','4'=>'处理失败'] as $k=>$v}
|
{foreach ['1'=>lang('等待处理'),'2'=>lang('正在处理'),'3'=>lang('处理完成'),'4'=>lang('处理失败')] as $k=>$v}
|
||||||
{if isset($get.status) and $get.status eq $k}
|
{if isset($get.status) and $get.status eq $k}
|
||||||
<option selected value="{$k}">{$v}</option>
|
<option selected value="{$k}">{$v}</option>
|
||||||
{else}
|
{else}
|
||||||
@ -32,28 +32,14 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline">
|
<div class="layui-form-item layui-inline">
|
||||||
<label class="layui-form-label">计划时间</label>
|
<label class="layui-form-label">{:lang('计划时间')}</label>
|
||||||
<label class="layui-input-inline">
|
<label class="layui-input-inline">
|
||||||
<input data-date-range name="exec_time" value="{$get.exec_time|default=''}" placeholder="请选择计划时间" class="layui-input">
|
<input data-date-range name="exec_time" value="{$get.exec_time|default=''}" placeholder="{:lang('请选择计划时间')}" class="layui-input">
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline layui-hide">
|
|
||||||
<label class="layui-form-label">执行时间</label>
|
|
||||||
<label class="layui-input-inline">
|
|
||||||
<input data-date-range name="enter_time" value="{$get.enter_time|default=''}" placeholder="请选择执行时间" class="layui-input">
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline layui-hide">
|
|
||||||
<label class="layui-form-label">创建时间</label>
|
|
||||||
<label class="layui-input-inline">
|
|
||||||
<input data-date-range name="create_at" value="{$get.create_at|default=''}" placeholder="请选择创建时间" class="layui-input">
|
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline">
|
<div class="layui-form-item layui-inline">
|
||||||
<button class="layui-btn layui-btn-primary"><i class="layui-icon"></i> 搜 索</button>
|
<button class="layui-btn layui-btn-primary"><i class="layui-icon"></i> {:lang('搜 索')}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</fieldset>
|
</fieldset>
|
@ -3,7 +3,7 @@
|
|||||||
{block name='header'}
|
{block name='header'}
|
||||||
{notempty name='title'}
|
{notempty name='title'}
|
||||||
<div class="layui-card-header">
|
<div class="layui-card-header">
|
||||||
<span class="layui-icon font-s10 color-desc margin-right-5"></span>{$title|default=''}
|
<span class="layui-icon font-s10 color-desc margin-right-5"></span>{$title|default=''|lang}
|
||||||
<div class="pull-right">{block name='button'}{/block}</div>
|
<div class="pull-right">{block name='button'}{/block}</div>
|
||||||
</div>
|
</div>
|
||||||
{/notempty}
|
{/notempty}
|
||||||
|
@ -3,17 +3,17 @@
|
|||||||
{block name="button"}
|
{block name="button"}
|
||||||
{if isset($type) and $type eq 'index'}
|
{if isset($type) and $type eq 'index'}
|
||||||
<!--{if auth("add")}-->
|
<!--{if auth("add")}-->
|
||||||
<button data-modal='{:url("add")}' data-title="添加用户" class='layui-btn layui-btn-sm layui-btn-primary'>添加用户</button>
|
<button data-modal='{:url("add")}' data-title="{:lang('添加用户')}" class='layui-btn layui-btn-sm layui-btn-primary'>{:lang('添加用户')}</button>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
<!--{if auth("state")}-->
|
<!--{if auth("state")}-->
|
||||||
<a data-confirm="确定要启用该用户吗?" data-table-id="UserTable" data-action="{:url('state')}" data-rule="id#{id};status#0" class='layui-btn layui-btn-sm layui-btn-primary'>批量禁用</a>
|
<a data-confirm="确定要启用该用户吗?" data-table-id="UserTable" data-action="{:url('state')}" data-rule="id#{id};status#0" class='layui-btn layui-btn-sm layui-btn-primary'>{:lang('批量禁用')}</a>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
{else}
|
{else}
|
||||||
<!--{if auth("state")}-->
|
<!--{if auth("state")}-->
|
||||||
<a data-confirm="确定要恢复这些账号吗?" data-table-id="UserTable" data-action="{:url('state')}" data-rule="id#{id};status#1" class='layui-btn layui-btn-sm layui-btn-primary'>批量恢复</a>
|
<a data-confirm="确定要恢复这些账号吗?" data-table-id="UserTable" data-action="{:url('state')}" data-rule="id#{id};status#1" class='layui-btn layui-btn-sm layui-btn-primary'>{:lang('批量恢复')}</a>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
<!--{if auth("remove")}-->
|
<!--{if auth("remove")}-->
|
||||||
<a data-confirm="确定永久删除这些账号吗?" data-table-id="UserTable" data-action='{:url("remove")}' data-rule="id#{id}" class='layui-btn layui-btn-sm layui-btn-primary'>批量删除</a>
|
<a data-confirm="确定永久删除这些账号吗?" data-table-id="UserTable" data-action='{:url("remove")}' data-rule="id#{id}" class='layui-btn layui-btn-sm layui-btn-primary'>{:lang('批量删除')}</a>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
{/if}
|
{/if}
|
||||||
{/block}
|
{/block}
|
||||||
@ -21,7 +21,7 @@
|
|||||||
{block name="content"}
|
{block name="content"}
|
||||||
<div class="layui-tab layui-tab-card">
|
<div class="layui-tab layui-tab-card">
|
||||||
<ul class="layui-tab-title">
|
<ul class="layui-tab-title">
|
||||||
{foreach ['index'=>'系统用户','recycle'=>'回 收 站'] as $k=>$v}{if isset($type) and $type eq $k}
|
{foreach ['index'=>lang('系统用户'),'recycle'=>lang('回 收 站')] as $k=>$v}{if isset($type) and $type eq $k}
|
||||||
<li data-open="{:url('index')}?type={$k}" class="layui-this">{$v}</li>
|
<li data-open="{:url('index')}?type={$k}" class="layui-this">{$v}</li>
|
||||||
{else}
|
{else}
|
||||||
<li data-open="{:url('index')}?type={$k}">{$v}</li>
|
<li data-open="{:url('index')}?type={$k}">{$v}</li>
|
||||||
@ -40,18 +40,18 @@
|
|||||||
where: {type: '{$type|default="index"}'},
|
where: {type: '{$type|default="index"}'},
|
||||||
cols: [[
|
cols: [[
|
||||||
{checkbox: true, fixed: true},
|
{checkbox: true, fixed: true},
|
||||||
{field: 'sort', title: '排序权重', width: 100, align: 'center', sort: true, templet: '#SortInputTpl'},
|
{field: 'sort', title: '{:lang("排序权重")}', width: 100, align: 'center', sort: true, templet: '#SortInputTpl'},
|
||||||
{
|
{
|
||||||
field: 'headimg', title: '头像', width: 60, align: 'center', templet: function (d) {
|
field: 'headimg', title: '{:lang("头像")}', width: 60, align: 'center', templet: function (d) {
|
||||||
if (!d.headimg) return '-';
|
if (!d.headimg) return '-';
|
||||||
return layui.laytpl('<div class="headimg headimg-ss shadow-inset margin-0" data-tips-image data-tips-hover data-lazy-src="{{d.headimg}}"></div>').render(d);
|
return layui.laytpl('<div class="headimg headimg-ss shadow-inset margin-0" data-tips-image data-tips-hover data-lazy-src="{{d.headimg}}"></div>').render(d);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: 'username', title: '登录账号', minWidth: 100, align: 'center', templet: '<div>{{d.username||"-"}}</div>'},
|
{field: 'username', title: '{:lang("登录账号")}', minWidth: 100, align: 'center', templet: '<div>{{d.username||"-"}}</div>'},
|
||||||
{field: 'nickname', title: '用户名称', minWidth: 100, align: 'center', templet: '<div>{{d.nickname||"-"}}</div>'},
|
{field: 'nickname', title: '{:lang("用户名称")}', minWidth: 100, align: 'center', templet: '<div>{{d.nickname||"-"}}</div>'},
|
||||||
/* {notempty name='bases'} */
|
/* {notempty name='bases'} */
|
||||||
{
|
{
|
||||||
field: 'usertype', title: '角色身份', minWidth: 100, align: 'center', templet: function (d) {
|
field: 'usertype', title: '{:lang("角色身份")}', minWidth: 100, align: 'center', templet: function (d) {
|
||||||
d.userinfo = d.userinfo || {};
|
d.userinfo = d.userinfo || {};
|
||||||
return d.userinfo.code ? (d.userinfo.name + ' ( ' + d.userinfo.code + ' ) ') : '-';
|
return d.userinfo.code ? (d.userinfo.name + ' ( ' + d.userinfo.code + ' ) ') : '-';
|
||||||
}
|
}
|
||||||
@ -59,11 +59,11 @@
|
|||||||
/* {/notempty} */
|
/* {/notempty} */
|
||||||
// {field: 'contact_mail', title: '联系邮箱', minWidth: 80, templet: '<div>{{d.contact_mail||"-"}}</div>'},
|
// {field: 'contact_mail', title: '联系邮箱', minWidth: 80, templet: '<div>{{d.contact_mail||"-"}}</div>'},
|
||||||
// {field: 'contact_phone', title: '联系电话', minWidth: 80, templet: '<div>{{d.contact_phone||"-"}}</div>'},
|
// {field: 'contact_phone', title: '联系电话', minWidth: 80, templet: '<div>{{d.contact_phone||"-"}}</div>'},
|
||||||
{field: 'status', title: '账号状态', align: 'center', minWidth: 110, templet: '#StatusSwitchTpl'},
|
{field: 'status', title: '{:lang("使用状态")}', align: 'center', minWidth: 110, templet: '#StatusSwitchTpl'},
|
||||||
{field: 'login_num', title: '登录次数', align: 'center', minWidth: 100, sort: true},
|
{field: 'login_num', title: '{:lang("登录次数")}', align: 'center', minWidth: 100, sort: true},
|
||||||
{field: 'login_at', title: '最后登录', align: 'center', minWidth: 170, sort: true},
|
{field: 'login_at', title: '{:lang("最后登录")}', align: 'center', minWidth: 170, sort: true},
|
||||||
{field: 'create_at', title: '创建时间', align: 'center', minWidth: 170, sort: true},
|
{field: 'create_at', title: '{:lang("创建时间")}', align: 'center', minWidth: 170, sort: true},
|
||||||
{toolbar: '#toolbar', title: '操作面板', align: 'center', minWidth: 150, fixed: 'right'}
|
{toolbar: '#toolbar', title: '{:lang("操作面板")}', align: 'center', minWidth: 180, fixed: 'right'}
|
||||||
]]
|
]]
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -85,9 +85,9 @@
|
|||||||
<!-- 数据状态切换模板 -->
|
<!-- 数据状态切换模板 -->
|
||||||
<script type="text/html" id="StatusSwitchTpl">
|
<script type="text/html" id="StatusSwitchTpl">
|
||||||
<!--{if auth("state")}-->
|
<!--{if auth("state")}-->
|
||||||
<input type="checkbox" value="{{d.id}}" lay-skin="switch" lay-text="已激活|已禁用" lay-filter="StatusSwitch" {{-d.status>0?'checked':''}}>
|
<input type="checkbox" value="{{d.id}}" lay-skin="switch" lay-text="{:lang('已激活')}|{:lang('已禁用')}" lay-filter="StatusSwitch" {{-d.status>0?'checked':''}}>
|
||||||
<!--{else}-->
|
<!--{else}-->
|
||||||
{{-d.status ? '<b class="color-green">已启用</b>' : '<b class="color-red">已禁用</b>'}}
|
{{-d.status ? '<b class="color-green">{:lang("已激活")}</b>' : '<b class="color-red">{:lang("已禁用")}</b>'}}
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -99,17 +99,17 @@
|
|||||||
<script type="text/html" id="toolbar">
|
<script type="text/html" id="toolbar">
|
||||||
{if isset($type) and $type eq 'index'}
|
{if isset($type) and $type eq 'index'}
|
||||||
<!--{if auth("edit")}-->
|
<!--{if auth("edit")}-->
|
||||||
<a class="layui-btn layui-btn-sm" data-event-dbclick data-title="编辑用户" data-modal='{:url("edit")}?id={{d.id}}'>编 辑</a>
|
<a class="layui-btn layui-btn-sm" data-event-dbclick data-title="{:lang('编辑用户')}" data-modal='{:url("edit")}?id={{d.id}}'>{:lang('编 辑')}</a>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
<!--{if auth("pass")}-->
|
<!--{if auth("pass")}-->
|
||||||
<a class="layui-btn layui-btn-sm layui-btn-normal" data-title="设置密码" data-modal='{:url("pass")}?id={{d.id}}'>密 码</a>
|
<a class="layui-btn layui-btn-sm layui-btn-normal" data-title="{:lang('设置密码')}" data-modal='{:url("pass")}?id={{d.id}}'>{:lang('密 码')}</a>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
{else}
|
{else}
|
||||||
<!--{if auth("edit")}-->
|
<!--{if auth("edit")}-->
|
||||||
<a class="layui-btn layui-btn-sm" data-event-dbclick data-title="编辑用户" data-modal='{:url("edit")}?id={{d.id}}'>编 辑</a>
|
<a class="layui-btn layui-btn-sm" data-event-dbclick data-title="{:lang('编辑用户')}" data-modal='{:url("edit")}?id={{d.id}}'>{:lang('编 辑')}</a>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
<!--{if auth("remove")}-->
|
<!--{if auth("remove")}-->
|
||||||
<a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要永久删除此账号吗?" data-action="{:url('remove')}" data-value="id#{{d.id}}">删 除</a>
|
<a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="{:lang('确定要永久删除吗?')}" data-action="{:url('remove')}" data-value="id#{{d.id}}">{:lang('删 除')}</a>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
{/if}
|
{/if}
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
<form class="layui-form layui-form-pane form-search" action="{:sysuri()}" onsubmit="return false" method="get" autocomplete="off">
|
<form class="layui-form layui-form-pane form-search" action="{:sysuri()}" onsubmit="return false" method="get" autocomplete="off">
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline">
|
<div class="layui-form-item layui-inline">
|
||||||
<label class="layui-form-label">账号名称</label>
|
<label class="layui-form-label">{:lang('账号名称')}</label>
|
||||||
<label class="layui-input-inline">
|
<label class="layui-input-inline">
|
||||||
<input name="username" value="{$get.username|default=''}" placeholder="请输入账号或名称" class="layui-input">
|
<input name="username" value="{$get.username|default=''}" placeholder="{:lang('请输入账号或名称')}" class="layui-input">
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--{notempty name='bases'}-->
|
<!--{notempty name='bases'}-->
|
||||||
<div class="layui-form-item layui-inline">
|
<div class="layui-form-item layui-inline">
|
||||||
<label class="layui-form-label">角色身份</label>
|
<label class="layui-form-label">{:lang('角色身份')}</label>
|
||||||
<div class="layui-input-inline">
|
<div class="layui-input-inline">
|
||||||
<select name="usertype" lay-search class="layui-select">
|
<select name="usertype" lay-search class="layui-select">
|
||||||
<option value=''>-- 全部 --</option>
|
<option value=''>-- {:lang('全部')} --</option>
|
||||||
{foreach $bases as $base}{if $base.code eq input('get.usertype')}
|
{foreach $bases as $base}{if $base.code eq input('get.usertype')}
|
||||||
<option selected value="{$base.code|default=''}">{$base.name|default=''} ( {$base.code|default=''} )</option>
|
<option selected value="{$base.code|default=''}">{$base.name|default=''} ( {$base.code|default=''} )</option>
|
||||||
{else}
|
{else}
|
||||||
@ -23,36 +23,22 @@
|
|||||||
</div>
|
</div>
|
||||||
<!--{/notempty}-->
|
<!--{/notempty}-->
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline layui-hide">
|
|
||||||
<label class="layui-form-label">联系手机</label>
|
|
||||||
<label class="layui-input-inline">
|
|
||||||
<input name="phone" value="{$get.phone|default=''}" placeholder="请输入联系手机" class="layui-input">
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline layui-hide">
|
|
||||||
<label class="layui-form-label">联系邮箱</label>
|
|
||||||
<label class="layui-input-inline">
|
|
||||||
<input name="mail" value="{$get.mail|default=''}" placeholder="请输入联系邮箱" class="layui-input">
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline">
|
<div class="layui-form-item layui-inline">
|
||||||
<label class="layui-form-label">最后登录</label>
|
<label class="layui-form-label">{:lang('最后登录')}</label>
|
||||||
<div class="layui-input-inline">
|
<div class="layui-input-inline">
|
||||||
<input data-date-range name="login_at" value="{$get.login_at|default=''}" placeholder="请选择登录时间" class="layui-input">
|
<input data-date-range name="login_at" value="{$get.login_at|default=''}" placeholder="{:lang('请选择登录时间')}" class="layui-input">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline">
|
<div class="layui-form-item layui-inline">
|
||||||
<label class="layui-form-label">创建时间</label>
|
<label class="layui-form-label">{:lang('创建时间')}</label>
|
||||||
<div class="layui-input-inline">
|
<div class="layui-input-inline">
|
||||||
<input data-date-range name="create_at" value="{$get.create_at|default=''}" placeholder="请选择创建时间" class="layui-input">
|
<input data-date-range name="create_at" value="{$get.create_at|default=''}" placeholder="{:lang('请选择创建时间')}" class="layui-input">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item layui-inline">
|
<div class="layui-form-item layui-inline">
|
||||||
<input type="hidden" name="type" value="{$type|default='index'}">
|
<input type="hidden" name="type" value="{$type|default='index'}">
|
||||||
<button class="layui-btn layui-btn-primary"><i class="layui-icon"></i> 搜 索</button>
|
<button class="layui-btn layui-btn-primary"><i class="layui-icon"></i> {:lang('搜 索')}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
@ -218,7 +218,7 @@ $(function () {
|
|||||||
this.stat = function () {
|
this.stat = function () {
|
||||||
return this.$body.is(':visible');
|
return this.$body.is(':visible');
|
||||||
}, this.done = function () {
|
}, this.done = function () {
|
||||||
$.msg.page.$body.fadeOut();
|
return $.msg.page.$body.fadeOut();
|
||||||
}, this.show = function () {
|
}, this.show = function () {
|
||||||
this.stat() || this.$main.removeClass('layui-hide').show();
|
this.stat() || this.$main.removeClass('layui-hide').show();
|
||||||
}, this.hide = function () {
|
}, this.hide = function () {
|
||||||
@ -292,7 +292,7 @@ $(function () {
|
|||||||
this.load = function (url, data, method, callable, loading, tips, time, headers) {
|
this.load = function (url, data, method, callable, loading, tips, time, headers) {
|
||||||
// 如果主页面 loader 显示中,绝对不显示 loading 图标
|
// 如果主页面 loader 显示中,绝对不显示 loading 图标
|
||||||
loading = $('.layui-page-loader').is(':visible') ? false : loading;
|
loading = $('.layui-page-loader').is(':visible') ? false : loading;
|
||||||
let loadidx = loading !== false ? $.msg.loading(tips) : 0;
|
let defer = jQuery.Deferred(), loadidx = loading !== false ? $.msg.loading(tips) : 0;
|
||||||
if (typeof data === 'object' && typeof data['_token_'] === 'string') {
|
if (typeof data === 'object' && typeof data['_token_'] === 'string') {
|
||||||
headers = headers || {}, headers['User-Form-Token'] = data['_token_'], delete data['_token_'];
|
headers = headers || {}, headers['User-Form-Token'] = data['_token_'], delete data['_token_'];
|
||||||
}
|
}
|
||||||
@ -302,7 +302,7 @@ $(function () {
|
|||||||
if (typeof headers === 'object') for (i in headers) xhr.setRequestHeader(i, headers[i]);
|
if (typeof headers === 'object') for (i in headers) xhr.setRequestHeader(i, headers[i]);
|
||||||
}, error: function (XMLHttpRequest, $dialog, layIdx, iframe) {
|
}, error: function (XMLHttpRequest, $dialog, layIdx, iframe) {
|
||||||
// 异常消息显示处理
|
// 异常消息显示处理
|
||||||
if (parseInt(XMLHttpRequest.status) !== 200 && XMLHttpRequest.responseText.indexOf('Call Stack') > -1) try {
|
if (defer.notify('load.error') && parseInt(XMLHttpRequest.status) !== 200 && XMLHttpRequest.responseText.indexOf('Call Stack') > -1) try {
|
||||||
layIdx = layer.open({title: XMLHttpRequest.status + ' - ' + XMLHttpRequest.statusText, type: 2, move: false, content: 'javascript:;'});
|
layIdx = layer.open({title: XMLHttpRequest.status + ' - ' + XMLHttpRequest.statusText, type: 2, move: false, content: 'javascript:;'});
|
||||||
layer.full(layIdx), $dialog = $('#layui-layer' + layIdx), iframe = $dialog.find('iframe').get(0);
|
layer.full(layIdx), $dialog = $('#layui-layer' + layIdx), iframe = $dialog.find('iframe').get(0);
|
||||||
(iframe.contentDocument || iframe.contentWindow.document).write(XMLHttpRequest.responseText);
|
(iframe.contentDocument || iframe.contentWindow.document).write(XMLHttpRequest.responseText);
|
||||||
@ -321,15 +321,15 @@ $(function () {
|
|||||||
} else {
|
} else {
|
||||||
this.success(XMLHttpRequest.responseText);
|
this.success(XMLHttpRequest.responseText);
|
||||||
}
|
}
|
||||||
}, success: function (ret) {
|
}, success: function (res) {
|
||||||
time = time || ret.wait || undefined;
|
defer.notify('load.success', res) && (time = time || res.wait || undefined);
|
||||||
if (typeof callable === 'function' && callable.call($.form, ret, time) === false) return false;
|
if (typeof callable === 'function' && callable.call($.form, res, time, defer) === false) return false;
|
||||||
return typeof ret === 'object' ? $.msg.auto(ret, time) : $.form.show(ret);
|
return typeof res === 'object' ? $.msg.auto(res, time) : $.form.show(res);
|
||||||
}, complete: function () {
|
}, complete: function () {
|
||||||
$.msg.page.done();
|
defer.notify('load.complete') && $.msg.page.done() && $.msg.close(loadidx);
|
||||||
$.msg.close(loadidx);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
return defer;
|
||||||
};
|
};
|
||||||
/*! 兼容跳转与执行 */
|
/*! 兼容跳转与执行 */
|
||||||
this.goto = function (url) {
|
this.goto = function (url) {
|
||||||
@ -362,20 +362,18 @@ $(function () {
|
|||||||
this.idx = layer.open({title: name || '窗口', type: 2, area: area || ['800px', '580px'], end: destroy || null, offset: offset, fixed: true, maxmin: false, content: url, success: success});
|
this.idx = layer.open({title: name || '窗口', type: 2, area: area || ['800px', '580px'], end: destroy || null, offset: offset, fixed: true, maxmin: false, content: url, success: success});
|
||||||
return isfull && layer.full(this.idx), this.idx;
|
return isfull && layer.full(this.idx), this.idx;
|
||||||
};
|
};
|
||||||
/*! 加载 HTML 到弹出层 */
|
/*! 加载 HTML 到弹出层,返回 refer 对象 */
|
||||||
this.modal = function (url, data, name, call, load, tips, area, offset, isfull) {
|
this.modal = function (url, data, name, call, load, tips, area, offset, isfull) {
|
||||||
this.load(url, data, 'GET', function (res) {
|
return this.load(url, data, 'GET', function (res, time, defer) {
|
||||||
if (typeof res === 'object') return $.msg.auto(res), false;
|
return typeof res === 'object' ? $.msg.auto(res) : $.msg.mdx.push(this.idx = layer.open({
|
||||||
return $.msg.mdx.push(this.idx = layer.open({
|
type: 1, btn: false, area: area || '800px', offset: offset || 'auto', resize: false, content: res,
|
||||||
type: 1, btn: false, area: area || "800px", resize: false, content: res, title: name === 'false' ? '' : name, offset: offset || 'auto', success: function ($dom, idx) {
|
title: name === 'false' ? '' : name, end: () => defer.notify('modal.close'), success: function ($dom, idx) {
|
||||||
typeof call === 'function' && call.call($.form, $dom);
|
defer.notify('modal.success', $dom) && typeof call === 'function' && call.call($.form, $dom);
|
||||||
$.form.reInit($dom.off('click', '[data-close]').on('click', '[data-close]', function () {
|
$.form.reInit($dom.off('click', '[data-close]').on('click', '[data-close]', function () {
|
||||||
$.base.onConfirm(this.dataset.confirm, function () {
|
$.base.onConfirm(this.dataset.confirm, () => layer.close(idx));
|
||||||
layer.close(idx);
|
|
||||||
});
|
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
})), isfull && layer.full(this.idx), false;
|
})) && isfull && layer.full(this.idx), false;
|
||||||
}, load, tips);
|
}, load, tips);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -916,7 +914,8 @@ $(function () {
|
|||||||
/*! 注册 data-modal 事件行为 */
|
/*! 注册 data-modal 事件行为 */
|
||||||
$.base.onEvent('click', '[data-modal]', function () {
|
$.base.onEvent('click', '[data-modal]', function () {
|
||||||
$.base.applyRuleValue(this, {open_type: 'modal'}, function (data, elem, dset) {
|
$.base.applyRuleValue(this, {open_type: 'modal'}, function (data, elem, dset) {
|
||||||
return $.form.modal(dset.modal, data, dset.title || this.innerText || '编辑', undefined, undefined, undefined, dset.area || dset.width || '800px', dset.offset || 'auto', dset.full !== undefined);
|
let defer = $.form.modal(dset.modal, data, dset.title || this.innerText || '编辑', undefined, undefined, undefined, dset.area || dset.width || '800px', dset.offset || 'auto', dset.full !== undefined);
|
||||||
|
defer.progress((type) => type === 'modal.close' && dset.closeRefresh && $.layTable.reload(dset.closeRefresh));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -935,20 +934,15 @@ $(function () {
|
|||||||
/*! 注册 data-video-player 事件行为 */
|
/*! 注册 data-video-player 事件行为 */
|
||||||
$.base.onEvent('click', '[data-video-player]', function () {
|
$.base.onEvent('click', '[data-video-player]', function () {
|
||||||
let idx = $.msg.loading(), url = this.dataset.videoPlayer, name = this.dataset.title || '媒体播放器', payer;
|
let idx = $.msg.loading(), url = this.dataset.videoPlayer, name = this.dataset.title || '媒体播放器', payer;
|
||||||
require(['artplayer'], function () {
|
require(['artplayer'], () => layer.open({
|
||||||
layer.open({
|
title: name, type: 1, fixed: true, maxmin: false,
|
||||||
title: name, type: 1, fixed: true, maxmin: false, content: '<div class="data-play-video" style="width:800px;height:450px"></div>',
|
content: '<div class="data-play-video" style="width:800px;height:450px"></div>',
|
||||||
end: () => payer.destroy(), success: ($ele) => {
|
end: () => payer.destroy(), success: $ele => payer = new Artplayer({
|
||||||
payer = new Artplayer({
|
url: url, container: $ele.selector + ' .data-play-video', controls: [
|
||||||
url: url, container: $ele.selector + ' .data-play-video', controls: [
|
{html: '全屏播放', position: 'right', click: () => payer.fullscreen = !payer.fullscreen},
|
||||||
{html: '全屏播放', position: 'right', click: () => payer.fullscreen = !payer.fullscreen},
|
]
|
||||||
],
|
}, art => art.play(), $.msg.close(idx))
|
||||||
});
|
}));
|
||||||
payer.on('ready', () => (payer.autoHeight = payer.autoSize = true) && payer.play());
|
|
||||||
$.msg.close(idx);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/*! 注册 data-icon 事件行为 */
|
/*! 注册 data-icon 事件行为 */
|
||||||
|
18
public/static/plugs/jquery/artplayer.min.js
vendored
18
public/static/plugs/jquery/artplayer.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user