From ad40d66c702bd536d2e117582f794797d760ca08 Mon Sep 17 00:00:00 2001 From: XXAY <2606432452@qq.com> Date: Sat, 25 Sep 2021 14:55:47 +0800 Subject: [PATCH] tools --- chart/tools.py | 6 ++++-- chart/views.py | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/chart/tools.py b/chart/tools.py index 6540fe0..e478c52 100644 --- a/chart/tools.py +++ b/chart/tools.py @@ -377,10 +377,11 @@ class="layui-input" style="height: 25px; width:80px;margin-top: 6px"> , color: '%s' //设置默认色 , size: "xs" , format: '%s' - , done: function (color) { - var %s = color + , change: function (color) { + %s = color } + }); }) """ % (i, random_color(), fl, i) @@ -471,3 +472,4 @@ class Basics(object): f.write(data) return data + diff --git a/chart/views.py b/chart/views.py index d8812bc..73909f6 100644 --- a/chart/views.py +++ b/chart/views.py @@ -116,6 +116,7 @@ def chart_run(request, get_chart_sort): # file_path 输入文件的路径 file # chart 展示图片的路径 # out_path 输出文件的路径 + print(data) eval(f'charts.{chart_name}')(file_path[0], f"{chart_out_path}_{k}.png", out_path, **data)