|
@@ -15,17 +15,19 @@
|
|
|
</div>
|
|
|
</mark-header>
|
|
|
<div class="flex-1 overflow-hidden p-base mark-container">
|
|
|
+ <div v-if="!enableRemark && !currentTask" class="waiting flex justify-center items-center">等待组长审核</div>
|
|
|
<div
|
|
|
+ v-else
|
|
|
class="p-base radius-base full fill-blank scroll-auto mark-content"
|
|
|
:style="{ 'background-color': backgroundColor }"
|
|
|
>
|
|
|
- <span v-if="currentTask" class="mark-status">
|
|
|
+ <span class="mark-status">
|
|
|
<img :src="statusIcon" alt="" />
|
|
|
</span>
|
|
|
- <span v-if="currentTask" class="preview" @click="onPreview">
|
|
|
+ <span class="preview" @click="onPreview">
|
|
|
<svg-icon name="preview"></svg-icon>
|
|
|
</span>
|
|
|
- <div v-if="currentTask" :class="{ 'text-center': center }" class="img-wrap">
|
|
|
+ <div :class="{ 'text-center': center }" class="img-wrap">
|
|
|
<img :src="dataUrl" alt="" class="paper-img" :style="{ 'background-color': frontColor }" />
|
|
|
</div>
|
|
|
</div>
|
|
@@ -116,7 +118,7 @@ const currentTaskType = ref<TaskType>('FORMAL')
|
|
|
const statusIcon = computed(() => {
|
|
|
return markStatusIcon[currentTaskType.value] || markStatusIcon.default
|
|
|
})
|
|
|
-
|
|
|
+const enableRemark = ref(true)
|
|
|
const {
|
|
|
rotate,
|
|
|
scale,
|
|
@@ -157,7 +159,7 @@ const { fetch: getMarkingTask, loading } = useFetch('getMarkingTask')
|
|
|
const { fetch: submitMarkTask, loading: submitting } = useFetch('submitMarkTask')
|
|
|
const { fetch: getMarkStatus, result: markStatus } = useFetch('getMarkStatus')
|
|
|
|
|
|
-const historyTaskChange = (task: HistoryTaskType) => {
|
|
|
+const historyTaskChange = (task: any) => {
|
|
|
let saveTargetTask = unref(currentTask)
|
|
|
console.log('saveTargetTask:', saveTargetTask)
|
|
|
if (currentTaskType.value != 'remarking') {
|
|
@@ -274,7 +276,7 @@ const onSubmitSimilar = async () => {
|
|
|
return
|
|
|
}
|
|
|
const markHistory = await useFetch('getMarkHistory').fetch()
|
|
|
- if (!markHistory.length) {
|
|
|
+ if (!markHistory.markHistoryList.length) {
|
|
|
return ElMessage.warning('暂无评卷记录')
|
|
|
}
|
|
|
return push({
|
|
@@ -378,7 +380,16 @@ const onRefresh = async (refreshToNext?: boolean) => {
|
|
|
|
|
|
/** 回评 */
|
|
|
const onRemark = () => {
|
|
|
- remarkModalVisible.value = true
|
|
|
+ // remarkModalVisible.value = true
|
|
|
+ useFetch('getMarkHistory')
|
|
|
+ .fetch()
|
|
|
+ .then((markHistoryRes: any) => {
|
|
|
+ if (!markHistoryRes.enableRemark) {
|
|
|
+ ElMessage.warning('审核中,暂时无法回评')
|
|
|
+ } else {
|
|
|
+ remarkModalVisible.value = true
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
/** 设置问题卷 */
|
|
@@ -423,13 +434,24 @@ const imgOption = computed<SetImgBgOption>(() => {
|
|
|
|
|
|
const { drawing, dataUrl } = useSetImgBg(imgOption, frontColor, setFrontColor)
|
|
|
|
|
|
+const getEnableRemark = () => {
|
|
|
+ useFetch('getMarkHistory')
|
|
|
+ .fetch()
|
|
|
+ .then((markHistoryRes: any) => {
|
|
|
+ enableRemark.value = markHistoryRes.enableRemark
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
watch(currentTask, () => {
|
|
|
- getMarkStatus()
|
|
|
+ // getMarkStatus()
|
|
|
resume()
|
|
|
+ if (!currentTask.value) {
|
|
|
+ getEnableRemark()
|
|
|
+ }
|
|
|
})
|
|
|
|
|
|
onRefresh()
|
|
|
-
|
|
|
+getEnableRemark()
|
|
|
// bus.on('showStandard', () => {
|
|
|
// standardVisible.value = true
|
|
|
// })
|
|
@@ -437,6 +459,12 @@ onRefresh()
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
.mark-container {
|
|
|
+ .waiting {
|
|
|
+ background-color: #fff;
|
|
|
+ font-size: 80px;
|
|
|
+ color: #ccc;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
.mark-content {
|
|
|
position: relative;
|
|
|
|