From 5b1a90bba97ca5611c6a800b2281e6efdcb6c8fe Mon Sep 17 00:00:00 2001 From: Twhmr Date: Sun, 11 Oct 2020 18:56:36 +0800 Subject: [PATCH 1/2] =?UTF-8?q?update=20application/admin/controller/Ajax.?= =?UTF-8?q?php.=20=E8=A7=A3=E5=86=B3=E5=BD=93=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E6=8E=92=E5=BA=8F=E5=AD=97=E6=AE=B5=E7=9A=84=E5=80=BC=E9=83=BD?= =?UTF-8?q?=E4=B8=BA=E7=BB=9F=E4=B8=80=E4=B8=AA=E5=80=BC=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E5=AF=B9=E5=88=97=E8=A1=A8=E8=BF=9B=E8=A1=8C=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=E5=B0=86=E6=97=A0=E4=BD=9C=E7=94=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controller/Ajax.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/application/admin/controller/Ajax.php b/application/admin/controller/Ajax.php index dd58cf117..c517c76a5 100644 --- a/application/admin/controller/Ajax.php +++ b/application/admin/controller/Ajax.php @@ -177,6 +177,16 @@ class Ajax extends Backend continue; } $weighids[$n] = $weighdata[$offset]; + if ($weighdata[$offset] == $weighdata[$sour_id] && $offset != $sour_id) { + $weighdata[$offset]++; + $step = 1; + foreach ($weighdata as $key => $wd) { + if ($key < $sour_id && $key != $offset) { + $weighdata[$key] = $weighdata[$offset] + $step++; + Db::name($table)->where($prikey, $key)->update([$field => $weighdata[$key]]); + } + } + } Db::name($table)->where($prikey, $n)->update([$field => $weighdata[$offset]]); } $this->success(); -- Gitee From ac891e72ad486a84024fda6e9eba09f40ec9feb1 Mon Sep 17 00:00:00 2001 From: Twhmr Date: Sun, 11 Oct 2020 18:59:23 +0800 Subject: [PATCH 2/2] =?UTF-8?q?update=20public/assets/js/backend/dashboard?= =?UTF-8?q?.js.=20ECharts=20=E5=9B=BE=E8=A1=A8=E7=9A=84=E8=BE=B9=E8=B7=9D?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E7=9C=8B=E5=88=B0=E5=85=A8=E9=83=A8=E5=86=85?= =?UTF-8?q?=E5=AE=B9=EF=BC=8C=E4=BF=AE=E6=94=B9=E6=A0=B7=E5=BC=8F=E8=A7=A3?= =?UTF-8?q?=E5=86=B3=E8=AF=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/js/backend/dashboard.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/assets/js/backend/dashboard.js b/public/assets/js/backend/dashboard.js index 078d1def3..8f5c12bee 100755 --- a/public/assets/js/backend/dashboard.js +++ b/public/assets/js/backend/dashboard.js @@ -31,9 +31,9 @@ define(['jquery', 'bootstrap', 'backend', 'addtabs', 'table', 'echarts', 'echart }, yAxis: {}, grid: [{ - left: 'left', - top: 'top', - right: '10', + left: 35, + top: 10, + right: 40, bottom: 30 }], series: [{ -- Gitee