xiaohaizhao hace 1 año
padre
commit
cbe4b46195

+ 4 - 1
components/My_listbox.vue

@@ -2,7 +2,7 @@
     <view class="container" :style="{ background: boxBackground }">
         <view id="mylisttop" />
         <scroll-view class="scroll-view" scroll-y :refresher-enabled='pullDown' :refresher-triggered='inRefresh'
-            :style="{ height: height + 'px' }" :triggered='true' @refresherrefresh='pullToRefresh'
+            :style="{ height: height || defaultHeight + 'px' }" :triggered='true' @refresherrefresh='pullToRefresh'
             :scroll-into-view="scrollIntoView" :lower-threshold='300' :scroll-with-animation="true"
             @scrolltolower='loadThePage'>
             <view id="header">
@@ -45,6 +45,9 @@ export default {
         boxBackground: {
             type: String,
             default: ""
+        },
+        defaultHeight: {
+            type: [String, Number]
         }
     },
     data() {

+ 1 - 1
components/filtrate-group.vue

@@ -60,7 +60,7 @@ export default {
             text-align: center;
             font-size: 14px;
             color: #333333;
-            margin: 10px 10px 0 0;
+            margin: 10px 5px 0 0;
             background: #F2F2F2;
             border-radius: 5px;
         }

+ 5 - 2
components/filtrate.vue

@@ -43,6 +43,7 @@ export default {
                 value: "",//提交时选中的value
                 defaultVal: "",//默认值
                 rang: "",//选择的范围
+                interrupt: false,//中断
             }]
         },
         arrName: {
@@ -51,6 +52,9 @@ export default {
         },
         onFiltration: {
             type: Function
+        },
+        onInterrupt: {
+            type: Function
         }
     },
     watch: {
@@ -86,13 +90,13 @@ export default {
             });
         },
         onChange(option, index) {
-            console.log(option, index)
             let item = this.list[index];
             this.$set(item, 'value', option[item.selected]);
             try {
                 if (item.isAll) item.selectObj = option;
             } catch (error) { }
             this.$set(this.list, index, item);
+            if (item.interrupt) this.$emit("onInterrupt", { item, index, option })
         },
         onReset() {
             let page = getCurrentPages()[getCurrentPages().length - 1];
@@ -102,7 +106,6 @@ export default {
             // #ifndef H5
             this.list = JSON.parse(JSON.stringify(page.data[this.arrName]))
             // #endif
-            console.log("重置")
         },
         onConfirm() {
             let obj = {};

+ 617 - 0
packageA/exam/detail.vue

@@ -0,0 +1,617 @@
+<template>
+    <view>
+        <view class="head box" style="margin-bottom: 10px;">
+            <view>
+                <text class="iconfont icon-shijian" />
+                <timer ref="timer" />
+            </view>
+            <text class="iconfont icon-tika" @click="openTopicCard = true">
+                题卡
+            </text>
+        </view>
+        <My_listbox :pullDown="false">
+            <swiper :style="{ height: tovw(swiperHeight), marginTop: 0 }" :current-item-id="currentItemId"
+                @change="swiperChange">
+                <swiper-item v-for="item in detail.testquestions" :key="item.sat_courseware_testitemsid"
+                    :item-id="item.rowindex + ''">
+                    <view class="box">
+                        <view class="typemxstr">
+                            {{ item.rowindex }} {{ item.typemxstr }}<text class="score">({{ item.score }})</text>
+                        </view>
+                        <image class="image" v-if="item.attinfos.length" :src="item.attinfos[0].src" mode="aspectFill"
+                            lazy-load="true" />
+                        <view class="content">
+                            <view class="title">{{ item.question }}</view>
+                            <view class="option" v-for="option in item.options" :key="option.sequence"
+                                @click="selectOption(item.rowindex, option.option)"
+                                :class="item.answer.includes(option.option) ? 'active' : ''">
+                                <image class="image" v-if="option.url.length" :src="option.url[0].url" mode="aspectFill"
+                                    lazy-load="true" />
+                                <view class="text">
+                                    {{ option.option }} {{ option.content }}
+                                </view>
+                            </view>
+                        </view>
+                    </view>
+                    <view class="box" v-if="detail.status == '已完成'">
+                        <view class="typemxstr">答案</view>
+                        <view class="row" style="padding-top: 10px;">
+                            结果:<text class="res-f" v-if="item.result == 0">答错</text><text v-else class="res-t">答对</text>
+                        </view>
+                        <view class="row">
+                            结果:<text style="font-weight: bold;color:#009270 ;">{{ item.answer_fact.join(",") }}</text>
+                        </view>
+                        <view class="row">
+                            分数:<text class="score">{{ item.result == 1 ? item.score : 0 }}</text>
+                        </view>
+                    </view>
+                </swiper-item>
+            </swiper>
+
+            <view :style="{ height: tovw(80) }" />
+        </My_listbox>
+        <view class="bottom">
+            <view v-if="currentItemId != 1" class="but up" hover-class="navigator-hover" @click="changeQuestions('-')">
+                上一题
+            </view>
+            <view v-if="detail.testquestions.length != currentItemId" class="but down" hover-class="navigator-hover"
+                @click="changeQuestions('+')">
+                下一题
+            </view>
+            <view v-if="detail.testquestions.length == currentItemId && detail.status != '已完成'" class="but submit"
+                @click="submit" hover-class="navigator-hover">
+                提交
+            </view>
+        </view>
+
+        <u-popup :show="openTopicCard" :safeAreaInsetBottom="false" round="8" @close="openTopicCard = false">
+            <My_listbox :pullDown="false" :automatic="false" defaultHeight="500">
+                <view class="topic-card">
+                    <view class="topic-card-title">选择题目</view>
+                    <view class="topic-card-content">
+                        <view class="topic-card-item"
+                            :class="[currentItemId == item.rowindex ? 'topic-card-active' : '', item.answer.length > 0 ? 'topic-card-filled' : '']"
+                            v-for="item in  detail.testquestions " :key="item.sat_courseware_testitemsid"
+                            :data-currentItemId="item.rowindex + ''" @click="swiperChange">
+                            {{ item.rowindex }}
+                            <view class="res" v-if="detail.status == '已完成'"
+                                :style="{ background: item.result == 1 ? '#70D95D' : '#E3041F' }" />
+                        </view>
+                    </view>
+                </view>
+            </My_listbox>
+            <view class="bottom" style="position: relative;">
+                <view class="but down" hover-class="navigator-hover" @click="openTopicCard = false">
+                    关 闭
+                </view>
+            </view>
+        </u-popup>
+
+        <u-popup :show="showFinish" mode="center" round="8" :safeAreaInsetBottom="false">
+            <view class="finish">
+                <image class="result" src="../../static//examination-result.png" mode="aspectFill" />
+                <view class="shadow" />
+                <view class="finish-title">考试结果</view>
+                <view class="finish-result">
+                    <view class="finish-result-item">
+                        <view class="finish-result-item-data" style="color:#FF3B30;">
+                            {{ detail.score }}
+                        </view>
+                        成绩(分)
+                    </view>
+                    <view class="finish-result-item">
+                        <view class="finish-result-item-data" style="color:#3874F6;">
+                            {{ detail.answercount + ' / ' + detail.num }}
+                        </view>
+                        答题数
+                    </view>
+                </view>
+
+                <view class="tips">
+                    <view class="row">
+                        <view class="dot" style="background: #52C41A;" />
+                        答对<text class="text">{{ detail.rightcount }}</text>题
+                    </view>
+                    <view class="row">
+                        <view class="dot" style="background: #FF3B30;" />
+                        答错<text class="text">{{ detail.errcount }}</text>题
+                    </view>
+                </view>
+
+                <view class="but but-res" @click="showFinish = false">
+                    查看答案
+                </view>
+                <view class="but" @click="returnList">
+                    返回
+                </view>
+            </view>
+        </u-popup>
+
+
+        <view class="quere-height">
+            <view :id="'Item' + item.rowindex" v-for=" item  in  detail.testquestions "
+                :key="item.sat_courseware_testitemsid" :item-id="item.rowindex + ''">
+                <view class="box">
+                    <view class="typemxstr">
+                        {{ item.rowindex }} {{ item.typemxstr }}<text class="score">({{ item.score }})</text>
+                    </view>
+                    <image class="image" v-if="item.attinfos.length" :src="item.attinfos[0].src" mode="aspectFill"
+                        lazy-load="true" />
+                    <view class="content">
+                        <view class="title">{{ item.question }}</view>
+                        <view class="option" v-for=" option  in  item.options " :key="option.sequence"
+                            @click="selectOption(item.rowindex, option.option)"
+                            :class="item.answer.includes(option.option) ? 'active' : ''">
+                            <image class="image" v-if="option.url.length" :src="option.url[0].url" mode="aspectFill"
+                                lazy-load="true" />
+                            <view class="text">
+                                {{ option.option }} {{ option.content }}
+                            </view>
+                        </view>
+                    </view>
+                </view>
+
+                <view class="box" v-if="detail.status == '已完成'">
+                    <view class="typemxstr">答案</view>
+                    <view class="row" style="padding-top: 10px;">
+                        结果:<text class="res-f">答错</text><text class="res-t">答对</text>
+                    </view>
+                    <view class="row">
+                        结果:<text style="font-weight: bold;color:#009270 ;">{{ item.answer_fact }}</text>
+                    </view>
+                    <view class="row">
+                        分数:<text class="score">{{ item.result == 1 ? item.score : 0 }}</text>
+                    </view>
+                </view>
+            </view>
+        </view>
+    </view>
+</template>
+
+<script>
+import timer from "./modules/timer.vue"
+export default {
+    components: { timer },
+    data() {
+        return {
+            sat_courseware_testheadid: 0,
+            currentItemId: '1',
+            detail: {
+                testquestions: []
+            },
+            swiperHeight: 10,
+            openTopicCard: false,
+            showFinish: false
+        }
+    },
+    onLoad(options) {
+        this.sat_courseware_testheadid = options.id || 0;
+        this.getDetail();
+    },
+    methods: {
+        getDetail() {
+            this.$Http.basic({
+                "id": 20240325102202,
+                "content": {
+                    "sat_courseware_testheadid": this.sat_courseware_testheadid
+                }
+            }).then(res => {
+                console.log("生成试卷并获取详情", res)
+                if (this.cutoff(res.msg)) return;
+                this.detail = res.data;
+                if (this.detail.status != '已完成') {
+                    this.$refs.timer.startCounting()
+                } else {
+                    this.$refs.timer.showTime = res.data.countdown;
+                    this.showFinish = true;
+                }
+                this.$nextTick(() => { this.setSwiperHeight() })
+            })
+        },
+        selectOption(rowindex, option) {
+            if (this.detail.status == '已完成') return;
+            let item = this.detail.testquestions[rowindex - 1],
+                answer = item.answer;
+            switch (item.typemxstr) {
+                case '单选':
+                    answer = [option]
+                    break;
+                case '多选':
+                    answer.some(v => v == option) ? answer = answer.filter(v => v != option) : answer.push(option)
+                    break;
+            }
+            this.$set(item, 'answer', answer)
+        },
+        swiperChange(e) {
+            this.currentItemId = e.target.currentItemId || e.currentTarget.dataset.currentitemid;
+            this.$nextTick(() => { this.setSwiperHeight() })
+        },
+        changeQuestions(e) {
+            if (e == '+') {
+                this.currentItemId = String(this.currentItemId - 0 + 1);
+            } else {
+                this.currentItemId = String(this.currentItemId - 1);
+            }
+        },
+        setSwiperHeight() {
+            let that = this;
+            const element = `#Item${this.currentItemId}`;
+            const query = uni.createSelectorQuery().in(that);
+            setTimeout(() => {
+                query.select(element).boundingClientRect();
+                query.exec(res => {
+                    if (res && res[0]) that.swiperHeight = res[0].height - 10;
+                });
+            }, 100)
+        },
+        submit() {
+            let content = {
+                "sat_courseware_testid": this.detail.sat_courseware_testid,
+                "answers": this.detail.testquestions.map(v => {
+                    return {
+                        sat_courseware_testitemsid: v.sat_courseware_testitemsid,
+                        answer: v.answer,
+                        rowindex: v.rowindex
+                    }
+                })
+            },
+                notFilleds = content.answers.filter(v => v.answer.length == 0).map(v => v.rowindex),
+                tips = "是否确定提交",
+                that = this;
+
+            if (notFilleds.length) tips = `题号“${notFilleds.join(',')}”还未完成!是否继续提交?`;
+            content.countdown = that.$refs.timer.getTime();
+            uni.showModal({
+                title: '提示',
+                content: tips,
+                success: ({ confirm }) => {
+                    if (confirm) that.$Http.basic({
+                        "id": 20240326145902,
+                        content
+                    }).then(res => {
+                        console.log('提交试卷', res)
+                        if (this.cutoff(res.msg, '', true)) return that.$refs.timer.startCounting();
+                        that.$refs.timer.endTiming();
+                        that.getDetail();
+                    })
+                },
+            })
+
+        },
+        returnList() {
+            uni.navigateBack();
+        }
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+body,
+page {
+    height: 100vh;
+    overflow: hidden;
+}
+
+.box {
+    width: 355px;
+    background: #FFFFFF;
+    border-radius: 8px;
+    margin: 10px auto 0;
+    box-sizing: border-box;
+
+    .row {
+        padding: 5px 10px;
+
+        .score {
+            font-weight: bold;
+            color: #095DE0;
+        }
+
+        .res-t,
+        .res-f {
+            font-family: Source Han Sans SC, Source Han Sans SC;
+            font-weight: bold;
+            font-size: 14px;
+        }
+
+        .res-t {
+            color: #009270;
+        }
+
+        .res-f {
+            color: #E3041F;
+        }
+    }
+
+    .row:last-child {
+        padding-bottom: 10px;
+    }
+}
+
+.image {
+    width: 163px;
+    height: 100px;
+    border-radius: 8px;
+}
+
+.head {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding: 0 10px;
+    height: 50px;
+
+    /deep/ .time,
+    .iconfont {
+        font-family: Source Han Sans SC, Source Han Sans SC;
+        font-size: 14px;
+        color: #333333;
+    }
+
+    .icon-tika:before,
+    .icon-shijian:before {
+        color: #999999;
+        margin-right: 5px;
+    }
+}
+
+.quere-height {
+    position: fixed;
+    z-index: -9999;
+    top: -99999999999999999;
+    opacity: 0;
+}
+
+.typemxstr {
+    width: 100%;
+    height: 50px;
+    padding: 15px 10px;
+    border-bottom: 1px solid #DDDDDD;
+    box-sizing: border-box;
+
+    .score {
+        color: #999999;
+        margin-left: 5px;
+    }
+}
+
+.content {
+    padding: 10px;
+    padding-bottom: 20px;
+
+    .title {
+        font-family: Source Han Sans SC, Source Han Sans SC;
+        font-size: 14px;
+        color: #333333;
+    }
+
+    .option {
+        border-radius: 8px;
+        border: 1px solid #CCCCCC;
+        padding: 10px;
+        margin-top: 10px;
+
+        .text {
+            font-family: PingFang SC, PingFang SC;
+        }
+    }
+
+    .active {
+        border: 1px solid #095DE0 !important;
+
+        .text {
+            color: #095DE0 !important;
+        }
+    }
+}
+
+.bottom {
+    display: flex;
+    position: fixed;
+    bottom: 0;
+    width: 375px;
+    height: 64px;
+    background: #FFFFFF;
+    box-shadow: 0px -2px 6px 1px rgba(0, 0, 0, 0.16);
+    padding-right: 10px;
+    box-sizing: border-box;
+
+    .but {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        flex: 1;
+        margin-left: 10px;
+        width: 168px;
+        height: 45px;
+        border-radius: 5px;
+        margin-top: 4px;
+        box-sizing: border-box;
+    }
+
+    .up {
+        background: #FFFFFF;
+        border: 1px solid #999999;
+        font-size: 16px;
+        color: #666666;
+    }
+
+    .down,
+    .submit {
+        background: #095DE0;
+        font-family: PingFang SC, PingFang SC;
+        font-size: 16px;
+        color: #FFFFFF;
+    }
+
+    .submit {
+        background: #C30D23;
+    }
+}
+
+.topic-card {
+    .topic-card-title {
+        font-family: PingFang SC, PingFang SC;
+        font-weight: bold;
+        font-size: 16px;
+        color: #333333;
+        margin: 20px;
+        text-align: center;
+    }
+
+    .topic-card-content {
+        display: flex;
+        flex-wrap: wrap;
+        padding-left: 8px;
+
+
+        .topic-card-item {
+            position: relative;
+            width: 35px;
+            text-align: center;
+            height: 50px;
+            line-height: 50px;
+            border-radius: 5px;
+            border: 1px solid #999999;
+            margin-right: 10px;
+            margin-bottom: 10px;
+
+            .res {
+                position: absolute;
+                width: 4px;
+                height: 4px;
+                border-radius: 2px;
+                bottom: 6px;
+                left: 16px;
+                background: red;
+            }
+        }
+
+        .topic-card-active {
+            border: 1px solid #095DE0;
+            color: #095DE0;
+        }
+
+        .topic-card-filled {
+            background: #F4F5F7 !important;
+        }
+
+        .topic-card-item:nth-child(8n) {
+            margin-right: 0;
+        }
+
+    }
+}
+
+.finish {
+    position: relative;
+    width: 240px;
+    background: #FFFFFF;
+    box-shadow: 0px 2px 10px 1px rgba(98, 98, 241, 0.12);
+    border-radius: 8px;
+    padding-bottom: 20px;
+
+    .result {
+        position: absolute;
+        width: 88px;
+        height: 88px;
+        top: -20px;
+        left: 76px;
+    }
+
+    .shadow {
+        position: absolute;
+        top: 65px;
+        left: 76px;
+        width: 88px;
+        height: 11px;
+        background: rgba(227, 4, 31, 0.15);
+        filter: blur(7.4338297843933105px);
+    }
+
+    &-title {
+        font-family: Source Han Sans SC, Source Han Sans SC;
+        font-size: 14px;
+        color: #222222;
+        text-align: center;
+        padding-top: 96px;
+    }
+
+    &-result {
+        display: flex;
+        justify-content: space-around;
+        height: 67px;
+        width: 180px;
+        margin: 18px auto 0;
+        border-bottom: 1px solid #DDDDDD;
+
+        &-item {
+            text-align: center;
+            font-family: PingFang HK, PingFang HK;
+            font-size: 13px;
+            color: #666666;
+
+            &-data {
+                height: 24px;
+                line-height: 24px;
+                font-family: Source Han Sans SC, Source Han Sans SC;
+                font-weight: bold;
+                font-size: 16px;
+                margin-bottom: 5px;
+            }
+        }
+    }
+
+    .tips {
+        display: flex;
+        flex-direction: column;
+        align-items: center;
+        margin-top: 8px;
+
+        .row {
+            display: flex;
+            align-items: center;
+            margin-top: 10px;
+
+            .dot {
+                width: 6px;
+                height: 6px;
+                border-radius: 3px;
+                margin-right: 10px;
+            }
+
+            .text {
+                color: #3874F6;
+                font-size: 16px;
+                font-weight: bold;
+                padding: 0 4px;
+            }
+        }
+    }
+
+    .but {
+        width: 160px;
+        height: 45px;
+        text-align: center;
+        line-height: 45px;
+        background: #C30D23;
+        border-radius: 22.5px;
+        margin: 0 auto;
+        font-family: PingFang SC, PingFang SC;
+        font-weight: bold;
+        font-size: 14px;
+        color: #FFFFFF;
+        margin-top: 10px;
+    }
+
+    .but-res {
+        background: #FFFFFF;
+        border: 1px solid #CCCCCC;
+        margin-top: 25px;
+        font-family: PingFang SC, PingFang SC;
+        font-weight: bold;
+        font-size: 14px;
+        color: #333333;
+    }
+}
+</style>

+ 309 - 0
packageA/exam/index.vue

@@ -0,0 +1,309 @@
+<template>
+    <view>
+        <view class="head" catchtouchmove="true" @touchmove.stop.prevent="() => { }">
+            <My_search :value="content.where.condition" @onSearch="onSearch">
+                <view class="filtrate" v-if="filtrateList.length" hover-class="navigator-hover" @click="openFiltrate">
+                    筛选
+                    <text class="iconfont icon-shaixuan" />
+                </view>
+            </My_search>
+            <view class="crumbs">
+                <view class="crumb" v-for="item in crumbs" :key="item.classname">{{ item.classname }}</view>
+            </view>
+            <u-tabs :list="status" :activeStyle="{ fontWeight: 'bold', color: '#C30D23' }" lineColor="#C30D23"
+                keyName="name" @change="statusChange" />
+        </view>
+        <view style="height: 1px;" />
+        <filtrate ref="Filtrate" :filtrateList="filtrateList" @onFiltration="onFiltration" @onInterrupt="onInterrupt" />
+
+        <My_listbox ref="List" @getlist="getList">
+            <view class="list-box">
+                <navigator class="item" v-for="item in list" :key="item.sat_courseware_testheadid"
+                    :url="'/packageA/exam/detail?id=' + item.sat_courseware_testheadid">
+                    <view class="title u-line-2">{{ item.title || '--' }}</view>
+                    <view class="hr" />
+                    <view class="bottom">
+                        <view>
+                            分数:<text class="score">{{ item.score }}</text>
+                        </view>
+                        <view>
+                            答题数:{{ item.answerinfo }}
+                        </view>
+                    </view>
+
+                    <view class="status" v-if="item.status == '未开始'" style="background:#E3041F;color: #FFFFFF;">
+                        未开始
+                    </view>
+                    <view class="status" v-else-if="item.status == '进行中'" style="background: #FFF0F2;color: #E3041F;">
+                        进行中
+                    </view>
+                    <view class="status" v-else-if="item.status == '已完成'" style="background: #EEEEEE;color: #999999;">
+                        已完成
+                    </view>
+
+                </navigator>
+            </view>
+        </My_listbox>
+    </view>
+</template>
+
+<script>
+export default {
+
+    data() {
+        return {
+            crumbs: [],
+            list: [],
+            "content": {
+                "where": {
+                    "condition": "",
+                    "status": "",
+                    "sat_courseware_classids": [[]]
+                }
+            },
+            filtrateList: [],
+            status: [{
+                name: "全部"
+            }, {
+                name: "未开始"
+            }, {
+                name: "进行中"
+            }, {
+                name: "已完成"
+            }]
+        }
+    },
+    onLoad(options) {
+        this.crumbs = [{
+            classname: "考试",
+            parentid: ""
+        }, {
+            classname: "全部",
+            parentid: ''
+        }]
+        this.getType()
+        this.getList(true)
+    },
+    onShow() {
+        this.updateList()
+    },
+    methods: {
+        getType() {
+            this.$Http.basic({
+                "id": "20221102143302",
+                content: {
+                    pageSize: 9999,
+                    parentid: "",
+                    "where": {
+                        "isenable": 1
+                    }
+                }
+            }).then(res => {
+                console.log("获取分类列表", res)
+                if (this.cutoff(res.msg)) return;
+                this.filtrateList = [{
+                    title: "一级分类",
+                    key: '一级分类',//提交时返回的Key
+                    showKey: "classname",//显示的key
+                    selected: "sat_courseware_classid",//选择时选择的字段
+                    value: "",//提交时选中的value
+                    defaultVal: "",//返回的默认值
+                    isAll: true,
+                    interrupt: true,
+                    rang: [{ classname: "全部", sat_courseware_classid: "", children: [] }].concat(res.data),//选择的范围
+                }]
+            })
+        },
+        getList(init = false) {
+            if (this.paging(this.content, init)) return;
+            let ids = this.crumbs.map(v => v.parentid).filter(v => v);
+            this.content.where.sat_courseware_classids = ids.length ? [ids] : []
+            this.$Http.basic({
+                "id": 20240326133302,
+                content: this.content
+            }).then(res => {
+                this.$refs.List.RefreshToComplete()
+                console.log("获取试卷列表", res)
+                if (this.cutoff(res.msg)) return;
+                this.list = res.pageNumber == 1 ? res.data : this.list.concat(res.data);
+                this.content = this.$refs.List.paging(this.content, res)
+            })
+        },
+        updateList() {
+            if (this.content.pageNumber && this.content.pageNumber >= 2) {
+                let content = this.paging(this.content, true, true)
+                this.$Http.basic({
+                    "id": "20240326133302",
+                    content
+                }).then(res => {
+                    console.log("更新试卷列表", res)
+                    if (this.cutoff(res.msg)) return;
+                    this.list = res.data;
+                })
+            }
+        },
+        openFiltrate() {
+            this.$refs.Filtrate.changeShow();
+        },
+        onSearch(condition) {
+            this.content.where.condition = condition;
+            this.getList(true)
+        },
+        onInterrupt({ item, index, option }) {
+            let filtrateList = this.$refs.Filtrate.list;
+            const i = filtrateList.findIndex(v => v.title == '二级分类');
+            if (option.children.length) {
+                const obj = {
+                    title: "二级分类",
+                    key: '二级分类',
+                    showKey: "classname",
+                    selected: "sat_courseware_classid",
+                    value: "",
+                    defaultVal: "",
+                    isAll: true,
+                    rang: [{ classname: "全部", sat_courseware_classid: "" }].concat(option.children),
+                };
+                i == -1 ? filtrateList.push(obj) : filtrateList[i] = obj;
+            } else {
+                i == -1 ? '' : filtrateList.pop();
+            }
+            this.$refs.Filtrate.list = filtrateList || JSON.parse(JSON.stringify());
+        },
+        onFiltration(e) {
+            let crumbs = [{
+                classname: "考试",
+                parentid: ""
+            }]
+            crumbs.push({
+                classname: e.一级分类.classname,
+                parentid: e.一级分类.sat_courseware_classid
+            })
+            if (e.二级分类) crumbs.push({
+                classname: e.二级分类.classname,
+                parentid: e.二级分类.sat_courseware_classid
+            })
+
+            this.crumbs = crumbs;
+            this.getList(true)
+        },
+        statusChange({ name }) {
+            this.content.where.status = name == '全部' ? '' : name;
+            this.getList(true)
+        }
+    }
+}
+</script>
+
+<style lang="scss">
+.head {
+    padding: 10px;
+    width: 100%;
+    background: #fff;
+    box-sizing: border-box;
+
+    .filtrate {
+        line-height: 30px;
+        padding: 0 10px;
+        font-family: PingFang SC, PingFang SC;
+        font-size: 14px;
+        color: #333333;
+        border-radius: 3px;
+        margin-left: 10px;
+
+        .iconfont {
+            margin-left: 3px;
+            color: #BBBBBB;
+        }
+    }
+}
+
+.crumbs {
+    display: flex;
+    line-height: 17px;
+    font-family: PingFang SC, PingFang SC;
+    font-size: 12px;
+    flex-wrap: wrap;
+    width: 100%;
+    margin-top: 10px;
+
+    .crumb {
+        flex-shrink: 0;
+
+    }
+
+    .crumb::after {
+        content: ">";
+        padding: 0 2px;
+    }
+
+    .crumb:last-child {
+        font-weight: bold;
+    }
+
+    .crumb:last-child::after {
+        content: "";
+    }
+}
+
+.list-box {
+    width: 100vw;
+    padding: 10px;
+    padding-top: 0;
+    box-sizing: border-box;
+
+    .item {
+        position: relative;
+        background: #FFFFFF;
+        border-radius: 8px;
+        margin-top: 10px;
+        padding: 10px;
+        padding-top: 15px;
+
+        .title {
+            width: 280px;
+            line-height: 20px;
+            height: 40px;
+            font-family: Source Han Sans SC, Source Han Sans SC;
+            font-weight: bold;
+            font-size: 14px;
+            color: #333333;
+        }
+
+        .hr {
+            width: 100%;
+            height: 1px;
+            background: #DDDDDD;
+            margin-top: 15px;
+        }
+
+        .status {
+            position: absolute;
+            top: 10px;
+            right: 0;
+            width: 44px;
+            height: 24px;
+            line-height: 24px;
+            border-radius: 12px 0px 0px 12px;
+            text-align: center;
+            font-family: Source Han Sans SC, Source Han Sans SC;
+            font-size: 12px;
+            color: #FFFFFF;
+        }
+
+        .bottom {
+            display: flex;
+            justify-content: space-between;
+            line-height: 20px;
+            font-family: Source Han Sans SC, Source Han Sans SC;
+            font-size: 14px;
+            color: #666666;
+            margin-top: 10px;
+
+            .score {
+                color: #E3041F;
+                font-weight: bold;
+            }
+        }
+    }
+}
+</style>

+ 45 - 0
packageA/exam/modules/timer.vue

@@ -0,0 +1,45 @@
+<template>
+    <text class="time">{{ showTime }}</text>
+</template>
+
+<script>
+export default {
+    name: "timer",
+    data() {
+        return {
+            showTime: "00:00:00",
+            count: null,
+            scale: 60
+        }
+    },
+    methods: {
+        startCounting() {
+            let time = this.showTime.split(":");
+            this.count = setInterval(() => {
+                if (time[2] == this.scale) {
+                    if (time[1] == this.scale) {
+                        time[0] = time[0] - 0 + 1;
+                        time[1] = '00';
+                    } else {
+                        time[1] = time[1] - 0 + 1;
+                    }
+                    time[2] = '00';
+                } else {
+                    time[2] = time[2] - 0 + 1;
+                }
+                this.showTime = time.map(v => v != '00' && v < 10 ? '0' + v : v).join(":")
+            }, 1000);
+        },
+        endTiming() {
+            clearInterval(this.count);
+            return this.showTime;
+        },
+        getTime(){
+            return this.showTime;
+
+        }
+    },
+}
+</script>
+
+<style lang="scss"></style>

+ 4 - 0
pages.json

@@ -21,6 +21,10 @@
 			"path": "course/list"
 		}, {
 			"path": "course/detail"
+		}, {
+			"path": "exam/index"
+		}, {
+			"path": "exam/detail"
 		}]
 	}],
 	"globalStyle": {

+ 20 - 1
pages/index/cloud/school.vue

@@ -7,6 +7,15 @@
                 <image v-if="item.cover" class="image" :src="item.cover" mode="aspectFill" lazy-load="false" />
                 <text v-else>{{ item.classname }}</text>
             </navigator>
+
+            <navigator class="nav-box" v-for="item in appList" :key="item.name" :url="item.path"
+                hover-class="navigator-hover">
+                <block v-if="item.cover">
+                    <image class="image" :src="item.cover" mode="aspectFill" lazy-load="false" />
+                </block>
+                <text v-else>{{ item.remark }}</text>
+            </navigator>
+
         </view>
     </My_listbox>
 </template>
@@ -15,12 +24,22 @@
 export default {
     data() {
         return {
-            list: []
+            list: [],
+            appList: []
         }
     },
     created() {
         this.getList()
     },
+    mounted() {
+        try {
+            this.appList = this.getApps('商学院')
+            console.log('商学院', this.appList)
+        } catch (error) {
+            console.log("未获取到授权信息")
+        }
+
+    },
     methods: {
         getList() {
             this.$Http.basic({

BIN
static/examination-result.png