mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-07-10 18:01:05 +08:00
Compare commits
7 Commits
12c50de24b
...
ba5afc2fa3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba5afc2fa3 | ||
|
|
12b0bb2692 | ||
|
|
fad1836dbd | ||
|
|
3fcfb760fd | ||
|
|
c1cfaa5ec0 | ||
|
|
e6bf3a294d | ||
|
|
95596bf3b7 |
1758
SQL01-数据表结构.sql
1758
SQL01-数据表结构.sql
File diff suppressed because it is too large
Load Diff
@ -53,7 +53,7 @@ class Config extends Controller
|
||||
{
|
||||
$this->title = '系统参数配置';
|
||||
$this->super = AdminService::isSuper();
|
||||
$this->version = ModuleService::instance()->getVersion();
|
||||
$this->version = ModuleService::getVersion();
|
||||
$this->fetch();
|
||||
}
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ class Module extends Controller
|
||||
public function index()
|
||||
{
|
||||
$this->title = '系统模块管理';
|
||||
$this->modules = ModuleService::instance()->change();
|
||||
$this->modules = ModuleService::change();
|
||||
$this->fetch();
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@ class Module extends Controller
|
||||
public function install()
|
||||
{
|
||||
$data = $this->_vali(['name.require' => '模块名称不能为空!']);
|
||||
[$state, $message] = ModuleService::instance()->install($data['name']);
|
||||
[$state, $message] = ModuleService::install($data['name']);
|
||||
$state ? $this->success($message) : $this->error($message);
|
||||
}
|
||||
|
||||
@ -56,8 +56,8 @@ class Module extends Controller
|
||||
public function change()
|
||||
{
|
||||
$data = $this->_vali(['name.require' => '模块名称不能为空!']);
|
||||
$online = ModuleService::instance()->online();
|
||||
$locals = ModuleService::instance()->getModules();
|
||||
$online = ModuleService::online();
|
||||
$locals = ModuleService::getModules();
|
||||
if (isset($online[$data['name']])) {
|
||||
$this->module = $online[$data['name']];
|
||||
$this->current = $locals[$data['name']] ?? [];
|
||||
|
||||
@ -45,7 +45,7 @@ class Queue extends Controller
|
||||
SystemQueue::mQuery()->layTable(function () {
|
||||
$this->title = '系统任务管理';
|
||||
$this->iswin = ProcessService::instance()->iswin();
|
||||
if ($this->super = AdminService::instance()->isSuper()) {
|
||||
if ($this->super = AdminService::isSuper()) {
|
||||
$process = ProcessService::instance();
|
||||
if ($process->iswin() || empty($_SERVER['USER'])) {
|
||||
$this->command = $process->think('xadmin:queue start');
|
||||
|
||||
@ -44,7 +44,7 @@ class Update extends Controller
|
||||
public function get()
|
||||
{
|
||||
$filename = decode(input('encode', '0'));
|
||||
if (!ModuleService::instance()->checkAllowDownload($filename)) {
|
||||
if (!ModuleService::checkAllowDownload($filename)) {
|
||||
$this->error('下载的文件不在认证规则中!');
|
||||
}
|
||||
if (file_exists($realname = $this->app->getRootPath() . $filename)) {
|
||||
@ -61,7 +61,7 @@ class Update extends Controller
|
||||
*/
|
||||
public function node()
|
||||
{
|
||||
$this->success('获取文件列表成功!', ModuleService::instance()->getChanges(
|
||||
$this->success('获取文件列表成功!', ModuleService::getChanges(
|
||||
json_decode($this->request->post('rules', '[]', ''), true),
|
||||
json_decode($this->request->post('ignore', '[]', ''), true)
|
||||
));
|
||||
@ -72,6 +72,6 @@ class Update extends Controller
|
||||
*/
|
||||
public function version()
|
||||
{
|
||||
$this->success('获取模块信息成功!', ModuleService::instance()->getModules());
|
||||
$this->success('获取模块信息成功!', ModuleService::getModules());
|
||||
}
|
||||
}
|
||||
@ -1,37 +1,78 @@
|
||||
<div class="image-dialog" id="ImageDialog">
|
||||
<div class="image-dialog-head">
|
||||
<div class="pull-left flex">
|
||||
<input class="layui-input margin-right-5" v-model="keys" style="height:30px;line-height:30px" placeholder="请输入搜索关键词">
|
||||
<a class="layui-btn layui-btn-sm layui-btn-normal" @click="search">搜 索</a>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a data-file="one" data-type="jpg,png" class="layui-btn layui-btn-sm">上传图片</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="image-dialog-body upload-image-mdbox flex flex-wrap flex-align-start">
|
||||
<div class="image-dialog-body">
|
||||
<div class="image-dialog-item" v-for="x in items">
|
||||
<div class="uploadimage" :style="x.style"></div>
|
||||
<p class="image-dialog-item-name layui-elip" v-text="x.name"></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="image-dialog-foot">
|
||||
<div id="ImageDialogPage" class="image-dialog-page"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.image-dialog-head {
|
||||
clear: both;
|
||||
height: 30px;
|
||||
padding: 10px 15px;
|
||||
padding: 10px 12px;
|
||||
}
|
||||
|
||||
.image-dialog-body {
|
||||
height: 500px;
|
||||
height: 470px;
|
||||
background: #efefef;
|
||||
padding-top: 15px;
|
||||
padding-left: 15px;
|
||||
padding-top: 12px;
|
||||
padding-left: 12px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-content: flex-start;
|
||||
}
|
||||
|
||||
.image-dialog-item {
|
||||
margin-right: 15px;
|
||||
margin-bottom: 15px;
|
||||
position: relative;
|
||||
margin-right: 12px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.image-dialog-item-name {
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
color: #fff;
|
||||
padding: 3px 10px;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
line-height: 1.5em;
|
||||
white-space: nowrap;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
.image-dialog-item .uploadimage {
|
||||
margin: 0
|
||||
margin: 0;
|
||||
width: 145px;
|
||||
height: 145px;
|
||||
}
|
||||
|
||||
.image-dialog-foot {
|
||||
padding: 0 12px;
|
||||
}
|
||||
|
||||
.image-dialog-page {
|
||||
height: 50px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.image-dialog-page .layui-laypage a,
|
||||
.image-dialog-page .layui-laypage span {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -41,21 +82,37 @@
|
||||
el: '#ImageDialog',
|
||||
data: {
|
||||
page: 1,
|
||||
items: []
|
||||
keys: '',
|
||||
limit: 15,
|
||||
items: [],
|
||||
},
|
||||
created: function () {
|
||||
this.loadPage();
|
||||
},
|
||||
methods: {
|
||||
addPage: function (count) {
|
||||
var that = this;
|
||||
layui.laypage.render({
|
||||
curr: this.page, count: count, limit: that.limit,
|
||||
layout: ['count', 'prev', 'page', 'next', 'refresh'],
|
||||
elem: 'ImageDialogPage', jump: function (obj, first) {
|
||||
if (!first) that.loadPage(that.page = obj.curr);
|
||||
},
|
||||
});
|
||||
},
|
||||
search: function () {
|
||||
this.page = 1;
|
||||
this.loadPage();
|
||||
},
|
||||
loadPage: function () {
|
||||
var that = this;
|
||||
this.params = {page: this.page, output: 'layui.table'};
|
||||
this.params = {page: this.page, limit: this.limit, output: 'layui.table', name: this.keys || ''};
|
||||
$.form.load('{:url("image")}', this.params, 'get', function (ret) {
|
||||
that.items = that.items.concat(ret.data);
|
||||
that.addPage(ret.count);
|
||||
that.items = ret.data;
|
||||
that.items.forEach(function (item) {
|
||||
item.style = 'background-image:url(' + item.xurl + ')';
|
||||
});
|
||||
console.log(that.items)
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user