zengh
2022-03-09 e5b8ad7dc614a2c36c7cf60e76b0848737764499
Merge remote-tracking branch 'origin/master'
7 files modified
237 ■■■■ changed files
components/dyw-answer/answer.vue 51 ●●●● patch | view | raw | blame | history
pages/exam/examTextPage.vue 8 ●●●● patch | view | raw | blame | history
pages/grabOrders/grabOrdersMain/business.vue 24 ●●●● patch | view | raw | blame | history
pages/grabOrders/grabOrdersZAXC/map.vue 6 ●●●●● patch | view | raw | blame | history
pages/grabOrders/grabOrdersZAYWXC/grabOrders.vue 2 ●●● patch | view | raw | blame | history
pages/grabOrders/grabOrdersZAYWXC/map.vue 5 ●●●●● patch | view | raw | blame | history
pages/myself/myself.vue 141 ●●●● patch | view | raw | blame | history
components/dyw-answer/answer.vue
@@ -205,6 +205,7 @@
    export default {
        data() {
            return {
                sleepTime:2000,
                subHeaderTop: 0,
                isreadOnly: true,
                quesModules: [],
@@ -438,11 +439,11 @@
                if (item.tempAnswer == item.answer) item.correctOrError = true
                // 强制刷新更新视图
                this.$forceUpdate()
                if (this.currentIndex < this.max) {
                    setTimeout(() => {
                        this.currentIndex += 1
                    }, 300)
                }
                // if (this.currentIndex < this.max) {
                //     setTimeout(() => {
                //         this.currentIndex += 1
                //     }, this.sleepTime)
                // }
            },
            /* 选择答案(多选)*/
            chooseMutiSolution(item, subItem) {
@@ -490,11 +491,11 @@
                this.$forceUpdate()
                if (this.currentIndex < this.max) {
                    setTimeout(() => {
                        this.currentIndex += 1
                    }, 300)
                }
                // if (this.currentIndex < this.max) {
                //     setTimeout(() => {
                //         this.currentIndex += 1
                //     }, this.sleepTime)
                // }
            },
            // 实操题中的答案确认
            pictureConfirm(item) {
@@ -528,11 +529,11 @@
                this.$forceUpdate()
                if (this.currentIndex < this.max) {
                    setTimeout(() => {
                        this.currentIndex += 1
                    }, 300)
                }
                // if (this.currentIndex < this.max) {
                //     setTimeout(() => {
                //         this.currentIndex += 1
                //     }, this.sleepTime)
                // }
            },
            /* 判断题答案 */
            judgeSolution(item, value) {
@@ -542,21 +543,16 @@
                if (item.tempAnswer == item.answer) item.correctOrError = true
                // 强制刷新更新视图
                this.$forceUpdate()
                if (this.currentIndex < this.max) {
                    setTimeout(() => {
                        this.currentIndex += 1
                    }, 300)
                }
                // if (this.currentIndex < this.max) {
                //     setTimeout(() => {
                //         this.currentIndex += 1
                //     }, this.sleepTime)
                // }
            },
            /* 交卷  相同 */
            handleSubmit(submitORimeEnd) {
                /*submitORimeEnd == 1,submit
                  submitORimeEnd == 0,stimeEnd*/
                if (this.currentIndex == 0) {
                    this.currentIndex++
                } else {
                    this.currentIndex = 0
                }
                if (submitORimeEnd) {
                    // this.$emit('submit', this.questionList)
                    this.$emit('submit')
@@ -576,6 +572,7 @@
        right: 10px;
        bottom: 0;
        margin: auto;
        font-size: 1.0rem;
        color: #fff;
        letter-spacing: 4rpx;
        /* 如果您想让slot内容占满整个导航栏的宽度 */
@@ -619,13 +616,13 @@
    .footer {
        width: 100%;
        height: 88rpx;
        padding: 30rpx 20rpx;
        padding: 30rpx 25rpx;
        position: fixed;
        bottom: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 30rpx;
        font-size: 1rem;
        box-sizing: border-box;
        color: #4c8af3;
        box-shadow: 0 0 5px 1px #eee;
pages/exam/examTextPage.vue
@@ -3,7 +3,6 @@
        <!-- <nav-bar-sub></nav-bar-sub> -->
        <!-- 用于提示是否确认退出考试 -->
        <u-modal v-model="show" :content="content" :show-cancel-button="true" @confirm="handleConfirm"></u-modal>
        <!-- 渲染题目 -->
        <Answer @submit='handleCommit' @timeEnd='handleConfirm' @onChange='onChange'></Answer>
@@ -30,10 +29,10 @@
            this.$store.state.questionList = []
            var that = this
            console.log(this.$store.state.UserData)
            // 理论考试
            uni.request({
                url: "http://223.82.109.183:2080/api/simulateExamRecord/beginExam",
                // url: "http://localhost:81/simulateExamRecord/beginExam",
                method: 'POST',
                data: {
                    idCardNo: this.$store.state.UserData.cardid
@@ -64,7 +63,7 @@
        },
        methods: {
            /* 提交答案 显示再次确认*/
            handleCommit(questionList) {
            handleCommit() {
                // 显示是否确认交卷
                this.show = true;
            },
@@ -140,7 +139,8 @@
            },
            /* 题目答案变化
             */
            onChange(answer) {}
            onChange(answer) {
            }
        }
    }
</script>
pages/grabOrders/grabOrdersMain/business.vue
@@ -121,11 +121,11 @@
          img: "/static/workbench/task9.png",
          url: "",
        },
        // ,{
        //     title:'模拟考试',
        //     img:'../../static/workbench/exam.png',
        //     url:'/pages/exam/startexam'
        // }
        {
          title: "模拟考试",
          img: "/static/workbench/task5.png",
          url: "/pages/exam/startexam",
        }
      ],
    };
  },
@@ -133,13 +133,13 @@
    this.getNum();
  },
  onLoad() {
    if (this.$store.state.billFlag == true) {
      this.dataTwo.push({
        title: "模拟考试",
        img: "/static/workbench/task5.png",
        url: "/pages/exam/startexam",
      });
    }
    // if (this.$store.state.billFlag == true) {
    //   this.dataTwo.push({
    //     title: "模拟考试",
    //     img: "/static/workbench/task5.png",
    //     url: "/pages/exam/startexam",
    //   });
    // }
  },
  onBackPress(e) {
    console.log("监听返回按钮事件2", e);
pages/grabOrders/grabOrdersZAXC/map.vue
@@ -113,6 +113,12 @@
                </u-button>
            </view>
            <view class="once-c" v-if="ourData.buttype == 2">
                <u-button type="info" :disabled="true">
                    已完成
                </u-button>
            </view>
        </view>
        <u-popup v-model="showIn" mode="bottom" border-radius="14" z-index='1000001' :mask-close-able="true">
            <view class="Info2">
pages/grabOrders/grabOrdersZAYWXC/grabOrders.vue
@@ -15,7 +15,7 @@
                            @getOrders="getOrders" @outOrders="outOrders"></page0>
                        <page1 :listData="rightdata" :swiperCurrent="1" v-if="item.name == '可参与'" @openOnce="openOnce"
                            @getOrders="getOrders"></page1>
                        <page2 :listData="rightdata" :swiperCurrent="2" v-if="item.name == '已完成'" @openOnce="openOnce"
                        <page2 :listData="overdata" :swiperCurrent="2" v-if="item.name == '已完成'" @openOnce="openOnce"
                            @getOrders="getOrders"></page2>
                        <!-- <view class="a" v-if="item.name == '正在进行'">
pages/grabOrders/grabOrdersZAYWXC/map.vue
@@ -110,6 +110,11 @@
                    {{ourData.num==ourData.jnum?"人数已满":'我参与'}}
                </u-button>
            </view>
            <view class="once-c" v-if="ourData.buttype == 2">
                <u-button type="info" :disabled="true">
                    已完成
                </u-button>
            </view>
        </view>
        <u-popup v-model="showIn" mode="bottom" border-radius="14" z-index='1000001' :mask-close-able="true">
pages/myself/myself.vue
@@ -16,7 +16,7 @@
                    <view class="dept-name">所属部门:&nbsp;{{deptName}}</view>
                </view>
            </view>
        </view>
        </view>
        <view class="bomBut">
            <!-- <view class="attendance-btn">
                <view class="attendance-info"  @click="goToAttendance()">
@@ -105,10 +105,10 @@
                    },
                ],
                tabbar:this.$store.state.tabbar,
                name:'',
                id:'',
                deptName:''
                tabbar: this.$store.state.tabbar,
                name: '',
                id: '',
                deptName: ''
            }
        },
        components: {
@@ -123,42 +123,42 @@
            }
        },
        onLoad() {
            if(this.$store.state.puserID){
            if (this.$store.state.puserID) {
                //获取个人信息
                this.getOneselfInFo();
            }
            if(this.$store.state.avatar!=null && this.$store.state.avatar!=''){
            if (this.$store.state.avatar != null && this.$store.state.avatar != '') {
                this.useimg = this.$store.state.avatar;
            }
        },
        //子页面返回时执行
        onShow() {
        },
        methods: {
            goToAttendance(){
                if(this.$store.state.UserData.stype != "1"){
            goToAttendance() {
                if (this.$store.state.UserData.stype != "1") {
                    this.$refs.uToast.show({
                        title: '功能暂未开放',
                        type: 'warning',
                    });
                    return;
                }
                uni.navigateTo({
                    url:'../clockSignIn/clockSignIn'
                    url: '../clockSignIn/clockSignIn'
                })
            },
            openThere(fn) {
                this[fn]();
            },
            collect(){
            collect() {
                uni.navigateTo({
                    url: './childen/collect',
                })
            },
            chenzs(){
            chenzs() {
                uni.navigateTo({
                    url: '../shengzs/index',
                })
@@ -205,17 +205,17 @@
                });
            },
            //登录成功后,获取个人信息
            getOneselfInFo(){
            getOneselfInFo() {
                var that = this;
                //保安信息查询
                uni.request({
                    url:that.$store.state.piAPI + '/blade-user/details?id='+this.$store.state.puserID,
                    method:'POST',
                    url: that.$store.state.piAPI + '/blade-user/details?id=' + this.$store.state.puserID,
                    method: 'POST',
                    success(resdata) {
                        that.name = resdata.data.data.realName;
                        that.id = resdata.data.data.id;
                        var dept = resdata.data.data.deptName;
                        if(dept !=null && dept !=""){
                        if (dept != null && dept != "") {
                            var name = dept.split(",");
                            that.deptName = name[name.length - 1];
                        }
@@ -240,21 +240,21 @@
                var that = this;
                uni.showActionSheet({
                    // itemList按钮的文字接受的是数组
                    itemList: ["查看头像","拍摄","从相册选择"],
                    success(e){
                    itemList: ["查看头像", "拍摄", "从相册选择"],
                    success(e) {
                        var index = e.tapIndex;
                        if(index == 0){
                        if (index == 0) {
                            // 用户点击了预览当前图片
                            // 可以自己实现当前头像链接的读取
                            let url  = that.useimg;
                            let arr=[]
                            arr.push(url)
                            uni.previewImage({
                            let url = that.useimg;
                            let arr = []
                            arr.push(url)
                            uni.previewImage({
                                // 预览功能图片也必须是数组的
                                urls: arr
                            })
                            })
                        }
                        if(index == 1 || index==2 ){
                        if (index == 1 || index == 2) {
                            //拍照或从图库上传
                            that.uploadPictrue(index);
                        }
@@ -262,50 +262,51 @@
                });
            },
            //图片上传
            uploadPictrue(e){
            uploadPictrue(e) {
                var that = this;
                var sourceTypeArr = [];
                e==1 ? sourceTypeArr.push("camera") : sourceTypeArr.push("album")
                e == 1 ? sourceTypeArr.push("camera") : sourceTypeArr.push("album")
                uni.chooseImage({
                    count: 1, //可选择数量,默认9
                    sizeType: ['compressed','original'], //上传压缩图,原图
                    sizeType: ['compressed', 'original'], //上传压缩图,原图
                    sourceType: sourceTypeArr, //从相册选择
                    success: async (res) => {
                        if(res.tempFiles[0].size > 10 * 1024 * 1000){  //上传图片大小限制
                        if (res.tempFiles[0].size > 10 * 1024 * 1000) { //上传图片大小限制
                            uni.showToast({
                                title: "照片大小不能10MB",
                                title: "照片大小不能10MB",
                                icon: "none"
                            })
                            return
                        }
                        var tempFilePath = res.tempFilePaths;
                        try{
                        try {
                            uni.showLoading({
                                title:"上传中...",
                                mask:true
                                title: "上传中...",
                                mask: true
                            })
                            // 文件上传
                            uni.uploadFile({
                                // url: 'https://web.byisf.com/api/depl/put-depl', //仅为示例,非真实的接口地址
                                url: that.$store.state.piAPI+'/depl/put-depl',
                                url: that.$store.state.piAPI + '/depl/put-depl',
                                filePath: tempFilePath[0],
                                name: 'file',
                                formData: {
                                    'user': 'test'  // 上传附带参数
                                    'user': 'test' // 上传附带参数
                                },
                                success: (data) => {
                                    that.useimg = JSON.parse(data.data).data;
                                    that.$store.state.avatar = that.useimg;
                                    //修改用户头像信息
                                    uni.request({
                                        url:that.$store.state.piAPI + "/blade-user/updateUserInfo",
                                        method:"POST",
                                        data:{
                                        url: that.$store.state.piAPI +
                                            "/blade-user/updateUserInfo",
                                        method: "POST",
                                        data: {
                                            id: that.$store.state.puserID,
                                            avatar:that.useimg
                                            avatar: that.useimg
                                        },
                                        success:(res)=> {
                                            if(res.data.code==200){
                                        success: (res) => {
                                            if (res.data.code == 200) {
                                                uni.showToast({
                                                    title: '上传成功!',
                                                    duration: 2000
@@ -315,9 +316,9 @@
                                    })
                                }
                            });
                        }catch(e){
                        } catch (e) {
                            console.log(e);
                        }finally{
                        } finally {
                            uni.hideLoading();
                        }
                    }
@@ -327,7 +328,7 @@
    }
</script>
<style>
    page{
    page {
        width: 100%;
        height: 100%;
        background-color: #F7F7F7;
@@ -335,10 +336,10 @@
</style>
<style lang="scss" scoped>
    $imgSize: 1.2rem;
    .m-top,
    .my-user-info,
    .user-name-id{
    .user-name-id {
        display: flex;
    }
@@ -360,18 +361,18 @@
                height: 6rem;
                align-items: center;
                // border: 1px solid #007AFF;
                .user-name-id{
                .user-name-id {
                    flex-direction: column;
                    justify-content: center;
                    .user-name{
                    .user-name {
                        font-size: 1.5rem;
                        letter-spacing: 1rpx;
                    }
                    .user-id{
                    .user-id {
                        font-size: 0.6rem;
                        color: #fff;
                        margin-top: 0.3rem;
@@ -396,17 +397,17 @@
                margin: 0 auto;
                height: 2.4rem;
                background-image: linear-gradient(to bottom, #103289, #174cd1);
                box-shadow:0 0 0.1px 0.1px #0BB9C8;
                box-shadow: 0 0 0.1px 0.1px #0BB9C8;
                // border: 1px solid #00ff00;
                .dept-info{
                .dept-info {
                    width: 92%;
                    height: 1.8rem;
                    line-height: 1.8rem;
                    margin-left: 0.6rem;
                    margin-top: 0.3rem;
                    background-image: linear-gradient(to bottom, #103289, #174cd1);
                    .dept-name {
                        margin-left: 0.3rem;
                    }
@@ -422,13 +423,13 @@
            border-radius: 2px;
            margin-top: -2.5rem;
            background-color: #fff;
            .attendance-btn{
            .attendance-btn {
                width: 100%;
                height: 6.1rem;
                border-bottom: 2px solid rgba($color: #F7F7F7, $alpha:0.8);
                .attendance-info{
                .attendance-info {
                    width: 7rem;
                    height: 100%;
                    // background-color: #007AFF;
@@ -436,13 +437,13 @@
                    align-items: center;
                    justify-content: center;
                    flex-direction: column;
                    image{
                    image {
                        width: 3.5rem;
                        height: 3.2rem;
                    }
                    .attendance-title{
                    .attendance-title {
                        margin-top: 0.3rem;
                        font-weight: 550;
                    }
@@ -475,8 +476,8 @@
                        font-size: 0.9rem;
                    }
                }
                image{
                image {
                    margin-right: 1rem;
                }
            }