|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="common-layout" style="width: 100%" v-loading="loading">
|
|
|
- <el-container v-if="pageAndPage">
|
|
|
+ <el-container v-if="pageAndPage===0">
|
|
|
<el-aside width="300" style="margin-right: 10px;margin-top: 20px">
|
|
|
|
|
|
<el-card class="infinite-list"
|
|
@@ -32,16 +32,19 @@
|
|
|
<el-col :span="8" style="padding: 20px;">
|
|
|
<el-card style="height: 100px;">
|
|
|
总作品数量
|
|
|
+ {{ scoreStatus.all }}
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
<el-col :span="8" style="padding: 20px;">
|
|
|
<el-card style="height: 100px;">
|
|
|
已评作品数量
|
|
|
+ {{ scoreStatus.finish }}
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
<el-col :span="8" style="padding: 20px;">
|
|
|
<el-card style="height: 100px;">
|
|
|
未评作品数量
|
|
|
+ {{ scoreStatus.remain }}
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -61,7 +64,8 @@
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="12" style="padding: 20px">
|
|
|
- <el-button style="width: 100%;height: 400px;font-size: 90px;min-width: 400px">
|
|
|
+ <el-button style="width: 100%;height: 400px;font-size: 90px;min-width: 400px"
|
|
|
+ @click="pageAndPage=2">
|
|
|
查看详情
|
|
|
</el-button>
|
|
|
</el-col>
|
|
@@ -73,7 +77,7 @@
|
|
|
</el-main>
|
|
|
</el-container>
|
|
|
|
|
|
- <el-container v-if="!pageAndPage">
|
|
|
+ <el-container v-if="pageAndPage===1">
|
|
|
<el-aside width="300" style="margin-right: 10px">
|
|
|
<el-card class="infinite-list"
|
|
|
style="margin: auto;width: 300px;max-height:700px;min-height:80px;padding: 1px">
|
|
@@ -189,6 +193,116 @@
|
|
|
</el-container>
|
|
|
</el-container>
|
|
|
|
|
|
+ <div v-if="pageAndPage===2">
|
|
|
+ <ContentWrap>
|
|
|
+ <!-- 搜索工作栏 -->
|
|
|
+ <el-form
|
|
|
+ class="-mb-15px"
|
|
|
+ :model="queryParams"
|
|
|
+ ref="queryFormRef"
|
|
|
+ :inline="true"
|
|
|
+ label-width="68px"
|
|
|
+ >
|
|
|
+ <el-form-item label="作品编号" prop="workId">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.workId"
|
|
|
+ placeholder="请输入作品id"
|
|
|
+ clearable
|
|
|
+ @keyup.enter="handleQuery"
|
|
|
+ class="!w-240px"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="评分" prop="score">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.score"
|
|
|
+ placeholder="请输入评分"
|
|
|
+ clearable
|
|
|
+ @keyup.enter="handleQuery"
|
|
|
+ class="!w-240px"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="评分时间" prop="createTime">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="queryParams.createTime"
|
|
|
+ value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
+ type="daterange"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
|
|
+ class="!w-220px"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button @click="handleQuery">
|
|
|
+ <Icon icon="ep:search" class="mr-5px"/>
|
|
|
+ 搜索
|
|
|
+ </el-button>
|
|
|
+ <el-button @click="resetQuery">
|
|
|
+ <Icon icon="ep:refresh" class="mr-5px"/>
|
|
|
+ 重置
|
|
|
+ </el-button>
|
|
|
+
|
|
|
+ <el-button
|
|
|
+ type="success"
|
|
|
+ plain
|
|
|
+ @click="handleExport"
|
|
|
+ :loading="exportLoading"
|
|
|
+ v-hasPermi="['work:score:export']"
|
|
|
+ >
|
|
|
+ <Icon icon="ep:download" class="mr-5px"/>
|
|
|
+ 导出
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ @click="pageAndPage=0"
|
|
|
+ v-hasPermi="['work:score:create']"
|
|
|
+ >
|
|
|
+ 返回上一页
|
|
|
+ </el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </ContentWrap>
|
|
|
+
|
|
|
+ <!-- 列表 -->
|
|
|
+ <ContentWrap>
|
|
|
+ <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
|
|
+ <el-table-column label="作品编号" align="center" prop="workId" width="100"/>
|
|
|
+ <el-table-column label="作品名" align="center" width="400">
|
|
|
+ <template #default="scope">
|
|
|
+ {{ scope.row.workDO.workName }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="评分" align="center" prop="score" width="150"/>
|
|
|
+ <el-table-column label="状态" align="center" width="150">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button v-if="scope.row.status==='1'" type="success" size="small">
|
|
|
+ 已提交
|
|
|
+ </el-button>
|
|
|
+ <el-button v-if="scope.row.status==='0'" type="info" size="small">
|
|
|
+ 未提交
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="评分时间"
|
|
|
+ align="center"
|
|
|
+ prop="createTime"
|
|
|
+ :formatter="dateFormatter"
|
|
|
+ />
|
|
|
+ </el-table>
|
|
|
+ <!-- 分页 -->
|
|
|
+ <Pagination
|
|
|
+ :total="total"
|
|
|
+ v-model:page="queryParams.pageNo"
|
|
|
+ v-model:limit="queryParams.pageSize"
|
|
|
+ @pagination="getList"
|
|
|
+ />
|
|
|
+ </ContentWrap>
|
|
|
+
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
|
|
|
<!--======================================= -->
|
|
|
|
|
@@ -208,7 +322,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-
|
|
|
+import {dateFormatter} from '@/utils/formatTime'
|
|
|
import {c} from "vite/dist/node/types.d-jgA8ss1A";
|
|
|
|
|
|
const visible = ref(false)
|
|
@@ -258,8 +372,8 @@ const handleSave = () => {
|
|
|
try {
|
|
|
const data = formDataScope.value as unknown as ScoreVO
|
|
|
|
|
|
- ScoreApi.updateScoreStatus(data)
|
|
|
- message.success(t('common.updateSuccess'))
|
|
|
+ ScoreApi.updateScoreStatus(data)
|
|
|
+ message.success(t('common.updateSuccess'))
|
|
|
|
|
|
file.value.score = formDataScope.value.score
|
|
|
visible.value = false
|
|
@@ -267,10 +381,11 @@ const handleSave = () => {
|
|
|
emit('success')
|
|
|
} finally {
|
|
|
formLoading.value = false
|
|
|
- pageAndPage.value=true
|
|
|
+ pageAndPage.value = 0
|
|
|
file.value = {score: undefined, workName: "", manuscriptAndMaterial: "", format: "", url: ""}
|
|
|
- workList.value=undefined
|
|
|
+ workList.value = undefined
|
|
|
}
|
|
|
+ getScoreStatus()
|
|
|
getTypeList()
|
|
|
getList()
|
|
|
}
|
|
@@ -281,7 +396,7 @@ const uploadBase64Image = (base64Data, contentType = 'image/png') => {
|
|
|
formData.append('file', blob, 'image.png'); // 你可以根据需要更改文件名
|
|
|
|
|
|
workApi.uploadFiles(formData).then(data => {
|
|
|
- formDataScope.value.url=data.url
|
|
|
+ formDataScope.value.url = data.url
|
|
|
})
|
|
|
}
|
|
|
const base64ToBlob = (base64Data, contentType = 'image/png') => {
|
|
@@ -296,7 +411,7 @@ const base64ToBlob = (base64Data, contentType = 'image/png') => {
|
|
|
}
|
|
|
//=======================================================
|
|
|
|
|
|
-import { ElMessage } from 'element-plus'
|
|
|
+import {ElMessage} from 'element-plus'
|
|
|
import download from '@/utils/download'
|
|
|
import {ScoreApi, ScoreVO} from '@/api/work/score'
|
|
|
import {TypeApi} from "@/api/work/type";
|
|
@@ -316,14 +431,10 @@ const formRules = reactive({})
|
|
|
|
|
|
/** 返回开始评分界面 */
|
|
|
const returnScope = () => {
|
|
|
- pageAndPage.value = true
|
|
|
- workList.value = []
|
|
|
-}
|
|
|
-/** 提交 */
|
|
|
-const subStatus = () => {
|
|
|
- pageAndPage.value = true
|
|
|
+ pageAndPage.value = 0
|
|
|
workList.value = []
|
|
|
}
|
|
|
+
|
|
|
/** 下一个 */
|
|
|
const nextScope = () => {
|
|
|
if (indexScore.value === workList.value.length) {
|
|
@@ -404,7 +515,7 @@ const scrollToSection = (sectionId) => {
|
|
|
//=================================
|
|
|
|
|
|
|
|
|
-const pageAndPage = ref(true)
|
|
|
+const pageAndPage = ref(0)
|
|
|
|
|
|
const file = ref({
|
|
|
format: '',
|
|
@@ -449,6 +560,11 @@ interface Tree {
|
|
|
|
|
|
const loading = ref(true) // 列表的加载中
|
|
|
const list = ref<ScoreVO[]>([]) // 列表的数据
|
|
|
+const scoreStatus = ref({
|
|
|
+ all: 0,
|
|
|
+ finish: 0,
|
|
|
+ remain: 0
|
|
|
+}) // 个人评分统计
|
|
|
const typeList = ref([]) // 列表的数据
|
|
|
const total = ref(0) // 列表的总页数
|
|
|
const queryParams = reactive({//评分查询参数
|
|
@@ -472,7 +588,7 @@ const handleNodeClick = () => {
|
|
|
|
|
|
file.value = {score: undefined, workName: "", manuscriptAndMaterial: "", format: "", url: ""}
|
|
|
workQueryParams.categoryId = startType.value.id
|
|
|
- if (workQueryParams.categoryId===''){
|
|
|
+ if (workQueryParams.categoryId === '') {
|
|
|
ElMessage({
|
|
|
message: '当前没有您要评的作品!',
|
|
|
type: 'warning',
|
|
@@ -573,7 +689,7 @@ const getWorkLists = async () => {
|
|
|
formDataScope.value.score = workList.value[indexScore.value].scoreDO.score
|
|
|
formDataScope.value.id = workList.value[indexScore.value].scoreDO.id
|
|
|
formDataScope.value.workId = workList.value[indexScore.value].workId
|
|
|
- pageAndPage.value = false
|
|
|
+ pageAndPage.value = 1
|
|
|
}
|
|
|
} finally {
|
|
|
loading.value = false
|
|
@@ -590,11 +706,24 @@ const getList = async () => {
|
|
|
loading.value = false
|
|
|
}
|
|
|
}
|
|
|
+/** 查询列表 */
|
|
|
+const getScoreStatus = async () => {
|
|
|
+ loading.value = true
|
|
|
+ try {
|
|
|
+ const data = await ScoreApi.getScoreStatus()
|
|
|
+ scoreStatus.value = data
|
|
|
+ console.log(scoreStatus.value)
|
|
|
+ console.log(data)
|
|
|
+ } finally {
|
|
|
+ loading.value = false
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
/** 搜索按钮操作 */
|
|
|
const handleQuery = () => {
|
|
|
queryParams.pageNo = 1
|
|
|
getList()
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/** 重置按钮操作 */
|
|
@@ -673,6 +802,7 @@ const handleExport = async () => {
|
|
|
onMounted(() => {
|
|
|
getTypeList()
|
|
|
getList()
|
|
|
+ getScoreStatus()
|
|
|
})
|
|
|
</script>
|
|
|
<style>
|