|
@@ -102,8 +102,10 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <BindLabModal
|
|
|
|
|
- :visible="showBindLabModal"
|
|
|
|
|
|
|
+ <BindLabModal
|
|
|
|
|
+ :visible="showBindLabModal"
|
|
|
|
|
+ :off-type="bindLabOffType"
|
|
|
|
|
+ :education-type="userInfo.educationType"
|
|
|
@close="showBindLabModal = false"
|
|
@close="showBindLabModal = false"
|
|
|
@bind-success="refreshPageData"
|
|
@bind-success="refreshPageData"
|
|
|
/>
|
|
/>
|
|
@@ -141,83 +143,45 @@
|
|
|
studyHourRate: '',
|
|
studyHourRate: '',
|
|
|
targetExamName: '',
|
|
targetExamName: '',
|
|
|
},
|
|
},
|
|
|
- showBindLabModal:true,
|
|
|
|
|
|
|
+ showBindLabModal: false,
|
|
|
|
|
+ bindLabOffType: true,
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
- this.examElLabEduRelationBindStatus();
|
|
|
|
|
|
|
+ this.loadUserInfo();
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- // 绑定成功后的回调
|
|
|
|
|
refreshPageData() {
|
|
refreshPageData() {
|
|
|
- // 重新获取用户信息或刷新页面数据
|
|
|
|
|
- this.examElLabEduRelationBindStatus();
|
|
|
|
|
|
|
+ this.loadUserInfo();
|
|
|
},
|
|
},
|
|
|
handleExamClick() {
|
|
handleExamClick() {
|
|
|
- // 这里写跳转到考试详情页的逻辑
|
|
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
|
- url: '/pages_safetyEducationExamination/screen-exam-detail/screen-exam-detail' // 根据实际路径修改
|
|
|
|
|
|
|
+ url: '/pages_safetyEducationExamination/views/exam/index',
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- // 获取用户信息
|
|
|
|
|
- async examElLabEduRelationBindStatus() {
|
|
|
|
|
- const {
|
|
|
|
|
- data
|
|
|
|
|
- } = await examElLabEduRelationBindStatus({});
|
|
|
|
|
|
|
+ async loadUserInfo() {
|
|
|
|
|
+ const { data } = await examElLabEduRelationBindStatus({});
|
|
|
if (data.code == 200) {
|
|
if (data.code == 200) {
|
|
|
- // 使用 Object.assign 保留默认值,同时更新接口返回的数据
|
|
|
|
|
- // Object.assign(this.userInfo, data.data);
|
|
|
|
|
- this.$set(this,'userInfo',data.data);
|
|
|
|
|
|
|
+ this.$set(this, 'userInfo', data.data);
|
|
|
|
|
+ if (data.data.isPopup) {
|
|
|
|
|
+ this.bindLabOffType = false;
|
|
|
|
|
+ this.showBindLabModal = true;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- //关闭弹层
|
|
|
|
|
- shadeButton(type){
|
|
|
|
|
- let self = this;
|
|
|
|
|
- if(type == 1){
|
|
|
|
|
- //提交
|
|
|
|
|
- this.$refs["shadeForm"].validate(valid => {
|
|
|
|
|
- if (valid) {
|
|
|
|
|
- this.$confirm('确认提交?', "提示", {
|
|
|
|
|
- confirmButtonText: "确认",
|
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
|
- type: "warning"
|
|
|
|
|
- }).then(function() {
|
|
|
|
|
- }).then(() => {
|
|
|
|
|
- self.examElLabEduRelationBind();
|
|
|
|
|
- }).catch(() => {});
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- }else if(type == 2){
|
|
|
|
|
- //查看通知
|
|
|
|
|
- this.$set(this,'shadeType',2);
|
|
|
|
|
- }else if(type == 3 || type == 33){
|
|
|
|
|
- if(type == 3){
|
|
|
|
|
- //关闭通知
|
|
|
|
|
- this.$set(this.shadeFormData,'checkType',true);
|
|
|
|
|
- this.$set(this,'shadeType',1);
|
|
|
|
|
- }else if(type == 33){
|
|
|
|
|
- //关闭通知
|
|
|
|
|
- this.$set(this.shadeFormData,'checkType',false);
|
|
|
|
|
- this.$set(this,'shadeType',1);
|
|
|
|
|
- }
|
|
|
|
|
- }else if(type == 4||type == 5){
|
|
|
|
|
- //开启
|
|
|
|
|
- this.$set(this,'shadeFormData',{
|
|
|
|
|
- subId:null,
|
|
|
|
|
- reason:'',
|
|
|
|
|
- isEnter:false,
|
|
|
|
|
- checkType:false,
|
|
|
|
|
- offType:type == 4?true:false,
|
|
|
|
|
- });
|
|
|
|
|
- this.$set(this,'shadeType',1);
|
|
|
|
|
- }else if(type == 6){
|
|
|
|
|
- //关闭
|
|
|
|
|
- this.$set(this,'shadeType',null);
|
|
|
|
|
|
|
+ shadeButton(type) {
|
|
|
|
|
+ if (type == 4) {
|
|
|
|
|
+ this.bindLabOffType = true;
|
|
|
|
|
+ this.showBindLabModal = true;
|
|
|
|
|
+ } else if (type == 5) {
|
|
|
|
|
+ this.bindLabOffType = false;
|
|
|
|
|
+ this.showBindLabModal = true;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-</script>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ </script>
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
|
<style lang="stylus" scoped>
|
|
|
.safetyEducationExamination-workbench-userInfoCard {
|
|
.safetyEducationExamination-workbench-userInfoCard {
|
|
@@ -353,6 +317,7 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.lab-name {
|
|
.lab-name {
|
|
|
|
|
+ width: 400rpx;
|
|
|
font-weight: 500;
|
|
font-weight: 500;
|
|
|
color: #1857d4;
|
|
color: #1857d4;
|
|
|
font-size: 28rpx;
|
|
font-size: 28rpx;
|