From 62fcbe61f8631ccf20d95f73a8de2fdb01021734 Mon Sep 17 00:00:00 2001 From: baoliang Date: Sun, 4 Oct 2020 23:09:07 +0800 Subject: [PATCH] add message --- polls/templates/polls/monitor_statistics.html | 40 +++++++++++++++++- polls/urls.py | 2 + polls/views/__init__.py | 2 +- .../views/__pycache__/__init__.cpython-38.pyc | Bin 1090 -> 1119 bytes polls/views/__pycache__/media.cpython-38.pyc | Bin 4693 -> 4693 bytes .../views/__pycache__/monitor.cpython-38.pyc | Bin 2748 -> 2888 bytes polls/views/__pycache__/notice.cpython-38.pyc | Bin 2822 -> 3108 bytes .../__pycache__/organizations.cpython-38.pyc | Bin 1134 -> 1556 bytes polls/views/monitor.py | 7 ++- polls/views/notice.py | 23 +++++++--- polls/views/organizations.py | 18 +++++++- 11 files changed, 79 insertions(+), 13 deletions(-) diff --git a/polls/templates/polls/monitor_statistics.html b/polls/templates/polls/monitor_statistics.html index 3f40208..a1d6fb2 100644 --- a/polls/templates/polls/monitor_statistics.html +++ b/polls/templates/polls/monitor_statistics.html @@ -9,6 +9,9 @@
+
+
+
{% endblock%} @@ -55,7 +58,6 @@ var option2 = { title: { text: '政务新媒体区域分布', - subtext: '省直部门{{total1}},市直部门{{total2}},县区政府{{total3}}', subtextStyle: { fontSize: 16, }, @@ -87,5 +89,41 @@ ]}; myChart2.setOption(option2); + + var myChart3 = echarts.init(document.getElementById('chart3')); + var option3 = { + title: { + text: '政务新媒体省址、市州和县区分布', + subtextStyle: { + fontSize: 16, + }, + left: 'center' + }, + tooltip: { + trigger: 'item', + formatter: '{a}
{b} : {c} ({d}%)' + }, + legend: { + top: '15%', + data: ['省直各部门', '市州政府及部门', '县区政府及部门、乡镇'] + }, + series: [ + { + name: '总量', + type: 'pie', + radius: '50%', + center: ['50%', '70%'], + data: {{chart3_data|safe}}, + emphasis: { + itemStyle: { + shadowBlur: 10, + shadowOffsetX: 0, + shadowColor: 'rgba(0, 0, 0, 0.5)' + } + } + } + ]}; + + myChart3.setOption(option3); {% endblock %} \ No newline at end of file diff --git a/polls/urls.py b/polls/urls.py index 954be7c..0f01975 100644 --- a/polls/urls.py +++ b/polls/urls.py @@ -42,6 +42,8 @@ urlpatterns = [ name='polls_compartments_list'), path('organizations/list/', views.organizations, name='polls_organizations_list'), + path('organizations/level/', views.organization_level, + name='polls_organization_level'), path('messages/list/last/', views.last_messages, name='polls_messages_list_last'), path('messages/send/text/', views.send_text_message, diff --git a/polls/views/__init__.py b/polls/views/__init__.py index d1468be..aa2cf6f 100644 --- a/polls/views/__init__.py +++ b/polls/views/__init__.py @@ -6,5 +6,5 @@ from .monitor import monitor_statistics, monitor_result from .task import tasks, create_task, create_test_task from .group import groups, room from .compartment import compartments -from .organizations import organizations +from .organizations import organizations, organization_level from .message import last_messages, send_text_message \ No newline at end of file diff --git a/polls/views/__pycache__/__init__.cpython-38.pyc b/polls/views/__pycache__/__init__.cpython-38.pyc index aa0d13a5aba42f2e4c3c4e997cc33f1fdc79204b..1ccd4dabb13fce6a6d60f0ef2cba2c246cbd1f82 100644 GIT binary patch delta 139 zcmX@aai4=Xl$V!_0SG?at&E>Akyn=S#zgIdBDrc&YK#mi3@KbW>bV+G8o8QLnj8Nt zV^m?f#hYK0o|ut7lUkOVGkFt}8l%?an@m>}ixhxH-(t^AEiO(> bPc2de@`{vz#7c%DZ4g^~@=4}$CILnOa}z7# delta 110 zcmcc5afpLAl$V!_0SJ2d^W$qK^2#z^nW%kGfRQ1EA%!bPEmu8CJy#=2V-w>tMghiK zy!l1xiFuh-i6xo&dBu}YF{v?XPX5SrMdlWJZfbFHVtQ(k0?@1?MIf<~p-2nF)|&i` JxtxiI5dhW2AD93D diff --git a/polls/views/__pycache__/media.cpython-38.pyc b/polls/views/__pycache__/media.cpython-38.pyc index 65f6d537b4f00caf1d99146d41543d6385bdeaad..8066143d524b36eeb767b031f26d558a65aa9384 100644 GIT binary patch delta 20 acmcbra#e*pl$V!_0SHujDmHR^2>}2$YXr9d delta 20 acmcbra#e*pl$V!_0SH9IN;YzP2>}2zBLpn~ diff --git a/polls/views/__pycache__/monitor.cpython-38.pyc b/polls/views/__pycache__/monitor.cpython-38.pyc index cd9aa1cdf28daf20813aaa3017d15307a0c11549..d8e51420c80e8455fa5f32fce2c6a034c73dbe70 100644 GIT binary patch delta 390 zcmdlZdP0mZl$V!_0SG=RRK&LmZsa@4#3useasaV25EoZ%e#m6Z?32z=D_kSIfIWq` zMj(Z04%0$LMg}mSuSO7s&tD@11{ zA87jXIgQU}Z+SYQD&LbXBV2x zk1>i&e$5`I7{ykSUy_(( z2&Ijnv~dy0+La7N+LL2Aav0Z4KFP6+n~{Z401S(CCl_%B8mIu36luc=9U$u#Uv7S0 zW=Vcgd{Js~X--K2P^_2hwnvmNl$V!_0SKD-^W&EbY~(x2#3u~og2bGGxY%p+LndQpnG(?&h7{f!_8PVt zz8ZlV!5X0yzBz2o%)tzr{F4*dW=-~HS72nDoWrgp&Q_9Nl9*$73ql(~Y2(SW*pD#^ zPfp~B6D|@3np`9XBE*5jN`@lc$qzVk7?(`;LThM`1sDb@H^allX;pkcB4^U;-@=(SzCy`7zZ*$hOS%z z$Pb@`3}A(ADi!!Y~Tac&7=iH9UfJ_7Ge(VOGmOOcc%c|nrqH|lNR8up}ZO$th0`c$W1>{FS842!AD zeSfNMd(KIVUeP3fkuTfrwjVlc5vS>gjvG#s_!@QUElO$);wL8BwmY5Lh288rzBw6D z$93x7ct}kiMN^okcH4w6AT-Up#SG2jjf}t_q-;mc7ZYf>ovtF*5Jf}@v5we4U?81G zScn2US1o0WYiEfK)JzuiKNSZo188~prn->(m5P_CsCMQwClEPKPoWeebshKgHA((-Mp@cJ=tEg#mJi9z2_vCtZJ@z6|ps|`< zlVv#cCbw}|C_4hV#S$R9n7J6a7Cf9I9F@{XO&ZW-iF!?{%Nj6iU X(M1lE&v9GIGBE*7<`KXk1wkSJ(qT8W diff --git a/polls/views/__pycache__/organizations.cpython-38.pyc b/polls/views/__pycache__/organizations.cpython-38.pyc index 2e3c399abd9844679f7a7e505b5591f5e75032c3..fa0a45a5642f31f917321d3da0cf2d63522216ae 100644 GIT binary patch delta 573 zcmZ8eze@u#6uy_-^=dt<_;V4_p<)ry$w^!kM-{}yrB;*59jzzHRZy=~sDq23)J3SG zi{K=JAoyRn23(6S{tdpQRm6n%CHcPhzWn-1UV7>EuCA1YEqFi3mE4Q;Fl=5-t_*UQ zcd#VuII(I_gN;s>TC=j9PseXC@IX{TM){~Lm0RLc=6CqgL%l$5Ayaqh28`9W=t>pD z7`kqQ_HH*DM+aj8Lk0-36<7h>k~^ycG02gKGGK(!2C2cC6+>WGNKE9c;q70Z1Ww>o zXiVj*QJfzISBaR$BuKET+b~A@4rc_GAPoty5t9bRGz!aEul`Dp7WK~Y{eysC8fo; z*mF~hixbmR-83hcF)d(Jo-EEB#V9|yh}oZ$sYo7Zik~L;