|
@@ -17,7 +17,7 @@
|
|
|
<el-radio-group v-model="startType">
|
|
|
<template v-for="(o) in typeList" :key="o">
|
|
|
<el-menu-item style="width: 250px">
|
|
|
- <el-radio :value="o" :label="o" border>{{ o.typeName }}</el-radio>
|
|
|
+ <el-radio @click="getScoreStatus(o.id)" :value="o" :label="o" border>{{ o.typeName }}</el-radio>
|
|
|
<br/>
|
|
|
</el-menu-item>
|
|
|
</template>
|
|
@@ -28,25 +28,30 @@
|
|
|
|
|
|
</el-aside>
|
|
|
<el-main>
|
|
|
- <el-row style="background-color: #ffffff;min-width: 840px">
|
|
|
- <el-col :span="8" style="padding: 20px;">
|
|
|
+ <el-row :style="'min-width: 840px;background-color:'+(scoreStatus.status?'#b6f1bf':'#ffffff')">
|
|
|
+ <el-col :span="6" style="padding: 20px;" >
|
|
|
<el-card style="height: 100px;">
|
|
|
总作品数量
|
|
|
{{ scoreStatus.all }}
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
- <el-col :span="8" style="padding: 20px;">
|
|
|
+ <el-col :span="6" style="padding: 20px;">
|
|
|
<el-card style="height: 100px;">
|
|
|
已评作品数量
|
|
|
{{ scoreStatus.finish }}
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
- <el-col :span="8" style="padding: 20px;">
|
|
|
+ <el-col :span="6" style="padding: 20px;">
|
|
|
<el-card style="height: 100px;">
|
|
|
未评作品数量
|
|
|
{{ scoreStatus.remain }}
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
+ <el-col :span="6" style="padding: 20px;">
|
|
|
+ <el-card style="height: 100px;">
|
|
|
+ {{ scoreStatus.status?"已提交审核":"未提交审核" }}
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
<div style="font-size: 30px;margin-top: 15px;text-align: center">
|
|
|
当前选择评卷类别:{{ startType.typeName }}
|
|
@@ -91,10 +96,10 @@
|
|
|
text-color="#000"
|
|
|
>
|
|
|
<el-radio-group v-model="lookWorkOne">
|
|
|
- <template v-for="(o) in workList" :key="o">
|
|
|
+ <template v-for="(o,i) in workList" :key="o">
|
|
|
<el-menu-item
|
|
|
:style="'width: 250px;background-color:'+(o.scoreDO.score!==null?'#b6f1bf':'#ffffff')">
|
|
|
- <el-radio @click="lookWork(o)" :value="o" :label="o" border>{{
|
|
|
+ <el-radio @click="lookWork(o,i)" :value="o" :label="o" border>{{
|
|
|
o.workName
|
|
|
}}
|
|
|
</el-radio>
|
|
@@ -111,11 +116,14 @@
|
|
|
|
|
|
<el-header style="justify-content:center; display: flex;height: 30px">
|
|
|
<el-radio-group size="large" v-model="tabPosition" style="width: 800px;margin-top: 10px">
|
|
|
- <el-radio-button value="当前作品" @click="scrollToSection('chapter1')" style="height: 20px">作品名称
|
|
|
+ <el-radio-button value="当前作品" @click="scrollToSection('chapter1')"
|
|
|
+ style="height: 20px">作品名称
|
|
|
</el-radio-button>
|
|
|
- <el-radio-button value="作品详情" @click="scrollToSection('chapter3') " style="height: 20px">作品详情
|
|
|
+ <el-radio-button value="作品详情" @click="scrollToSection('chapter3') "
|
|
|
+ style="height: 20px">作品详情
|
|
|
</el-radio-button>
|
|
|
- <el-radio-button value="文稿材料" @click="scrollToSection('chapter2')" style="height: 20px">文稿/材料
|
|
|
+ <el-radio-button value="文稿材料" @click="scrollToSection('chapter2')"
|
|
|
+ style="height: 20px">文稿/材料
|
|
|
</el-radio-button>
|
|
|
</el-radio-group>
|
|
|
</el-header>
|
|
@@ -132,18 +140,19 @@
|
|
|
|
|
|
<div id="chapter1">
|
|
|
<el-tag type="primary" size="large">作品名称</el-tag>
|
|
|
-<!-- <el-card style="width: 100%;margin-top: 10px;margin-bottom: 10px"-->
|
|
|
-<!-- shadow="always">-->
|
|
|
-<!-- 作品名称-->
|
|
|
-<!-- </el-card>-->
|
|
|
+ <!-- <el-card style="width: 100%;margin-top: 10px;margin-bottom: 10px"-->
|
|
|
+ <!-- shadow="always">-->
|
|
|
+ <!-- 作品名称-->
|
|
|
+ <!-- </el-card>-->
|
|
|
</div>
|
|
|
|
|
|
- <el-card style="width: 100%;margin-top: 10px;margin-bottom: 10px;text-align: center"
|
|
|
- shadow="always">
|
|
|
- {{ file.workName }}
|
|
|
- </el-card>
|
|
|
+ <el-card
|
|
|
+ style="width: 100%;margin-top: 10px;margin-bottom: 10px;text-align: center"
|
|
|
+ shadow="always">
|
|
|
+ {{ file.workName }}
|
|
|
+ </el-card>
|
|
|
<el-tag id="chapter3" type="primary" size="large">作品详情</el-tag>
|
|
|
- <el-card style="width: 100%;margin-top: 10px;margin-bottom: 10px" shadow="always">
|
|
|
+ <el-card style="width: 100%;margin-top: 10px;margin-bottom: 10px" shadow="always">
|
|
|
<div style="max-width: 800px">
|
|
|
<audio v-if="file.format==='mp3'" :src="file.url" controls>
|
|
|
</audio>
|
|
@@ -166,14 +175,17 @@
|
|
|
{{
|
|
|
file.manuscriptAndMaterial.split("/")[file.manuscriptAndMaterial.split("/").length - 1]
|
|
|
}}
|
|
|
- <el-divider />
|
|
|
+ <el-divider/>
|
|
|
<el-scrollbar v-if="file.manuscriptAndMaterial!==''"
|
|
|
style="max-width: 850px;max-height: 1000px;overflow-y: auto;">
|
|
|
- <div v-if="file.manuscriptAndMaterial.substring(file.manuscriptAndMaterial.lastIndexOf('.') + 1, file.manuscriptAndMaterial.length)==='pdf'">
|
|
|
- <VueOfficePdf :src="file.manuscriptAndMaterial" style="height: 670px"/>
|
|
|
+ <div
|
|
|
+ v-if="file.manuscriptAndMaterial.substring(file.manuscriptAndMaterial.lastIndexOf('.') + 1, file.manuscriptAndMaterial.length)==='pdf'">
|
|
|
+ <VueOfficePdf :src="file.manuscriptAndMaterial" style="height: 670px"/>
|
|
|
</div>
|
|
|
- <div v-if="file.manuscriptAndMaterial.substring(file.manuscriptAndMaterial.lastIndexOf('.') + 1, file.manuscriptAndMaterial.length)==='doc' ||file.manuscriptAndMaterial.substring(file.manuscriptAndMaterial.lastIndexOf('.') + 1, file.manuscriptAndMaterial.length)==='docx'">
|
|
|
- <iframe :src="yulanData.yulandz+file.manuscriptAndMaterial" width="100%" height="670px"></iframe>
|
|
|
+ <div
|
|
|
+ v-if="file.manuscriptAndMaterial.substring(file.manuscriptAndMaterial.lastIndexOf('.') + 1, file.manuscriptAndMaterial.length)==='doc' ||file.manuscriptAndMaterial.substring(file.manuscriptAndMaterial.lastIndexOf('.') + 1, file.manuscriptAndMaterial.length)==='docx'">
|
|
|
+ <iframe :src="yulanData.yulandz+file.manuscriptAndMaterial" width="100%"
|
|
|
+ height="670px"></iframe>
|
|
|
</div>
|
|
|
</el-scrollbar>
|
|
|
</el-card>
|
|
@@ -193,8 +205,8 @@
|
|
|
<el-form-item label="附加分" style="margin-top: 20px">
|
|
|
<el-input
|
|
|
|
|
|
- @change="submitScope"
|
|
|
- placeholder="请输入分数(未启用)" disabled/>
|
|
|
+ @change="submitScope"
|
|
|
+ placeholder="请输入分数(未启用)" disabled/>
|
|
|
</el-form-item>
|
|
|
</el-row>
|
|
|
<el-row style="margin-top: 20px">
|
|
@@ -415,15 +427,15 @@ const startDraw = (x, y) => {
|
|
|
const handleClear = () => {
|
|
|
ctx.value.clearRect(0, 0, 1000, 500)
|
|
|
}
|
|
|
-const handleSave = () => {
|
|
|
+const handleSave = async () => {
|
|
|
formLoading.value = true
|
|
|
const base64 = canvas.value.toDataURL()
|
|
|
uploadBase64Image(base64)
|
|
|
try {
|
|
|
const data = formDataScope.value as unknown as ScoreVO
|
|
|
|
|
|
- ScoreApi.updateScoreStatus(data)
|
|
|
- message.success(t('common.updateSuccess'))
|
|
|
+ await ScoreApi.updateScoreStatus(data)
|
|
|
+ message.success("提交成功")
|
|
|
|
|
|
file.value.score = formDataScope.value.score
|
|
|
visible.value = false
|
|
@@ -435,7 +447,7 @@ const handleSave = () => {
|
|
|
file.value = {score: undefined, workName: "", manuscriptAndMaterial: "", format: "", url: ""}
|
|
|
workList.value = undefined
|
|
|
}
|
|
|
- getScoreStatus()
|
|
|
+
|
|
|
getTypeList()
|
|
|
getList()
|
|
|
}
|
|
@@ -491,7 +503,7 @@ const returnScope = () => {
|
|
|
|
|
|
/** 下一个 */
|
|
|
const nextScope = () => {
|
|
|
- if (indexScore.value+1 === workList.value.length) {
|
|
|
+ if (indexScore.value + 1 === workList.value.length) {
|
|
|
return
|
|
|
}
|
|
|
indexScore.value++
|
|
@@ -500,17 +512,19 @@ const nextScope = () => {
|
|
|
formDataScope.value.id = undefined
|
|
|
getWorkLists()
|
|
|
}
|
|
|
-/** 状态获取 */
|
|
|
-const subScoreInfoStatus = () => {
|
|
|
+/** 提交 */
|
|
|
+const subScoreInfoStatus = async () => {
|
|
|
+ await getWorkLists()
|
|
|
+
|
|
|
let j = 0
|
|
|
for (let i = 0; i < workList.value.length; i++) {
|
|
|
if (workList.value[i].scoreDO.score !== null) {
|
|
|
j++
|
|
|
}
|
|
|
}
|
|
|
- if (j===workList.value.length){
|
|
|
+ if (j === workList.value.length) {
|
|
|
visible.value = true
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
ElMessageBox.alert('作品并没有打分完毕', '提示', {
|
|
|
confirmButtonText: 'OK'
|
|
|
})
|
|
@@ -634,8 +648,11 @@ const list = ref<ScoreVO[]>([]) // 列表的数据
|
|
|
const scoreStatus = ref({
|
|
|
all: 0,
|
|
|
finish: 0,
|
|
|
- remain: 0
|
|
|
-}) // 个人评分统计
|
|
|
+ remain: 0,
|
|
|
+ status: false
|
|
|
+})
|
|
|
+
|
|
|
+// 个人评分统计
|
|
|
const typeList = ref([]) // 列表的数据
|
|
|
const total = ref(0) // 列表的总页数
|
|
|
const queryParams = reactive({//评分查询参数
|
|
@@ -672,7 +689,8 @@ const handleNodeClick = () => {
|
|
|
}
|
|
|
|
|
|
/** 评分查看作品内容 */
|
|
|
-const lookWork = (value) => {
|
|
|
+const lookWork = (value,i) => {
|
|
|
+ indexScore.value=i
|
|
|
file.value = {score: undefined, workName: "", manuscriptAndMaterial: "", format: "", url: ""}
|
|
|
console.log(value)
|
|
|
file.value.format = value.format
|
|
@@ -693,6 +711,8 @@ const getTypeList = async () => {
|
|
|
try {
|
|
|
const datas = await TypeApi.getScoreTreeList(typeQueryParams)
|
|
|
typeList.value = handleTreeAll(datas)
|
|
|
+
|
|
|
+ getScoreStatus(typeList.value[0].id)
|
|
|
// list.value = data.list
|
|
|
} finally {
|
|
|
loading.value = false
|
|
@@ -750,6 +770,14 @@ const getWorkLists = async () => {
|
|
|
try {
|
|
|
const data = await workApi.getworkList(workQueryParams)
|
|
|
workList.value = data.list
|
|
|
+ if (workList.value.length==1&&workList.value[0].scoreDO===null){
|
|
|
+ ElMessage({
|
|
|
+ message: '作品已经全部提交,请勿重复评分!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ loading.value = false
|
|
|
+ return
|
|
|
+ }
|
|
|
if (workList.value.length > 0) {
|
|
|
lookWorkOne.value = workList.value[indexScore.value]
|
|
|
file.value.format = workList.value[indexScore.value].format
|
|
@@ -761,9 +789,9 @@ const getWorkLists = async () => {
|
|
|
formDataScope.value.id = workList.value[indexScore.value].scoreDO.id
|
|
|
formDataScope.value.workId = workList.value[indexScore.value].workId
|
|
|
pageAndPage.value = 1
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
ElMessage({
|
|
|
- message: '当前类别没有您要评的作品!',
|
|
|
+ message: '本次上传作品为空!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
}
|
|
@@ -783,10 +811,10 @@ const getList = async () => {
|
|
|
}
|
|
|
}
|
|
|
/** 查询列表 */
|
|
|
-const getScoreStatus = async () => {
|
|
|
+const getScoreStatus = async (id:number) => {
|
|
|
loading.value = true
|
|
|
try {
|
|
|
- const data = await ScoreApi.getScoreStatus()
|
|
|
+ const data = await ScoreApi.getScoreStatus(id)
|
|
|
scoreStatus.value = data
|
|
|
console.log(scoreStatus.value)
|
|
|
console.log(data)
|
|
@@ -816,7 +844,7 @@ const formDataScope = ref({
|
|
|
url: undefined
|
|
|
})
|
|
|
/** 添加/修改操作 */
|
|
|
-const submitScope = async () => {
|
|
|
+const submitScope = async (type: true) => {
|
|
|
if (file.value.score === null) {
|
|
|
formType.value = 'create'
|
|
|
} else {
|
|
@@ -831,16 +859,22 @@ const submitScope = async () => {
|
|
|
const data = formDataScope.value as unknown as ScoreVO
|
|
|
if (formType.value === 'create') {
|
|
|
formDataScope.value.id = await ScoreApi.createScore(data)
|
|
|
- message.success(t('common.createSuccess'))
|
|
|
+ if (type) {
|
|
|
+ message.success(t('common.createSuccess'))
|
|
|
+ }
|
|
|
} else {
|
|
|
await ScoreApi.updateScore(data)
|
|
|
- message.success(t('common.updateSuccess'))
|
|
|
+ if (type) {
|
|
|
+ message.success(t('common.updateSuccess'))
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
file.value.score = formDataScope.value.score
|
|
|
dialogVisible.value = false
|
|
|
// 发送操作成功的事件
|
|
|
emit('success')
|
|
|
} finally {
|
|
|
+ await getWorkLists()
|
|
|
formLoading.value = false
|
|
|
}
|
|
|
}
|
|
@@ -878,7 +912,6 @@ const handleExport = async () => {
|
|
|
onMounted(() => {
|
|
|
getTypeList()
|
|
|
getList()
|
|
|
- getScoreStatus()
|
|
|
})
|
|
|
</script>
|
|
|
<style>
|