test mini
This commit is contained in:
parent
3c49d1b729
commit
b7b13e1732
|
@ -15,6 +15,7 @@
|
|||
.txlabel{
|
||||
color:#fff;
|
||||
background-color: rgb(216, 140, 0);
|
||||
padding: 2px
|
||||
border-radius: 2px;
|
||||
padding: 1px 4px;
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,8 @@ Page({
|
|||
isright:false,
|
||||
answerP:false,
|
||||
tmtotal:0,
|
||||
moShi:'看题模式'
|
||||
moShi:'看题模式',
|
||||
domain:getApp().globalData.mediahost,
|
||||
},
|
||||
radioChange: function (e) {
|
||||
var that = this
|
||||
|
@ -175,7 +176,7 @@ Page({
|
|||
for (let key in currentTm.options) {
|
||||
let option = {}
|
||||
option.key = key
|
||||
option.value = key + ':' + currentTm.options[key]
|
||||
option.value = currentTm.options[key].toString()
|
||||
if (currentTm.user_answer && this.data.moShi == '看题模式') {
|
||||
if (key == currentTm.user_answer || currentTm.user_answer.indexOf(key) != -1) {
|
||||
option.checked = true
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"usingComponents": {},
|
||||
"usingComponents": {
|
||||
"parser": "/components/parser/parser"
|
||||
},
|
||||
"navigationBarTitleText": "错题集"
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
<view class="head">
|
||||
<view style="width:50%">
|
||||
题量: {{tm_index+1}}/{{tmtotal}}
|
||||
<span style="margin-left:10px">题量: {{tm_index+1}}/{{tmtotal}}</span>
|
||||
</view>
|
||||
<view style="width:50%;text-align:right" bindtap="changeM">
|
||||
<span style="font-weight:bold;">{{moShi}}</span>
|
||||
(点击切换)
|
||||
<span style="margin-right:10px"><span style="font-weight:bold;">{{moShi}}</span>
|
||||
(点击切换)</span>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-y="true" style="height: {{scrollHeight}}px;">
|
||||
|
@ -13,14 +13,17 @@
|
|||
<span class="txlabel">{{currentTm.type}}</span>
|
||||
<span style="color:gray"> {{currentTm.questioncat_name}}</span>
|
||||
</view>
|
||||
<view class="weui-article__title">{{currentTm.name}}</view>
|
||||
<view class="weui-article__title">
|
||||
<parser html="{{currentTm.name}}" domain="{{domain}}" selectable/>
|
||||
</view>
|
||||
<view wx:if="{{currentTm.img}}" style="text-align:center"><image src="{{currentTm.img}}" mode="aspectFit"></image></view>
|
||||
</view>
|
||||
<view class="weui-cells weui-cells_radio">
|
||||
<radio-group class="radio-group" bindchange="radioChange" wx:if="{{(currentTm.type=='单选' ||currentTm.type=='判断')}}">
|
||||
<label class="weui-cell weui-cell_active weui-check__label" wx:for="{{options}}" wx:key="key">
|
||||
<view class="weui-cell__bd">
|
||||
<view>{{item.value}}</view>
|
||||
<view style="float:left;width:10%">{{item.key}}:</view>
|
||||
<view style="float:left;width:90%"><parser html="{{item.value}}" domain="{{domain}}" selectable /></view>
|
||||
</view>
|
||||
<view class="weui-cell__ft">
|
||||
<radio class="weui-check" value="{{item.key}}" checked="{{item.checked}}" />
|
||||
|
@ -34,7 +37,8 @@
|
|||
<label class="weui-cell weui-cell_active weui-check__label" wx:for="{{options}}" wx:key="key">
|
||||
|
||||
<view class="weui-cell__bd">
|
||||
<view>{{item.value}}</view>
|
||||
<view style="float:left;width:10%">{{item.key}}:</view>
|
||||
<view style="float:left;width:90%"><parser html="{{item.value}}" domain="{{domain}}" selectable /></view>
|
||||
</view>
|
||||
<view class="weui-cell__hd">
|
||||
<checkbox class="weui-check" value="{{item.key}}" checked="{{item.checked}}"/>
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
.txlabel{
|
||||
color:#fff;
|
||||
background-color: rgb(216, 140, 0);
|
||||
padding: 2px
|
||||
border-radius: 2px;
|
||||
padding: 1px 4px;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,8 @@ Page({
|
|||
*/
|
||||
data: {
|
||||
questioncatData: [],
|
||||
isLoad: true
|
||||
isLoad: true,
|
||||
workscopeName:''
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -16,13 +17,15 @@ Page({
|
|||
onLoad: function () {
|
||||
if (getApp().globalData.userinfo.workscope) {
|
||||
this.setData({
|
||||
workscopeId: getApp().globalData.userinfo.workscope
|
||||
workscopeId: getApp().globalData.userinfo.workscope,
|
||||
workscopeName:getApp().globalData.userinfo.workscope_name
|
||||
})
|
||||
} else {
|
||||
wx.switchTab({
|
||||
url: '/pages/main/main',
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
<!--pages/lianxi/index.wxml-->
|
||||
<view class="page">
|
||||
<view class="page__bd">
|
||||
<view class="weui-panel__hd">当前工作类别题库子类</view>
|
||||
<view class="weui-panel__bd">
|
||||
<view style="height:10px"></view>
|
||||
<view style="color:steelblue;font-weight:bold;text-align:center">{{workscopeName}}</view>
|
||||
<block wx:for="{{questioncatData}}" wx:key="unique">
|
||||
<view class="weui-panel weui-panel_access">
|
||||
<view class="weui-panel__bd">
|
||||
<view class="weui-media-box weui-media-box_appmsg">
|
||||
<view class="weui-media-box__hd">
|
||||
<image class="weui-media-box__thumb" src="/images/fushe.svg" alt></image>
|
||||
|
@ -28,7 +29,9 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
|
|
|
@ -1 +1,6 @@
|
|||
/* pages/lianxi/index.wxss */
|
||||
.weui-panel {
|
||||
margin-left:8px;
|
||||
margin-right:8px;
|
||||
border-radius: 8px;
|
||||
}
|
|
@ -15,6 +15,7 @@
|
|||
.txlabel{
|
||||
color:#fff;
|
||||
background-color: rgb(216, 140, 0);
|
||||
padding: 2px
|
||||
border-radius: 2px;
|
||||
padding: 1px 4px;
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
<view class="weui-cell__hd">
|
||||
<image src="/images/qtest.svg" style="margin-right: 16px;vertical-align: middle;width:20px; height: 20px;"></image>
|
||||
</view>
|
||||
<view class="weui-cell__bd">铅当量检测</view>
|
||||
<view class="weui-cell__bd">个人防护用品检测(铅当量)</view>
|
||||
<view class="weui-cell__ft weui-cell__ft_in-access" style="color:red">
|
||||
<!-- <span wx:if="{{to_read}}">{{to_read}}条未读</span> -->
|
||||
</view>
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
<view class="page">
|
||||
<view class="weui-form">
|
||||
<view class="weui-form__text-area">
|
||||
<h2 class="weui-form__title">铅当量检测</h2>
|
||||
<view class="weui-form__desc">我司开展铅当量检测业务,如有需要,请留下您的信息,我们工作人员将及时与您联系。</view>
|
||||
<view >
|
||||
<view class="weui-form__text-area" style="margin-top:20px;padding: 0 18px;">
|
||||
<h2 class="weui-form__title">个人防护用品检测(铅当量)</h2>
|
||||
<view class="weui-form__desc">中科辐射学堂和国家建材工业安防工程产品质量监督检验中心推出个人防护用品合格检测,限每个核技术利用单位在10月31日之前免费检测一套个人防护用品,如有需要请提交您的申请。</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="weui-cells__title">基本信息</view>
|
||||
|
@ -35,11 +34,7 @@
|
|||
<checkbox-group bindchange="checkboxChange">
|
||||
<label class="weui-cell weui-cell_active weui-check__label" wx:for="{{items}}" wx:key="name">
|
||||
<view class="weui-cell__hd">
|
||||
<checkbox
|
||||
class="weui-check"
|
||||
value="{{item.name}}"
|
||||
checked="{{item.checked}}"
|
||||
/>
|
||||
<checkbox class="weui-check" value="{{item.name}}" checked="{{item.checked}}" />
|
||||
<i class="weui-icon-checked"></i>
|
||||
</view>
|
||||
<view class="weui-cell__bd">
|
||||
|
@ -70,6 +65,5 @@
|
|||
<view class="weui-footer__text">Copyright © 2008-2019 weui.io</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
|
@ -9,6 +9,7 @@ Page({
|
|||
data: {
|
||||
is_right: false,
|
||||
answerP: false,
|
||||
domain:getApp().globalData.mediahost,
|
||||
},
|
||||
radioChange: function (e) {
|
||||
var that = this
|
||||
|
@ -138,7 +139,7 @@ Page({
|
|||
for (let key in tm_current.options) {
|
||||
let option = {}
|
||||
option.key = key
|
||||
option.value = key + ':' + tm_current.options[key]
|
||||
option.value = tm_current.options[key].toString()
|
||||
if (tm_current.user_answer) {
|
||||
if (key == tm_current.user_answer || tm_current.user_answer.indexOf(key) != -1) {
|
||||
option.checked = true
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
{
|
||||
"usingComponents": {}
|
||||
"usingComponents": {
|
||||
"parser": "/components/parser/parser"
|
||||
}
|
||||
}
|
|
@ -7,14 +7,17 @@
|
|||
<span class="txlabel">{{tm_current.type}}</span>
|
||||
<span style="color:gray"> {{tm_current.questioncat_name}}</span>
|
||||
</view>
|
||||
<view class="weui-article__title">{{tm_current.name}}</view>
|
||||
<view class="weui-article__title">
|
||||
<parser html="{{tm_current.name}}" domain="{{domain}}" selectable/>
|
||||
</view>
|
||||
<view wx:if="{{tm_current.img}}" style="text-align:center"><image src="{{tm_current.img}}" mode="aspectFit"></image></view>
|
||||
</view>
|
||||
<view class="weui-cells weui-cells_radio">
|
||||
<radio-group class="radio-group" bindchange="radioChange" wx:if="{{(tm_current.type=='单选' ||tm_current.type=='判断')}}">
|
||||
<label class="weui-cell weui-cell_active weui-check__label" wx:for="{{options}}" wx:key="key">
|
||||
<view class="weui-cell__bd">
|
||||
<view>{{item.value}}</view>
|
||||
<view style="float:left;width:10%">{{item.key}}:</view>
|
||||
<view style="float:left;width:90%"><parser html="{{item.value}}" domain="{{domain}}" selectable /></view>
|
||||
</view>
|
||||
<view class="weui-cell__ft">
|
||||
<radio class="weui-check" value="{{item.key}}" checked="{{item.checked}}" />
|
||||
|
@ -28,7 +31,8 @@
|
|||
<label class="weui-cell weui-cell_active weui-check__label" wx:for="{{options}}" wx:key="key">
|
||||
|
||||
<view class="weui-cell__bd">
|
||||
<view>{{item.value}}</view>
|
||||
<view style="float:left;width:10%">{{item.key}}:</view>
|
||||
<view style="float:left;width:90%"><parser html="{{item.value}}" domain="{{domain}}" selectable /></view>
|
||||
</view>
|
||||
<view class="weui-cell__hd">
|
||||
<checkbox class="weui-check" value="{{item.key}}" checked="{{item.checked}}"/>
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
.txlabel{
|
||||
color:#fff;
|
||||
background-color: rgb(216, 140, 0);
|
||||
padding: 2px
|
||||
border-radius: 2px;
|
||||
padding: 1px 4px;
|
||||
}
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
.txlabel{
|
||||
color:#fff;
|
||||
background-color: rgb(216, 140, 0);
|
||||
padding: 2px
|
||||
border-radius: 2px;
|
||||
padding: 1px 4px;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
.txlabel{
|
||||
color:#fff;
|
||||
background-color: rgb(216, 140, 0);
|
||||
padding: 2px
|
||||
border-radius: 2px;
|
||||
padding: 1px 4px;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,8 @@ Page({
|
|||
query:{
|
||||
page:1,
|
||||
limit:10
|
||||
}
|
||||
},
|
||||
workscopeName:''
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -20,7 +21,8 @@ Page({
|
|||
|
||||
if (getApp().globalData.userinfo.workscope) {
|
||||
this.setData({
|
||||
workscopeId: getApp().globalData.userinfo.workscope
|
||||
workscopeId: getApp().globalData.userinfo.workscope,
|
||||
workscopeName:getApp().globalData.userinfo.workscope_name
|
||||
})
|
||||
} else {
|
||||
wx.switchTab({
|
||||
|
|
|
@ -1,28 +1,21 @@
|
|||
<!--pages/lianxi/index.wxml-->
|
||||
<view class="page">
|
||||
<view class="page__bd">
|
||||
<view class="weui-panel__hd">当前工作类别押题卷
|
||||
<span style="color:red" wx:if="{{count==0}}">(暂无)</span>
|
||||
</view>
|
||||
<view class="weui-panel__bd">
|
||||
<view style="height:10px"></view>
|
||||
<view style="color:steelblue;font-weight:bold;text-align:center">{{workscopeName}}</view>
|
||||
|
||||
<block wx:for="{{paperData}}" wx:key="unique">
|
||||
<view class="weui-panel weui-panel_access">
|
||||
<view class="weui-panel__bd">
|
||||
<view class="weui-media-box weui-media-box_appmsg">
|
||||
<view class="weui-media-box__bd">
|
||||
<h4 class="weui-media-box__title">{{item.name}}</h4>
|
||||
<view class="weui-media-box__desc">
|
||||
<span style="color:orange;font-weight:bold">{{item.workscope_name}}</span>
|
||||
<!-- --共
|
||||
<span style="color:darkblue;font-weight:bold">{{item.tmtotal}}</span>
|
||||
道/已答
|
||||
<span style="color:darkblue;font-weight:bold">{{item.ydtmtotal}}</span>
|
||||
道 -->
|
||||
</view>
|
||||
<view class="weui-media-box__desc">
|
||||
<a class="weui-btn weui-btn_mini weui-btn_primary" bindtap="startYati" id="{{item.id}}" >选择</a>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
|
|
@ -1 +1,6 @@
|
|||
/* pages/yati/index.wxss */
|
||||
.weui-panel {
|
||||
margin-left:8px;
|
||||
margin-right:8px;
|
||||
border-radius: 8px;
|
||||
}
|
|
@ -83,7 +83,7 @@ class QuestioncatViewSet(ModelViewSet):
|
|||
"""
|
||||
工作类别下的全部分类
|
||||
"""
|
||||
queryset = WorkScope.objects.get(id=request.query_params.get('id')).questioncat.all().order_by('type')
|
||||
queryset = WorkScope.objects.get(id=request.query_params.get('id')).questioncat.all().order_by('pk')
|
||||
serializer = QuestioncatSerializer(instance=queryset,many=True)
|
||||
return Response(serializer.data)
|
||||
|
||||
|
|
Loading…
Reference in New Issue