|
|
@@ -20,7 +20,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="content_right">
|
|
|
- <el-button class="button_border" @click="GoToElectiveSubject" >更改科目班级</el-button>
|
|
|
+ <el-button v-if="isShowSelectSubject" :class="[isCurrentQuestionnaireTaskFinish ? 'is-disabled' : 'button_border']"
|
|
|
+ @click="isCurrentQuestionnaireTaskFinish ? '' : GoToElectiveSubject()" >更改科目班级</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -56,7 +57,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-import { ref, onMounted } from 'vue';
|
|
|
+import { ref, onMounted, computed } from 'vue';
|
|
|
import { useRouter } from 'vue-router';
|
|
|
import { subjectToColor,fillOutStatusToColor } from '@/components/commonDictConvert';
|
|
|
|
|
|
@@ -86,7 +87,21 @@ const remainTime = ref() //剩余时间
|
|
|
const teacherList = ref<TeacherItm[]>([]);
|
|
|
|
|
|
|
|
|
+// 当前问卷任务是否全部完成 ———— 以及问卷是否结束
|
|
|
+const isCurrentQuestionnaireTaskFinish = computed(()=>{
|
|
|
+ // 判断教师列表是否全部完成
|
|
|
+ return !(teacherList.value.find(teacher=>{
|
|
|
+ return (teacher.evaluationStatus === 0 || teacher.evaluationStatus === 1)
|
|
|
+ }))
|
|
|
+})
|
|
|
|
|
|
+// 当前问卷是否有选科
|
|
|
+const isShowSelectSubject = computed(()=>{
|
|
|
+ let userInfo = JSON.parse(localStorage.getItem('userInfo') || '{}')
|
|
|
+ return userInfo?.evaluationBO?.showSelectSubject
|
|
|
+})
|
|
|
+
|
|
|
+// 跳转到选科页面
|
|
|
const GoToElectiveSubject = ()=>{
|
|
|
router.push('/app/questionnaireElectiveSubject')
|
|
|
}
|
|
|
@@ -129,7 +144,12 @@ onMounted( async()=>{
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
background-color: #ffffff !important;
|
|
|
- padding:calc(16 * var(--app-rpx)) calc(12 * var(--app-rpx)) calc(90 * var(--app-rpx)) !important;
|
|
|
+
|
|
|
+ padding:calc(16 * var(--app-rpx))
|
|
|
+ calc(12 * var(--app-rpx))
|
|
|
+ // calc(90 * var(--app-rpx)) !important;
|
|
|
+ calc((90 + 44 + 84 + 10) * var(--app-rpx)) !important; /* 为底部按钮留出空间 */
|
|
|
+
|
|
|
|
|
|
.search_content{
|
|
|
.content_right{
|
|
|
@@ -242,14 +262,25 @@ onMounted( async()=>{
|
|
|
|
|
|
/* 底部区域 */
|
|
|
.bottom_action {
|
|
|
- margin-top: calc(84 * var(--app-rpx)) ;
|
|
|
- margin-bottom: calc(10 * var(--app-rpx)) ;
|
|
|
+ position: fixed;
|
|
|
+ bottom:0;
|
|
|
+ left: 0;
|
|
|
+ width: 100%;
|
|
|
+ padding-bottom: calc(10 * var(--app-rpx)) ;
|
|
|
+ background-color: white;
|
|
|
+
|
|
|
+
|
|
|
+ // position:relative 时 距离上部间距
|
|
|
+ // margin-top: calc(84 * var(--app-rpx)) ;
|
|
|
+ // margin-bottom: calc(10 * var(--app-rpx)) ;
|
|
|
+
|
|
|
+
|
|
|
flex: 1 1;
|
|
|
display: flex;
|
|
|
align-items: flex-end;
|
|
|
justify-content: center;
|
|
|
.button_background{
|
|
|
- width:calc(100% - 16 * var(--app-rpx));
|
|
|
+ width:calc(100vw - 40 * var(--app-rpx));
|
|
|
height: calc(44 * var(--app-rpx));
|
|
|
font-size: calc(16 * var(--app-rpx));
|
|
|
border-radius: calc(4 * var(--app-rpx));
|