图表展示bugserver端
This commit is contained in:
parent
61bd80141a
commit
22b9254ce8
|
|
@ -69,9 +69,9 @@ App({
|
||||||
globalData: {
|
globalData: {
|
||||||
userInfo: {},
|
userInfo: {},
|
||||||
userinfo: {}, // 服务器传回的消费者信息
|
userinfo: {}, // 服务器传回的消费者信息
|
||||||
//host: 'https://apitest.ahctc.cn',
|
host: 'https://apitest.ahctc.cn',
|
||||||
mediahost: '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',
|
//mediahost: 'http://127.0.0.1:8000',
|
||||||
token : '',
|
token : '',
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,8 @@
|
||||||
<span style="color:gray">({{tm_current.question.questioncat_name}})</span>
|
<span style="color:gray">({{tm_current.question.questioncat_name}})</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="weui-article__title">
|
<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>
|
||||||
<view wx:if="{{tm_current.img}}" style="text-align:center"><image src="{{tm_current.img}}" mode="aspectFit"></image></view>
|
<view wx:if="{{tm_current.img}}" style="text-align:center"><image src="{{tm_current.img}}" mode="aspectFit"></image></view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
"disablePlugins": [],
|
"disablePlugins": [],
|
||||||
"outputPath": ""
|
"outputPath": ""
|
||||||
},
|
},
|
||||||
"useCompilerModule": true,
|
"useCompilerModule": false,
|
||||||
"userConfirmedUseCompilerModuleSwitch": false,
|
"userConfirmedUseCompilerModuleSwitch": false,
|
||||||
"compileHotReLoad": false,
|
"compileHotReLoad": false,
|
||||||
"useMultiFrameRuntime": false,
|
"useMultiFrameRuntime": false,
|
||||||
|
|
|
||||||
|
|
@ -101,9 +101,10 @@ class Companydis(APIView):
|
||||||
"""
|
"""
|
||||||
def get(self, request, format=None):
|
def get(self, request, format=None):
|
||||||
ret = {'s':[], 't':'单位分布', 'max':300, 'min':0}
|
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:
|
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)
|
return Response(ret)
|
||||||
|
|
||||||
class Consumerdis(APIView):
|
class Consumerdis(APIView):
|
||||||
|
|
@ -112,9 +113,10 @@ class Consumerdis(APIView):
|
||||||
"""
|
"""
|
||||||
def get(self, request, format=None):
|
def get(self, request, format=None):
|
||||||
ret = {'s':[], 't':'学员分布', 'max':600, 'min':0}
|
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:
|
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)
|
return Response(ret)
|
||||||
class Quota(APIView):
|
class Quota(APIView):
|
||||||
'''
|
'''
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue