图表展示bugserver端

This commit is contained in:
caoqianming 2020-12-11 10:03:47 +08:00
parent 61bd80141a
commit 22b9254ce8
4 changed files with 11 additions and 8 deletions

View File

@ -69,9 +69,9 @@ App({
globalData: {
userInfo: {},
userinfo: {}, // 服务器传回的消费者信息
//host: 'https://apitest.ahctc.cn',
host: 'https://apitest.ahctc.cn',
mediahost: 'https://apitest.ahctc.cn',
host: 'http://127.0.0.1:8000',
//host: 'http://127.0.0.1:8000',
//mediahost: 'http://127.0.0.1:8000',
token : '',
}

View File

@ -8,7 +8,8 @@
<span style="color:gray">({{tm_current.question.questioncat_name}})</span>
</view>
<view class="weui-article__title">
<parser html="{{tm_current.question.name}}" domain="{{domain}}" selectable/>
<!-- <parser html="{{tm_current.question.name}}" domain="{{domain}}" selectable/> -->
<rich-text nodes="{{tm_current.question.name}}"></rich-text>
</view>
<view wx:if="{{tm_current.img}}" style="text-align:center"><image src="{{tm_current.img}}" mode="aspectFit"></image></view>
</view>

View File

@ -25,7 +25,7 @@
"disablePlugins": [],
"outputPath": ""
},
"useCompilerModule": true,
"useCompilerModule": false,
"userConfirmedUseCompilerModuleSwitch": false,
"compileHotReLoad": false,
"useMultiFrameRuntime": false,

View File

@ -101,9 +101,10 @@ class Companydis(APIView):
"""
def get(self, request, format=None):
ret = {'s':[], 't':'单位分布', 'max':300, 'min':0}
tmp = Company.objects.exclude(geo__isnull=True).values('geo__pname').annotate(total=Count('geo__pname'))
tmp = Company.objects.exclude(geo__pname__isnull=True).values('geo__pname').annotate(total=Count('geo__pname'))
for i in tmp:
ret['s'].append({'name':nameMap[i['geo__pname']], 'value':i['total']})
if i['geo__pname'] in nameMap:
ret['s'].append({'name':nameMap[i['geo__pname']], 'value':i['total']})
return Response(ret)
class Consumerdis(APIView):
@ -112,9 +113,10 @@ class Consumerdis(APIView):
"""
def get(self, request, format=None):
ret = {'s':[], 't':'学员分布', 'max':600, 'min':0}
tmp = Consumer.objects.exclude(company__geo__isnull=True).values('company__geo__pname').annotate(total=Count('company__geo__pname'))
tmp = Consumer.objects.exclude(company__geo__pname__isnull=True).values('company__geo__pname').annotate(total=Count('company__geo__pname'))
for i in tmp:
ret['s'].append({'name':nameMap[i['company__geo__pname']], 'value':i['total']})
if i['company__geo__pname'] in nameMap:
ret['s'].append({'name':nameMap[i['company__geo__pname']], 'value':i['total']})
return Response(ret)
class Quota(APIView):
'''