|
|
@ -53,9 +53,14 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
<a-form-item class="text-right"> |
|
|
|
<a-button type="primary" html-type="submit" @click="onSubmit">确定</a-button> |
|
|
|
<a-button type="primary" html-type="submit" @click="onSubmit" :disabled="expreStatus == 0 || expreStatus == 2 ? false : true"> |
|
|
|
确定 |
|
|
|
</a-button> |
|
|
|
</a-form-item> |
|
|
|
</a-form> |
|
|
|
|
|
|
|
<a-alert v-if="isShowSuccess" :message="tipsMessage" type="success" /> |
|
|
|
<a-alert v-if="isShowWarning" :message="tipsMessage" type="warning" /> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
@ -79,10 +84,38 @@ const code = computed(() => store.state.task.label); // code |
|
|
|
const questionList = ref([]); |
|
|
|
// 当前操作的问题下标 |
|
|
|
const currIndex = ref(null); |
|
|
|
|
|
|
|
const isShowSuccess = ref(false); |
|
|
|
const isShowWarning = ref(false); |
|
|
|
const tipsMessage = ref(''); |
|
|
|
|
|
|
|
// 实验起止时间 |
|
|
|
const expreStartTime = computed(() => store.state.layout.expreStartTime); |
|
|
|
const expreEndTime = computed(() => store.state.layout.expreEndTime); |
|
|
|
|
|
|
|
// 试验状态 |
|
|
|
const expreStatus = computed(() => store.state.projects.expreStatus); |
|
|
|
const sessionStatus = sessionStorage.getItem('expreStatus'); |
|
|
|
|
|
|
|
if (!expreStatus.value && sessionStatus) { |
|
|
|
store.commit('projects/setExpreimentStatus', sessionStatus); |
|
|
|
} |
|
|
|
|
|
|
|
if (expreStatus.value) { |
|
|
|
if (expreStatus.value === 1 || expreStatus.value === 3 || expreStatus.value === 4) { |
|
|
|
isShowWarning.value = true; |
|
|
|
tipsMessage.value = '数据已锁定,不可操作'; |
|
|
|
} else { |
|
|
|
isShowSuccess.value = true; |
|
|
|
tipsMessage.value = '数据未锁定,可操作'; |
|
|
|
} |
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
isShowWarning.value = false; |
|
|
|
isShowSuccess.value = false; |
|
|
|
}, 3000); |
|
|
|
} |
|
|
|
|
|
|
|
getDataByCode(); |
|
|
|
|
|
|
|
const beforeUpload = index => { |
|
|
@ -215,6 +248,15 @@ async function getDataByCode() { |
|
|
|
</script> |
|
|
|
|
|
|
|
<style scoped> |
|
|
|
.task-form { |
|
|
|
position: relative; |
|
|
|
} |
|
|
|
|
|
|
|
.task-form :deep(.ant-alert) { |
|
|
|
position: absolute; |
|
|
|
right: 30px; |
|
|
|
} |
|
|
|
|
|
|
|
.task-detail { |
|
|
|
background-color: #fff; |
|
|
|
} |
|
|
|