Browse Source

Merge branch 'v6' into dev

Anyon 2 years ago
parent
commit
5c0919a5ca

+ 1 - 1
app/admin/controller/Menu.php

@@ -108,7 +108,7 @@ class Menu extends Controller
             /* 读取系统功能节点 */
             $this->auths = [];
             $this->nodes = MenuService::instance()->getList();
-            foreach (NodeService::instance()->getMethods() as $node => $item) {
+            foreach (NodeService::instance()->getMethods($this->app->isDebug()) as $node => $item) {
                 if ($item['isauth'] && substr_count($node, '/') >= 2) {
                     $this->auths[] = ['node' => $node, 'title' => $item['title']];
                 }

+ 4 - 4
app/admin/view/api/upload.js

@@ -66,13 +66,13 @@ define(['md5', 'notify'], function (SparkMD5, Notify, allowMime) {
         layui.each(files, function (index, file) {
             that.count.total++, file.index = index, that.files[index] = file;
             if (that.option.size && file.size > that.option.size) {
-                that.count.error++, file.xstate = -1, file.xstats = '大小超限';
-                return $.msg.tips('文件大小超出限制!');
-            }
-            if (!that.option.hide) {
+                that.event('upload.error', {file: file}, file, '大小超限');
+            } else if (!that.option.hide) {
                 file.notify = new NotifyExtend(file);
             }
         }), layui.each(files, function (index, file) {
+            // 禁传异常状态文件
+            if (typeof file.xstate === 'number' && file.xstate === -1) return;
             // 图片限宽限高压缩
             if (/^image\/*$/.test(file.type) && file.maxWidth > 0 || file.maxHeight > 0 || file.quality !== 1) {
                 FileToBase64(file).then(function (base64) {

+ 5 - 35
public/static/admin.js

@@ -50,40 +50,10 @@ window.jQuery = window.$ = window.jQuery || window.$ || layui.$;
 
 /*! 配置 require 参数  */
 require.config({
-    baseUrl: baseRoot,
-    waitSeconds: 60,
-    map: {'*': {css: baseRoot + 'plugs/require/css.js'}},
-    paths: {
-        'vue': ['plugs/vue/vue.min'],
-        'md5': ['plugs/jquery/md5.min'],
-        'json': ['plugs/jquery/json.min'],
-        'xlsx': ['plugs/jquery/xlsx.min'],
-        'excel': ['plugs/jquery/excel.xlsx'],
-        'base64': ['plugs/jquery/base64.min'],
-        'upload': [tapiRoot + '/api.upload/index?'],
-        'notify': ['plugs/notify/notify.min'],
-        'angular': ['plugs/angular/angular.min'],
-        'cropper': ['plugs/cropper/cropper.min'],
-        'echarts': ['plugs/echarts/echarts.min'],
-        'ckeditor4': ['plugs/ckeditor4/ckeditor'],
-        'ckeditor5': ['plugs/ckeditor5/ckeditor'],
-        'websocket': ['plugs/socket/websocket'],
-        'pcasunzips': ['plugs/jquery/pcasunzips'],
-        'sortablejs': ['plugs/sortable/sortable.min'],
-        'vue.sortable': ['plugs/sortable/vue.draggable.min'],
-        'jquery.ztree': ['plugs/ztree/ztree.all.min'],
-        'jquery.masonry': ['plugs/jquery/masonry.min'],
-        'jquery.cropper': ['plugs/cropper/cropper.min'],
-        'jquery.autocompleter': ['plugs/jquery/autocompleter.min'],
+    baseUrl: baseRoot, waitSeconds: 60, map: {'*': {css: baseRoot + 'plugs/require/css.js'}}, paths: {
+        'vue': ['plugs/vue/vue.min'], 'md5': ['plugs/jquery/md5.min'], 'json': ['plugs/jquery/json.min'], 'xlsx': ['plugs/jquery/xlsx.min'], 'excel': ['plugs/jquery/excel.xlsx'], 'base64': ['plugs/jquery/base64.min'], 'upload': [tapiRoot + '/api.upload/index?'], 'notify': ['plugs/notify/notify.min'], 'angular': ['plugs/angular/angular.min'], 'cropper': ['plugs/cropper/cropper.min'], 'echarts': ['plugs/echarts/echarts.min'], 'ckeditor4': ['plugs/ckeditor4/ckeditor'], 'ckeditor5': ['plugs/ckeditor5/ckeditor'], 'websocket': ['plugs/socket/websocket'], 'pcasunzips': ['plugs/jquery/pcasunzips'], 'sortablejs': ['plugs/sortable/sortable.min'], 'vue.sortable': ['plugs/sortable/vue.draggable.min'], 'jquery.ztree': ['plugs/ztree/ztree.all.min'], 'jquery.masonry': ['plugs/jquery/masonry.min'], 'jquery.cropper': ['plugs/cropper/cropper.min'], 'jquery.autocompleter': ['plugs/jquery/autocompleter.min'],
     }, shim: {
-        'excel': {deps: [baseRoot + 'plugs/layui_exts/excel.js']},
-        'notify': {deps: ['css!' + baseRoot + 'plugs/notify/light.css']},
-        'cropper': {deps: ['css!' + baseRoot + 'plugs/cropper/cropper.min.css']},
-        'websocket': {deps: [baseRoot + 'plugs/socket/swfobject.min.js']},
-        'ckeditor5': {deps: ['jquery', 'upload', 'css!' + baseRoot + 'plugs/ckeditor5/ckeditor.css']},
-        'vue.sortable': {deps: ['vue', 'sortablejs']},
-        'jquery.ztree': {deps: ['jquery', 'css!' + baseRoot + 'plugs/ztree/zTreeStyle/zTreeStyle.css']},
-        'jquery.autocompleter': {deps: ['jquery', 'css!' + baseRoot + 'plugs/jquery/autocompleter.css']},
+        'excel': {deps: [baseRoot + 'plugs/layui_exts/excel.js']}, 'notify': {deps: ['css!' + baseRoot + 'plugs/notify/light.css']}, 'cropper': {deps: ['css!' + baseRoot + 'plugs/cropper/cropper.min.css']}, 'websocket': {deps: [baseRoot + 'plugs/socket/swfobject.min.js']}, 'ckeditor5': {deps: ['jquery', 'upload', 'css!' + baseRoot + 'plugs/ckeditor5/ckeditor.css']}, 'vue.sortable': {deps: ['vue', 'sortablejs']}, 'jquery.ztree': {deps: ['jquery', 'css!' + baseRoot + 'plugs/ztree/zTreeStyle/zTreeStyle.css']}, 'jquery.autocompleter': {deps: ['jquery', 'css!' + baseRoot + 'plugs/jquery/autocompleter.css']},
     }
 });
 
@@ -706,9 +676,9 @@ $(function () {
                 option.height = $(window).height() - $table.removeClass('layui-hide').offset().top - 35;
             }
             // 动态计算最大页数
-            option.done = function () {
-                typeof option.success === 'function' && option.success.call(this);
+            option.done = function (res, curr, count) {
                 layui.sessionData('pages', {key: table.id, value: this.page.curr || 1});
+                typeof option.success === 'function' && option.success.call(this, res, curr, count);
                 $.form.reInit($table.next()).find('[data-load][data-time!="false"],[data-action][data-time!="false"],[data-queue],[data-iframe]').not('[data-table-id]').attr('data-table-id', table.id);
                 (option.loading = this.loading = true) && $table.data('next', this).next().find(cls.join(',')).animate({opacity: 1});
             }, option.parseData = function (res) {

+ 5 - 0
public/static/theme/css/_custom.less

@@ -143,6 +143,11 @@
     border-radius: 2px;
   }
 
+  &-ss {
+    width: 20px;
+    height: 20px;
+  }
+
   &-xs {
     width: 26px;
     height: 26px;

File diff suppressed because it is too large
+ 0 - 0
public/static/theme/css/console.css


File diff suppressed because it is too large
+ 0 - 0
public/static/theme/css/console.css.map


Some files were not shown because too many files changed in this diff