变更考试规则
This commit is contained in:
parent
2563a3b62f
commit
e8685e804c
|
@ -12,5 +12,5 @@ module.exports = {
|
||||||
* @type {boolean} true | false
|
* @type {boolean} true | false
|
||||||
* @description Whether show the logo in sidebar
|
* @description Whether show the logo in sidebar
|
||||||
*/
|
*/
|
||||||
sidebarLogo: true
|
sidebarLogo: false
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 : '',
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,21 +21,23 @@
|
||||||
"checkSiteMap": true,
|
"checkSiteMap": true,
|
||||||
"uploadWithSourceMap": true,
|
"uploadWithSourceMap": true,
|
||||||
"compileHotReLoad": false,
|
"compileHotReLoad": false,
|
||||||
"useMultiFrameRuntime": false,
|
"useMultiFrameRuntime": true,
|
||||||
"useApiHook": true,
|
"useApiHook": true,
|
||||||
|
"useApiHostProcess": false,
|
||||||
"babelSetting": {
|
"babelSetting": {
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"disablePlugins": [],
|
"disablePlugins": [],
|
||||||
"outputPath": ""
|
"outputPath": ""
|
||||||
},
|
},
|
||||||
|
"enableEngineNative": false,
|
||||||
|
"bundle": false,
|
||||||
"useIsolateContext": true,
|
"useIsolateContext": true,
|
||||||
"useCompilerModule": true,
|
"useCompilerModule": true,
|
||||||
"userConfirmedUseCompilerModuleSwitch": false,
|
"userConfirmedUseCompilerModuleSwitch": false,
|
||||||
"userConfirmedBundleSwitch": false,
|
"userConfirmedBundleSwitch": false,
|
||||||
"packNpmManually": false,
|
"packNpmManually": false,
|
||||||
"packNpmRelationList": [],
|
"packNpmRelationList": [],
|
||||||
"minifyWXSS": true,
|
"minifyWXSS": true
|
||||||
"bundle": false
|
|
||||||
},
|
},
|
||||||
"compileType": "miniprogram",
|
"compileType": "miniprogram",
|
||||||
"libVersion": "2.14.1",
|
"libVersion": "2.14.1",
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
from sympy import *
|
||||||
|
a1 = Symbol('a1')
|
||||||
|
a2 = Symbol('a2')
|
||||||
|
a3 = Symbol('a3')
|
||||||
|
b1 = Symbol('b1')
|
||||||
|
b2 = Symbol('b2')
|
||||||
|
r = solve([
|
||||||
|
a1+a2-40,
|
||||||
|
b1+b2-10,
|
||||||
|
2*a1+4*b1-60,
|
||||||
|
2*a2+4*b2-40
|
||||||
|
], [a1,a2,b1,b2])
|
||||||
|
print(r)
|
|
@ -84,7 +84,7 @@ class WorkScopeViewSet(ModelViewSet):
|
||||||
ret['panduan_count'] = workscope.rule.panduan_count
|
ret['panduan_count'] = workscope.rule.panduan_count
|
||||||
ret['panduan_score'] = workscope.rule.panduan_score
|
ret['panduan_score'] = workscope.rule.panduan_score
|
||||||
question_queryset = Question.objects.none()
|
question_queryset = Question.objects.none()
|
||||||
questioncats = workscope.questioncat.exclude(name='辐射小知识更新中').order_by('type')
|
questioncats = workscope.questioncat.exclude(name='辐射小知识更新中').order_by('type', 'create_time')
|
||||||
if questioncats.count() == 3:
|
if questioncats.count() == 3:
|
||||||
import random
|
import random
|
||||||
b2 = random.randint(1,8)
|
b2 = random.randint(1,8)
|
||||||
|
@ -101,6 +101,20 @@ class WorkScopeViewSet(ModelViewSet):
|
||||||
b2_set = queryset.filter(questioncat=questioncats[1], type='多选').order_by('?')[:b2]
|
b2_set = queryset.filter(questioncat=questioncats[1], type='多选').order_by('?')[:b2]
|
||||||
b3_set = queryset.filter(questioncat=questioncats[2], type='多选').order_by('?')[:b3]
|
b3_set = queryset.filter(questioncat=questioncats[2], type='多选').order_by('?')[:b3]
|
||||||
question_queryset = question_queryset|a1_set|a2_set|a3_set|b1_set|b2_set|b3_set
|
question_queryset = question_queryset|a1_set|a2_set|a3_set|b1_set|b2_set|b3_set
|
||||||
|
elif workscope.name == '辐射安全管理':
|
||||||
|
queryset = Question.objects.filter(is_delete=0)
|
||||||
|
a1_set = queryset.filter(questioncat=questioncats[0], type='单选').order_by('?')[:16]
|
||||||
|
a2_set = queryset.filter(questioncat=questioncats[1], type='单选').order_by('?')[:24]
|
||||||
|
b1_set = queryset.filter(questioncat=questioncats[0], type='多选').order_by('?')[:4]
|
||||||
|
b2_set = queryset.filter(questioncat=questioncats[1], type='多选').order_by('?')[:6]
|
||||||
|
question_queryset = question_queryset|a1_set|a2_set|b1_set|b2_set
|
||||||
|
elif workscope.name == '科研、生产及其他':
|
||||||
|
queryset = Question.objects.filter(is_delete=0)
|
||||||
|
a1_set = queryset.filter(questioncat=questioncats[0], type='单选').order_by('?')[:24]
|
||||||
|
a2_set = queryset.filter(questioncat=questioncats[1], type='单选').order_by('?')[:16]
|
||||||
|
b1_set = queryset.filter(questioncat=questioncats[0], type='多选').order_by('?')[:6]
|
||||||
|
b2_set = queryset.filter(questioncat=questioncats[1], type='多选').order_by('?')[:4]
|
||||||
|
question_queryset = question_queryset|a1_set|a2_set|b1_set|b2_set
|
||||||
else:
|
else:
|
||||||
queryset = Question.objects.filter(is_delete=0,questioncat__in = workscope.questioncat.all())
|
queryset = Question.objects.filter(is_delete=0,questioncat__in = workscope.questioncat.all())
|
||||||
if ret['danxuan_count']:
|
if ret['danxuan_count']:
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue