|
@@ -85,8 +85,8 @@
|
|
<el-icon v-show="!skModule"><CaretRight /></el-icon>
|
|
<el-icon v-show="!skModule"><CaretRight /></el-icon>
|
|
赛课模块
|
|
赛课模块
|
|
</p>
|
|
</p>
|
|
- <el-alert title="上传作品时间已过" v-show="contest.upload.actState === 'finish'" type="warning" :closable="false" show-icon style="margin-top: 20px;" />
|
|
|
|
<div v-show="skModule">
|
|
<div v-show="skModule">
|
|
|
|
+ <el-alert title="上传作品时间已过" v-show="contest.upload.actState === 'finish'" type="warning" :closable="false" show-icon style="margin-top: 20px;" />
|
|
<div class="cipher-box" v-show="contest.sign.type">
|
|
<div class="cipher-box" v-show="contest.sign.type">
|
|
<p>队伍名称:{{ cipher.teamName }}</p>
|
|
<p>队伍名称:{{ cipher.teamName }}</p>
|
|
<p>队伍编号:{{ cipher.cipher }}</p>
|
|
<p>队伍编号:{{ cipher.cipher }}</p>
|
|
@@ -113,6 +113,11 @@
|
|
</el-tag>
|
|
</el-tag>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
+ <el-table-column label="分数" align="center" v-if="scoreData.levelStatus != -1">
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ {{ scope.row.myself ? scoreData.score : '无权限' }}
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
<el-table-column label="操作" align="center">
|
|
<el-table-column label="操作" align="center">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<el-button size="small" type="primary" @click="changeLeader(scope.$index, scope.row)" v-if="isLeader && !scope.row.myself">
|
|
<el-button size="small" type="primary" @click="changeLeader(scope.$index, scope.row)" v-if="isLeader && !scope.row.myself">
|
|
@@ -121,6 +126,9 @@
|
|
<el-button size="small" type="danger" @click="deleteMem(scope.$index, scope.row)" v-if="isLeader && !scope.row.myself && !scope.row.identity">
|
|
<el-button size="small" type="danger" @click="deleteMem(scope.$index, scope.row)" v-if="isLeader && !scope.row.myself && !scope.row.identity">
|
|
删除
|
|
删除
|
|
</el-button>
|
|
</el-button>
|
|
|
|
+ <el-button size="small" type="primary" v-if="scope.row.myself && scoreData.detailScore.length">
|
|
|
|
+ 查看得分
|
|
|
|
+ </el-button>
|
|
<el-button size="small" @click="exitAct(scope.$index, scope.row)" v-if="scope.row.myself">
|
|
<el-button size="small" @click="exitAct(scope.$index, scope.row)" v-if="scope.row.myself">
|
|
退出
|
|
退出
|
|
</el-button>
|
|
</el-button>
|
|
@@ -181,6 +189,32 @@
|
|
</el-scrollbar>
|
|
</el-scrollbar>
|
|
</template>
|
|
</template>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
|
|
+ <el-tab-pane label="成绩展示" name="score">
|
|
|
|
+ <el-scrollbar>
|
|
|
|
+ <el-table :data="contestScores" style="width: 100%">
|
|
|
|
+ <el-table-column prop="lable" label="奖项名称" align="center" width="200">
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ <p>{{ scope.row.lable }}</p>
|
|
|
|
+ <p>
|
|
|
|
+ <el-icon color="#ffd111" size="18" v-for="scores in scope.row.scores" :key="scores.tmdid"><Trophy /></el-icon>
|
|
|
|
+ </p>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="获奖人员" align="center">
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ <div class="score-box">
|
|
|
|
+ <div v-for="scores in scope.row.scores" :key="scores.tmdid">
|
|
|
|
+ <el-avatar :size="35" :src="scores.picture" />
|
|
|
|
+ <p style="font-size: 14px; margin-top: 5px;">
|
|
|
|
+ {{ scores.type ? scores.teamName : scores.name }}({{ scores.score }}分)
|
|
|
|
+ </p>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ </el-scrollbar>
|
|
|
|
+ </el-tab-pane>
|
|
<el-tab-pane label="活动信息" name="info">
|
|
<el-tab-pane label="活动信息" name="info">
|
|
<el-scrollbar>
|
|
<el-scrollbar>
|
|
<div style="margin-bottom: 20px;" class="sk-info">
|
|
<div style="margin-bottom: 20px;" class="sk-info">
|
|
@@ -236,11 +270,21 @@
|
|
</div>
|
|
</div>
|
|
<el-image-viewer v-else hide-on-click-modal @close="previewStatus = false" :url-list="[previewFile.urlShow]" />
|
|
<el-image-viewer v-else hide-on-click-modal @close="previewStatus = false" :url-list="[previewFile.urlShow]" />
|
|
</div>
|
|
</div>
|
|
|
|
+ <el-dialog v-model="uploadDia" title="上传作品" width="30%">
|
|
|
|
+ <p style="margin-bottom: 10px;">请为作品集取一个名称</p>
|
|
|
|
+ <el-input v-model="uploadName" placeholder="请输入" />
|
|
|
|
+ <template #footer>
|
|
|
|
+ <span class="dialog-footer">
|
|
|
|
+ <el-button @click="uploadDia = false">取消</el-button>
|
|
|
|
+ <el-button type="primary" @click="startUpload()">开始上传</el-button>
|
|
|
|
+ </span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
-import { Search, Delete, UserFilled, Clock, UploadFilled, CaretBottom, CaretRight, WarnTriangleFilled, DArrowRight, CloseBold, Warning, Filter } from '@element-plus/icons-vue'
|
|
|
|
|
|
+import { Search, Delete, UserFilled, Clock, UploadFilled, CaretBottom, CaretRight, WarnTriangleFilled, DArrowRight, CloseBold, Warning, Filter, Trophy } from '@element-plus/icons-vue'
|
|
import { ElMessageBox, ElMessage, FormRules, ElLoading } from 'element-plus'
|
|
import { ElMessageBox, ElMessage, FormRules, ElLoading } from 'element-plus'
|
|
import { getCurrentInstance, nextTick, onMounted, reactive, ref, toRaw, watch } from 'vue'
|
|
import { getCurrentInstance, nextTick, onMounted, reactive, ref, toRaw, watch } from 'vue'
|
|
import { useStore } from "@/pinia/common"
|
|
import { useStore } from "@/pinia/common"
|
|
@@ -259,21 +303,25 @@ let accept = ref('')
|
|
let nowYear = ref('')
|
|
let nowYear = ref('')
|
|
let scopeVal = ref('')
|
|
let scopeVal = ref('')
|
|
let publishVal = ref('')
|
|
let publishVal = ref('')
|
|
|
|
+let uploadName = ref('')
|
|
let searShow = ref(false)
|
|
let searShow = ref(false)
|
|
let skModule = ref(true)
|
|
let skModule = ref(true)
|
|
let isLeader = ref(false)
|
|
let isLeader = ref(false)
|
|
let previewStatus = ref(false)
|
|
let previewStatus = ref(false)
|
|
|
|
+let uploadDia = ref(false)
|
|
let actList = ref([])
|
|
let actList = ref([])
|
|
let actListShow = ref([])
|
|
let actListShow = ref([])
|
|
let memberData = ref([])
|
|
let memberData = ref([])
|
|
let fileList = ref([])
|
|
let fileList = ref([])
|
|
let uploadList = ref([])
|
|
let uploadList = ref([])
|
|
let modalList = ref([])
|
|
let modalList = ref([])
|
|
|
|
+let contestScores = ref([])
|
|
let actInfo = ref({attachment: []})
|
|
let actInfo = ref({attachment: []})
|
|
let contest = ref({})
|
|
let contest = ref({})
|
|
let research = ref({}) //教研
|
|
let research = ref({}) //教研
|
|
let training = ref({}) //研修
|
|
let training = ref({}) //研修
|
|
let previewFile = ref({})
|
|
let previewFile = ref({})
|
|
|
|
+let scoreData = ref({detailScore: []})
|
|
|
|
|
|
const refUpload = ref(HTMLElement)
|
|
const refUpload = ref(HTMLElement)
|
|
const cipher = ref({})
|
|
const cipher = ref({})
|
|
@@ -318,6 +366,10 @@ function getActList() {
|
|
function getListInfo(info, index) {
|
|
function getListInfo(info, index) {
|
|
actIndex.value = index
|
|
actIndex.value = index
|
|
actInfo.value = {attachment: []}
|
|
actInfo.value = {attachment: []}
|
|
|
|
+ uploadList.value = []
|
|
|
|
+ accept.value = ''
|
|
|
|
+ uploadName.value = ''
|
|
|
|
+ scoreData.value = {}
|
|
if(!info.isJoin) return
|
|
if(!info.isJoin) return
|
|
/* loading = ElLoading.service({
|
|
/* loading = ElLoading.service({
|
|
lock: true,
|
|
lock: true,
|
|
@@ -338,6 +390,7 @@ function getListInfo(info, index) {
|
|
res.contest[item].actState = nowDate < res.contest[item].stime ? 'notStart' : (nowDate > res.contest[item].etime ? 'finish' : 'going')
|
|
res.contest[item].actState = nowDate < res.contest[item].stime ? 'notStart' : (nowDate > res.contest[item].etime ? 'finish' : 'going')
|
|
})
|
|
})
|
|
contest.value = res.contest
|
|
contest.value = res.contest
|
|
|
|
+ contestScores.value = res.contestScores || []
|
|
research.value = res.research
|
|
research.value = res.research
|
|
training.value = res.training
|
|
training.value = res.training
|
|
|
|
|
|
@@ -389,6 +442,9 @@ function getEnroll() {
|
|
// loading.close()
|
|
// loading.close()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if(res.scoreData) {
|
|
|
|
+ scoreData.value = res.scoreData
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
// loading.close()
|
|
// loading.close()
|
|
@@ -606,14 +662,19 @@ async function uploadFile() {
|
|
})
|
|
})
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- /* loading = ElLoading.service({
|
|
|
|
- lock: true,
|
|
|
|
- text: '加载中',
|
|
|
|
- background: 'rgba(0, 0, 0, 0.7)'
|
|
|
|
- }) */
|
|
|
|
|
|
+ uploadDia.value = true
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+async function startUpload() {
|
|
|
|
+ if(!uploadName.value) {
|
|
|
|
+ ElMessage({
|
|
|
|
+ type: 'warning',
|
|
|
|
+ message: '请输入作品集名称'
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
let blobList = await uploadBlob()
|
|
let blobList = await uploadBlob()
|
|
if(!blobList) {
|
|
if(!blobList) {
|
|
- // loading.close()
|
|
|
|
ElMessage({
|
|
ElMessage({
|
|
type: 'warning',
|
|
type: 'warning',
|
|
message: '上传失败'
|
|
message: '上传失败'
|
|
@@ -625,6 +686,7 @@ async function uploadFile() {
|
|
activityId: actInfo.value.id,
|
|
activityId: actInfo.value.id,
|
|
uploadData: {
|
|
uploadData: {
|
|
type: contest.value.upload.type,
|
|
type: contest.value.upload.type,
|
|
|
|
+ name: uploadName.value,
|
|
},
|
|
},
|
|
}
|
|
}
|
|
// 暂不考虑这种情况,因为创建活动时必须填写报名模块
|
|
// 暂不考虑这种情况,因为创建活动时必须填写报名模块
|
|
@@ -641,7 +703,7 @@ async function uploadFile() {
|
|
} else {
|
|
} else {
|
|
params.uploadData.sokrates = []
|
|
params.uploadData.sokrates = []
|
|
}
|
|
}
|
|
- proxy.$api.teaContest(params).then(res => {
|
|
|
|
|
|
+ proxy.$api.teaContest(params).then(async res => {
|
|
if(res.code === 200) {
|
|
if(res.code === 200) {
|
|
ElMessage({
|
|
ElMessage({
|
|
type: 'success',
|
|
type: 'success',
|
|
@@ -654,9 +716,12 @@ async function uploadFile() {
|
|
type: 'warning',
|
|
type: 'warning',
|
|
message: res.code === 35 ? '上传时间已过,不能上传' : '上传失败'
|
|
message: res.code === 35 ? '上传时间已过,不能上传' : '上传失败'
|
|
})
|
|
})
|
|
|
|
+ let path = `activity/${actInfo.value.id}/upload/${store.userInfo.sub}`
|
|
|
|
+ await deleteBlobPrefix(actInfo.value.owner, path)
|
|
}
|
|
}
|
|
}).finally(() => {
|
|
}).finally(() => {
|
|
// loading.close()
|
|
// loading.close()
|
|
|
|
+ uploadDia.value = false
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
@@ -696,6 +761,7 @@ function scopeChange(value) {
|
|
actListShow.value = actList.value.filter(item => {
|
|
actListShow.value = actList.value.filter(item => {
|
|
return item.scope === value && (publishVal.value ? (publishVal.value === 'notRegister' ? !item.isJoin : (item.isJoin && (publishVal.value === 'going' ? item.publish === 1 : item.publish === 2))) : true)
|
|
return item.scope === value && (publishVal.value ? (publishVal.value === 'notRegister' ? !item.isJoin : (item.isJoin && (publishVal.value === 'going' ? item.publish === 1 : item.publish === 2))) : true)
|
|
})
|
|
})
|
|
|
|
+ getListInfo(actListShow.value[0], 0)
|
|
} else {
|
|
} else {
|
|
onFilterClear()
|
|
onFilterClear()
|
|
}
|
|
}
|
|
@@ -706,6 +772,7 @@ function publishChange(value) {
|
|
actListShow.value = actList.value.filter(item => {
|
|
actListShow.value = actList.value.filter(item => {
|
|
return (value === 'notRegister' ? !item.isJoin : (item.isJoin && (value === 'going' ? item.publish === 1 : item.publish === 2))) && (scopeVal.value ? item.scope === scopeVal.value : true) && (modalList.value.length ? item.modules.every(modules => modalList.value.includes(modules)) : true)
|
|
return (value === 'notRegister' ? !item.isJoin : (item.isJoin && (value === 'going' ? item.publish === 1 : item.publish === 2))) && (scopeVal.value ? item.scope === scopeVal.value : true) && (modalList.value.length ? item.modules.every(modules => modalList.value.includes(modules)) : true)
|
|
})
|
|
})
|
|
|
|
+ getListInfo(actListShow.value[0], 0)
|
|
} else {
|
|
} else {
|
|
onFilterClear()
|
|
onFilterClear()
|
|
}
|
|
}
|
|
@@ -716,6 +783,7 @@ function modalChange(value) {
|
|
actListShow.value = actList.value.filter(item => {
|
|
actListShow.value = actList.value.filter(item => {
|
|
return item.modules.every(modules => value.includes(modules)) && (publishVal.value ? (publishVal.value === 'notRegister' ? !item.isJoin : (item.isJoin && (publishVal.value === 'going' ? item.publish === 1 : item.publish === 2))) : true) && (scopeVal.value ? item.scope === scopeVal.value : true)
|
|
return item.modules.every(modules => value.includes(modules)) && (publishVal.value ? (publishVal.value === 'notRegister' ? !item.isJoin : (item.isJoin && (publishVal.value === 'going' ? item.publish === 1 : item.publish === 2))) : true) && (scopeVal.value ? item.scope === scopeVal.value : true)
|
|
})
|
|
})
|
|
|
|
+ getListInfo(actListShow.value[0], 0)
|
|
} else {
|
|
} else {
|
|
onFilterClear()
|
|
onFilterClear()
|
|
}
|
|
}
|
|
@@ -735,6 +803,7 @@ function onFilterClear() {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
actListShow.value = actList.value
|
|
actListShow.value = actList.value
|
|
|
|
+ getListInfo(actListShow.value[0], 0)
|
|
}
|
|
}
|
|
|
|
|
|
watch(nowYear, (newValue, oldValue) => {
|
|
watch(nowYear, (newValue, oldValue) => {
|