Compare commits

...

17 Commits

  1. 7
      src/assets/css/main.css
  2. 35
      src/components/upload/config.js
  3. 8
      src/router/index.js
  4. 6
      src/setting.js
  5. 10
      src/utils/api.js
  6. 25
      src/views/Login.vue
  7. 86
      src/views/course/AddCurriculum.vue
  8. 39
      src/views/customer/AddCustomer.vue
  9. 193
      src/views/devLogin.vue
  10. 3
      src/views/match/add/index.vue
  11. 4
      src/views/match/add/step2.vue
  12. 1
      src/views/match/add/step3.vue
  13. 63
      src/views/match/list/index.vue
  14. 16
      src/views/match/manage/index.vue
  15. 57
      src/views/match/manage/matchArch.vue
  16. 550
      src/views/match/manage/matchArchList.vue
  17. 24
      src/views/match/manage/matchInfo.vue
  18. 89
      src/views/match/manage/matchRank.vue
  19. 8
      src/views/match/manage/matchSignup.vue
  20. 675
      src/views/match/manage/otherArchList.vue
  21. 535
      src/views/match/manage/theoryArchList.vue
  22. 108
      src/views/match/manage/theoryReport.vue
  23. 15
      src/views/match/manage/trialReport.vue
  24. 6
      src/views/order/AddOrder.vue
  25. 113
      src/views/parner/staff.vue
  26. 20
      src/views/review/index.vue
  27. 284
      src/views/serve/projectAdd.vue
  28. 107
      src/views/setting/info.vue

@ -520,3 +520,10 @@ li {
} }
} }
} }
.files-tip {
li {
line-height: 1.8;
cursor: pointer;
}
}

@ -1,31 +1,22 @@
/** /**
* 阿里云oss配置 * 阿里云oss配置
* */ * */
import { get } from '@/utils/http'
import api from '@/utils/api'
import CryptoJS from 'crypto-js'
import JSEncrypt from 'jsencrypt'
const A = (key, encryptedData) => {
const keyHex = CryptoJS.enc.Base64.parse(key)
const decrypted = CryptoJS.AES.decrypt(encryptedData, keyHex, {
mode: CryptoJS.mode.ECB,
padding: CryptoJS.pad.Pkcs7
})
return decrypted.toString(CryptoJS.enc.Utf8)
}
const R = (encryptedKey, privateKey) => {
const decrypt = new JSEncrypt()
decrypt.setPrivateKey(privateKey)
const decryptedKey = decrypt.decrypt(encryptedKey)
return decryptedKey
}
import router from '@/router/index'
import { Message } from 'element-ui'
export default async function () { export default async function () {
try { try {
const res = await get(api.encrypt) let RE = localStorage.getItem('osc')
const RE = A(R(res.encryptedKey, res.privateKey), res.encryptedData).split('/') if (RE) {
RE = JSON.parse(RE)
} else {
sessionStorage.removeItem('token')
Message.error('登录过期,请重新登录!')
setTimeout(() => {
router.replace('/login')
}, 1500)
return false
}
return { return {
// oss账号信息 // oss账号信息
config: { config: {

@ -114,8 +114,8 @@ let router = new Router({
component: () => import('../views/match/manage/noticeDetail'), component: () => import('../views/match/manage/noticeDetail'),
}, },
{ {
path: '/matchArchList', path: '/otherArchList',
component: () => import('../views/match/manage/matchArchList'), component: () => import('../views/match/manage/otherArchList'),
}, },
{ {
path: '/matchRank', path: '/matchRank',
@ -126,8 +126,8 @@ let router = new Router({
component: () => import('../views/match/manage/trialReport'), component: () => import('../views/match/manage/trialReport'),
}, },
{ {
path: '/theoryArchList', path: '/matchArchList',
component: () => import('../views/match/manage/theoryArchList'), component: () => import('../views/match/manage/matchArchList'),
}, },
{ {
path: '/theoryReport', path: '/theoryReport',

@ -5,7 +5,7 @@ const url = location.host;
const isDev = process.env.NODE_ENV === 'development' // 开发环境 const isDev = process.env.NODE_ENV === 'development' // 开发环境
const isPro = url.includes('huorantech.cn') //正式服 const isPro = url.includes('huorantech.cn') //正式服
let jumpPath = `${location.origin}/judgmentPoint/` let jumpPath = `${location.origin}/panfen/`
let sandPath = `http://121.37.12.51/sandbox` // 沙盘地址 let sandPath = `http://121.37.12.51/sandbox` // 沙盘地址
let host = `${location.origin}/` let host = `${location.origin}/`
if (isDev) { if (isDev) {
@ -18,7 +18,7 @@ if (isDev) {
host = ips[+localStorage.getItem('ip')] host = ips[+localStorage.getItem('ip')]
} else if (isPro) { } else if (isPro) {
sandPath = `https://izhixinyun.com/sandbox` sandPath = `https://izhixinyun.com/sandbox`
jumpPath = 'https://judgment.huorantech.cn/' // jumpPath = 'https://judgment.huorantech.cn/'
} }
@ -51,7 +51,7 @@ const Setting = {
isDev, isDev,
isPro, isPro,
// 是否使用动态路由 // 是否使用动态路由
dynamicRoute: false, dynamicRoute: true,
/** /**
* @description 默认密码 * @description 默认密码
*/ */

@ -106,8 +106,8 @@ export default {
editProjectDraft: `occupationlab/occupationlab/projectManage/editProjectDraft`, // 修改项目管理 editProjectDraft: `occupationlab/occupationlab/projectManage/editProjectDraft`, // 修改项目管理
copyProjectManage: `occupationlab/occupationlab/projectManage/copyProjectManage`, // 复制项目管理 copyProjectManage: `occupationlab/occupationlab/projectManage/copyProjectManage`, // 复制项目管理
// 判分点 // 判分点
getBcJudgmentPoint: `${jumpApi}judgment/judgment/bcJudgmentPoint/getBcJudgmentPoint`, // 获取编程类判分点列表(分页) getBcJudgmentPoint: `${host}judgment/judgment/bcJudgmentPoint/getBcJudgmentPoint`, // 获取编程类判分点列表(分页)
getLcJudgmentPoint: `${jumpApi}judgment/judgment/lcJudgmentPoint/queryAllJudgmentPoint`, // 获取流程类判分点列表(分页) getLcJudgmentPoint: `${host}judgment/judgment/lcJudgmentPoint/queryAllJudgmentPoint`, // 获取流程类判分点列表(分页)
addProjectJudgment: `occupationlab/occupationlab/projectJudgment/addProjectJudgment`, // 添加项目管理、判分点中间表 addProjectJudgment: `occupationlab/occupationlab/projectJudgment/addProjectJudgment`, // 添加项目管理、判分点中间表
updateProjectJudgment: `occupationlab/occupationlab/projectJudgment/updateProjectJudgment`, // 判分点中间表批量更新 updateProjectJudgment: `occupationlab/occupationlab/projectJudgment/updateProjectJudgment`, // 判分点中间表批量更新
deleteProjectJudgment: `occupationlab/occupationlab/projectJudgment/deleteProjectJudgment`, // 判分点中间表批量删除 deleteProjectJudgment: `occupationlab/occupationlab/projectJudgment/deleteProjectJudgment`, // 判分点中间表批量删除
@ -347,6 +347,8 @@ export default {
copyExamPaper: `exam/exam/paper/copyExamPaper`, copyExamPaper: `exam/exam/paper/copyExamPaper`,
getDetailedExamScores: `exam/exam/paper/getDetailedExamScores`, getDetailedExamScores: `exam/exam/paper/getDetailedExamScores`,
exportExamPaperReport: `exam/exam/paper/exportExamPaperReport`, exportExamPaperReport: `exam/exam/paper/exportExamPaperReport`,
exportLabReport: `occupationlab/occupationlab/achievement/exportLabReport`,
exportBankExperimentReport: `occupationlab/occupationlab/achievement/exportBankExperimentReport`,
// 赛事内容 // 赛事内容
addCompetitionContent: `competition/competition/content/addCompetitionContent`, addCompetitionContent: `competition/competition/content/addCompetitionContent`,
@ -414,9 +416,12 @@ export default {
batchDeleteContestGrade: `competition/competition/performance/batchDeleteContestGrade`, batchDeleteContestGrade: `competition/competition/performance/batchDeleteContestGrade`,
batchImportGrades: `${host}competition/competition/performance/batchImportGrades`, batchImportGrades: `${host}competition/competition/performance/batchImportGrades`,
exportExperimentalResultsInBatch: `${host}competition/competition/performance/exportExperimentalResultsInBatch`, exportExperimentalResultsInBatch: `${host}competition/competition/performance/exportExperimentalResultsInBatch`,
exportExamPaperReports: `${host}exam/exam/paper/exportExamPaperReports`,
batchExportReportsAsZip: `${host}occupationlab/occupationlab/achievement/batchExportReportsAsZip`,
performanceExportFailure: `${host}competition/competition/performance/exportFailure`, performanceExportFailure: `${host}competition/competition/performance/exportFailure`,
rankExportFailure: `${host}competition/competition/rank/exportFailure`, rankExportFailure: `${host}competition/competition/rank/exportFailure`,
batchImportRanking: `${host}competition/competition/rank/batchImportRanking`, batchImportRanking: `${host}competition/competition/rank/batchImportRanking`,
getPaperUploadFileZip: `${host}exam/exam/paper/question/userAnswer/getPaperUploadFileZip`,
stageGradeManagementList: `competition/competition/performance/stageGradeManagementList`, stageGradeManagementList: `competition/competition/performance/stageGradeManagementList`,
stageRaceRanking: `competition/competition/rank/stageRaceRanking`, stageRaceRanking: `competition/competition/rank/stageRaceRanking`,
overallStandingsInThePointsRace: `competition/competition/rank/overallStandingsInThePointsRace`, overallStandingsInThePointsRace: `competition/competition/rank/overallStandingsInThePointsRace`,
@ -442,6 +447,7 @@ export default {
getCompetitionStageRankingTime: `competition/competitionReleaseTime/getCompetitionStageRankingTime`, getCompetitionStageRankingTime: `competition/competitionReleaseTime/getCompetitionStageRankingTime`,
frontOfficeCompetitionRanking: `competition/competition/rank/frontOfficeCompetitionRanking`, frontOfficeCompetitionRanking: `competition/competition/rank/frontOfficeCompetitionRanking`,
cCompetitionStageFileList: `competition/cCompetitionStageFile/listByEntity`, cCompetitionStageFileList: `competition/cCompetitionStageFile/listByEntity`,
getPaperUploadFile: `exam/exam/paper/question/userAnswer/getPaperUploadFile`,
derive: `${host}competition/cCompetitionStageFile/deriveAll`, derive: `${host}competition/cCompetitionStageFile/deriveAll`,
allExperimentalResultsAreDerived: `${host}competition/competition/performance/allExperimentalResultsAreDerived`, allExperimentalResultsAreDerived: `${host}competition/competition/performance/allExperimentalResultsAreDerived`,
derivedRanking: `${host}competition/competition/rank/derivedRanking`, derivedRanking: `${host}competition/competition/rank/derivedRanking`,

@ -103,6 +103,8 @@
import vFooter from '../components/Footer' import vFooter from '../components/Footer'
import Setting from '@/setting' import Setting from '@/setting'
import addRoutes from '@/libs/route/addRoutes' import addRoutes from '@/libs/route/addRoutes'
import CryptoJS from 'crypto-js'
import JSEncrypt from 'jsencrypt'
export default { export default {
data: function () { data: function () {
var regPhoneOrEmail = (rule, value, callback) => {// var regPhoneOrEmail = (rule, value, callback) => {//
@ -201,6 +203,7 @@ export default {
this.$post(this.api.logins, param).then(({ status, data, message }) => { this.$post(this.api.logins, param).then(({ status, data, message }) => {
localStorage.removeItem('examPath') localStorage.removeItem('examPath')
localStorage.removeItem('reviewPath') localStorage.removeItem('reviewPath')
this.getOss()
if (status == 200) { if (status == 200) {
const accounts = data.userAccounts const accounts = data.userAccounts
// //
@ -229,6 +232,28 @@ export default {
} }
}); });
}, },
// oss
async getOss () {
const A = (key, encryptedData) => {
const keyHex = CryptoJS.enc.Base64.parse(key)
const decrypted = CryptoJS.AES.decrypt(encryptedData, keyHex, {
mode: CryptoJS.mode.ECB,
padding: CryptoJS.pad.Pkcs7
})
return decrypted.toString(CryptoJS.enc.Utf8)
}
const R = (encryptedKey, privateKey) => {
const decrypt = new JSEncrypt()
decrypt.setPrivateKey(privateKey)
const decryptedKey = decrypt.decrypt(encryptedKey)
return decryptedKey
}
const res = await this.$get(this.api.encrypt)
const RE = A(R(res.encryptedKey, res.privateKey), res.encryptedData).split('/')
localStorage.setItem('osc', JSON.stringify(RE))
},
// //
chooseUser (user) { chooseUser (user) {
user.isEnable && this.$post(`${this.api.getToken}?id=${user.id}`).then(({ data }) => { user.isEnable && this.$post(`${this.api.getToken}?id=${user.id}`).then(({ data }) => {

@ -106,13 +106,13 @@
@selection-change="handleSelectionPractice"> @selection-change="handleSelectionPractice">
<el-table-column type="selection" width="55" align="center"></el-table-column> <el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> <el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="projectName" label="项目名称" align="center"></el-table-column> <el-table-column prop="projectName" label="项目名称" align="center">
<el-table-column prop="remark" label="备注名称" align="center"></el-table-column>
<el-table-column prop="applicationName" label="系统名称" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.applicationName || systemAll.find(e => e.systemId == scope.row.systemId).systemName }} {{ scope.row.projectName || scope.row.paperName }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="remark" label="备注名称" align="center"></el-table-column>
<el-table-column prop="systemName" label="系统名称" align="center"></el-table-column>
<el-table-column label="排序" align="center" width="100"> <el-table-column label="排序" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model.trim="scope.row.sort" <el-input v-model.trim="scope.row.sort"
@ -156,13 +156,13 @@
@selection-change="handleSelectionAssessment"> @selection-change="handleSelectionAssessment">
<el-table-column type="selection" width="55" align="center"></el-table-column> <el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> <el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="projectName" label="项目名称" align="center"></el-table-column> <el-table-column prop="projectName" label="项目名称" align="center">
<el-table-column prop="remark" label="备注名称" align="center"></el-table-column>
<el-table-column prop="applicationName" label="系统名称" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.applicationName || systemAll.find(e => e.systemId == scope.row.systemId).systemName }} {{ scope.row.projectName || scope.row.paperName }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="remark" label="备注名称" align="center"></el-table-column>
<el-table-column prop="systemName" label="系统名称" align="center"></el-table-column>
<el-table-column label="排序" align="center" width="100"> <el-table-column label="排序" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model.trim="scope.row.sort" <el-input v-model.trim="scope.row.sort"
@ -205,12 +205,12 @@
@selection-change="handleSelectionMatch"> @selection-change="handleSelectionMatch">
<el-table-column type="selection" width="55" align="center"></el-table-column> <el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> <el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="projectName" label="项目名称" align="center"></el-table-column> <el-table-column prop="projectName" label="项目名称" align="center">
<el-table-column prop="applicationName" label="系统名称" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.applicationName || systemAll.find(e => e.systemId == scope.row.systemId).systemName }} {{ scope.row.projectName || scope.row.paperName }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="systemName" label="系统名称" align="center"></el-table-column>
<el-table-column label="排序" align="center" width="100"> <el-table-column label="排序" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model.trim="scope.row.sort" <el-input v-model.trim="scope.row.sort"
@ -272,7 +272,7 @@
@change="val => checkAllChange(val, projects[0].systemId)"></el-checkbox> @change="val => checkAllChange(val, projects[0].systemId)"></el-checkbox>
<li v-for="(item, i) in projects" :key="i" :title="item.projectName"> <li v-for="(item, i) in projects" :key="i" :title="item.projectName">
<el-checkbox v-model="item.check" <el-checkbox v-model="item.check"
:label="item.remark ? item.remark + '(' + item.projectName + ')' : item.projectName" :label="item.remark ? item.remark + '(' + item.projectName + ')' : (item.projectName || item.paperName)"
@change="val => projectChange(val, item)"></el-checkbox> @change="val => projectChange(val, item)"></el-checkbox>
</li> </li>
</ul> </ul>
@ -287,18 +287,18 @@
v-model.trim="checkedKeyword" clearable></el-input> v-model.trim="checkedKeyword" clearable></el-input>
<el-table :data="checkeds" class="table" stripe header-align="center" max-height="470"> <el-table :data="checkeds" class="table" stripe header-align="center" max-height="470">
<el-table-column type="index" width="55" label="序号" align="center"></el-table-column> <el-table-column type="index" width="55" label="序号" align="center"></el-table-column>
<el-table-column prop="applicationName" label="系统名称" align="center"> <el-table-column prop="systemName" label="系统名称" align="center"></el-table-column>
<el-table-column prop="projectName" width="80" label="系统类型" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.applicationName || systemAll.find(e => e.systemId == scope.row.systemId).systemName }} {{ scope.row.type === 1 ? '流程类' : scope.row.type === 3 ? '理论' : '编程类' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="projectName" width="80" label="系统类型" align="center"> <el-table-column prop="remark" label="备注名称" align="center"></el-table-column>
<el-table-column prop="projectName" label="项目名称" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.type ? '流程类' : '编程类' }} {{ scope.row.projectName || scope.row.paperName }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="remark" label="备注名称" align="center"></el-table-column>
<el-table-column prop="projectName" label="项目名称" align="center"></el-table-column>
<el-table-column label="操作" align="center" width="55"> <el-table-column label="操作" align="center" width="55">
<template slot-scope="scope"> <template slot-scope="scope">
<i :class="['el-icon-delete rm', { disabled: scope.row.disabled }]" <i :class="['el-icon-delete rm', { disabled: scope.row.disabled }]"
@ -415,7 +415,6 @@ export default {
systemChecked: [], systemChecked: [],
curSystem: '', curSystem: '',
projects: [], projects: [],
projectAll: [],
projectKeyword: '', projectKeyword: '',
checkedKeyword: '', checkedKeyword: '',
checkeds: [], checkeds: [],
@ -442,7 +441,7 @@ export default {
projectKeyword: function (val) { projectKeyword: function (val) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.filterProject(); this.getProject();
}, 500); }, 500);
}, },
checkedKeyword: function (val) { checkedKeyword: function (val) {
@ -577,6 +576,7 @@ export default {
this.pageNo = 1; this.pageNo = 1;
this.getConfig(); this.getConfig();
this.checkeds = JSON.parse(JSON.stringify(type == 1 ? this.assessmentData : type == 2 ? this.matches : this.practiceData)) this.checkeds = JSON.parse(JSON.stringify(type == 1 ? this.assessmentData : type == 2 ? this.matches : this.practiceData))
this.checkedAll = JSON.parse(JSON.stringify(this.checkeds))
}, },
// //
getConfig () { getConfig () {
@ -609,26 +609,23 @@ export default {
}).catch(err => { }) }).catch(err => { })
}, },
// //
getProject (item) { async getProject (item, fromSystemChange) {
const checked = this.checkeds const checked = this.checkeds
this.curSystem = item.systemId if (item) this.curSystem = item.systemId
this.$get(`${this.api.getInternalProjectBySystemId}?permissions=${this.permissions}&systemId=${item.systemId}`).then(res => { let res
this.projectAll = JSON.parse(JSON.stringify(res)) // if (!fromSystemChange) {
res = await this.$get(`${this.api.getInternalProjectBySystemId}?permissions=${this.permissions}&systemId=${this.curSystem}&keyword=${this.projectKeyword}`)
}
const result = [] const result = []
res.map(e => { const projects = fromSystemChange ? this.projects : res
projects.map(e => {
// //
const include = checked.some(n => n.projectId == e.projectId && n.systemId == e.systemId) const include = checked.some(n => (e.projectId && n.projectId == e.projectId && n.systemId == e.systemId) || (e.paperId && n.paperId == e.paperId))
e.check = include e.check = include
result.push(e) result.push(e)
}) })
this.checkAll = !result.filter(e => !e.check).length this.checkAll = !result.filter(e => !e.check).length
this.projects = result this.projects = result
}).catch(err => { })
},
//
filterProject () {
const val = this.projectKeyword
this.projects = this.projectAll.filter(e => e.projectName.includes(val))
}, },
// //
systemChange (val, item) { systemChange (val, item) {
@ -640,7 +637,7 @@ export default {
}) })
} }
this.projectKeyword = '' this.projectKeyword = ''
this.$get(`${this.api.getInternalProjectBySystemId}?permissions=${this.permissions}&systemId=${item.systemId}`).then(res => { this.$get(`${this.api.getInternalProjectBySystemId}?permissions=${this.permissions}&systemId=${item.systemId}&keyword=${this.projectKeyword}`).then(res => {
if (val) { if (val) {
// //
if (!this.mulSystem) { if (!this.mulSystem) {
@ -648,18 +645,18 @@ export default {
item.check = true item.check = true
} }
res.map(e => { res.map(e => {
if (!checkeds.find(n => n.projectId == e.projectId && n.systemId == e.systemId)) { if (!checkeds.find(n => (e.projectId && n.projectId == e.projectId && n.systemId == e.systemId) || (e.paperId && e.paperId == n.paperId))) {
checkeds.push(e) checkeds.push(e)
} }
}) })
} else { } else {
res.map(e => { res.map(e => {
const i = checkeds.findIndex(n => n.projectId == e.projectId && n.systemId == e.systemId) const i = checkeds.findIndex(n => (e.projectId && n.projectId == e.projectId && n.systemId == e.systemId) || (e.paperId && e.paperId == n.paperId))
i === -1 || checkeds.splice(i, 1) i === -1 || checkeds.splice(i, 1)
}) })
} }
this.checkedAll = JSON.parse(JSON.stringify(checkeds)) // this.checkedAll = JSON.parse(JSON.stringify(checkeds)) //
this.getProject(item) this.getProject(item, 1)
}).catch(err => { }) }).catch(err => { })
}, },
// //
@ -671,8 +668,8 @@ export default {
}, },
// //
projectChange (val, item) { projectChange (val, item) {
const { systemId } = item const { systemId, paperId } = item
const i = this.checkeds.findIndex(e => e.projectId == item.projectId && e.systemId == systemId) const i = this.checkeds.findIndex(e => (item.projectId && e.projectId == item.projectId && e.systemId == systemId) || (paperId && paperId == e.paperId))
// push // push
if (val) { if (val) {
this.checkeds.push(item) this.checkeds.push(item)
@ -685,12 +682,11 @@ export default {
}) })
this.checkAll = !this.projects.find(e => !e.check) // this.checkAll = !this.projects.find(e => !e.check) //
this.checkedAll = JSON.parse(JSON.stringify(this.checkeds)) // this.checkedAll = JSON.parse(JSON.stringify(this.checkeds)) //
console.log("🚀 ~ file: AddCurriculum.vue ~ line 728 ~ projectChange ~ checkedAll", this.checkeds, item)
}, },
// //
filterChecked () { filterChecked () {
const val = this.checkedKeyword const val = this.checkedKeyword
this.checkeds = this.checkedAll.filter(e => e.projectName.includes(val)) this.checkeds = this.checkedAll.filter(e => (e.projectName && e.projectName.includes(val)) || (e.paperName && e.paperName.includes(val)))
}, },
// //
delProject (i, e) { delProject (i, e) {
@ -701,9 +697,9 @@ export default {
this.checkeds.splice(i, 1) this.checkeds.splice(i, 1)
// checkdisabled // checkdisabled
if (e.systemId == this.curSystem) { if (e.systemId == this.curSystem) {
const { projectId } = e const { projectId, paperId } = e
this.projects.map(n => { this.projects.map(n => {
if (n.projectId == projectId) { if ((projectId && n.projectId == projectId) || (paperId && n.paperId == paperId)) {
n.check = false n.check = false
} }
}) })
@ -822,7 +818,8 @@ export default {
form.systemIdByPractice = this.practiceData.map(i => { form.systemIdByPractice = this.practiceData.map(i => {
let obj = { let obj = {
isShow: i.isShow, isShow: i.isShow,
projectId: i.projectId, projectId: i.projectId || '',
paperId: i.paperId || '',
sort: Number(i.sort), sort: Number(i.sort),
systemId: i.systemId systemId: i.systemId
}; };
@ -838,6 +835,7 @@ export default {
let obj = { let obj = {
isShow: i.isShow, isShow: i.isShow,
projectId: i.projectId, projectId: i.projectId,
paperId: i.paperId || '',
sort: Number(i.sort), sort: Number(i.sort),
systemId: i.systemId systemId: i.systemId
}; };
@ -850,6 +848,7 @@ export default {
let obj = { let obj = {
isShow: i.isShow, isShow: i.isShow,
projectId: i.projectId, projectId: i.projectId,
paperId: i.paperId || '',
sort: Number(i.sort), sort: Number(i.sort),
systemId: i.systemId systemId: i.systemId
}; };
@ -864,6 +863,7 @@ export default {
spinner: 'el-icon-loading', spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)' background: 'rgba(0, 0, 0, 0.7)'
}) })
debugger
if (form.cid) { if (form.cid) {
this.$post(this.api.modifyCourse, form).then((res) => { this.$post(this.api.modifyCourse, form).then((res) => {
this.$message.success("编辑成功"); this.$message.success("编辑成功");

@ -139,7 +139,7 @@
<el-table-column prop="productTypeName" label="产品分类" align="center"></el-table-column> <el-table-column prop="productTypeName" label="产品分类" align="center"></el-table-column>
<el-table-column label="起止日期" align="center"> <el-table-column label="起止日期" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.status === '已过期' ? '' : scope.row.startAndEndTime }} {{ scope.row.status === '已过期' ? '-' : scope.row.startAndEndTime }}
<el-tooltip v-if="scope.row.other" class="item" effect="dark" placement="top"> <el-tooltip v-if="scope.row.other" class="item" effect="dark" placement="top">
<div slot="content"> <div slot="content">
还有<span v-html="scope.row.other"></span><br>的订单还未生效 还有<span v-html="scope.row.other"></span><br>的订单还未生效
@ -173,14 +173,14 @@
<ul class="filter"> <ul class="filter">
<li> <li>
<label>订单类型</label> <label>订单类型</label>
<el-select v-model="form3.orderType" clearable placeholder="请选择订单类型" @change="getOrder"> <el-select v-model="form3.orderType" clearable placeholder="请选择订单类型" @change="initOrder">
<el-option v-for="(item, index) in orderTypeList" :key="index" :label="item.name" <el-option v-for="(item, index) in orderTypeList" :key="index" :label="item.name"
:value="item.value"></el-option> :value="item.value"></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<label>订单状态</label> <label>订单状态</label>
<el-select v-model="form3.orderStatus" clearable placeholder="请选择订单状态" @change="getOrder"> <el-select v-model="form3.orderStatus" clearable placeholder="请选择订单状态" @change="initOrder">
<el-option v-for="(item, index) in orderStatusList" :key="index" :label="item.name" <el-option v-for="(item, index) in orderStatusList" :key="index" :label="item.name"
:value="item.id"></el-option> :value="item.id"></el-option>
</el-select> </el-select>
@ -200,7 +200,7 @@
<el-table-column prop="orderContent" label="订单内容" align="center"> <el-table-column prop="orderContent" label="订单内容" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-popover trigger="hover" placement="top" style='width: 500px' <el-popover trigger="hover" placement="top" style='width: 500px'
v-if='scope.row.orderContent.length > 14'> v-if='scope.row.orderContent && scope.row.orderContent.length > 14'>
<p> {{ scope.row.orderContent }}</p> <p> {{ scope.row.orderContent }}</p>
<div slot="reference" class="name-wrapper"> <div slot="reference" class="name-wrapper">
<el-tag size="medium" class='tags'>{{ scope.row.orderContent }}</el-tag> <el-tag size="medium" class='tags'>{{ scope.row.orderContent }}</el-tag>
@ -526,6 +526,7 @@ export default {
], ],
products: [], products: [],
productAll: [], productAll: [],
productAllOrigin: [],
pageProduct: this.$route.query.type === 'tab2' ? (+this.$route.query.page || 1) : 1, pageProduct: this.$route.query.type === 'tab2' ? (+this.$route.query.page || 1) : 1,
pageSizeProduct: 10, pageSizeProduct: 10,
totalProduct: 0, totalProduct: 0,
@ -702,7 +703,7 @@ export default {
}) })
// //
// if (list[0].startTime && list[0].endTime) { // if (list[0].startTime && list[0].endTime) {
if (list[0].startTime && now < new Date(list[0].startTime).getTime()) { if (list[0].startTime && now < new Date(list[0].startTime)) {
e.startTime = list[0].startTime e.startTime = list[0].startTime
e.endTime = connect ? list[list.length - 1].endTime : list[0].endTime e.endTime = connect ? list[list.length - 1].endTime : list[0].endTime
e.status = '未生效' e.status = '未生效'
@ -716,7 +717,7 @@ export default {
e.other += `<br>${j.startTime} ~ ${j.endTime}` e.other += `<br>${j.startTime} ~ ${j.endTime}`
}) })
} }
} else if (list[list.length - 1].endTime && now > new Date(list[list.length - 1].endTime).getTime()) { } else if (list[list.length - 1].endTime && now > new Date(list[list.length - 1].endTime)) {
e.status = '已过期' e.status = '已过期'
} else { } else {
// //
@ -729,7 +730,7 @@ export default {
for (const j in list) { for (const j in list) {
const i = +j const i = +j
const n = list[i] const n = list[i]
if (n.startTime && n.endTime && now >= new Date(n.startTime).getTime() && now <= new Date(n.endTime).getTime()) { if (n.startTime && n.endTime && now >= new Date(n.startTime) && now <= new Date(n.endTime)) {
// //
e.startTime = n.startTime e.startTime = n.startTime
e.endTime = n.endTime e.endTime = n.endTime
@ -744,7 +745,7 @@ export default {
}) })
} }
break break
} else if (i != 0 && list[i - 1].endTime && n.startTime && n.endTime && now > new Date(list[i - 1].endTime).getTime() && now < new Date(n.startTime).getTime()) { } else if (i != 0 && list[i - 1].endTime && n.startTime && n.endTime && now > new Date(list[i - 1].endTime) && now < new Date(n.startTime)) {
// //
e.startTime = n.startTime e.startTime = n.startTime
e.endTime = n.endTime e.endTime = n.endTime
@ -775,13 +776,14 @@ export default {
} }
}) })
this.productAll = data this.productAll = data
this.productAllOrigin = data
this.totalProduct = data.length this.totalProduct = data.length
this.handlePage() this.handlePage()
}).catch(res => { }) }).catch(res => { })
}, },
// //
getRemain (startTime, endTime) { getRemain (startTime, endTime) {
return parseInt(((new Date(endTime).getTime() - new Date(startTime).getTime()) / 86400000)) return parseInt(((new Date(endTime) - new Date(startTime)) / 86400000))
}, },
// //
handlePage () { handlePage () {
@ -792,6 +794,15 @@ export default {
this.handlePage() this.handlePage()
this.$router.push(`addcustomer?id=${this.customerId}&type=tab2&page=${val}`) this.$router.push(`addcustomer?id=${this.customerId}&type=tab2&page=${val}`)
}, },
//
filterForm2 () {
const list = this.productAllOrigin
const { productType, status, keyword } = this.form2
this.productAll = list.filter(e => (productType === '' || productType === e.productType) && (e.status === status || status === '全部') && (!e.goodsName || (e.goodsName && e.goodsName.includes(keyword))))
this.pageProduct = 1
this.totalProduct = this.productAll.length
this.handlePage()
},
// //
setCustomer () { setCustomer () {
this.initCustomer() this.initCustomer()
@ -902,12 +913,6 @@ export default {
this.productTypeList = res.classificationList this.productTypeList = res.classificationList
}).catch(err => { }) }).catch(err => { })
}, },
//
filterForm2 () {
const list = this.productAll
const { productType, status, keyword } = this.form2
this.products = list.filter(e => (productType === '' || productType === e.productType) && (e.status === status || status === '全部') && (!e.goodsName || (e.goodsName && e.goodsName.includes(keyword))))
},
// //
exportList () { exportList () {
let list = this.productAll let list = this.productAll
@ -935,11 +940,11 @@ export default {
// //
getOrder () { getOrder () {
const { orderStatus, orderType } = this.form3 const { orderStatus, orderType, keyword } = this.form3
this.$post(this.api.getCustomerOrderRecord, { this.$post(this.api.getCustomerOrderRecord, {
customerId: this.customerId, customerId: this.customerId,
cityId: '', cityId: '',
customerName: this.form.customerName, orderContent: keyword,
orderStatus, orderStatus,
orderType, orderType,
pageNo: this.pageOrder, pageNo: this.pageOrder,

@ -6,26 +6,19 @@
<h1>欢迎使用开发者平台</h1> <h1>欢迎使用开发者平台</h1>
<div class="form"> <div class="form">
<ul class="tab"> <ul class="tab">
<li v-for="(item, i) in tabList" :key="i" :class="{active: activeIndex == item.id}" @click="handleSelect(item.id)">{{item.label}}</li> <li v-for="(item, i) in tabList" :key="i" :class="{ active: activeIndex == item.id }"
@click="handleSelect(item.id)">{{ item.label }}</li>
</ul> </ul>
<el-form v-show="activeIndex === '1'" :model="param" :rules="rules" ref="login" label-width="0px"> <el-form v-show="activeIndex === '1'" :model="param" :rules="rules" ref="login" label-width="0px">
<el-form-item prop="account"> <el-form-item prop="account">
<el-input @blur="blur" v-model="param.account" placeholder="请输入账号"></el-input> <el-input @blur="blur" v-model="param.account" placeholder="请输入账号"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="password"> <el-form-item prop="password">
<el-input <el-input type="password" placeholder="请输入密码" v-model="param.password">
type="password"
placeholder="请输入密码"
v-model="param.password"
>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item prop="code" v-if="showVerify"> <el-form-item prop="code" v-if="showVerify">
<el-input <el-input placeholder="请输入验证码" v-model="param.code" @keyup.enter.native="submitForm()">
placeholder="请输入验证码"
v-model="param.code"
@keyup.enter.native="submitForm()"
>
</el-input> </el-input>
<img @click="blur" :src="verificationIMG" class="verification" alt=""> <img @click="blur" :src="verificationIMG" class="verification" alt="">
</el-form-item> </el-form-item>
@ -34,24 +27,17 @@
</div> </div>
</el-form> </el-form>
<el-form v-show="activeIndex==='2'" :model="phoneOrEmail" :rules="phoneOrEmailrules" ref="phoneOrEmail" label-width="0px"> <el-form v-show="activeIndex === '2'" :model="phoneOrEmail" :rules="phoneOrEmailrules" ref="phoneOrEmail"
label-width="0px">
<el-form-item prop="account"> <el-form-item prop="account">
<el-input @blur="phoneBlur" v-model="phoneOrEmail.account" placeholder="请输入电话/邮箱"></el-input> <el-input @blur="phoneBlur" v-model="phoneOrEmail.account" placeholder="请输入电话/邮箱"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="password"> <el-form-item prop="password">
<el-input <el-input type="password" placeholder="请输入密码" v-model="phoneOrEmail.password">
type="password"
placeholder="请输入密码"
v-model="phoneOrEmail.password"
>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item prop="code" v-if="showPhoneVerify"> <el-form-item prop="code" v-if="showPhoneVerify">
<el-input <el-input placeholder="请输入验证码" v-model="phoneOrEmail.code" @keyup.enter.native="submitForm('phone')">
placeholder="请输入验证码"
v-model="phoneOrEmail.code"
@keyup.enter.native="submitForm('phone')"
>
</el-input> </el-input>
<img @click="phoneBlur" :src="PhoneVerificationIMG" class="verification" alt=""> <img @click="phoneBlur" :src="PhoneVerificationIMG" class="verification" alt="">
</el-form-item> </el-form-item>
@ -71,7 +57,8 @@
<el-form-item label="验证码"> <el-form-item label="验证码">
<div style="display:flex;"> <div style="display:flex;">
<el-input v-model="phoneCode" placeholder="请输入验证码" maxlength="6"></el-input> <el-input v-model="phoneCode" placeholder="请输入验证码" maxlength="6"></el-input>
<el-button style="margin-left:10px" @click="sendPhoneCode" :disabled="phoneDisabled">{{phoneBtnText}}</el-button> <el-button style="margin-left:10px" @click="sendPhoneCode" :disabled="phoneDisabled">{{ phoneBtnText
}}</el-button>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -80,6 +67,20 @@
<el-button type="primary" @click="phoneSubmit"> </el-button> <el-button type="primary" @click="phoneSubmit"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog title="请选择您要登录的用户" :visible.sync="userVisible" :close-on-click-modal="false" custom-class="user-dia"
width="500px">
<p class="tips">该手机号已绑定以下用户信息</p>
<ul class="users">
<li :class="{ isEnable: !user.isEnable }" v-for="(user, i) in users" :key="i" @click="chooseUser(user)">
<span>{{ user.schoolName }}{{ user.userName }}{{ user.workNumber }}{{
user.isEnable
? ''
: '(已禁用)' }}</span>
<i class="el-icon-right"></i>
</li>
</ul>
</el-dialog>
<v-footer class="footer" ref="footer"></v-footer> <v-footer class="footer" ref="footer"></v-footer>
</div> </div>
</template> </template>
@ -87,6 +88,9 @@
<script> <script>
import vFooter from '../components/Footer' import vFooter from '../components/Footer'
import Setting from '@/setting' import Setting from '@/setting'
import addRoutes from '@/libs/route/addRoutes'
import CryptoJS from 'crypto-js'
import JSEncrypt from 'jsencrypt'
export default { export default {
data: function () { data: function () {
var regPhoneOrEmail = (rule, value, callback) => {// var regPhoneOrEmail = (rule, value, callback) => {//
@ -155,8 +159,10 @@ export default {
phoneDisabled: false, phoneDisabled: false,
phoneBtnText: '发送验证码', phoneBtnText: '发送验证码',
phoneTimer: '', phoneTimer: '',
phoneOpener:'' phoneOpener: '',
userVisible: false,
users: [],
}; };
}, },
components: { components: {
@ -190,26 +196,29 @@ export default {
let param = val === 'phone' ? this.phoneOrEmail : this.param let param = val === 'phone' ? this.phoneOrEmail : this.param
this.$refs[ref].validate(valid => { this.$refs[ref].validate(valid => {
if (valid) { if (valid) {
this.$post(this.api.logins,param).then(res => { this.$post(this.api.logins, param).then(({ status, data, message }) => {
const { message } = res localStorage.removeItem('examPath')
sessionStorage.setItem('token',res.data.token) localStorage.removeItem('reviewPath')
this.$get(`${this.api.getUserRolesPermissionMenu}?platformId=${Setting.platformId}`).then(res => { this.getOss()
const list = res.permissionMenu if (status == 200) {
this.$store.commit('setDataPer', res.dataPermissionList) const accounts = data.userAccounts
this.$message.success(message); //
this.$router.push({ if (accounts instanceof Array) {
path: list[0].children[0].path this.users = accounts
}); this.userVisible = true
localStorage.setItem('ms_username', this.param.username); } else {
}).catch(err => { sessionStorage.setItem('token', data.token)
if (err.status === 500) { this.setLogin()
sessionStorage.clear() }
} else {
param.code = ''
this.$message.error(message)
} }
})
}).catch(err => { }).catch(err => {
if (err.status === 30001) { if (err.status === 30001) {
this.phoneVisible = true this.phoneVisible = true
}else if(err.status == 10004){ } else if (err.status == 10004 || err.status == 10005) {
param.code = ''
this.blur() this.blur()
} }
}); });
@ -218,7 +227,54 @@ export default {
return false; return false;
} }
}); });
},
// oss
async getOss () {
const A = (key, encryptedData) => {
const keyHex = CryptoJS.enc.Base64.parse(key)
const decrypted = CryptoJS.AES.decrypt(encryptedData, keyHex, {
mode: CryptoJS.mode.ECB,
padding: CryptoJS.pad.Pkcs7
})
return decrypted.toString(CryptoJS.enc.Utf8)
}
const R = (encryptedKey, privateKey) => {
const decrypt = new JSEncrypt()
decrypt.setPrivateKey(privateKey)
const decryptedKey = decrypt.decrypt(encryptedKey)
return decryptedKey
}
const res = await this.$get(this.api.encrypt)
const RE = A(R(res.encryptedKey, res.privateKey), res.encryptedData).split('/')
localStorage.setItem('osc', JSON.stringify(RE))
},
//
chooseUser (user) {
user.isEnable && this.$post(`${this.api.getToken}?id=${user.id}`).then(({ data }) => {
sessionStorage.setItem('token', data.token)
this.token = data.token
this.setLogin()
}).catch(res => { })
},
//
async setLogin () {
try {
const res = await this.$get(`${this.api.getUserRolesPermissionMenu}?platformId=${Setting.platformId}`)
const list = res.permissionMenu
addRoutes(res.permissionMenu[0].children)
this.$store.commit('setDataPer', res.dataPermissionList)
this.$message.success('登录成功!')
this.$router.push({
path: list[0].children[0].path
});
localStorage.setItem('ms_username', this.param.username);
} catch (e) {
if (e.status === 500) {
sessionStorage.clear()
}
}
}, },
blur () { blur () {
this.param.random = Math.floor(Math.random() * 999999999) this.param.random = Math.floor(Math.random() * 999999999)
@ -305,24 +361,28 @@ export default {
.wrap { .wrap {
min-height: 100%; min-height: 100%;
} }
.logo { .logo {
z-index: 2; z-index: 2;
position: absolute; position: absolute;
top: 50px; top: 50px;
left: 50px; left: 50px;
} }
.login { .login {
position: relative; position: relative;
height: 100%; height: 100%;
background-image: url(../assets/img/devLogin.jpg); background-image: url(../assets/img/devLogin.jpg);
background-size: 100%; background-size: 100%;
} }
.box { .box {
width: 448px; width: 448px;
position: absolute; position: absolute;
right: 20%; right: 20%;
top: 50%; top: 50%;
transform: translateY(-50%); transform: translateY(-50%);
h1 { h1 {
margin-bottom: 20px; margin-bottom: 20px;
font-size: 34px; font-size: 34px;
@ -330,21 +390,25 @@ export default {
text-align: center; text-align: center;
} }
} }
/deep/ .form { /deep/ .form {
padding: 20px 60px 0; padding: 20px 60px 0;
background-color: rgba(255, 255, 255, .3); background-color: rgba(255, 255, 255, .3);
border-radius: 4px; border-radius: 4px;
box-sizing: border-box; box-sizing: border-box;
border: 4px solid rgba(255, 255, 255, .2); border: 4px solid rgba(255, 255, 255, .2);
.el-input__inner { .el-input__inner {
height: 50px; height: 50px;
line-height: 50px; line-height: 50px;
border: 1px solid rgba(220, 220, 220, 1); border: 1px solid rgba(220, 220, 220, 1);
border-radius: 2px; border-radius: 2px;
} }
.el-form-item { .el-form-item {
margin-bottom: 25px; margin-bottom: 25px;
} }
.verification { .verification {
position: absolute; position: absolute;
top: 1px; top: 1px;
@ -354,11 +418,13 @@ export default {
cursor: pointer; cursor: pointer;
} }
} }
.tab { .tab {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
margin-bottom: 24px; margin-bottom: 24px;
li { li {
padding: 18px 5px; padding: 18px 5px;
margin: 0 20px; margin: 0 20px;
@ -367,23 +433,28 @@ export default {
color: #fff; color: #fff;
cursor: pointer; cursor: pointer;
border-bottom: 2px solid transparent; border-bottom: 2px solid transparent;
&:last-child { &:last-child {
margin-right: 0; margin-right: 0;
} }
&.active { &.active {
color: #fff; color: #fff;
border-bottom-color: #ccc; border-bottom-color: #ccc;
} }
} }
} }
.title { .title {
font-size: 16px; font-size: 16px;
text-align: center; text-align: center;
font-weight: bold; font-weight: bold;
} }
.login-btn { .login-btn {
text-align: center; text-align: center;
} }
.login-btn button { .login-btn button {
width: 100%; width: 100%;
height: 48px; height: 48px;
@ -393,13 +464,55 @@ export default {
border-radius: 4px; border-radius: 4px;
border: 0; border: 0;
} }
.forget { .forget {
margin-bottom: 28px; margin-bottom: 28px;
text-align: right; text-align: right;
color: #999; color: #999;
font-weight: bold; font-weight: bold;
&:hover { &:hover {
color: #0092FF; color: #0092FF;
} }
} }
/deep/.user-dia {
.tips {
margin-bottom: 20px;
text-align: center;
color: #666;
}
.users {
li {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 15px;
margin-bottom: 10px;
line-height: 40px;
font-size: 14px;
background-color: #ebeef5;
cursor: pointer;
&.isEnable {
color: #c0c4cc;
background-color: #f5f7fa;
cursor: not-allowed;
}
&:last-child {
margin-bottom: 0;
}
&:hover {
background-color: #d3e0ff;
}
i {
font-size: 16px;
}
}
}
}
</style> </style>

@ -154,9 +154,10 @@ export default {
next (next, setupId, competitionId) { next (next, setupId, competitionId) {
if (!next) { if (!next) {
if (this.step === 3 && this.$refs['step' + this.step].form[0].contentId) { if (this.step === 3 && this.$refs['step' + this.step].form[0].contentId) {
// && // &&
this.editing = 0 this.editing = 0
this.step = 1 this.step = 1
this.$parent.initTabs && this.$parent.initTabs()
} else { } else {
// //
this.$router.push(`/match`) this.$router.push(`/match`)

@ -322,12 +322,12 @@ export default {
// //
if (this.step1.completeCompetitionSetup.competitionType) { if (this.step1.completeCompetitionSetup.competitionType) {
const { form, originForm } = this const { form, originForm } = this
// 34 // 34
let changeLimit = 0 let changeLimit = 0
for (const i in form.competitionStageList) { for (const i in form.competitionStageList) {
const e = form.competitionStageList[i] const e = form.competitionStageList[i]
if (e.teamNumLimit !== originForm.competitionStageList[i].teamNumLimit || e.customNumber !== originForm.competitionStageList[i].customNumber) { const originStage = originForm.competitionStageList[i]
if (!originStage || e.teamNumLimit !== originStage.teamNumLimit || e.customNumber !== originStage.customNumber) {
changeLimit = 1 changeLimit = 1
break break
} }

@ -392,6 +392,7 @@ export default {
this.$confirm('团队赛发布成功,由于您设置的报名时间已结束,如需自动分配阶段参赛人员,请前往报名人员列表进行设置', '提示', { this.$confirm('团队赛发布成功,由于您设置的报名时间已结束,如需自动分配阶段参赛人员,请前往报名人员列表进行设置', '提示', {
confirmButtonText: '关闭', confirmButtonText: '关闭',
type: 'success', type: 'success',
showCancelButton: false,
closeOnClickModal: false, closeOnClickModal: false,
dangerouslyUseHTMLString: true, dangerouslyUseHTMLString: true,
showClose: false, showClose: false,

@ -151,7 +151,7 @@
</template> </template>
<script> <script>
import util from "@/libs/util"; import Util from '@/libs/util'
import Bus from '@/libs/bus' import Bus from '@/libs/bus'
import qs from 'qs' import qs from 'qs'
export default { export default {
@ -283,13 +283,14 @@ export default {
}] }]
}, },
loading: false, loading: false,
now: '',
}; };
}, },
watch: { watch: {
"form.month": function (val) { "form.month": function (val) {
if (val) { if (val) {
let unit = 24 * 60 * 60 * 1000; let unit = 24 * 60 * 60 * 1000;
this.date = [util.formatDate("yyyy-MM-dd", new Date(new Date().getTime() - unit * 30 * val)), util.formatDate("yyyy-MM-dd", new Date(new Date().getTime() + unit))]; this.date = [Util.formatDate("yyyy-MM-dd", new Date(new Date().getTime() - unit * 30 * val)), Util.formatDate("yyyy-MM-dd", new Date(new Date().getTime() + unit))];
} else { } else {
this.date = []; this.date = [];
} }
@ -340,49 +341,57 @@ export default {
}) })
}, },
methods: { methods: {
getData () { async getData () {
this.loading = true this.loading = true
try {
const { form } = this const { form } = this
this.$post(this.api.CompetitionPageConditionQueryByNakadai, { const { data } = await this.$post(this.api.CompetitionPageConditionQueryByNakadai, {
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
...form ...form
}).then(({ data }) => { })
const list = data.records this.matchData = data.records
//
this.now = await Util.getNow()
clearInterval(this.timer)
this.handleBeganStage()
this.timer = setInterval(() => { this.timer = setInterval(() => {
const now = new Date() this.now = new Date(this.now.setSeconds(this.now.getSeconds() + 1))
list.map(e => { this.handleBeganStage()
}, 1000)
this.total = data.total
this.$refs.table.clearSelection()
this.loading = false
if (!this.matchData.length && this.total) {
this.page--
this.getData()
}
} catch (e) {
this.loading = false
}
},
//
async handleBeganStage () {
this.matchData.map(e => {
if (!e.playingStages) { if (!e.playingStages) {
this.$set(e, 'playingStages', []) this.$set(e, 'playingStages', [])
} else { } else {
e.playingStages = [] e.playingStages = []
} }
// //
if (now >= new Date(e.playStartTime) && now <= new Date(e.playEndTime)) { if (this.now >= new Date(e.playStartTime) && this.now <= new Date(e.playEndTime)) {
// //
if (e.competitionStageList) { if (e.competitionStageList) {
for (const n of e.competitionStageList) { for (const n of e.competitionStageList) {
// //
if (now >= new Date(n.startTime) && now <= new Date(n.endTime)) { if (this.now >= new Date(n.startTime) && this.now <= new Date(n.endTime)) {
e.playingStages.push(n) e.playingStages.push(n)
} }
} }
} }
} }
}) })
}, 1000)
this.matchData = list
this.total = data.total
this.$refs.table.clearSelection()
this.loading = false
if (!this.matchData.length && this.total) {
this.page--
this.getData()
}
}).catch(res => {
this.loading = false
})
}, },
initData () { initData () {
this.page = 1; this.page = 1;
@ -402,7 +411,7 @@ export default {
type: "warning" type: "warning"
}).then(async () => { }).then(async () => {
await this.$post(`${this.api.copyCompetition}?competitionId=${row.id}`) await this.$post(`${this.api.copyCompetition}?competitionId=${row.id}`)
util.successMsg('复制成功') Util.successMsg('复制成功')
this.initData() this.initData()
}).catch(() => { }) }).catch(() => { })
}, },
@ -425,7 +434,7 @@ export default {
competitionContents: data competitionContents: data
}).then(async res => { }).then(async res => {
await this.$post(`${this.api.refreshPageNotification}?content=1`) await this.$post(`${this.api.refreshPageNotification}?content=1`)
util.successMsg('修改成功') Util.successMsg('修改成功')
this.modifyVisible = false this.modifyVisible = false
this.getData() this.getData()
}).catch(err => { }) }).catch(err => { })
@ -450,7 +459,7 @@ export default {
}) })
.then(() => { .then(() => {
this.$post(`${this.api.batchDeleteCompetition}?competitionIds=${row.id}`).then(res => { this.$post(`${this.api.batchDeleteCompetition}?competitionIds=${row.id}`).then(res => {
util.successMsg("删除成功"); Util.successMsg("删除成功");
this.getData(); this.getData();
}).catch(res => { }).catch(res => {
}); });
@ -495,7 +504,7 @@ export default {
isOpen: val, isOpen: val,
type: 0 // (01) type: 0 // (01)
}).then(res => { }).then(res => {
util.successMsg(val == 1 ? '禁用成功' : '启用成功') Util.successMsg(val == 1 ? '禁用成功' : '启用成功')
}).catch(err => { }) }).catch(err => { })
await this.$post(`${this.api.refreshPageNotification}?content=1`) await this.$post(`${this.api.refreshPageNotification}?content=1`)

@ -42,7 +42,6 @@ export default {
tab3: "竞赛进展", tab3: "竞赛进展",
tab4: "公告通知", tab4: "公告通知",
tab5: "报名人员", tab5: "报名人员",
tab6: '查看异常团队'
} }
}; };
}, },
@ -55,11 +54,11 @@ export default {
AbnormalTeam AbnormalTeam
}, },
mounted () { mounted () {
if (Setting.dynamicRoute) { // if (Setting.dynamicRoute) {
this.initTabs() this.initTabs()
} else { // } else {
this.active = this.$route.query.tab || 'tab1' // this.active = this.$route.query.tab || 'tab1'
} // }
}, },
methods: { methods: {
async initTabs () { async initTabs () {
@ -77,7 +76,12 @@ export default {
tab3 || this.$delete(this.tabs, 'tab3') tab3 || this.$delete(this.tabs, 'tab3')
tab4 || this.$delete(this.tabs, 'tab4') tab4 || this.$delete(this.tabs, 'tab4')
tab5 || this.$delete(this.tabs, 'tab5') tab5 || this.$delete(this.tabs, 'tab5')
res.competition.completeCompetitionSetup.competitionType || this.$delete(this.tabs, 'tab6')
if (res.competition.completeCompetitionSetup.competitionType) {
this.tabs.tab6 || this.$set(this.tabs, 'tab6', '查看异常团队')
} else {
this.tabs.tab6 && this.$delete(this.tabs, 'tab6')
}
const type = this.$route.query.tab const type = this.$route.query.tab
const keys = Object.keys(this.tabs) const keys = Object.keys(this.tabs)

@ -8,30 +8,50 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="stageName" label="阶段名称" align="center"></el-table-column> <el-table-column prop="stageName" label="阶段名称" align="center"></el-table-column>
<el-table-column prop="competitionContent" label="比赛内容" align="center"></el-table-column>
<el-table-column prop="methodName" label="比赛方式" align="center"></el-table-column> <el-table-column prop="methodName" label="比赛方式" align="center"></el-table-column>
<el-table-column prop="founderName" label="比赛形式" align="center"> <el-table-column label="竞赛类型" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.competitionType ? '团队赛' : '个人赛' }} {{ scope.row.competitionType ? '团队赛' : '个人赛' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="ruleName" label="赛制" align="center"></el-table-column> <el-table-column prop="ruleName" label="赛制" align="center"></el-table-column>
<el-table-column prop="status" label="状态" align="center"></el-table-column> <el-table-column prop="status" label="大赛状态" align="center"></el-table-column>
<el-table-column label="竞赛起止时间" width="290" align="center"> <el-table-column prop="reviewStatus" label="评阅情况" align="center"></el-table-column>
<el-table-column label="竞赛时间" width="290" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.startTime + ' ~ ' + scope.row.endTime }} {{ scope.row.startTime + ' ~ ' + scope.row.endTime }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="260"> <el-table-column label="操作" align="center" width="280">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" @click="toRank(scope.row, scope.$index)">排名</el-button> <el-button type="text" @click="toRank(scope.row, scope.$index)">排名</el-button>
<el-button @click="toArch(scope.row, scope.$index)">成绩管理</el-button> <el-button type="text" @click="toArch(scope.row, scope.$index)">成绩统计</el-button>
<!-- <el-button @click="toArch(scope.row, scope.$index)">编辑试卷</el-button> -->
<template v-if="scope.row.method === 1">
<el-button v-if="scope.row.showMyReviewTask" type="text"
@click="showReview(scope.row, '/myReview/records')">我的评阅任务</el-button>
<el-button v-auth="'/review:分配评阅任务'" type="text"
@click="showReview(scope.row, '/allocationReview')">分配评阅任务</el-button>
</template>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-drawer title="" :visible.sync="reviewVisible" size="100%" :close-on-click-modal="false" :withHeader="false"
custom-class="review-dia">
<div>
<button type="button" class="el-drawer__close-btn" @click="reviewVisible = false">
<i class="el-dialog__close el-icon el-icon-close"></i>
</button>
</div>
<iframe :src="reviewUrl" frameborder="0" width="100%"></iframe>
</el-drawer>
</div> </div>
</template> </template>
<script> <script>
import Setting from '@/setting'
import Const from '@/const/match' import Const from '@/const/match'
export default { export default {
name: "matchArch", name: "matchArch",
@ -42,6 +62,8 @@ export default {
form: {}, form: {},
timer: null, timer: null,
curStep: [], curStep: [],
reviewVisible: false,
reviewUrl: '',
}; };
}, },
mounted () { mounted () {
@ -101,7 +123,16 @@ export default {
this.$store.commit('setInnerReferrer', this.$route.fullPath) this.$store.commit('setInnerReferrer', this.$route.fullPath)
const cur = this.form.competitionStage[i] const cur = this.form.competitionStage[i]
const showFile = !!(cur.method === 2 && cur.competitionStageContentSetting && cur.competitionStageContentSetting.whetherToUploadFiles) const showFile = !!(cur.method === 2 && cur.competitionStageContentSetting && cur.competitionStageContentSetting.whetherToUploadFiles)
this.$router.push(`/${cur.method !== 1 ? 'matchArchList' : 'theoryArchList'}?id=${this.id}&stageId=${row.stageId}&method=${row.method}&competitionType=${row.competitionType}&showFile=${showFile}`) this.$router.push(`/${cur.method === 2 ? 'otherArchList' : 'matchArchList'}?id=${this.id}&stageId=${row.stageId}&method=${row.method}&competitionType=${row.competitionType}&showFile=${showFile}&showMyReviewTask=${row.showMyReviewTask}`)
},
//
showReview (row, path) {
let url = `${location.origin}/reviewCenter/`
if (Setting.isDev) url = `http://192.168.31.125:8099/`
url += `#${path}?token=${sessionStorage.getItem('token')}&v=${Date.now()}&competitionId=${this.id}&stageId=${row.stageId}`
localStorage.setItem('review_token', sessionStorage.getItem('token'))
this.reviewUrl = url
this.reviewVisible = true
} }
} }
}; };
@ -122,4 +153,16 @@ export default {
margin-right: 30px; margin-right: 30px;
} }
} }
/deep/.review-dia {
.el-drawer__close-btn {
position: absolute;
top: 20px;
right: 20px;
}
iframe {
height: 100%;
}
}
</style> </style>

@ -17,8 +17,17 @@
</p> </p>
</div> </div>
<div class="item"> <div class="item">
<p class="name">实验平均分</p> <p class="name">平均分</p>
<p class="val">{{ avgScore }}</p> <p class="val">{{ (+statData.avgScore).toFixed(2) }}</p>
</div>
<div class="item">
<p class="name">最高分</p>
<p class="val">{{ statData.maxScore }}
</p>
</div>
<div class="item">
<p class="name">最低分</p>
<p class="val">{{ statData.minScore }}</p>
</div> </div>
</div> </div>
<div class="chart" id="chart"></div> <div class="chart" id="chart"></div>
@ -26,54 +35,95 @@
</el-card> </el-card>
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
<div v-if="showFile" class="tabs m-b-20"> <div class="tabs m-b-20">
<a class="item" v-for="(item, i) in tabs" :key="i" :class="{ active: i === active }" @click="tabChange(i)">{{ <a class="item" v-for="(item, i) in tabs" :key="i" :class="{ active: item.id === active }"
item }}</a> @click="tabChange(item.id)">{{ item.name }}</a>
</div> </div>
<div class="flex-between m-b-20"> <div class="tool flex-between">
<ul class="filter">
<li>
<label>省份</label>
<el-select v-model="filter.provinceId" filterable clearable placeholder="请选择省份" @change="provinceChange"
@clear="clearProvince">
<el-option v-for="(item, i) in provinces" :key="i" :label="item.provinceName"
:value="item.provinceId"></el-option>
</el-select>
</li>
<li>
<label>城市</label>
<el-select v-model="filter.cityId" filterable clearable placeholder="请选择城市" :disabled="!filter.provinceId"
@change="initData">
<el-option v-for="(item, i) in cities" :key="i" :label="item.cityName" :value="item.cityId"></el-option>
</el-select>
</li>
<li>
<label>学校</label>
<el-select v-model="filter.realSchoolId" clearable filterable placeholder="请选择学校" @change="initData">
<el-option v-for="(item, i) in schools" :key="i" :label="item.schoolName"
:value="item.schoolId"></el-option>
</el-select>
</li>
<li v-if="active">
<label>评阅状态</label>
<el-select v-model="filter.reviewStatus" clearable placeholder="请选择评阅状态" @change="initData">
<el-option value="待评阅"></el-option>
<el-option value="已评阅"></el-option>
</el-select>
</li>
<li>
<el-input size="small" placeholder="请输入学生姓名、学生学号、团队名称" prefix-icon="el-icon-search" v-model="keyword"
clearable style="width: 300px"></el-input>
</li>
</ul>
<div> <div>
<el-input size="small" placeholder="请输入学校/学生姓名" prefix-icon="el-icon-search" v-model="keyword" clearable <template v-if="active && method === 1">
style="width: 300px"></el-input> <el-button v-auth="'/review:分配评阅任务'" type="primary" size="mini"
</div> @click="showReview('/allocationReview')">分配评阅任务</el-button>
<div v-if="!active"> <el-button v-if="showMyReviewTask" type="primary" size="mini"
<el-button v-if="method == 2" type="primary" @click="batchImport">上传成绩</el-button> @click="showReview('/myReview/records')">我的评阅任务</el-button>
<el-button type="primary" :disabled="!!multipleSelection.find(e => method != 2 && !e.reportId)" <el-button type="primary" size="mini" @click="exportFiles">导出答题文件</el-button>
@click="delAllData">批量删除</el-button> </template>
<el-button type="primary" :loading="exporting" @click="exportData">{{ exporting ? '正在导出' : '批量导出' <el-button type="primary" size="mini" :loading="exportingList" @click="exportList">{{ exportingList ? '正在导出'
:
'导出成绩列表'
}}</el-button> }}</el-button>
</div> <template v-if="active">
<div v-else> <el-button type="primary" size="mini" :loading="exportingReport" @click="exporReport">{{ exportingReport ?
<el-button type="primary" :loading="exporting1" @click="exportData1">{{ exporting1 ? '正在导出' : '批量导出' '正在导出' :
'导出成绩报告'
}}</el-button> }}</el-button>
<el-button type="primary" size="mini" @click="delAllData">批量删除</el-button>
</template>
</div> </div>
</div> </div>
<template v-if="!active">
<el-table :data="list" class="table" :key="1" ref="table" stripe header-align="center" <el-table :data="list" class="table" :key="1" ref="table" stripe header-align="center"
@selection-change="handleSelectionChange" row-key="id"> @selection-change="handleSelectionChange" row-key="id" @sort-change="sortChange">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> <el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center"> <el-table-column type="index" width="60" label="序号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.$index + (page - 1) * pageSize + 1 }} {{ scope.$index + (page - 1) * pageSize + 1 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="provinceName" label="省份" min-width="100" align="center"></el-table-column>
<el-table-column prop="cityName" label="城市" min-width="100" align="center"></el-table-column>
<el-table-column prop="schoolName" label="学生账号归属" min-width="100" align="center"></el-table-column> <el-table-column prop="schoolName" label="学生账号归属" min-width="100" align="center"></el-table-column>
<el-table-column prop="realSchool" label="学生所在院校" min-width="100" align="center"></el-table-column> <el-table-column prop="realSchool" label="学生所在院校" min-width="100" align="center"></el-table-column>
<el-table-column v-if="competitionType" prop="teamName" label="团队名称" min-width="100" <el-table-column v-if="competitionType" prop="teamName" label="团队名称" min-width="100"
align="center"></el-table-column> align="center"></el-table-column>
<el-table-column prop="userName" label="学生姓名" min-width="100" align="center"></el-table-column> <el-table-column prop="userName" label="学生姓名" min-width="100" align="center"></el-table-column>
<el-table-column prop="workNumber" label="学号" min-width="100" align="center"></el-table-column> <el-table-column prop="workNumber" label="学号" min-width="100" align="center"></el-table-column>
<el-table-column prop="score" label="分数" width="90" align="center"> <el-table-column prop="score" label="成绩" width="90" align="center" sortable="custom">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.submitTime ? scope.row.score : '--' }} {{ scope.row.submitTime ? scope.row.score : '--' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="timeSum" label="时" width="90" align="center"> <el-table-column prop="timeSum" label="时" width="90" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.timeSum ? scope.row.timeSum + 'min' : '--' }} {{ scope.row.timeSum ? scope.row.timeSum + 'min' : '--' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="submitTime" label="提交时间" min-width="150" align="center"> <el-table-column prop="submitTime" label="提交时间" min-width="150" align="center" sortable="custom">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.submitTime || '--' }} {{ scope.row.submitTime || '--' }}
</template> </template>
@ -83,57 +133,42 @@
{{ scope.row.reportId || method == 2 ? '已参加' : '未参加' }} {{ scope.row.reportId || method == 2 ? '已参加' : '未参加' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="160"> <el-table-column prop="evaluationStatus" label="评阅状态" align="center" width="90">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="method != 2 && scope.row.reportId" type="text" <span v-if="scope.row.reviewStatus === '-'">-</span>
@click="show(scope.row)">查看成绩报告</el-button> <el-tag v-else :type="scope.row.reviewStatus === '待评阅' ? 'danger' : 'success'">{{ scope.row.reviewStatus
<el-button v-if="scope.row.reportId" type="text" @click="handleDelete(scope.row)">删除</el-button> }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
</el-table> <el-table-column v-if="active" label="操作" align="center" width="300">
<div class="pagination"> <template v-if="scope.row.reportId" slot-scope="scope">
<el-pagination background layout="total, prev, pager, next" :total="total" <template v-if="method === 1">
@current-change="handleCurrentChange" :current-page="page"> <el-popover placement="top" trigger="click" popper-class="files-tip">
</el-pagination> <div>
<ul class="match-files">
<li v-for="(file, i) in scope.row.files" :key="i" @click="preview(file.attachmentUrl)">{{
file.attachmentName }}</li>
</ul>
</div> </div>
<el-button slot="reference" :disabled="!scope.row.hasFile" type="text"
@click="showFiles(scope.row)">查看答题文件</el-button>
</el-popover>
<el-button style="margin-left: 10px;" :disabled="!scope.row.hasFile" type="text"
@click="downloadFile(scope.row)">下载答题文件</el-button>
</template> </template>
<template v-else> <el-button v-if="method != 2" type="text" @click="toReport(scope.row)">查看成绩报告</el-button>
<el-table :data="list1" class="table" :key="2" stripe header-align="center" <el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
@selection-change="handleSelectionChange1" row-key="id">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center">
<template slot-scope="scope">
{{ scope.$index + (page1 - 1) * pageSize + 1 }}
</template>
</el-table-column>
<el-table-column prop="schoolName" label="学生账号归属" align="center"></el-table-column>
<el-table-column prop="realSchool" label="学生所在院校" align="center"></el-table-column>
<el-table-column v-if="competitionType" prop="teamName" label="团队名称" align="center"></el-table-column>
<el-table-column prop="userName" label="学生姓名" align="center"></el-table-column>
<el-table-column prop="workNumber" label="学号" align="center"></el-table-column>
<el-table-column prop="fileName" label="文件名" align="center"></el-table-column>
<el-table-column prop="fileSize" label="文件大小" align="center"></el-table-column>
<el-table-column prop="fileType" label="文件类型" align="center"></el-table-column>
<el-table-column prop="fileFormat" label="文件格式" align="center"></el-table-column>
<el-table-column prop="createTime" label="提交时间" width="150" align="center">
</el-table-column>
<el-table-column label="操作" width="200">
<template slot-scope="scope">
<el-button v-if="!isCompress(scope.row.fileFormat)" type="text"
@click="preview(scope.row)">预览文件</el-button>
<el-button type="primary" size="mini" :loading="scope.row.loading"
@click="exportFile(scope.row)">导出文件</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background layout="total, prev, pager, next" :total="total1" <el-pagination background layout="total, prev, pager, next" :total="total"
@current-change="handleCurrentChange1" :current-page="page1"> @current-change="handleCurrentChange" :current-page="page">
</el-pagination> </el-pagination>
</div> </div>
</template>
</el-card> </el-card>
</div> </div>
<el-dialog title="批量导入" :visible.sync="importVisible" width="24%" :close-on-click-modal="false" <el-dialog title="批量导入" :visible.sync="importVisible" width="24%" :close-on-click-modal="false"
@close="cancelUpload"> @close="cancelUpload">
<div style="text-align: center"> <div style="text-align: center">
@ -164,23 +199,54 @@
<el-button @click="cancelUpload">停止导入</el-button> <el-button @click="cancelUpload">停止导入</el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-drawer title="" :visible.sync="reviewVisible" size="100%" :close-on-click-modal="false" :withHeader="false"
custom-class="review-dia">
<div>
<button type="button" class="el-drawer__close-btn" @click="reviewVisible = false">
<i class="el-dialog__close el-icon el-icon-close"></i>
</button>
</div>
<iframe :src="reviewUrl" frameborder="0" width="100%"></iframe>
</el-drawer>
<el-dialog title="图片预览" :visible.sync="previewImgVisible" width="800px" :close-on-click-modal="false">
<el-image style="max-width: 100px; max-height: 100px" :src="previewImg" :preview-src-list="[previewImg]">
</el-image>
</el-dialog>
<PdfDia :key="pdfVisible" :visible.sync="pdfVisible" :src.sync="pdfSrc" />
</div> </div>
</template> </template>
<script> <script>
import util from "@/libs/util"; import Setting from '@/setting'
import PdfDia from '@/components/pdf'
import Util from '@/libs/util'
import * as echarts from "echarts"; import * as echarts from "echarts";
import axios from 'axios'; import axios from 'axios';
import Zip from '@/libs/zip'
export default { export default {
components: {
PdfDia
},
data () { data () {
return { return {
id: +this.$route.query.id, id: +this.$route.query.id,
stageId: +this.$route.query.stageId, stageId: +this.$route.query.stageId,
method: +this.$route.query.method, method: +this.$route.query.method,
competitionType: +this.$route.query.competitionType, competitionType: +this.$route.query.competitionType,
showFile: this.$route.query.showFile === 'true', showMyReviewTask: +this.$route.query.showMyReviewTask,
isCompress: util.isCompress, isCompress: Util.isCompress,
filter: {
provinceId: '',
cityId: '',
realSchoolId: '',
reviewStatus: '',
scoreSortOrder: '',
submitTimeSortOrder: '',
},
provinces: [],
cities: [],
schools: [],
keyword: this.$route.query.keyword || '', keyword: this.$route.query.keyword || '',
searchTimer: null, searchTimer: null,
list: [], list: [],
@ -203,12 +269,34 @@ export default {
headers: { headers: {
token: sessionStorage.getItem("token") token: sessionStorage.getItem("token")
}, },
statData: {}, statData: {
tabs: ['成绩列表', '文件列表'], avgScore: 0,
active: 0, maxScore: 0,
minScore: 0,
},
tabs: [
{
id: 1,
name: '已提交'
},
{
id: 0,
name: '未提交'
}
],
active: 1,
loading: false, loading: false,
exporting: false, exportingFiles: false,
exporting1: false, exportingList: false,
exportingReport: false,
previewImgVisible: false,
previewImg: '',
pdfVisible: false,
pdfSrc: '',
reviewVisible: false,
reviewUrl: '',
}; };
}, },
watch: { watch: {
@ -228,76 +316,141 @@ export default {
}, },
mounted () { mounted () {
this.getData() this.getData()
this.getProvince()
this.getSchool()
}, },
methods: { methods: {
async getData () { async getData () {
this.loading = true this.loading = true
//
if (this.active) {
const { data } = await this.$post(this.api.cCompetitionStageFileList, {
pageNum: this.page1,
pageSize: this.pageSize,
competitionId: this.id,
stageId: this.stageId,
keyWord: this.keyword,
})
data.records.forEach(e => {
e.loading = false
e.fileType = '其他'
if (util.isVideo(e.fileFormat)) {
e.fileType = '视频'
} else if (util.isAudio(e.fileFormat)) {
e.fileType = '音频'
} else if (util.isImg(e.fileFormat)) {
e.fileType = '图片'
} else if (util.isDoc(e.fileFormat)) {
e.fileType = '文档'
} else if (util.isCompress(e.fileFormat)) {
e.fileType = '压缩包'
} else if (e.fileType === 'pdf') {
e.fileType = 'pdf'
}
})
this.list1 = data.records
this.total1 = data.total
this.loading = false
} else { //
const { data, page } = await this.$post(this.api.stageGradeManagementList, { const { data, page } = await this.$post(this.api.stageGradeManagementList, {
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
competitionId: this.id, competitionId: this.id,
keyWord: this.keyword, keyWord: this.keyword,
stageId: this.stageId, stageId: this.stageId,
isNakadai: 1 isNakadai: 1,
participatingState: this.active,
...this.filter
}) })
this.loading = false this.loading = false
this.total = page.total this.total = page.total
this.list = page.records this.list = page.records
this.statData = data this.statData = data
this.avgScore = (+data.avgScore).toFixed(2) this.getChart()
this.method != 2 && this.getChart()
}
}, },
initData () { initData () {
this.page = 1 this.page = 1
this.getData() this.getData()
}, },
//
async getProvince () {
const { list } = await this.$get(this.api.queryProvince)
this.provinces = list
},
//
clearProvince () {
this.filter.cityId = ''
},
//
provinceChange () {
this.clearProvince()
this.getCity()
this.initData()
},
//
async getCity () {
const id = this.filter.provinceId
if (id) {
const { list } = await this.$get(this.api.queryCity, {
provinceId: id
})
this.cities = list
}
},
//
async getSchool () {
const { list } = await this.$get(this.api.querySchoolData)
this.schools = list
},
//
sortChange (column) {
if (column.prop === 'score') this.filter.scoreSortOrder = column.order ? column.order === 'ascending' ? 'ASC' : 'DESC' : ''
if (column.prop === 'submitTime') this.filter.scoreSortOrder = column.order ? column.order === 'ascending' ? 'ASC' : 'DESC' : ''
this.getData()
},
//
async showFiles (row) {
const { data } = await this.$get(this.api.getPaperUploadFile, {
reportId: row.reportId
})
this.$set(row, 'files', data)
},
//
async downloadFile (row) {
const res = await axios.post(this.api.getPaperUploadFileZip, {
reportIds: [row.reportId],
// reportIds: [3785],
stageId: this.stageId
}, {
headers: this.headers,
responseType: 'blob'
})
const name = res.headers['content-disposition']
Util.downloadFileDirect(name ? decodeURI(name) : '答题文件.zip', new Blob([res.data]))
},
// //
show (row) { toReport (row) {
this.$router.push(`/trialReport?reportId=${row.reportId}`) this.$router.push(`/${this.method === 1 ? 'theoryReport' : 'trialReport'}?reportId=${row.reportId}`)
}, },
// ()
async exportData () {
//
showReview (path) {
let url = `${location.origin}/reviewCenter/`
if (Setting.isDev) url = `http://192.168.31.125:8099/`
url += `#${path}?token=${sessionStorage.getItem('token')}&v=${Date.now()}&competitionId=${this.id}&stageId=${this.stageId}`
localStorage.setItem('review_token', sessionStorage.getItem('token'))
this.reviewUrl = url
this.reviewVisible = true
},
//
async exportFiles () {
if (this.list.length) { if (this.list.length) {
this.exporting = true this.exportingFiles = true
const list = this.multipleSelection
const ids = []
if (list.length) {
list.forEach(e => {
e.reportId && ids.push(e.reportId)
})
}
const res = await axios.post(this.api.getPaperUploadFileZip, {
reportIds: ids,
// reportIds: [3785],
stageId: this.stageId
}, {
headers: this.headers,
responseType: 'blob'
})
const name = res.headers['content-disposition']
Util.downloadFileDirect(name ? decodeURI(name) : '答题文件.zip', new Blob([res.data]))
this.exportingFiles = false
}
},
// ()
async exportList () {
if (this.list.length) {
this.exportingList = true
// //
if (this.multipleSelection.length) { if (this.multipleSelection.length) {
const res = await axios.post(this.api.exportExperimentalResultsInBatch, this.multipleSelection, { const res = await axios.post(this.api.exportExperimentalResultsInBatch, this.multipleSelection, {
headers: this.headers, headers: this.headers,
responseType: 'blob' responseType: 'blob'
}) })
util.downloadFileDirect(`赛事成绩.xls`, new Blob([res.data])) Util.downloadFileDirect(`赛事成绩.xls`, new Blob([res.data]))
this.exporting = false this.exportingList = false
} else if (this.list.length) { } else if (this.list.length) {
const res = await axios.post(this.api.allExperimentalResultsAreDerived, { const res = await axios.post(this.api.allExperimentalResultsAreDerived, {
pageNum: 1, pageNum: 1,
@ -305,40 +458,70 @@ export default {
competitionId: this.id, competitionId: this.id,
isNakadai: 1, isNakadai: 1,
stageId: this.stageId, stageId: this.stageId,
participatingState: this.active,
}, { }, {
headers: this.headers, headers: this.headers,
responseType: 'blob' responseType: 'blob'
}) })
util.downloadFileDirect(`赛事成绩.xls`, new Blob([res.data])) Util.downloadFileDirect(`赛事成绩.xls`, new Blob([res.data]))
this.exporting = false this.exportingList = false
} }
} }
}, },
// () // ()
exportData1 () { async exporReport () {
this.exporting1 = true if (this.list.length) {
let list = this.list1 this.exportingReport = true
if (this.multipleSelection1.length) { const list = this.multipleSelection
list = this.multipleSelection1 const ids = []
if (list.length) {
list.forEach(e => {
e.reportId && ids.push(e.reportId)
})
} }
Zip('批量导出', list, () => { let res
this.exporting1 = false //
if (this.method) {
res = await axios.post(this.api.exportExamPaperReports, {
ids,
stageId: list.length ? '' : this.stageId
}, {
headers: this.headers,
responseType: 'blob'
}) })
Util.downloadFileDirect('成绩报告.zip', new Blob([res.data]))
this.exportingReport = false
} else {
//
res = await axios.post(this.api.batchExportReportsAsZip, {
reportIds: ids,
stageId: this.stageId,
competitionId: this.id,
}, {
headers: this.headers,
responseType: 'blob'
})
Util.downloadFileDirect('成绩报告.zip', new Blob([res.data]))
this.exportingReport = false
}
}
}, },
handleDelete (row) { // async handleDelete (row) { //
this.$confirm("确定要删除吗?", "提示", { await this.$confirm(`<p>确认要删除【${row.userName}】的成绩记录吗?</p><p style="color: #f56c6c;">删除后成绩数据不可恢复,自动变为未提交</p>`, '提示', {
type: "warning" confirmButtonText: '确定',
}).then(() => { cancelButtonText: '取消',
this.$post(this.api.batchDeleteContestGrade, { type: 'warning',
closeOnClickModal: false,
dangerouslyUseHTMLString: true,
})
await this.$post(this.api.batchDeleteContestGrade, {
ids: [this.method == 2 ? row.scoreId : row.reportId], ids: [this.method == 2 ? row.scoreId : row.reportId],
competitionId: this.id, competitionId: this.id,
stageId: this.stageId stageId: this.stageId
}).then(res => { })
util.successMsg("删除成功"); Util.successMsg("删除成功")
this.getData(); this.getData()
}).catch(res => {
});
}).catch(() => { });
}, },
delAllData () { // delAllData () { //
const list = this.multipleSelection const list = this.multipleSelection
@ -360,7 +543,7 @@ export default {
await this.$post(this.api.batchDeleteContestGrade, data) await this.$post(this.api.batchDeleteContestGrade, data)
this.multipleSelection = []; this.multipleSelection = [];
this.$refs.table.clearSelection(); this.$refs.table.clearSelection();
util.successMsg("删除成功"); Util.successMsg("删除成功");
this.getData(); this.getData();
}).catch(() => { }); }).catch(() => { });
}, },
@ -382,16 +565,8 @@ export default {
handleSelectionChange1 (val) { // handleSelectionChange1 (val) { //
this.multipleSelection1 = val; this.multipleSelection1 = val;
}, },
handleCurrentChange1 (val) { //
this.page1 = val;
this.getData();
},
getChart () { // 线 getChart () { // 线
const data = [] const { fractionalSegmentCounts: data } = this.statData
const { statData } = this
for (let i = 1; i <= 10; i++) {
data.push(statData['num' + i])
}
let myChart = echarts.init(document.getElementById("chart")); let myChart = echarts.init(document.getElementById("chart"));
myChart.setOption({ myChart.setOption({
title: { text: "实验分数分布图" }, title: { text: "实验分数分布图" },
@ -401,7 +576,7 @@ export default {
type: "category", type: "category",
boundaryGap: false, boundaryGap: false,
interval: 10, interval: 10,
data: ["0-10", "10-20", "20-30", "30-40", "40-50", "50-60", "60-70", "70-80", "80-90", "90-100"] data: data.map(e => e.range)
}, },
yAxis: { yAxis: {
name: "人数", name: "人数",
@ -409,9 +584,13 @@ export default {
minInterval: 10 minInterval: 10
}, },
series: [{ series: [{
data, data: data.map(e => e.count),
type: "line", type: "line",
areaStyle: {}, areaStyle: {},
label: {
show: true,
position: 'top'
},
color: ["#8191fd"] color: ["#8191fd"]
}] }]
}); });
@ -428,12 +607,12 @@ export default {
headers: this.headers, headers: this.headers,
responseType: 'blob' responseType: 'blob'
}).then((res) => { }).then((res) => {
util.downloadFileDirect('赛事成绩导入模板.xlsx', new Blob([res.data])) Util.downloadFileDirect('赛事成绩导入模板.xlsx', new Blob([res.data]))
}).catch(res => { }) }).catch(res => { })
}, },
// //
handleExceed (files, fileList) { handleExceed (files, fileList) {
util.warningMsg( Util.warningMsg(
`当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!` `当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!`
) )
}, },
@ -443,7 +622,7 @@ export default {
headers: this.headers, headers: this.headers,
responseType: 'blob' responseType: 'blob'
}).then((res) => { }).then((res) => {
util.downloadFileDirect(`批量导入成绩管理失败数据导出.xls`, new Blob([res.data])) Util.downloadFileDirect(`批量导入成绩管理失败数据导出.xls`, new Blob([res.data]))
}).catch(res => { }) }).catch(res => { })
}, },
uploadSuccess (res) { uploadSuccess (res) {
@ -456,11 +635,11 @@ export default {
this.faildData = data this.faildData = data
this.uploadFaild = true this.uploadFaild = true
} else { } else {
util.successMsg(data.tip, 3000) Util.successMsg(data.tip, 3000)
this.importVisible = false this.importVisible = false
} }
} else { } else {
util.errorMsg(res.message || '上传失败,请检查数据') Util.errorMsg(res.message || '上传失败,请检查数据')
} }
}, },
uploadError (err, file, fileList) { uploadError (err, file, fileList) {
@ -490,29 +669,23 @@ export default {
}, },
// tab // tab
tabChange (i) { tabChange (i) {
this.multipleSelection = []
this.$refs.table.clearSelection()
this.active = i this.active = i
this.getData() this.initData()
}, },
// //
preview (item) { preview (url) {
window.open((util.isDoc(item.fileFormat) ? 'https://view.officeapps.live.com/op/view.aspx?src=' : '') + item.filePath) const ext = url.split('.').pop()
}, if (Util.isDoc(ext)) {
// window.open('https://view.officeapps.live.com/op/view.aspx?src=' + url)
exportFile (item) { } else if (Util.isImg(ext)) {
item.loading = true this.previewImgVisible = true
const url = item.filePath this.previewImg = url
var x = new XMLHttpRequest() } else if (ext === 'pdf') {
x.open("GET", url, true) this.pdfVisible = true
x.responseType = "blob" this.pdfSrc = url
x.onload = function (e) { }
var url = window.URL.createObjectURL(x.response)
var a = document.createElement("a")
a.href = url
a.download = item.userName + '-' + item.fileName
a.click()
item.loading = false
}
x.send()
}, },
back () { back () {
this.$router.push(this.$store.state.innerReferrer) this.$router.push(this.$store.state.innerReferrer)
@ -540,12 +713,31 @@ export default {
} }
} }
.tool {
align-items: flex-start;
margin-bottom: 10px;
.filter {
flex-wrap: wrap;
}
li {
margin-bottom: 10px;
}
/deep/.el-select {
width: 140px;
}
}
.stat { .stat {
display: flex; display: flex;
.nums { .nums {
display: flex; display: flex;
flex-wrap: wrap;
align-items: center; align-items: center;
width: 640px;
margin-right: 20px; margin-right: 20px;
.item:nth-child(1) { .item:nth-child(1) {
@ -556,6 +748,14 @@ export default {
background-image: url('../../../assets/img/avg.png'); background-image: url('../../../assets/img/avg.png');
} }
.item:nth-child(3) {
background-image: url('../../../assets/img/ach1.png');
}
.item:nth-child(4) {
background-image: url('../../../assets/img/ach2.png');
}
.item { .item {
width: 300px; width: 300px;
min-height: 145px; min-height: 145px;
@ -580,7 +780,7 @@ export default {
} }
.chart { .chart {
flex: 1; width: calc(100% - 660px);
height: 300px; height: 300px;
} }
} }
@ -592,4 +792,16 @@ export default {
display: none !important; display: none !important;
} }
} }
/deep/.review-dia {
.el-drawer__close-btn {
position: absolute;
top: 20px;
right: 20px;
}
iframe {
height: 100%;
}
}
</style> </style>

@ -43,8 +43,8 @@
<template> <template>
<tr> <tr>
<th>队长</th> <th>队长</th>
<td>{{ info.caption.userName }}{{ info.caption.realSchool && ',' + info.caption.realSchool }}{{ <td>{{ info.captain.userName }}{{ info.captain.realSchool && ',' + info.captain.realSchool }}{{
info.caption.workNumber && ',' + info.caption.workNumber }}</td> info.captain.workNumber && ',' + info.captain.workNumber }}</td>
</tr> </tr>
<tr> <tr>
<th>团队成员</th> <th>团队成员</th>
@ -144,12 +144,13 @@
}}</el-tag> }}</el-tag>
</div> </div>
<div class="flex-center"> <div class="flex-center">
<p>队长{{ info.caption.userName }}</p> <p>队长{{ info.captain.userName }}</p>
<el-button type="primary" @click="transfer">转让队长</el-button> <el-button type="primary" @click="transfer">转让队长</el-button>
</div> </div>
<el-table :data="info.teamDetail" stripe header-align="center"> <el-table :data="info.teamDetail" stripe header-align="center">
<el-table-column prop="userName" label="成员姓名" min-width="100" align="center"></el-table-column> <el-table-column prop="userName" label="成员姓名" min-width="100" align="center"></el-table-column>
<el-table-column prop="realSchool" label="学校" min-width="100" align="center"></el-table-column> <el-table-column prop="realSchool" label="学校" min-width="100" align="center"></el-table-column>
<el-table-column prop="phone" label="手机号" min-width="100" align="center"></el-table-column>
<el-table-column prop="workNumber" label="学号" min-width="100" align="center"></el-table-column> <el-table-column prop="workNumber" label="学号" min-width="100" align="center"></el-table-column>
<el-table-column prop="createTime" label="加入时间" width="180" align="center"></el-table-column> <el-table-column prop="createTime" label="加入时间" width="180" align="center"></el-table-column>
<el-table-column label="操作" align="center" width="160"> <el-table-column label="操作" align="center" width="160">
@ -239,7 +240,7 @@ export default {
info: { info: {
isCaption: 0, isCaption: 0,
person: {}, person: {},
caption: {}, captain: {},
team: { team: {
captain: 1, captain: 1,
invitationCode: '' invitationCode: ''
@ -314,10 +315,10 @@ export default {
info.team = {} info.team = {}
info.teamDetail = [] info.teamDetail = []
} else { } else {
info.isCaption = info.team.caption info.isCaption = info.team.captain
} }
const caption = info.teamDetail.find(e => !e.caption) const captain = info.teamDetail.find(e => !e.captain)
info.caption = caption ? caption : {} info.captain = captain ? captain : {}
info.person = info.personalDetail || info.teamDetail.find(e => e.accountId == info.team.accountId) info.person = info.personalDetail || info.teamDetail.find(e => e.accountId == info.team.accountId)
this.originInfo = JSON.parse(JSON.stringify(info)) this.originInfo = JSON.parse(JSON.stringify(info))
// accountId // accountId
@ -347,9 +348,10 @@ export default {
teamId: this.info.teamId teamId: this.info.teamId
}) })
this.teamErrors = res.teamTip.split(';').filter(e => e) this.teamErrors = res.teamTip.split(';').filter(e => e)
if (Object.keys(res.stageTip).length) { if (Object.keys(res.stageTip).length) {
this.stageTip = res.stageTip this.stageTip = res.stageTip
} else {
this.stageTip = null
} }
}, },
// //
@ -451,7 +453,7 @@ export default {
transferSubmit () { transferSubmit () {
if (!this.checkedPlayer) return Util.errorMsg('请选择成员') if (!this.checkedPlayer) return Util.errorMsg('请选择成员')
this.$post(this.api.captainOfTransfer, { this.$post(this.api.captainOfTransfer, {
captainId: this.info.caption.teamId, captainId: this.info.captain.teamId,
playerId: this.checkedPlayer playerId: this.checkedPlayer
}).then(res => { }).then(res => {
this.checkedPlayer = '' this.checkedPlayer = ''
@ -570,9 +572,9 @@ export default {
}, },
// //
show (row) { show (row) {
this.curRow = row
// //
if (this.form.completeCompetitionSetup.competitionType) { // if (this.form.completeCompetitionSetup.competitionType) { //
this.curRow = row
this.memberVisible = true this.memberVisible = true
if (this.info.teamId) { if (this.info.teamId) {
this.getMembers() this.getMembers()
@ -589,7 +591,7 @@ export default {
}, },
// //
toReport (row) { toReport (row) {
this.$router.push(`/matchReport?reportId=${row.reportId}`) this.$router.push(`/${this.curRow.method === 1 ? 'theoryReport' : 'trialReport'}?reportId=${row.reportId}`)
}, },
back () { back () {
this.$router.push(this.$store.state.innerReferrer) this.$router.push(this.$store.state.innerReferrer)

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<el-card shadow="hover" class="m-b-20 head-card"> <el-card shadow="hover" class="m-b-20 head-card">
<div class="flex-between m-b-20"> <div class="flex-between">
<el-page-header v-if="grades.length" @back="back" :content="grades[index].stageName + '/排名'"></el-page-header> <el-page-header v-if="grades.length" @back="back" :content="grades[index].stageName + '/排名'"></el-page-header>
</div> </div>
@ -14,15 +14,41 @@
@click="tabChange(item.stageId)">{{ item.stageName }}排名</a> @click="tabChange(item.stageId)">{{ item.stageName }}排名</a>
</template> </template>
</div> </div>
<div class="flex-between" style="margin: 20px 0">
<div class="tool flex-between" style="margin-top: 20px">
<div style="display: inline-flex;align-items: center"> <div style="display: inline-flex;align-items: center">
<el-radio v-model="type" :label="0" @change="typeChange">默认系统排序</el-radio> <el-radio v-model="type" :label="0" @change="typeChange">默认系统排序</el-radio>
<el-radio v-model="type" :label="1" @change="typeChange">手动上传</el-radio> <el-radio v-model="type" :label="1" @change="typeChange">手动上传</el-radio>
<el-button type="primary" :disabled="type === 0" class="ml20" @click="batchImport">上传文件</el-button> <el-button type="primary" :disabled="type === 0" class="ml20" @click="batchImport">上传文件</el-button>
</div> </div>
<div style="display: inline-flex;align-items: center"> <ul class="filter" style="flex: none;">
<li>
<label>省份</label>
<el-select v-model="filter.provinceId" clearable filterable placeholder="请选择省份" @change="provinceChange"
@clear="clearProvince">
<el-option v-for="(item, i) in provinces" :key="i" :label="item.provinceName"
:value="item.provinceId"></el-option>
</el-select>
</li>
<li>
<label>城市</label>
<el-select v-model="filter.cityId" clearable filterable placeholder="请选择城市" :disabled="!filter.provinceId"
@change="initData">
<el-option v-for="(item, i) in cities" :key="i" :label="item.cityName" :value="item.cityId"></el-option>
</el-select>
</li>
<li>
<label>学校</label>
<el-select v-model="filter.realSchoolId" clearable filterable placeholder="请选择学校" @change="initData">
<el-option v-for="(item, i) in schools" :key="i" :label="item.schoolName"
:value="item.schoolId"></el-option>
</el-select>
</li>
<li>
<el-input style="margin-right: 15px" :placeholder="'请输入' + (competitionType ? '团队名称/队长' : '学生姓名') + '/学校'" <el-input style="margin-right: 15px" :placeholder="'请输入' + (competitionType ? '团队名称/队长' : '学生姓名') + '/学校'"
prefix-icon="el-icon-search" v-model="keyword" clearable></el-input> prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
</li>
<el-button v-if="!published" type="primary" @click="cancelPublish(1)">发布排名</el-button> <el-button v-if="!published" type="primary" @click="cancelPublish(1)">发布排名</el-button>
<template v-else> <template v-else>
<span style="margin-right: 10px;white-space: nowrap;">{{ publishTime }}发布排名</span> <span style="margin-right: 10px;white-space: nowrap;">{{ publishTime }}发布排名</span>
@ -31,8 +57,9 @@
<el-button v-if="list.length" type="primary" :loading="exporting" @click="exportData">{{ exporting ? '正在导出' : <el-button v-if="list.length" type="primary" :loading="exporting" @click="exportData">{{ exporting ? '正在导出' :
'批量导出' '批量导出'
}}</el-button> }}</el-button>
</ul>
</div> </div>
</div>
<el-table :data="list" class="table" ref="table" stripe row-key="scoreId" <el-table :data="list" class="table" ref="table" stripe row-key="scoreId"
@selection-change="handleSelectionChange" header-align="center"> @selection-change="handleSelectionChange" header-align="center">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> <el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
@ -46,6 +73,8 @@
<el-table-column prop="leaderName" label="队长" min-width="150" align="center"></el-table-column> <el-table-column prop="leaderName" label="队长" min-width="150" align="center"></el-table-column>
</template> </template>
<el-table-column v-else prop="userName" label="学生姓名" min-width="100" align="center"></el-table-column> <el-table-column v-else prop="userName" label="学生姓名" min-width="100" align="center"></el-table-column>
<el-table-column prop="provinceName" label="省份" min-width="100" align="center"></el-table-column>
<el-table-column prop="cityName" label="城市" min-width="100" align="center"></el-table-column>
<el-table-column prop="schoolName" label="学生账号归属" min-width="100" align="center"></el-table-column> <el-table-column prop="schoolName" label="学生账号归属" min-width="100" align="center"></el-table-column>
<el-table-column prop="realSchool" label="学生所在院校" min-width="100" align="center"></el-table-column> <el-table-column prop="realSchool" label="学生所在院校" min-width="100" align="center"></el-table-column>
<el-table-column prop="timeSum" label="用时" width="90" align="center"> <el-table-column prop="timeSum" label="用时" width="90" align="center">
@ -182,6 +211,14 @@ export default {
competitionType: +this.$route.query.competitionType, competitionType: +this.$route.query.competitionType,
rule: +this.$route.query.rule, rule: +this.$route.query.rule,
searchTimer: null, searchTimer: null,
filter: {
provinceId: '',
cityId: '',
realSchoolId: '',
},
provinces: [],
cities: [],
schools: [],
keyword: this.$route.query.keyword || '', keyword: this.$route.query.keyword || '',
teamCalculationMethods: [ teamCalculationMethods: [
{ {
@ -262,6 +299,8 @@ export default {
} }
}, },
mounted () { mounted () {
this.getProvince()
this.getSchool()
this.getStage() this.getStage()
}, },
methods: { methods: {
@ -275,6 +314,7 @@ export default {
}, },
// //
getRank () { getRank () {
const { filter } = this
this.loading = true this.loading = true
// //
if (this.type) { if (this.type) {
@ -284,7 +324,8 @@ export default {
competitionId: this.id, competitionId: this.id,
isOverallRanking: this.active ? 0 : 1, isOverallRanking: this.active ? 0 : 1,
stageId: this.active || this.stageId, stageId: this.active || this.stageId,
keyword: this.keyword keyword: this.keyword,
...filter
}).then(({ message, publishStatus }) => { }).then(({ message, publishStatus }) => {
// isRelease 01 // isRelease 01
this.published = publishStatus this.published = publishStatus
@ -307,7 +348,8 @@ export default {
publicationType: this.type, publicationType: this.type,
locationStageId: this.stageId, locationStageId: this.stageId,
stageIds: ids.splice(0, ids.length - 1), stageIds: ids.splice(0, ids.length - 1),
keyword: this.keyword keyword: this.keyword,
...filter
}).then(({ page, publishStatus, total }) => { }).then(({ page, publishStatus, total }) => {
this.published = publishStatus this.published = publishStatus
this.list = page || [] this.list = page || []
@ -319,7 +361,7 @@ export default {
}) })
} else { } else {
// //
this.$post(`${this.api.stageRaceRanking}?competitionId=${this.id}&stageId=${this.active}&pageNum=${this.page}&pageSize=${this.pageSize}&publicationType=${this.type}&keyword=${this.keyword}`).then(({ page, total, publishStatus }) => { this.$post(`${this.api.stageRaceRanking}?competitionId=${this.id}&stageId=${this.active}&pageNum=${this.page}&pageSize=${this.pageSize}&publicationType=${this.type}&keyword=${this.keyword}&provinceId=${filter.provinceId}&cityId=${filter.cityId}&realSchoolId=${filter.realSchoolId}`).then(({ page, total, publishStatus }) => {
this.published = publishStatus this.published = publishStatus
this.list = page this.list = page
this.total = total this.total = total
@ -367,6 +409,39 @@ export default {
this.active = i this.active = i
this.initData() this.initData()
}, },
//
async getProvince () {
const { list } = await this.$get(this.api.queryProvince)
this.provinces = list
},
//
clearProvince () {
this.filter.cityId = ''
},
//
provinceChange () {
this.clearProvince()
this.getCity()
this.initData()
},
//
async getCity () {
const id = this.filter.provinceId
if (id) {
const { list } = await this.$get(this.api.queryCity, {
provinceId: id
})
this.cities = list
}
},
//
async getSchool () {
const { list } = await this.$get(this.api.querySchoolData)
this.schools = list
},
// //
show (row, i) { show (row, i) {
this.teams = [] this.teams = []

@ -23,9 +23,11 @@
'取消' : '' }}自动分配阶段成员</el-button> '取消' : '' }}自动分配阶段成员</el-button>
<el-tooltip placement="top"> <el-tooltip placement="top">
<div slot="content"> <div slot="content">
<p style="margin-bottom: 5px;">报名结束前设置的自动分配将在报名结束时触发一次系统自动分配取消则不触发</p> <p>报名结束前设置的自动分配将在报名结束时触发一次系统自动分配取消则不触发</p>
<p>报名结束后也可以手动点击自动分配按钮来立即触发系统自动分配并且点击一次就触发一次</p> <p style="margin: 5px 0;">报名结束后也可以手动点击自动分配按钮来立即触发系统自动分配并且点击一次就触发一次</p>
<p>自动分配仅对触发时已报名的人员进行对于分配后才报名的人员如需自动分配则需手动再次触发自动分配</p> <p></p>
<p style="margin: 5px 0;">&emsp;&emsp;1. 自动分配仅对触发时已报名的人员进行对于分配后才报名的人员如需自动分配则需手动再次触发自动分配</p>
<p>&emsp;&emsp;2. 若已有学生提交了成绩报告则无法启用自动分配功能</p>
</div> </div>
<i class="el-icon-question" <i class="el-icon-question"
style="margin: 0 10px 0 5px;font-size: 16px;color: #8f8f8f;cursor: pointer;"></i> style="margin: 0 10px 0 5px;font-size: 16px;color: #8f8f8f;cursor: pointer;"></i>

@ -0,0 +1,675 @@
<template>
<div>
<el-card shadow="hover" class="m-b-20 head-card">
<div class="flex-between m-b-20">
<el-page-header @back="back" content="成绩管理"></el-page-header>
</div>
</el-card>
<div v-loading="loading">
<el-card v-if="method != 2" shadow="hover" class="m-b-20">
<div class="stat">
<div class="nums">
<div class="item">
<p class="name">已参加/应参加人数</p>
<p class="val">{{ isNaN(statData.totalNumber) ? '' : statData.attendance + '/' + statData.totalNumber }}
</p>
</div>
<div class="item">
<p class="name">实验平均分</p>
<p class="val">{{ avgScore }}</p>
</div>
</div>
<div class="chart" id="chart"></div>
</div>
</el-card>
<el-card shadow="hover" class="m-b-20">
<div v-if="showFile" class="tabs m-b-20">
<a class="item" v-for="(item, i) in tabs" :key="i" :class="{ active: i === active }" @click="tabChange(i)">{{
item }}</a>
</div>
<div class="tool flex-between">
<ul class="filter">
<li>
<label>省份</label>
<el-select v-model="filter.provinceId" filterable clearable placeholder="请选择省份" @change="provinceChange"
@clear="clearProvince">
<el-option v-for="(item, i) in provinces" :key="i" :label="item.provinceName"
:value="item.provinceId"></el-option>
</el-select>
</li>
<li>
<label>城市</label>
<el-select v-model="filter.cityId" filterable clearable placeholder="请选择城市" :disabled="!filter.provinceId"
@change="initData">
<el-option v-for="(item, i) in cities" :key="i" :label="item.cityName" :value="item.cityId"></el-option>
</el-select>
</li>
<li>
<label>学校</label>
<el-select v-model="filter.realSchoolId" clearable filterable placeholder="请选择学校" @change="initData">
<el-option v-for="(item, i) in schools" :key="i" :label="item.schoolName"
:value="item.schoolId"></el-option>
</el-select>
</li>
<li>
<el-input size="small" placeholder="请输入学生姓名" prefix-icon="el-icon-search" v-model="keyword" clearable
style="width: 300px"></el-input>
</li>
</ul>
<div v-if="!active">
<el-button v-if="method == 2" type="primary" @click="batchImport">上传成绩</el-button>
<el-button type="primary" :disabled="!!multipleSelection.find(e => method != 2 && !e.reportId)"
@click="delAllData">批量删除</el-button>
<el-button type="primary" :loading="exporting" @click="exportData">{{ exporting ? '正在导出' : '批量导出'
}}</el-button>
</div>
<div v-else>
<el-button type="primary" :loading="exporting1" @click="exportData1">{{ exporting1 ? '正在导出' : '批量导出'
}}</el-button>
</div>
</div>
<template v-if="!active">
<el-table :data="list" class="table" :key="1" ref="table" stripe header-align="center"
@selection-change="handleSelectionChange" row-key="id">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center">
<template slot-scope="scope">
{{ scope.$index + (page - 1) * pageSize + 1 }}
</template>
</el-table-column>
<el-table-column prop="provinceName" label="省份" min-width="100" align="center"></el-table-column>
<el-table-column prop="cityName" label="城市" min-width="100" align="center"></el-table-column>
<el-table-column prop="schoolName" label="学生账号归属" min-width="100" align="center"></el-table-column>
<el-table-column prop="realSchool" label="学生所在院校" min-width="100" align="center"></el-table-column>
<el-table-column v-if="competitionType" prop="teamName" label="团队名称" min-width="100"
align="center"></el-table-column>
<el-table-column prop="userName" label="学生姓名" min-width="100" align="center"></el-table-column>
<el-table-column prop="workNumber" label="学号" min-width="100" align="center"></el-table-column>
<el-table-column prop="score" label="分数" width="90" align="center">
<template slot-scope="scope">
{{ scope.row.submitTime ? scope.row.score : '--' }}
</template>
</el-table-column>
<el-table-column prop="timeSum" label="耗时" width="90" align="center">
<template slot-scope="scope">
{{ scope.row.timeSum ? scope.row.timeSum + 'min' : '--' }}
</template>
</el-table-column>
<el-table-column prop="submitTime" label="提交时间" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.submitTime || '--' }}
</template>
</el-table-column>
<el-table-column label="状态" width="100" align="center">
<template slot-scope="scope">
{{ scope.row.reportId || method == 2 ? '已参加' : '未参加' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="160">
<template slot-scope="scope">
<el-button v-if="method != 2 && scope.row.reportId" type="text"
@click="show(scope.row)">查看成绩报告</el-button>
<el-button v-if="scope.row.reportId" type="text" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next" :total="total"
@current-change="handleCurrentChange" :current-page="page">
</el-pagination>
</div>
</template>
<template v-else>
<el-table :data="list1" class="table" :key="2" stripe header-align="center"
@selection-change="handleSelectionChange1" row-key="id">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center">
<template slot-scope="scope">
{{ scope.$index + (page1 - 1) * pageSize + 1 }}
</template>
</el-table-column>
<el-table-column prop="provinceName" label="省份" align="center"></el-table-column>
<el-table-column prop="cityName" label="城市" align="center"></el-table-column>
<el-table-column prop="schoolName" label="学生账号归属" align="center"></el-table-column>
<el-table-column prop="realSchool" label="学生所在院校" align="center"></el-table-column>
<el-table-column v-if="competitionType" prop="teamName" label="团队名称" align="center"></el-table-column>
<el-table-column prop="userName" label="学生姓名" align="center"></el-table-column>
<el-table-column prop="workNumber" label="学号" align="center"></el-table-column>
<el-table-column prop="fileName" label="文件名" align="center"></el-table-column>
<el-table-column prop="fileSize" label="文件大小" align="center"></el-table-column>
<el-table-column prop="fileType" label="文件类型" align="center"></el-table-column>
<el-table-column prop="fileFormat" label="文件格式" align="center"></el-table-column>
<el-table-column prop="createTime" label="提交时间" width="150" align="center">
</el-table-column>
<el-table-column label="操作" width="200">
<template slot-scope="scope">
<el-button v-if="!isCompress(scope.row.fileFormat)" type="text"
@click="preview(scope.row)">预览文件</el-button>
<el-button type="primary" size="mini" :loading="scope.row.loading"
@click="exportFile(scope.row)">导出文件</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next" :total="total1"
@current-change="handleCurrentChange1" :current-page="page1">
</el-pagination>
</div>
</template>
</el-card>
</div>
<el-dialog title="批量导入" :visible.sync="importVisible" width="24%" :close-on-click-modal="false"
@close="cancelUpload">
<div style="text-align: center">
<template v-if="!uploadFaild">
<div style="margin-bottom: 10px;">
<el-button type="primary" @click="download">模板下载<i class="el-icon-download el-icon--right"></i></el-button>
</div>
<el-upload ref="upload" name="file" accept=".xls,.xlsx" class="import-file" :before-upload="beforeUpload"
:on-remove="handleRemove" :on-error="uploadError" :on-success="uploadSuccess" :before-remove="beforeRemove"
:limit="1" :on-exceed="handleExceed" :action="this.api.batchImportGrades" :file-list="uploadList"
:headers="headers" :disabled="uploading" :data="{
competitionId: this.id,
stageId: this.stageId,
systemId: 0
}">
<el-button type="primary" :loading="uploading" class="ml20">上传文件<i
class="el-icon-upload2 el-icon--right"></i></el-button>
</el-upload>
</template>
<template v-else>
<p style="margin: -10px 0 13px;font-size: 14px;color: #e90000;">{{ faildData.tip }}</p>
<p type="primary"
style="margin-bottom: 10px;font-size: 14px;color: #9076FF;text-decoration: underline;cursor: pointer;"
@click="showFaild">部分数据导入失败查看失败原因</p>
</template>
</div>
<span v-if="uploading" slot="footer" class="dialog-footer">
<el-button @click="cancelUpload">停止导入</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import util from "@/libs/util";
import * as echarts from "echarts";
import axios from 'axios';
import Zip from '@/libs/zip'
export default {
data () {
return {
id: +this.$route.query.id,
stageId: +this.$route.query.stageId,
method: +this.$route.query.method,
competitionType: +this.$route.query.competitionType,
showFile: this.$route.query.showFile === 'true',
isCompress: util.isCompress,
filter: {
provinceId: '',
cityId: '',
realSchoolId: '',
reviewStatus: '',
scoreSortOrder: '',
submitTimeSortOrder: '',
},
provinces: [],
cities: [],
schools: [],
keyword: this.$route.query.keyword || '',
searchTimer: null,
list: [],
multipleSelection: [],
page: +this.$route.query.page || 1,
pageSize: 10,
total: 0,
list1: [],
multipleSelection1: [],
page1: 1,
total1: 0,
avgScore: 0, //
importVisible: false,
uploadList: [],
uploadFaild: false,
uploading: false,
faildData: null,
headers: {
token: sessionStorage.getItem("token")
},
statData: {},
tabs: ['成绩列表', '文件列表'],
active: 0,
loading: false,
exporting: false,
exporting1: false,
};
},
watch: {
keyword: function (val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.$router.push({
path: '/otherArchList',
query: {
...this.$route.query,
keyword: val
}
})
this.initData();
}, 500);
}
},
mounted () {
this.getData()
this.getProvince()
this.getSchool()
},
methods: {
async getData () {
this.loading = true
//
if (this.active) {
const { data } = await this.$post(this.api.cCompetitionStageFileList, {
pageNum: this.page1,
pageSize: this.pageSize,
competitionId: this.id,
stageId: this.stageId,
keyWord: this.keyword,
...this.filter
})
data.records.forEach(e => {
e.loading = false
e.fileType = '其他'
if (util.isVideo(e.fileFormat)) {
e.fileType = '视频'
} else if (util.isAudio(e.fileFormat)) {
e.fileType = '音频'
} else if (util.isImg(e.fileFormat)) {
e.fileType = '图片'
} else if (util.isDoc(e.fileFormat)) {
e.fileType = '文档'
} else if (util.isCompress(e.fileFormat)) {
e.fileType = '压缩包'
} else if (e.fileType === 'pdf') {
e.fileType = 'pdf'
}
})
this.list1 = data.records
this.total1 = data.total
this.loading = false
} else { //
const { data, page } = await this.$post(this.api.stageGradeManagementList, {
pageNum: this.page,
pageSize: this.pageSize,
competitionId: this.id,
keyWord: this.keyword,
stageId: this.stageId,
isNakadai: 1,
...this.filter
})
this.loading = false
this.total = page.total
this.list = page.records
this.statData = data
this.avgScore = (+data.avgScore).toFixed(2)
this.method != 2 && this.getChart()
}
},
initData () {
this.page = 1
this.getData()
},
//
async getProvince () {
const { list } = await this.$get(this.api.queryProvince)
this.provinces = list
},
//
clearProvince () {
this.filter.cityId = ''
},
//
provinceChange () {
this.clearProvince()
this.getCity()
this.initData()
},
//
async getCity () {
const id = this.filter.provinceId
if (id) {
const { list } = await this.$get(this.api.queryCity, {
provinceId: id
})
this.cities = list
}
},
//
async getSchool () {
const { list } = await this.$get(this.api.querySchoolData)
this.schools = list
},
//
show (row) {
this.$router.push(`/trialReport?reportId=${row.reportId}`)
},
// ()
async exportData () {
if (this.list.length) {
this.exporting = true
//
if (this.multipleSelection.length) {
const res = await axios.post(this.api.exportExperimentalResultsInBatch, this.multipleSelection, {
headers: this.headers,
responseType: 'blob'
})
util.downloadFileDirect(`赛事成绩.xls`, new Blob([res.data]))
this.exporting = false
} else if (this.list.length) {
const res = await axios.post(this.api.allExperimentalResultsAreDerived, {
pageNum: 1,
pageSize: 10000,
competitionId: this.id,
isNakadai: 1,
stageId: this.stageId,
}, {
headers: this.headers,
responseType: 'blob'
})
util.downloadFileDirect(`赛事成绩.xls`, new Blob([res.data]))
this.exporting = false
}
}
},
// ()
exportData1 () {
this.exporting1 = true
let list = this.list1
if (this.multipleSelection1.length) {
list = this.multipleSelection1
}
Zip('批量导出', list, () => {
this.exporting1 = false
})
},
handleDelete (row) { //
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
}).then(() => {
this.$post(this.api.batchDeleteContestGrade, {
ids: [this.method == 2 ? row.scoreId : row.reportId],
competitionId: this.id,
stageId: this.stageId
}).then(res => {
util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
}).catch(() => { });
},
delAllData () { //
const list = this.multipleSelection
this.$confirm(list.length ? '该项目下的所有成绩报告将会删除,是否继续?' : '是否确定删除列表所有成绩数据?', "提示", {
type: "warning"
}).then(async () => {
let ids = []
if (list.length) {
ids = list.map(item => {
return this.method == 2 ? item.scoreId : item.reportId
});
ids = ids.filter(e => e)
}
const data = {
competitionId: this.id,
stageId: this.stageId
}
if (list.length) data.ids = ids
await this.$post(this.api.batchDeleteContestGrade, data)
this.multipleSelection = [];
this.$refs.table.clearSelection();
util.successMsg("删除成功");
this.getData();
}).catch(() => { });
},
handleSelectionChange (val) { //
this.multipleSelection = val;
},
handleCurrentChange (val) { //
this.$router.push({
path: '/otherArchList',
query: {
...this.$route.query,
page: val
}
})
this.page = val;
this.getData();
},
handleSelectionChange1 (val) { //
this.multipleSelection1 = val;
},
handleCurrentChange1 (val) { //
this.page1 = val;
this.getData();
},
getChart () { // 线
const data = []
const { statData } = this
for (let i = 1; i <= 10; i++) {
data.push(statData['num' + i])
}
let myChart = echarts.init(document.getElementById("chart"));
myChart.setOption({
title: { text: "实验分数分布图" },
tooltip: {},
xAxis: {
name: "分数",
type: "category",
boundaryGap: false,
interval: 10,
data: ["0-10", "10-20", "20-30", "30-40", "40-50", "50-60", "60-70", "70-80", "80-90", "90-100"]
},
yAxis: {
name: "人数",
type: "value",
minInterval: 10
},
series: [{
data,
type: "line",
areaStyle: {},
label: {
show: true,
position: 'top'
},
color: ["#8191fd"]
}]
});
},
//
batchImport () {
this.importVisible = true
this.uploadList = []
this.uploadFaild = false
},
//
download () {
axios.get(`${this.api.gradeDownloadExcel}?competitionId=${this.id}&stageId=${this.stageId}`, {
headers: this.headers,
responseType: 'blob'
}).then((res) => {
util.downloadFileDirect('赛事成绩导入模板.xlsx', new Blob([res.data]))
}).catch(res => { })
},
//
handleExceed (files, fileList) {
util.warningMsg(
`当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!`
)
},
//
showFaild () {
axios.get(`${this.api.performanceExportFailure}?exportCode=${this.faildData.exportCode}&competitionType=${this.faildData.competitionType}`, {
headers: this.headers,
responseType: 'blob'
}).then((res) => {
util.downloadFileDirect(`批量导入成绩管理失败数据导出.xls`, new Blob([res.data]))
}).catch(res => { })
},
uploadSuccess (res) {
this.uploading = false
this.uploadFaild = false
if (res.status === 200) {
this.initData()
const { data } = res
if (data.exportCode) {
this.faildData = data
this.uploadFaild = true
} else {
util.successMsg(data.tip, 3000)
this.importVisible = false
}
} else {
util.errorMsg(res.message || '上传失败,请检查数据')
}
},
uploadError (err, file, fileList) {
this.uploading = false
this.$message({
message: "上传出错,请重试!",
type: "error",
center: true
})
},
beforeUpload (file) {
this.uploading = true
},
beforeRemove (file, fileList) {
return this.$confirm(`确定移除 ${file.name}`)
},
handleRemove (file, fileList) {
this.uploadList = fileList
this.uploadFaild = false
},
cancelUpload () {
this.uploading = false
if (this.$refs.upload) this.$refs.upload.abort()
this.keyword = ''
this.initData()
this.importVisible = false
},
// tab
tabChange (i) {
this.active = i
this.getData()
},
//
preview (item) {
window.open((util.isDoc(item.fileFormat) ? 'https://view.officeapps.live.com/op/view.aspx?src=' : '') + item.filePath)
},
//
exportFile (item) {
item.loading = true
const url = item.filePath
var x = new XMLHttpRequest()
x.open("GET", url, true)
x.responseType = "blob"
x.onload = function (e) {
var url = window.URL.createObjectURL(x.response)
var a = document.createElement("a")
a.href = url
a.download = item.userName + '-' + item.fileName
a.click()
item.loading = false
}
x.send()
},
back () {
this.$router.push(this.$store.state.innerReferrer)
}
}
};
</script>
<style lang="scss" scoped>
/deep/ .head-card {
.el-card__body {
padding-bottom: 0px;
.el-tabs__header {
margin-bottom: 1px;
.el-tabs__nav-wrap::after {
display: none;
}
.el-tabs__item {
font-size: 18px;
}
}
}
}
.stat {
display: flex;
.nums {
display: flex;
align-items: center;
margin-right: 20px;
.item:nth-child(1) {
background-image: url('../../../assets/img/total.png');
}
.item:nth-child(2) {
background-image: url('../../../assets/img/avg.png');
}
.item {
width: 300px;
min-height: 145px;
padding: 30px 30px;
margin: 0 10px;
box-sizing: border-box;
border-radius: 8px;
background-size: 100% 100%;
background-repeat: no-repeat;
p {
font-size: 18px;
color: #ffffff;
}
.val {
margin-top: 10px;
color: #ffffff;
font-size: 36px;
}
}
}
.chart {
flex: 1;
height: 300px;
}
}
/deep/.import-file {
.el-progress__text,
.el-progress,
.el-upload-list__item-status-label {
display: none !important;
}
}
</style>

@ -1,535 +0,0 @@
<template>
<div>
<el-card shadow="hover" class="m-b-20 head-card">
<div class="flex-between m-b-20">
<el-page-header @back="back" content="成绩管理"></el-page-header>
</div>
</el-card>
<div v-loading="loading">
<el-card v-if="method != 2" shadow="hover" class="m-b-20">
<div class="stat">
<div class="nums">
<div class="item">
<p class="name">已参加/应参加人数</p>
<p class="val">{{ isNaN(statData.totalNumber) ? '' : statData.attendance + '/' + statData.totalNumber }}
</p>
</div>
<div class="item">
<p class="name">平均分</p>
<p class="val">{{ (+statData.avgScore).toFixed(2) }}</p>
</div>
<div class="item">
<p class="name">最高分</p>
<p class="val">{{ statData.maxScore }}
</p>
</div>
<div class="item">
<p class="name">最低分</p>
<p class="val">{{ statData.minScore }}</p>
</div>
</div>
<div class="chart" id="chart"></div>
</div>
</el-card>
<el-card shadow="hover" class="m-b-20">
<div class="tabs m-b-20">
<a class="item" v-for="(item, i) in tabs" :key="i" :class="{ active: item.id === active }"
@click="tabChange(item.id)">{{ item.name }}</a>
</div>
<div class="flex-between m-b-20">
<div>
<el-input size="small" placeholder="请输入学校/学生姓名" prefix-icon="el-icon-search" v-model="keyword" clearable
style="width: 300px"></el-input>
</div>
<el-button type="primary" :loading="exporting" @click="exportData">{{ exporting ? '正在导出' : '批量导出'
}}</el-button>
</div>
<el-table :data="list" class="table" :key="1" ref="table" stripe header-align="center"
@selection-change="handleSelectionChange" row-key="id">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center">
<template slot-scope="scope">
{{ scope.$index + (page - 1) * pageSize + 1 }}
</template>
</el-table-column>
<el-table-column prop="schoolName" label="学生账号归属" min-width="100" align="center"></el-table-column>
<el-table-column prop="realSchool" label="学生所在院校" min-width="100" align="center"></el-table-column>
<el-table-column v-if="competitionType" prop="teamName" label="团队名称" min-width="100"
align="center"></el-table-column>
<el-table-column prop="userName" label="学生姓名" min-width="100" align="center"></el-table-column>
<el-table-column prop="workNumber" label="学号" min-width="100" align="center"></el-table-column>
<el-table-column prop="score" label="分数" width="90" align="center">
<template slot-scope="scope">
{{ scope.row.submitTime ? scope.row.score : '--' }}
</template>
</el-table-column>
<el-table-column prop="timeSum" label="耗时" width="90" align="center">
<template slot-scope="scope">
{{ scope.row.timeSum ? scope.row.timeSum + 'min' : '--' }}
</template>
</el-table-column>
<el-table-column prop="submitTime" label="提交时间" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.submitTime || '--' }}
</template>
</el-table-column>
<el-table-column label="状态" width="100" align="center">
<template slot-scope="scope">
{{ scope.row.reportId || method == 2 ? '已参加' : '未参加' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="160">
<template slot-scope="scope">
<el-button v-if="method != 2 && scope.row.reportId" type="text"
@click="show(scope.row)">查看成绩报告</el-button>
<el-button v-if="scope.row.reportId" type="text" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next" :total="total"
@current-change="handleCurrentChange" :current-page="page">
</el-pagination>
</div>
</el-card>
</div>
<el-dialog title="批量导入" :visible.sync="importVisible" width="24%" :close-on-click-modal="false"
@close="cancelUpload">
<div style="text-align: center">
<template v-if="!uploadFaild">
<div style="margin-bottom: 10px;">
<el-button type="primary" @click="download">模板下载<i class="el-icon-download el-icon--right"></i></el-button>
</div>
<el-upload ref="upload" name="file" accept=".xls,.xlsx" class="import-file" :before-upload="beforeUpload"
:on-remove="handleRemove" :on-error="uploadError" :on-success="uploadSuccess" :before-remove="beforeRemove"
:limit="1" :on-exceed="handleExceed" :action="this.api.batchImportGrades" :file-list="uploadList"
:headers="headers" :disabled="uploading" :data="{
competitionId: this.id,
stageId: this.stageId,
systemId: 0
}">
<el-button type="primary" :loading="uploading" class="ml20">上传文件<i
class="el-icon-upload2 el-icon--right"></i></el-button>
</el-upload>
</template>
<template v-else>
<p style="margin: -10px 0 13px;font-size: 14px;color: #e90000;">{{ faildData.tip }}</p>
<p type="primary"
style="margin-bottom: 10px;font-size: 14px;color: #9076FF;text-decoration: underline;cursor: pointer;"
@click="showFaild">部分数据导入失败查看失败原因</p>
</template>
</div>
<span v-if="uploading" slot="footer" class="dialog-footer">
<el-button @click="cancelUpload">停止导入</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import util from "@/libs/util";
import * as echarts from "echarts";
import axios from 'axios';
import Zip from '@/libs/zip'
export default {
data () {
return {
id: +this.$route.query.id,
stageId: +this.$route.query.stageId,
method: +this.$route.query.method,
competitionType: +this.$route.query.competitionType,
isCompress: util.isCompress,
keyword: this.$route.query.keyword || '',
searchTimer: null,
list: [],
multipleSelection: [],
page: +this.$route.query.page || 1,
pageSize: 10,
total: 0,
list1: [],
multipleSelection1: [],
page1: 1,
total1: 0,
avgScore: 0, //
importVisible: false,
uploadList: [],
uploadFaild: false,
uploading: false,
faildData: null,
headers: {
token: sessionStorage.getItem("token")
},
statData: {
avgScore: 0,
maxScore: 0,
minScore: 0,
},
tabs: [
{
id: 1,
name: '已提交'
},
{
id: 0,
name: '未提交'
}
],
active: 1,
loading: false,
exporting: false,
exporting1: false,
};
},
watch: {
keyword: function (val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.$router.push({
path: '/theoryArchList',
query: {
...this.$route.query,
keyword: val
}
})
this.initData();
}, 500);
}
},
mounted () {
this.getData()
},
methods: {
async getData () {
this.loading = true
const { data, page } = await this.$post(this.api.stageGradeManagementList, {
pageNum: this.page,
pageSize: this.pageSize,
competitionId: this.id,
keyWord: this.keyword,
stageId: this.stageId,
isNakadai: 1,
participatingState: this.active,
})
this.loading = false
this.total = page.total
this.list = page.records
this.statData = data
this.getChart()
},
initData () {
this.page = 1
this.getData()
},
//
show (row) {
this.$router.push(`/theoryReport?reportId=${row.reportId}`)
},
// ()
async exportData () {
if (this.list.length) {
this.exporting = true
//
if (this.multipleSelection.length) {
const res = await axios.post(this.api.exportExperimentalResultsInBatch, this.multipleSelection, {
headers: this.headers,
responseType: 'blob'
})
util.downloadFileDirect(`赛事成绩.xls`, new Blob([res.data]))
this.exporting = false
} else if (this.list.length) {
const res = await axios.post(this.api.allExperimentalResultsAreDerived, {
pageNum: 1,
pageSize: 10000,
competitionId: this.id,
isNakadai: 1,
stageId: this.stageId,
participatingState: this.active,
}, {
headers: this.headers,
responseType: 'blob'
})
util.downloadFileDirect(`赛事成绩.xls`, new Blob([res.data]))
this.exporting = false
}
}
},
async handleDelete (row) { //
await this.$confirm(`<p>确认要删除【${row.userName}】的成绩记录吗?</p><p style="color: #f56c6c;">删除后成绩数据不可恢复,自动变为未提交</p>`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
closeOnClickModal: false,
dangerouslyUseHTMLString: true,
})
await this.$post(this.api.batchDeleteContestGrade, {
ids: [this.method == 2 ? row.scoreId : row.reportId],
competitionId: this.id,
stageId: this.stageId
})
util.successMsg("删除成功")
this.getData()
},
delAllData () { //
const list = this.multipleSelection
this.$confirm(list.length ? '该项目下的所有成绩报告将会删除,是否继续?' : '是否确定删除列表所有成绩数据?', "提示", {
type: "warning"
}).then(async () => {
let ids = []
if (list.length) {
ids = list.map(item => {
return this.method == 2 ? item.scoreId : item.reportId
});
ids = ids.filter(e => e)
}
const data = {
competitionId: this.id,
stageId: this.stageId
}
if (list.length) data.ids = ids
await this.$post(this.api.batchDeleteContestGrade, data)
this.multipleSelection = [];
this.$refs.table.clearSelection();
util.successMsg("删除成功");
this.getData();
}).catch(() => { });
},
handleSelectionChange (val) { //
this.multipleSelection = val;
},
handleCurrentChange (val) { //
this.$router.push({
path: '/theoryArchList',
query: {
...this.$route.query,
page: val
}
})
this.page = val;
this.getData();
},
handleSelectionChange1 (val) { //
this.multipleSelection1 = val;
},
getChart () { // 线
const { fractionalSegmentCounts: data } = this.statData
let myChart = echarts.init(document.getElementById("chart"));
myChart.setOption({
title: { text: "实验分数分布图" },
tooltip: {},
xAxis: {
name: "分数",
type: "category",
boundaryGap: false,
interval: 10,
data: data.map(e => e.range)
},
yAxis: {
name: "人数",
type: "value",
minInterval: 10
},
series: [{
data: data.map(e => e.count),
type: "line",
areaStyle: {},
color: ["#8191fd"]
}]
});
},
//
batchImport () {
this.importVisible = true
this.uploadList = []
this.uploadFaild = false
},
//
download () {
axios.get(`${this.api.gradeDownloadExcel}?competitionId=${this.id}&stageId=${this.stageId}`, {
headers: this.headers,
responseType: 'blob'
}).then((res) => {
util.downloadFileDirect('赛事成绩导入模板.xlsx', new Blob([res.data]))
}).catch(res => { })
},
//
handleExceed (files, fileList) {
util.warningMsg(
`当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!`
)
},
//
showFaild () {
axios.get(`${this.api.performanceExportFailure}?exportCode=${this.faildData.exportCode}&competitionType=${this.faildData.competitionType}`, {
headers: this.headers,
responseType: 'blob'
}).then((res) => {
util.downloadFileDirect(`批量导入成绩管理失败数据导出.xls`, new Blob([res.data]))
}).catch(res => { })
},
uploadSuccess (res) {
this.uploading = false
this.uploadFaild = false
if (res.status === 200) {
this.initData()
const { data } = res
if (data.exportCode) {
this.faildData = data
this.uploadFaild = true
} else {
util.successMsg(data.tip, 3000)
this.importVisible = false
}
} else {
util.errorMsg(res.message || '上传失败,请检查数据')
}
},
uploadError (err, file, fileList) {
this.uploading = false
this.$message({
message: "上传出错,请重试!",
type: "error",
center: true
})
},
beforeUpload (file) {
this.uploading = true
},
beforeRemove (file, fileList) {
return this.$confirm(`确定移除 ${file.name}`)
},
handleRemove (file, fileList) {
this.uploadList = fileList
this.uploadFaild = false
},
cancelUpload () {
this.uploading = false
if (this.$refs.upload) this.$refs.upload.abort()
this.keyword = ''
this.initData()
this.importVisible = false
},
// tab
tabChange (i) {
this.multipleSelection = []
this.$refs.table.clearSelection()
this.active = i
this.initData()
},
//
preview (item) {
window.open((util.isDoc(item.fileFormat) ? 'https://view.officeapps.live.com/op/view.aspx?src=' : '') + item.filePath)
},
//
exportFile (item) {
item.loading = true
const url = item.filePath
var x = new XMLHttpRequest()
x.open("GET", url, true)
x.responseType = "blob"
x.onload = function (e) {
var url = window.URL.createObjectURL(x.response)
var a = document.createElement("a")
a.href = url
a.download = item.userName + '-' + item.fileName
a.click()
item.loading = false
}
x.send()
},
back () {
this.$router.push(this.$store.state.innerReferrer)
}
}
};
</script>
<style lang="scss" scoped>
/deep/ .head-card {
.el-card__body {
padding-bottom: 0px;
.el-tabs__header {
margin-bottom: 1px;
.el-tabs__nav-wrap::after {
display: none;
}
.el-tabs__item {
font-size: 18px;
}
}
}
}
.stat {
display: flex;
.nums {
display: flex;
flex-wrap: wrap;
align-items: center;
width: 640px;
margin-right: 20px;
.item:nth-child(1) {
background-image: url('../../../assets/img/total.png');
}
.item:nth-child(2) {
background-image: url('../../../assets/img/avg.png');
}
.item:nth-child(3) {
background-image: url('../../../assets/img/ach1.png');
}
.item:nth-child(4) {
background-image: url('../../../assets/img/ach2.png');
}
.item {
width: 300px;
min-height: 145px;
padding: 30px 30px;
margin: 0 10px;
box-sizing: border-box;
border-radius: 8px;
background-size: 100% 100%;
background-repeat: no-repeat;
p {
font-size: 18px;
color: #ffffff;
}
.val {
margin-top: 10px;
color: #ffffff;
font-size: 36px;
}
}
}
.chart {
width: calc(100% - 660px);
height: 300px;
}
}
/deep/.import-file {
.el-progress__text,
.el-progress,
.el-upload-list__item-status-label {
display: none !important;
}
}
</style>

@ -64,7 +64,7 @@
<div v-else class="score-wrap"> <div v-else class="score-wrap">
<em>{{ info.score }}</em> <em>{{ info.score }}</em>
<img src="@/assets/img/point.png" alt=""> <img src="@/assets/img/point.png" alt="">
<p v-if="essayExist" class="exist">部分试题待判分成绩待定</p> <p v-if="notReview" class="exist">部分试题待判分成绩待定</p>
</div> </div>
</li> </li>
<li> <li>
@ -96,14 +96,16 @@
</el-table-column> </el-table-column>
<el-table-column prop="userTotalScore" label="得分" align="center"> <el-table-column prop="userTotalScore" label="得分" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<p v-if="scope.row.questionType === 'essay'" class="text-red">待评分</p> <p v-if="scope.row.questionType === 'essay' && scope.row.scoringStatus === '未判分'" class="text-red">待评分
<p v-else-if="essayExist && !scope.row.paperId" class="text-red">{{ scope.row.userTotalScore </p>
<p v-else-if="notReview && !scope.row.paperId" class="text-red">{{ scope.row.userTotalScore
}}部分试题待判分成绩待定</p> }}部分试题待判分成绩待定</p>
<p v-else>{{ scope.row.userTotalScore }}</p> <p v-else>{{ scope.row.userTotalScore }}</p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="scoreRatePercentage" label="得分率" align="center"> <el-table-column prop="scoreRatePercentage" label="得分率" align="center">
<template slot-scope="scope">{{ scope.row.questionType === 'essay' ? '-' : scope.row.scoreRatePercentage <template slot-scope="scope">{{ scope.row.questionType === 'essay' && scope.row.scoringStatus === '未判分'
? '-' : scope.row.scoreRatePercentage
}}</template> }}</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -127,16 +129,18 @@
<el-tag class="m-r-5" :type="ques.difficultTheme">{{ ques.difficult }}</el-tag> <el-tag class="m-r-5" :type="ques.difficultTheme">{{ ques.difficult }}</el-tag>
<div class="stem html-parse" :id="'stem' + ques.id" v-html="ques.stem"></div> <div class="stem html-parse" :id="'stem' + ques.id" v-html="ques.stem"></div>
<p>{{ ques.questionScore }}</p> <p v-if="!ques.notScored">{{ ques.questionScore }}</p>
</div> </div>
<div <div
v-if="item.questionType !== 'fill_blank' && item.questionType !== 'essay' && ques.questionAnswerVersionsList" v-if="item.questionType !== 'fill_blank' && item.questionType !== 'essay' && ques.questionAnswerVersionsList"
class="m-b-10"> class="m-b-10">
<div v-for="(opt, j) in ques.questionAnswerVersionsList" :key="j" class="opt"> <div v-for="(opt, j) in ques.questionAnswerVersionsList" :key="j" class="opt">
<template v-if="!ques.notScored">
<img v-if="opt.optCorrect === 1" src="@/assets/img/right.svg" alt="" class="icon"> <img v-if="opt.optCorrect === 1" src="@/assets/img/right.svg" alt="" class="icon">
<img v-else-if="!opt.optCorrect" src="@/assets/img/wrong.svg" alt="" class="icon"> <img v-else-if="!opt.optCorrect" src="@/assets/img/wrong.svg" alt="" class="icon">
<span v-else class="icon not-ans"></span> <span v-else class="icon not-ans"></span>
</template>
<span>{{ numToLetter(j) }}.&nbsp;</span> <span>{{ numToLetter(j) }}.&nbsp;</span>
<div class="text html-parse" v-html="opt.optionText"></div> <div class="text html-parse" v-html="opt.optionText"></div>
@ -156,37 +160,46 @@
</template> </template>
<div v-if="ques.knowledgePointList && ques.knowledgePointList.length" class="m-b-10"> <div v-if="ques.knowledgePointList && ques.knowledgePointList.length" class="m-b-10">
<span>知识点</span> <span class="line-label">知识点</span>
<el-tag v-for="(kp, k) in ques.knowledgePointList" :key="k" class="m-r-5" type="info">{{ kp.name <el-tag v-for="(kp, k) in ques.knowledgePointList" :key="k" class="m-r-5" type="info">{{ kp.name
}}</el-tag> }}</el-tag>
</div> </div>
<div class="flex m-b-10"> <div class="flex m-b-10">
<span>解析</span> <span class="line-label">解析</span>
<div <div
v-if="ques.questionAnswerVersionsList.length && ques.questionAnswerVersionsList[0].answerAnalysis" v-if="ques.questionAnswerVersionsList.length && ques.questionAnswerVersionsList[0].answerAnalysis"
v-html="ques.questionAnswerVersionsList[0].answerAnalysis" class="html-parse"></div> v-html="ques.questionAnswerVersionsList[0].answerAnalysis" class="html-parse"></div>
<div v-else>暂无解析</div> <div v-else>暂无解析</div>
</div> </div>
<div :class="['ques-info', { essay: item.questionType === 'essay' }]"> <div
:class="['ques-info', { essay: item.questionType === 'essay' && ques.scoringStatus === '未判分' && !ques.notScored }]">
<!-- 主观题 -->
<template v-if="item.questionType === 'essay'"> <template v-if="item.questionType === 'essay'">
<div class="line"> <div class="line">
<span class="line-label">参考答案</span> <span class="line-label">参考答案</span>
<div v-html="ques.questionAnswerVersionsList[0].referenceAnswer" class="html-parse"></div> <div v-if="ques.questionAnswerVersionsList[0].referenceAnswer"
v-html="ques.questionAnswerVersionsList[0].referenceAnswer" class="html-parse"></div>
<span v-else>暂无参考答案</span>
</div> </div>
<div class="line"> <div class="line">
<span class="line-label">考生答案</span> <span class="line-label">考生答案</span>
<div v-if="ques.answerContent" v-html="ques.answerContent" class="html-parse"></div> <p v-if="!ques.richTextStatus">无需作答</p>
<div v-else>未作答</div> <div v-else-if="ques.answerContent" v-html="ques.answerContent" class="html-parse"></div>
<p v-else>未作答</p>
</div> </div>
<div v-if="ques.attachmentUrl" class="line"> <div v-if="ques.allowAttachment" class="line">
<span class="line-label">考生上传附件</span> <span class="line-label">考生上传附件</span>
<template v-if="ques.attachmentUrl">
<el-link class="m-r-10" type="primary" @click="preview(ques.attachmentUrl)">{{ <el-link class="m-r-10" type="primary" @click="preview(ques.attachmentUrl)">{{
ques.attachmentName }}</el-link> ques.attachmentName }}</el-link>
<el-button type="primary" size="mini" round <el-button type="primary" size="mini" round
@click="download(ques.attachmentName, ques.attachmentUrl)">下载</el-button> @click="download(ques.attachmentName, ques.attachmentUrl)">下载</el-button>
</template>
<span v-else>未上传</span>
</div> </div>
</template> </template>
<!-- 客观题 -->
<template v-else> <template v-else>
<div class="line">正确答案{{ ques.quesAnswer }}</div> <div class="line">正确答案{{ ques.quesAnswer }}</div>
<div class="line"> <div class="line">
@ -195,16 +208,26 @@
<div v-else-if="ques.userAnswerFill" class="fill-answers"> <div v-else-if="ques.userAnswerFill" class="fill-answers">
<p v-for="(ans, j) in ques.userAnswerFill" :key="j" class="fill-answer"> <p v-for="(ans, j) in ques.userAnswerFill" :key="j" class="fill-answer">
填空{{ j + 1 }}{{ ans.studentAnswer || '未作答' }} 填空{{ j + 1 }}{{ ans.studentAnswer || '未作答' }}
<template v-if="!ques.notScored">
<img v-if="ans.correct" src="@/assets/img/right.svg" alt="" class="icon"> <img v-if="ans.correct" src="@/assets/img/right.svg" alt="" class="icon">
<img v-else src="@/assets/img/wrong.svg" alt="" class="icon"> <img v-else src="@/assets/img/wrong.svg" alt="" class="icon">
</template>
</p> </p>
</div> </div>
<span v-else>未作答</span>
</div> </div>
</template> </template>
<div class="line">题目分值{{ ques.questionScore }}</div> <div class="line">题目分值{{ ques.notScored ? '不计分' : ques.questionScore + '分' }}</div>
<div class="line">考生得分<el-input class="score-input" size="small" :value="ques.userScore" <div class="line">考生得分<template v-if="ques.notScored">不计分</template>
disabled /> <template v-else>
<el-input class="score-input" size="small" :value="ques.userScore" disabled />
</template>
</div>
<div v-for="(coment, k) in ques.comment" :key="k" class="line">
<span class="line-label">评语{{ k + 1 }}</span>
<div v-html="coment" class="html-parse"></div>
</div> </div>
</div> </div>
</div> </div>
@ -280,10 +303,15 @@ export default {
id: 4, id: 4,
name: '待判分' name: '待判分'
}, },
{
id: 5,
name: '不计分'
},
], ],
outlines: [], outlines: [],
paper: [], paper: [],
essayExist: 0, essayExist: 0,
notReview: 0,
previewImgVisible: false, previewImgVisible: false,
previewImg: '', previewImg: '',
pdfVisible: false, pdfVisible: false,
@ -305,8 +333,12 @@ export default {
const { questionTypes: types, difficults } = QuesConst const { questionTypes: types, difficults } = QuesConst
const { numToLetter } = Util const { numToLetter } = Util
let essayExist = 0 let essayExist = 0
let notReview = 0
outline.map(e => { outline.map(e => {
if (e.questionType === 'essay') essayExist = 1 if (e.questionType === 'essay') {
essayExist = 1
if (e.scoringStatus === '未判分') notReview = 1
}
e.shrink = false e.shrink = false
const type = e.questionType const type = e.questionType
e.questionTypeName = types.find(n => n.id === type).name e.questionTypeName = types.find(n => n.id === type).name
@ -319,10 +351,12 @@ export default {
} }
} }
n.notScored = n.questionScore === 0 // =0
if (n.notScored) n.userScore = '-'
const opts = n.questionAnswerVersionsList const opts = n.questionAnswerVersionsList
if (type !== 'fill_blank' && type !== 'essay') { // if (type !== 'fill_blank' && type !== 'essay') { //
if (!n.userScore) n.userScore = 0 if (!n.userScore) n.userScore = 0
n.isCorrect = n.userScore && n.userScore === n.questionScore ? 1 : 2 this.handleIsCorrect(n)
// //
let { userAnswer } = n let { userAnswer } = n
@ -367,14 +401,15 @@ export default {
// //
let rightLen = 0 let rightLen = 0
if (n.userAnswerFill) rightLen = n.userAnswerFill.filter(m => m.correct).length // if (n.userAnswerFill) rightLen = n.userAnswerFill.filter(m => m.correct).length //
n.isCorrect = n.userScore && n.questionScore === n.userScore ? 1 : (rightLen ? 3 : 2) n.isCorrect = n.notScored ? 5 : (n.userScore && n.questionScore === n.userScore ? 1 : (rightLen ? 3 : 2))
} else if (type === 'essay') { // } else if (type === 'essay') { //
n.isCorrect = 4 // this.handleIsCorrect(n)
} }
}) })
}) })
this.essayExist = essayExist // this.essayExist = essayExist //
this.notReview = notReview //
this.paper = outline this.paper = outline
this.outlines = [ this.outlines = [
...outline, ...outline,
@ -402,6 +437,10 @@ export default {
this.loading = false this.loading = false
} }
}, },
//
handleIsCorrect (n) {
n.isCorrect = n.notScored ? 5 : (n.userScore === undefined ? 4 : (n.userScore === n.questionScore ? 1 : n.userScore ? 3 : 2)) // reviewScore 0
},
scrollToSmooth (position, duration) { scrollToSmooth (position, duration) {
let startTime = Date.now() let startTime = Date.now()
@ -616,7 +655,7 @@ samp {
} }
.left { .left {
width: 290px; width: 320px;
margin-right: 15px; margin-right: 15px;
background-color: #fff; background-color: #fff;
@ -655,7 +694,7 @@ samp {
li { li {
position: relative; position: relative;
width: 30px; min-width: 30px;
margin: 7px 9px; margin: 7px 9px;
font-size: 13px; font-size: 13px;
text-align: center; text-align: center;
@ -696,8 +735,15 @@ samp {
border-color: #fe9f0a; border-color: #fe9f0a;
} }
.status5 .serial {
color: #fff;
background-color: #d1d1d1;
border-color: #d1d1d1;
}
.score { .score {
height: 22px; height: 22px;
padding: 0 2px;
border: 1px solid #d3d3d3; border: 1px solid #d3d3d3;
border-top: 0; border-top: 0;
line-height: 22px; line-height: 22px;
@ -707,7 +753,7 @@ samp {
.status-filter { .status-filter {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: 10px; padding: 10px 0;
border-top: 1px solid #e5e5e5; border-top: 1px solid #e5e5e5;
li { li {
@ -717,6 +763,7 @@ samp {
font-size: 12px; font-size: 12px;
color: #333; color: #333;
cursor: pointer; cursor: pointer;
white-space: nowrap;
border: 1px solid transparent; border: 1px solid transparent;
&:before { &:before {
@ -760,7 +807,7 @@ samp {
} }
} }
&:last-child { &:nth-child(4) {
&.active { &.active {
color: #fe9f0a; color: #fe9f0a;
border-color: #fe9f0a; border-color: #fe9f0a;
@ -771,6 +818,17 @@ samp {
} }
} }
&:last-child {
&.active {
color: #d1d1d1;
border-color: #d1d1d1;
}
&:before {
background-color: #d1d1d1;
}
}
&.active { &.active {
font-weight: 600; font-weight: 600;
} }
@ -779,7 +837,7 @@ samp {
} }
.right { .right {
width: calc(100% - 325px); width: calc(100% - 355px);
height: calc(100vh - 287px); height: calc(100vh - 287px);
padding: 10px; padding: 10px;
background-color: #fff; background-color: #fff;

@ -114,7 +114,7 @@
</span> </span>
</div> </div>
</div> </div>
<div v-else v-html='scope.row.answer' style='white-space: pre-wrap'></div> <div v-else class="pre-code">{{ scope.row.answer }}</div>
<template v-if="scope.row.runThePictureList"> <template v-if="scope.row.runThePictureList">
<img v-for="(img, i) in scope.row.runThePictureList" :key="i" width="200" class="result-pic" <img v-for="(img, i) in scope.row.runThePictureList" :key="i" width="200" class="result-pic"
:src="img" alt=""> :src="img" alt="">
@ -169,7 +169,6 @@ export default {
this.loading = true this.loading = true
this.$get(`${this.api.reportDetail}?reportId=${this.reportId}`).then(({ report, userScores }) => { this.$get(`${this.api.reportDetail}?reportId=${this.reportId}`).then(({ report, userScores }) => {
this.form = report this.form = report
this.expData = userScores
this.project = this.expData.find(e => e.lcRuleRecords) // lcRuleRecords this.project = this.expData.find(e => e.lcRuleRecords) // lcRuleRecords
let form = this.form; let form = this.form;
this.infoData = { this.infoData = {
@ -183,17 +182,17 @@ export default {
className: form.className, className: form.className,
userName: form.userName userName: form.userName
} }
const data = report.data const { data } = report
this.userScores = userScores
// data使 // data使
if (!data) { if (!data) {
this.userScores = userScores
this.handleList(userScores) this.handleList(userScores)
this.$post(this.api.editExperimentalData, { this.$post(this.api.editExperimentalData, {
reportId, reportId,
data: JSON.stringify(userScores) data: JSON.stringify(userScores)
}).then(res => { }).catch(err => { }) }).then(res => { }).catch(err => { })
} else { } else {
this.handleList(userScores.find(e => e.lcRuleRecords) ? userScores : JSON.parse(data)) this.handleList(JSON.parse(data))
} }
}).catch(res => { }).catch(res => {
this.loading = false this.loading = false
@ -207,7 +206,7 @@ export default {
e.assessmentPoint = '' e.assessmentPoint = ''
e.referenceAnswer = '' e.referenceAnswer = ''
e.answer = '' e.answer = ''
e.lcRuleRecords.map((n, i) => { e.lcRuleRecords && e.lcRuleRecords.map((n, i) => {
e.assessmentPoint += `${i + 1}.${n.name}` e.assessmentPoint += `${i + 1}.${n.name}`
e.referenceAnswer += `${i + 1}.${n.ruleAnswer}` e.referenceAnswer += `${i + 1}.${n.ruleAnswer}`
e.answer += `${i + 1}.${n.userAnswer}` e.answer += `${i + 1}.${n.userAnswer}`
@ -254,6 +253,10 @@ export default {
padding: 12px 300px 20px; padding: 12px 300px 20px;
} }
.pre-code {
white-space: pre-wrap;
}
.text-right { .text-right {
text-align: right; text-align: right;
} }

@ -1936,6 +1936,12 @@ export default {
this.getSettlemennt() this.getSettlemennt()
}); });
this.$forceUpdate(); this.$forceUpdate();
//
this.productProps.map(e => {
this[e.name].map(n => {
this.deadLine(n.periodOfUse, n, n.options, 1)
})
})
} }
}, },
// //

@ -21,37 +21,20 @@
</div> </div>
<div style="height: 504px; max-height: 504px; overflow: auto"> <div style="height: 504px; max-height: 504px; overflow: auto">
<el-tree <el-tree :data="orgList" default-expand-all ref="orgTree" node-key="id" highlight-current
:data="orgList" :expand-on-click-node="false" @node-click="handleNodeClick"
default-expand-all :props="{ children: 'children', label: 'partnerClassificationName', isLeaf: 'leaf' }">
ref="orgTree"
node-key="id"
highlight-current
:expand-on-click-node="false"
@node-click="handleNodeClick"
:props="{children: 'children', label: 'partnerClassificationName', isLeaf: 'leaf'}"
>
<span class="custom-tree-node" slot-scope="{ node, data }"> <span class="custom-tree-node" slot-scope="{ node, data }">
<span class="org-name">{{ node.label }}</span> <span class="org-name">{{ node.label }}</span>
<span> <span>
<!-- isTeam 0: 分类1: 团队 --> <!-- isTeam 0: 分类1: 团队 -->
<el-button <el-button v-auth="'/parner:账号管理:添加分类'" v-if="!data.isTeam" type="text"
v-auth="'/parner:账号管理:添加分类'" icon="el-icon-circle-plus-outline" @click="() => addOrg(node, data)">
v-if="!data.isTeam"
type="text"
icon="el-icon-circle-plus-outline"
@click="() => addOrg(node, data)">
</el-button> </el-button>
<el-button <el-button v-auth="'/parner:账号管理:编辑分类'" type="text" icon="el-icon-edit-outline"
v-auth="'/parner:账号管理:编辑分类'"
type="text"
icon="el-icon-edit-outline"
@click="() => editOrg(node, data)"> @click="() => editOrg(node, data)">
</el-button> </el-button>
<el-button <el-button v-auth="'/parner:账号管理:删除分类'" type="text" icon="el-icon-delete"
v-auth="'/parner:账号管理:删除分类'"
type="text"
icon="el-icon-delete"
@click="() => delOrg(node, data)"> @click="() => delOrg(node, data)">
</el-button> </el-button>
</span> </span>
@ -60,27 +43,16 @@
</div> </div>
</div> </div>
<el-dialog <el-dialog :title="typeForm.id ? '编辑' : '新增' + '分类'" :visible.sync="orgVisible" :close-on-click-modal="false"
:title="typeForm.id ? '编辑' : '新增' + '分类'" width="50%" @close="closeType">
:visible.sync="orgVisible"
:close-on-click-modal="false"
width="50%"
@close="closeType"
>
<el-form v-if="orgVisible" ref="typeForm" :model="typeForm" :rules="orgRules" label-width="100px"> <el-form v-if="orgVisible" ref="typeForm" :model="typeForm" :rules="orgRules" label-width="100px">
<el-form-item label="分类名称" prop="partnerClassificationName"> <el-form-item label="分类名称" prop="partnerClassificationName">
<el-input v-model.trim="typeForm.partnerClassificationName" placeholder="请输入"></el-input> <el-input v-model.trim="typeForm.partnerClassificationName" placeholder="请输入"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="上级部门"> <el-form-item label="上级部门">
<span v-if="typeForm.parentName">{{ typeForm.parentName }}</span> <span v-if="typeForm.parentName">{{ typeForm.parentName }}</span>
<el-cascader <el-cascader v-else :options="orgListDia" v-model="cascaderValue" :props="cascaderProps" clearable
v-else style="width: 100%">
:options="orgListDia"
v-model="cascaderValue"
:props="cascaderProps"
clearable
style="width: 100%"
>
</el-cascader> </el-cascader>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -96,7 +68,8 @@
<div class="tool"> <div class="tool">
<ul class="filter"> <ul class="filter">
<li> <li>
<el-input style="width: 250px;" placeholder="请输入员工姓名/手机号" prefix-icon="el-icon-search" v-model="keyWord" clearable></el-input> <el-input style="width: 250px;" placeholder="请输入员工姓名/手机号" prefix-icon="el-icon-search" v-model="keyWord"
clearable></el-input>
</li> </li>
</ul> </ul>
<div> <div>
@ -104,18 +77,21 @@
</div> </div>
</div> </div>
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id"> <el-table :data="listData" class="table" ref="table" stripe header-align="center"
@selection-change="handleSelectionChange" row-key="id">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> <el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column> <el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="userName" label="姓名" align="center" min-width="100"></el-table-column> <el-table-column prop="userName" label="姓名" align="center" min-width="100"></el-table-column>
<el-table-column prop="account" label="账号" align="center" min-width="100"></el-table-column> <el-table-column prop="account" label="账号" align="center" min-width="100"></el-table-column>
<el-table-column prop="phone" label="手机号" align="center" min-width="120"></el-table-column> <el-table-column prop="phone" label="手机号" align="center" min-width="120"></el-table-column>
<el-table-column prop="invitationAccount" label="邀请人" align="center" min-width="120"></el-table-column> <el-table-column prop="invitationAccount" label="邀请人" align="center" min-width="120"></el-table-column>
<el-table-column prop="partnerClassificationName" label="团队名称" align="center" min-width="120" show-overflow-tooltip></el-table-column> <el-table-column prop="partnerClassificationName" label="团队名称" align="center" min-width="120"
show-overflow-tooltip></el-table-column>
<template v-if="!type"> <template v-if="!type">
<el-table-column prop="provinceName" label="省份" align="center" min-width="80"></el-table-column> <el-table-column prop="provinceName" label="省份" align="center" min-width="80"></el-table-column>
<el-table-column prop="cityName" label="城市" align="center" min-width="80"></el-table-column> <el-table-column prop="cityName" label="城市" align="center" min-width="80"></el-table-column>
<el-table-column prop="roleName" label="授权角色" align="center" min-width="120" show-overflow-tooltip></el-table-column> <el-table-column prop="roleName" label="授权角色" align="center" min-width="120"
show-overflow-tooltip></el-table-column>
<el-table-column prop="phone" label="费率" align="center" min-width="120"> <el-table-column prop="phone" label="费率" align="center" min-width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<p v-if="scope.row.annualTeamFee">团队年费{{ scope.row.annualTeamFee }}w</p> <p v-if="scope.row.annualTeamFee">团队年费{{ scope.row.annualTeamFee }}w</p>
@ -130,16 +106,20 @@
<el-button v-if="!type" type="text" v-auth="'/parner:账号管理:重置密码'" @click="edit(scope.row)">编辑</el-button> <el-button v-if="!type" type="text" v-auth="'/parner:账号管理:重置密码'" @click="edit(scope.row)">编辑</el-button>
<el-button type="text" v-auth="'/parner:账号管理:重置密码'" @click="resetPassword(scope.row)">重置密码</el-button> <el-button type="text" v-auth="'/parner:账号管理:重置密码'" @click="resetPassword(scope.row)">重置密码</el-button>
<el-button v-if="type" type="text" v-auth="'/parner:账号管理:删除合伙人'" @click="del(scope.row)">删除</el-button> <el-button v-if="type" type="text" v-auth="'/parner:账号管理:删除合伙人'" @click="del(scope.row)">删除</el-button>
<el-button v-else-if="scope.row.isTeam == 1" type="text" v-auth="'/parner:账号管理:转让超管'" @click="transfer(scope.row)">转让超管</el-button> <el-button v-else-if="scope.row.isTeam == 1" type="text" v-auth="'/parner:账号管理:转让超管'"
<el-button v-if="scope.row.isTeam == 0" type="text" v-auth="'/parner:账号管理:移除'" @click="remove(scope.row)">移除</el-button> @click="transfer(scope.row)">转让超管</el-button>
<el-button v-if="scope.row.isTeam == 0" type="text" v-auth="'/parner:账号管理:移除'"
@click="remove(scope.row)">移除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next" :total="total"></el-pagination> <el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next"
:total="total"></el-pagination>
</div> </div>
<el-dialog title="添加城市合伙人" :visible.sync="parnerVisible" width="580px" custom-class="add-dia" :close-on-click-modal="false" @close="closeAdd"> <el-dialog title="添加城市合伙人" :visible.sync="parnerVisible" width="580px" custom-class="add-dia"
:close-on-click-modal="false" @close="closeAdd">
<p class="tips">链接/二维码失效时间{{ expireTime }}</p> <p class="tips">链接/二维码失效时间{{ expireTime }}</p>
<p class="title">城市合伙人 <em>邀请链接</em></p> <p class="title">城市合伙人 <em>邀请链接</em></p>
<p class="des">加盟商合作伙伴可以通过这个链接加入 <em>城市合伙人计划</em></p> <p class="des">加盟商合作伙伴可以通过这个链接加入 <em>城市合伙人计划</em></p>
@ -152,21 +132,24 @@
<img width="250" :src="qrcode" alt=""> <img width="250" :src="qrcode" alt="">
</el-dialog> </el-dialog>
<el-dialog title="转让管理员" :visible.sync="transferVisible" width="350px" custom-class="transfer-dia" :close-on-click-modal="false"> <el-dialog title="转让管理员" :visible.sync="transferVisible" width="350px" custom-class="transfer-dia"
:close-on-click-modal="false">
<div style="text-align: center"> <div style="text-align: center">
<el-button type="primary" @click="showChoose">转给团队成员</el-button> <el-button type="primary" @click="showChoose">转给团队成员</el-button>
<el-button @click="add(1)">邀请外部人员</el-button> <el-button @click="add(1)">邀请外部人员</el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog title="请选择要转让的团队成员" :visible.sync="chooseVisible" width="300px" custom-class="choose-dia" :close-on-click-modal="false"> <el-dialog title="请选择要转让的团队成员" :visible.sync="chooseVisible" width="300px" custom-class="choose-dia"
:close-on-click-modal="false">
<ul class="member-list"> <ul class="member-list">
<li v-for="(item, i) in members" :key="i"> <li v-for="(item, i) in members" :key="i">
<div class="info"> <div class="info">
<img src="@/assets/img/avatar.png" alt=""> <img src="@/assets/img/avatar.png" alt="">
<span class="name">{{ item.userName }}</span> <span class="name">{{ item.userName }}</span>
</div> </div>
<el-radio v-model="choosePartnerId" :label="item.partnerId" :disabled="curRow.accountId === item.accountId"></el-radio> <el-radio v-model="choosePartnerId" :label="item.partnerId"
:disabled="curRow.accountId === item.accountId"></el-radio>
</li> </li>
</ul> </ul>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
@ -184,22 +167,22 @@
<el-select class="w-100" v-model="form.roleList" multiple> <el-select class="w-100" v-model="form.roleList" multiple>
<template v-for="item in roleList"> <template v-for="item in roleList">
<!-- 不显示超管 --> <!-- 不显示超管 -->
<el-option <el-option :key="item.id" :label="item.roleName" :value="item.id">
:key="item.id"
:label="item.roleName"
:value="item.id">
</el-option> </el-option>
</template> </template>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="provinceId" label="省份"> <el-form-item prop="provinceId" label="省份">
<el-select style="width: 100%" v-model="form.provinceId" placeholder="请选择省份" @change="getCity"> <el-select style="width: 100%" v-model="form.provinceId" placeholder="请选择省份" @change="getCity">
<el-option v-for="(item,index) in provinces" :key="index" :label="item.provinceName" :value="item.provinceId"></el-option> <el-option v-for="(item, index) in provinces" :key="index" :label="item.provinceName"
:value="item.provinceId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="cityId" label="城市"> <el-form-item prop="cityId" label="城市">
<el-select style="width: 100%" v-model="form.cityId" placeholder="请选择城市" :disabled="form.provinceId ? false : true"> <el-select style="width: 100%" v-model="form.cityId" placeholder="请选择城市"
<el-option v-for="(item,index) in cities" :key="index" :label="item.cityName" :value="item.cityId"></el-option> :disabled="form.provinceId ? false : true">
<el-option v-for="(item, index) in cities" :key="index" :label="item.cityName"
:value="item.cityId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -665,47 +648,58 @@ export default {
.m-b-20 { .m-b-20 {
margin-bottom: 20px; margin-bottom: 20px;
} }
.org-name { .org-name {
margin-right: 20px; margin-right: 20px;
} }
.w-100 { .w-100 {
width: 100%; width: 100%;
} }
.wrap { .wrap {
display: flex; display: flex;
padding: 0 24px; padding: 0 24px;
.side { .side {
width: 300px; width: 300px;
padding: 24px 10px 24px 0; padding: 24px 10px 24px 0;
margin-right: 24px; margin-right: 24px;
border-right: 1px solid rgba(0, 0, 0, 0.06); border-right: 1px solid rgba(0, 0, 0, 0.06);
} }
.right { .right {
width: calc(100% - 324px); width: calc(100% - 324px);
padding: 24px 0; padding: 24px 0;
} }
} }
.add-dia { .add-dia {
.tips { .tips {
font-size: 12px; font-size: 12px;
color: #f00; color: #f00;
} }
.title { .title {
margin: 10px 0; margin: 10px 0;
font-size: 14px; font-size: 14px;
em { em {
font-style: normal; font-style: normal;
} }
} }
.des { .des {
font-size: 13px; font-size: 13px;
color: #7a7a7a; color: #7a7a7a;
} }
.link-wrap { .link-wrap {
display: flex; display: flex;
align-items: center; align-items: center;
margin: 10px 0 20px; margin: 10px 0 20px;
} }
.link { .link {
padding: 10px; padding: 10px;
margin-right: 15px; margin-right: 15px;
@ -713,6 +707,7 @@ export default {
border-radius: 4px; border-radius: 4px;
} }
} }
/deep/.choose-dia { /deep/.choose-dia {
.member-list { .member-list {
li { li {
@ -721,17 +716,21 @@ export default {
align-items: center; align-items: center;
margin-bottom: 10px; margin-bottom: 10px;
} }
.info { .info {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
} }
img { img {
width: 40px; width: 40px;
height: 40px; height: 40px;
} }
.name { .name {
margin-left: 10px; margin-left: 10px;
} }
.el-radio__label { .el-radio__label {
display: none; display: none;
} }

@ -13,20 +13,32 @@ export default {
}; };
}, },
mounted () { mounted () {
const token = sessionStorage.getItem('token')
const cache = localStorage.getItem('reviewPath') // localStorage const cache = localStorage.getItem('reviewPath') // localStorage
let url = `${location.origin}/reviewCenter/` let url = `${location.origin}/reviewCenter/`
if (Setting.isDev) url = `http://192.168.31.125:8099/` if (Setting.isDev) url = `http://192.168.31.125:8099/`
if (cache) { if (cache) {
url += `#${cache}${cache.includes('?') ? `&` : '?'}token=${sessionStorage.getItem('token')}` url += '#' + this.replaceParam(cache, Date.now())
} else { } else {
url += `#/myReview?token=${sessionStorage.getItem('token')}` url += `#/myReview?nakadai=1${Setting.isDev ? `&token=${token}` : ''}&v=${Date.now()}`
} }
url += `&v=${Date.now()}` console.log("🚀 ~ mounted ~ url:", url)
localStorage.setItem('review_token', sessionStorage.getItem('token')) localStorage.setItem('review_token', token)
this.url = url this.url = url
}, },
methods: { methods: {
replaceParam (url, newVValue) {
const vParamRegex = /v=[^&]+/g
let newUrl = url.replace(vParamRegex, `v=${newVValue}`)
const [baseUrl, hash] = newUrl.split('#');
if (hash) {
newUrl = `${baseUrl}#${hash.replace(vParamRegex, `v=${newVValue}`)}`
}
return newUrl
}
} }
}; };
</script> </script>

@ -1,28 +1,20 @@
<template> <template>
<div ref="main" <div ref="main" class="main" v-loading="loading">
class="main"
v-loading="loading">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="24"> <el-col :span="24">
<el-card shadow="hover" <el-card shadow="hover" class="mgb20">
class="mgb20">
<div class="flex-between"> <div class="flex-between">
<el-page-header @back="back" <el-page-header @back="back" content="项目配置"></el-page-header>
content="项目配置"></el-page-header>
<div v-if="!isDetail"> <div v-if="!isDetail">
<el-button type="success" <el-button type="success" :loading="submiting === 0"
:loading="submiting === 0"
@click="handleSubmit(0, projectManage.isOpen = 1, projectManage.ztOpen = 1)">保存为草稿 @click="handleSubmit(0, projectManage.isOpen = 1, projectManage.ztOpen = 1)">保存为草稿
</el-button> </el-button>
<el-button type="primary" <el-button type="primary" :loading="submiting === 1" @click="handleSubmit(1)">确定并发布</el-button>
:loading="submiting === 1"
@click="handleSubmit(1)">确定并发布</el-button>
</div> </div>
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" <el-card shadow="hover" class="mgb20">
class="mgb20">
<div class="flex-center mgb20"> <div class="flex-center mgb20">
<p class="addhr_tag"></p> <p class="addhr_tag"></p>
<span>课程信息</span> <span>课程信息</span>
@ -33,26 +25,18 @@
<el-form label-width="80px"> <el-form label-width="80px">
<div style="display: flex"> <div style="display: flex">
<el-form-item label="项目名称"> <el-form-item label="项目名称">
<el-input :disabled="isDetail" <el-input :disabled="isDetail" v-model.trim="projectManage.projectName" placeholder="20个字符以内"
v-model.trim="projectManage.projectName"
placeholder="20个字符以内"
@blur="projectNameExistis"></el-input> @blur="projectNameExistis"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="备注"> <el-form-item label="备注">
<el-input v-model.trim="projectManage.remark" <el-input v-model.trim="projectManage.remark" placeholder="20个字符以内"></el-input>
placeholder="20个字符以内"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="项目用途"> <el-form-item label="项目用途">
<el-select :disabled="isDetail" <el-select :disabled="isDetail" v-model="projectManage.permissions" placeholder="请选择"
v-model="projectManage.permissions"
placeholder="请选择"
@change="permissionChange"> @change="permissionChange">
<el-option label="练习" <el-option label="练习" :value="0"></el-option>
:value="0"></el-option> <el-option label="考核" :value="1"></el-option>
<el-option label="考核" <el-option label="竞赛" :value="2"></el-option>
:value="1"></el-option>
<el-option label="竞赛"
:value="2"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</div> </div>
@ -60,8 +44,7 @@
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" <el-card shadow="hover" class="mgb20">
class="mgb20">
<div class="flex-center mgb20"> <div class="flex-center mgb20">
<p class="addhr_tag"></p> <p class="addhr_tag"></p>
<span>实验目标</span> <span>实验目标</span>
@ -70,20 +53,14 @@
<div> <div>
<el-form label-width="0"> <el-form label-width="0">
<el-form-item> <el-form-item>
<quill :border="true" <quill :border="true" :readonly="isDetail" v-model="projectManage.experimentTarget"
:readonly="isDetail" :type.sync="projectManage.experimentTargetType" radio :minHeight="150" :height="150" />
v-model="projectManage.experimentTarget"
:type.sync="projectManage.experimentTargetType"
radio
:minHeight="150"
:height="150" />
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" <el-card shadow="hover" class="mgb20">
class="mgb20">
<div class="flex-center mgb20"> <div class="flex-center mgb20">
<p class="addhr_tag"></p> <p class="addhr_tag"></p>
<span>项目背景</span> <span>项目背景</span>
@ -92,30 +69,22 @@
<div> <div>
<el-form label-width="0"> <el-form label-width="0">
<el-form-item> <el-form-item>
<quill :border="true" <quill :border="true" :readonly="isDetail" v-model="projectManage.experimentDescription"
:readonly="isDetail" :type.sync="projectManage.experimentDescriptionType" radio :minHeight="150" :height="150"
v-model="projectManage.experimentDescription"
:type.sync="projectManage.experimentDescriptionType"
radio
:minHeight="150"
:height="150"
:index="1" /> :index="1" />
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" <el-card shadow="hover" class="mgb20">
class="mgb20">
<div class="flex-between mgb20"> <div class="flex-between mgb20">
<div class="flex-center"> <div class="flex-center">
<p class="addhr_tag"></p> <p class="addhr_tag"></p>
<span>实验任务</span> <span>实验任务</span>
</div> </div>
<div> <div>
<el-button :disabled="isDetail" <el-button :disabled="isDetail" type="primary" @click="toJudgePoint('home')">进入判分点
type="primary"
@click="toJudgePoint('home')">进入判分点
</el-button> </el-button>
</div> </div>
</div> </div>
@ -123,120 +92,67 @@
<div class="mgb20 flex-between"> <div class="mgb20 flex-between">
<div class="flex-center"> <div class="flex-center">
<div class="m-r-20" <div class="m-r-20" style="color: #f00">项目总分值100</div>
style="color: #f00">项目总分值100</div>
<!-- <div>权重&emsp;<div class="dib"><el-input></el-input></div></div> --> <!-- <div>权重&emsp;<div class="dib"><el-input></el-input></div></div> -->
</div> </div>
<div> <div>
<el-button :disabled="isDetail" <el-button :disabled="isDetail" class="m-r-20" type="text" @click="avgDistributionScore">
class="m-r-20"
type="text"
@click="avgDistributionScore">
平均分配分值 平均分配分值
</el-button> </el-button>
<el-button :disabled="isDetail" <el-button :disabled="isDetail" class="m-r-20" type="text" @click="manualDistributionScore">
class="m-r-20"
type="text"
@click="manualDistributionScore">
手动分配分值 手动分配分值
</el-button> </el-button>
<span>(待分配分值: {{ handDistributionScore }}/100)</span> <span>(待分配分值: {{ handDistributionScore }}/100)</span>
</div> </div>
</div> </div>
<el-button :disabled="isDetail" <el-button :disabled="isDetail" type="primary" icon="el-icon-plus" round @click="handleAddJudgment"
type="primary"
icon="el-icon-plus"
round
@click="handleAddJudgment"
style="margin-bottom: 10px">判分点 style="margin-bottom: 10px">判分点
</el-button> </el-button>
<el-button :disabled="isDetail" <el-button :disabled="isDetail" type="primary" icon="el-icon-delete" round @click="batchDeleteProjectJudgment"
type="primary"
icon="el-icon-delete"
round
@click="batchDeleteProjectJudgment"
style="margin-bottom: 10px">批量删除 style="margin-bottom: 10px">批量删除
</el-button> </el-button>
<div class="draggable"> <div class="draggable">
<u-table ref="projectJudgementTable" <el-table ref="projectJudgementTable" :data="projectJudgmentData" class="table" stripe header-align="center"
:data="projectJudgmentData" :use-virtual="isLc" :max-height="600" :row-height="60" :border="false"
class="table" @selection-change="handleSelectionProjectJudgment" row-key="judgmentId" v-loading="listLoading">
stripe <el-table-column type="selection" width="55" align="center"></el-table-column>
header-align="center" <el-table-column prop="sort" label="序号" width="80" align="center">
:use-virtual="isLc"
:max-height="600"
:row-height="60"
:border="false"
@selection-change="handleSelectionProjectJudgment"
row-key="judgmentId"
v-loading="listLoading">
<u-table-column type="selection"
width="55"
align="center"></u-table-column>
<u-table-column prop="sort"
label="序号"
width="80"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.sort }} {{ scope.row.sort }}
</template> </template>
</u-table-column> </el-table-column>
<u-table-column prop="name" <el-table-column prop="name" label="判分指标" align="center" show-overflow-tooltip
label="判分指标" min-width="140"></el-table-column>
align="center" <el-table-column prop="name" label="判分点名称" align="center" show-overflow-tooltip
show-overflow-tooltip min-width="140"></el-table-column>
min-width="140"></u-table-column> <el-table-column label="实验要求" align="center" width="600">
<u-table-column prop="name"
label="判分点名称"
align="center"
show-overflow-tooltip
min-width="140"></u-table-column>
<u-table-column label="实验要求"
align="center"
width="600">
<template slot-scope="scope"> <template slot-scope="scope">
<quill :readonly="true" <quill :readonly="true" elseRead="true" v-model="scope.row.experimentalRequirements" :index="2" />
elseRead="true"
v-model="scope.row.experimentalRequirements"
:index="2" />
</template> </template>
</u-table-column> </el-table-column>
<u-table-column prop="score" <el-table-column prop="score" label="分数" align="center" width="120">
label="分数"
align="center"
width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input :disabled="isDetail" <el-input :disabled="isDetail" :key="scope.$index" type="number" step="0.1"
:key="scope.$index"
type="number"
step="0.1"
v-model.trim="scope.row.score"></el-input> v-model.trim="scope.row.score"></el-input>
<!-- <!--
@input="scoreChange(scope.row, scope.$index)" --> @input="scoreChange(scope.row, scope.$index)" -->
</template> </template>
</u-table-column> </el-table-column>
<u-table-column label="操作" <el-table-column label="操作" width="140" align="center">
width="140"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button :disabled="isDetail" <el-button :disabled="isDetail" type="text" style="margin-right: 10px"
type="text"
style="margin-right: 10px"
@click="toJudgePoint('edit', scope.row)">自定义</el-button> @click="toJudgePoint('edit', scope.row)">自定义</el-button>
<el-button :disabled="isDetail" <el-button :disabled="isDetail" type="text" @click="delJudgePoint(scope.$index)">
type="text"
@click="delJudgePoint(scope.$index)">
删除 删除
</el-button> </el-button>
</template> </template>
</u-table-column> </el-table-column>
</u-table> </el-table>
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" <el-card shadow="hover" class="mgb20">
class="mgb20">
<div class="flex-between mgb20"> <div class="flex-between mgb20">
<div class="flex-center"> <div class="flex-center">
<p class="addhr_tag"></p> <p class="addhr_tag"></p>
@ -244,25 +160,16 @@
</div> </div>
<div> <div>
启用 启用
<el-switch :disabled="isDetail" <el-switch :disabled="isDetail" :active-value="0" :inactive-value="1"
:active-value="0"
:inactive-value="1"
v-model="projectManage.hintOpen"></el-switch> v-model="projectManage.hintOpen"></el-switch>
</div> </div>
</div> </div>
<div class="border-b-dashed"></div> <div class="border-b-dashed"></div>
<div> <div>
<el-form label-width="0"> <el-form label-width="0">
<el-form-item prop="tips" <el-form-item prop="tips" label="">
label=""> <quill :border="true" :readonly="isDetail" v-model="projectManage.experimentHint"
<quill :border="true" :type.sync="projectManage.experimentHintType" radio :minHeight="150" :height="400" :index="3" />
:readonly="isDetail"
v-model="projectManage.experimentHint"
:type.sync="projectManage.experimentHintType"
radio
:minHeight="150"
:height="400"
:index="3" />
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -271,62 +178,34 @@
</el-row> </el-row>
<!--选择判分点对话框--> <!--选择判分点对话框-->
<el-dialog title="添加判分点" <el-dialog title="添加判分点" :visible.sync="dialogVisible" width="40%" :close-on-click-modal="false"
:visible.sync="dialogVisible"
width="40%"
:close-on-click-modal="false"
@close="closeJudgment"> @close="closeJudgment">
<div class="text-right mgb10"> <div class="text-right mgb10">
<div> <div>
<el-input placeholder="请输入需要查找的判分点" <el-input placeholder="请输入需要查找的判分点" prefix-icon="el-icon-search" v-model.trim="judgementpointsquery"
prefix-icon="el-icon-search"
v-model.trim="judgementpointsquery"
clearable></el-input> clearable></el-input>
</div> </div>
</div> </div>
<u-table v-loading="visibleLoading" <el-table v-loading="visibleLoading" :data="judgementData" ref="judgementTable" class="table" stripe
:data="judgementData" header-align="center" use-virtual :row-height="45" :max-height="400" :border="false"
ref="judgementTable" @selection-change="handleSelectionJudgment" :row-key="rowKey">
class="table" <el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
stripe <el-table-column prop="id" label="序号" align="center" width="100">
header-align="center"
use-virtual
:row-height="45"
:max-height="400"
:border="false"
@selection-change="handleSelectionJudgment"
:row-key="rowKey">
<u-table-column type="selection"
width="55"
align="center"
:reserve-selection="true"></u-table-column>
<u-table-column prop="id"
label="序号"
align="center"
width="100">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.$index + 1 }} {{ scope.$index + 1 }}
</template> </template>
</u-table-column> </el-table-column>
<u-table-column prop="name" <el-table-column prop="name" label="判分点名称" align="center"></el-table-column>
label="判分点名称" <el-table-column label="操作" align="center" width="100">
align="center"></u-table-column>
<u-table-column label="操作"
align="center"
width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" <el-button size="mini" @click="toJudgePoint('view', scope.row)">查看</el-button>
@click="toJudgePoint('view', scope.row)">查看</el-button>
</template> </template>
</u-table-column> </el-table-column>
</u-table> </el-table>
<div slot="footer" <div slot="footer" class="dialog-footer">
class="dialog-footer">
<el-button @click="closeJudgment"> </el-button> <el-button @click="closeJudgment"> </el-button>
<el-button type="primary" <el-button type="primary" :loading="savingJud" @click="saveJudgment"> </el-button>
:loading="savingJud"
@click="saveJudgment"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
@ -440,6 +319,8 @@ export default {
if (this.$route.query.projectId) { if (this.$route.query.projectId) {
this.projectId = this.$route.query.projectId; this.projectId = this.$route.query.projectId;
this.getInfoData(); this.getInfoData();
} else {
this.rowDrop()
} }
// //
if (JSON.stringify(this.projectFields) != "{}") { if (JSON.stringify(this.projectFields) != "{}") {
@ -447,7 +328,6 @@ export default {
this.projectManage = projectManage; this.projectManage = projectManage;
this.projectJudgmentData = projectJudgmentData; this.projectJudgmentData = projectJudgmentData;
} }
this.rowDrop();
this.$refs.main.scrollTop = 0; this.$refs.main.scrollTop = 0;
}, },
beforeDestroy () { beforeDestroy () {
@ -482,6 +362,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.updateTime = 0 this.updateTime = 0
this.$refs.main.scrollTop = 0; this.$refs.main.scrollTop = 0;
this.rowDrop();
}); });
}).catch(err => { }).catch(err => {
this.loading = false this.loading = false
@ -785,24 +666,16 @@ export default {
// //
rowDrop () { rowDrop () {
// //
const tbody = document.querySelector(".draggable .el-table__body-wrapper tbody"); const tbody = document.querySelector(".el-table__body tbody");
const _this = this; const that = this;
Sortable.create(tbody, { this.$refs.projectJudgementTable && Sortable.create(tbody, {
// //
draggable: ".draggable .el-table__row", // draggable: ".draggable .el-table__row",
onEnd ({ newIndex, oldIndex }) { onUpdate ({ newIndex, oldIndex }) {
// : vue$nextTick console.log("🚀 ~ onEnd ~ newIndex, oldIndex:", newIndex, oldIndex)
_this.projectJudgmentData.splice(newIndex, 0, _this.projectJudgmentData.splice(oldIndex, 1)[0]); if (newIndex == oldIndex) return false
let newArray = _this.projectJudgmentData.slice(0); const currentRow = that.projectJudgmentData.splice(oldIndex, 1)[0]
_this.projectJudgmentData = []; that.projectJudgmentData.splice(newIndex, 0, currentRow)
_this.$nextTick(function () {
newArray.forEach((e, i) => {
_this.$set(e, "sort", i + 1);//
_this.$set(e, "name", e.name + "?");
_this.$set(e, "name", e.name.slice(0, e.name.length - 1)); //
});
_this.projectJudgmentData = newArray;
});
} }
}); });
}, },
@ -915,6 +788,7 @@ export default {
padding: 0; padding: 0;
border-bottom: 0; border-bottom: 0;
} }
.main { .main {
overflow: auto; overflow: auto;
overflow-x: hidden; overflow-x: hidden;

@ -13,7 +13,8 @@
<li> <li>
<label>所在国家</label> <label>所在国家</label>
<el-select size="small" v-model="form.countries"> <el-select size="small" v-model="form.countries">
<el-option v-for="item in countryList" :key="item.value" :label="item.label" :value="item.label"></el-option> <el-option v-for="item in countryList" :key="item.value" :label="item.label"
:value="item.label"></el-option>
</el-select> </el-select>
</li> </li>
</div> </div>
@ -21,7 +22,8 @@
<li> <li>
<label>性别</label> <label>性别</label>
<el-select size="small" v-model="form.sex"> <el-select size="small" v-model="form.sex">
<el-option v-for="item in sexList" :key="item.value" :label="item.name" :value="item.value"></el-option> <el-option v-for="item in sexList" :key="item.value" :label="item.name"
:value="item.value"></el-option>
</el-select> </el-select>
</li> </li>
<li class="selects"> <li class="selects">
@ -29,17 +31,21 @@
<div class="mul"> <div class="mul">
<div class="child"> <div class="child">
<el-select size="small" v-model="form.countries" placeholder> <el-select size="small" v-model="form.countries" placeholder>
<el-option v-for="item in countryList" :key="item.value" :label="item.label" :value="item.label"></el-option> <el-option v-for="item in countryList" :key="item.value" :label="item.label"
:value="item.label"></el-option>
</el-select> </el-select>
</div> </div>
<div class="child"> <div class="child">
<el-select size="small" v-model="form.provinceId" placeholder @change="id => getCity(id, 1)"> <el-select size="small" v-model="form.provinceId" placeholder @change="id => getCity(id, 1)">
<el-option v-for="item in provinceList" :key="item.provinceId" :label="item.provinceName" :value="item.provinceId"></el-option> <el-option v-for="item in provinceList" :key="item.provinceId" :label="item.provinceName"
:value="item.provinceId"></el-option>
</el-select> </el-select>
</div> </div>
<div class="child"> <div class="child">
<el-select size="small" v-model="form.cityId" placeholder :disabled="form.provinceId ? false : true"> <el-select size="small" v-model="form.cityId" placeholder
<el-option v-for="item in cityList" :key="item.cityId" :label="item.cityName" :value="item.cityId"></el-option> :disabled="form.provinceId ? false : true">
<el-option v-for="item in cityList" :key="item.cityId" :label="item.cityName"
:value="item.cityId"></el-option>
</el-select> </el-select>
</div> </div>
</div> </div>
@ -48,7 +54,8 @@
<div class="line info"> <div class="line info">
<li> <li>
<label>出生年月</label> <label>出生年月</label>
<el-date-picker size="small" placeholder="请选择时间" v-model="form.dateBirth" :clearable="false" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd"></el-date-picker> <el-date-picker size="small" placeholder="请选择时间" v-model="form.dateBirth" :clearable="false" type="date"
format="yyyy-MM-dd" value-format="yyyy-MM-dd"></el-date-picker>
</li> </li>
<li> <li>
<label>身份证</label> <label>身份证</label>
@ -59,7 +66,8 @@
<li> <li>
<label>教育程度</label> <label>教育程度</label>
<el-select size="small" v-model="form.educationDegree" placeholder="请选择教育程度"> <el-select size="small" v-model="form.educationDegree" placeholder="请选择教育程度">
<el-option v-for="(item,index) in educationDegreeList" :key="index" :label="item.name" :value="item.value"></el-option> <el-option v-for="(item, index) in educationDegreeList" :key="index" :label="item.name"
:value="item.value"></el-option>
</el-select> </el-select>
</li> </li>
</div> </div>
@ -76,41 +84,52 @@
<li> <li>
<label>职业</label> <label>职业</label>
<el-select size="small" v-model="archive.personalCareerId" placeholder="选择职业"> <el-select size="small" v-model="archive.personalCareerId" placeholder="选择职业">
<el-option v-for="item in occupationList" :key="item.value" :label="item.label" :value="item.value"></el-option> <el-option v-for="item in occupationList" :key="item.value" :label="item.label"
:value="item.value"></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<label>所在国家</label> <label>所在国家</label>
<el-select size="small" v-model="form.countries" placeholder> <el-select size="small" v-model="form.countries" placeholder>
<el-option v-for="item in countryList" :key="item.value" :label="item.label" :value="item.label" ></el-option> <el-option v-for="item in countryList" :key="item.value" :label="item.label"
:value="item.label"></el-option>
</el-select> </el-select>
</li> </li>
</div> </div>
<div class="line"> <div class="line">
<li> <li>
<label>学校名称</label> <label>学校名称</label>
<el-select size="small" v-model="archive.schoolId" filterable placeholder="选择学校" @change="id => getSchoolName(id,index)"> <el-select size="small" v-model="archive.schoolId" filterable placeholder="选择学校"
<el-option v-for="item in schoolList" :key="item.value" :label="item.schoolName" :value="item.schoolId"></el-option> @change="id => getSchoolName(id, index)">
<el-option v-for="item in schoolList" :key="item.value" :label="item.schoolName"
:value="item.schoolId"></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<label>专业学科</label> <label>专业学科</label>
<el-select size="small" v-model="archive.disciplineId" placeholder="选择专业学科" @change="id => getItemProfessionalClass(id,index)" @clear="() => clearItemClass(index)"> <el-select size="small" v-model="archive.disciplineId" placeholder="选择专业学科"
<el-option v-for="item in subjectList" :key="item.value" :label="item.disciplineName" :value="item.disciplineId"></el-option> @change="id => getItemProfessionalClass(id, index)" @clear="() => clearItemClass(index)">
<el-option v-for="item in subjectList" :key="item.value" :label="item.disciplineName"
:value="item.disciplineId"></el-option>
</el-select> </el-select>
</li> </li>
</div> </div>
<div class="line" style="margin-bottom: 0"> <div class="line" style="margin-bottom: 0">
<li> <li>
<label>专业类</label> <label>专业类</label>
<el-select size="small" v-model="archive.professionalClassId" placeholder="选择专业类" :disabled="archive.disciplineId ? false : true" @change="id => getItemProfessional(id,index)" @clear="() => clearItemProfess(index)"> <el-select size="small" v-model="archive.professionalClassId" placeholder="选择专业类"
<el-option v-for="item in archive.ProfessionalClassList" :key="item.professionalClassId" :label="item.professionalClassName" :value="item.professionalClassId"></el-option> :disabled="archive.disciplineId ? false : true" @change="id => getItemProfessional(id, index)"
@clear="() => clearItemProfess(index)">
<el-option v-for="item in archive.ProfessionalClassList" :key="item.professionalClassId"
:label="item.professionalClassName" :value="item.professionalClassId"></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<label>专业</label> <label>专业</label>
<el-select size="small" v-model="archive.professionalId" placeholder="选择专业" :disabled="archive.professionalClassId ? false : true" @change="getItemStuGrade"> <el-select size="small" v-model="archive.professionalId" placeholder="选择专业"
<el-option v-for="item in archive.ProfessionalList" :key="item.professionalId" :label="item.professionalName" :value="item.professionalId"></el-option> :disabled="archive.professionalClassId ? false : true" @change="getItemStuGrade">
<el-option v-for="item in archive.ProfessionalList" :key="item.professionalId"
:label="item.professionalName" :value="item.professionalId"></el-option>
</el-select> </el-select>
</li> </li>
</div> </div>
@ -163,7 +182,8 @@
<el-button type="primary" size="small" @click="save">更新</el-button> <el-button type="primary" size="small" @click="save">更新</el-button>
</div> </div>
<el-dialog :title="form.email ? '更换邮箱' : '绑定邮箱'" :visible.sync="emailVisible" :close-on-click-modal="false" @close="closeEmail" width="30%"> <el-dialog :title="form.email ? '更换邮箱' : '绑定邮箱'" :visible.sync="emailVisible" :close-on-click-modal="false"
@close="closeEmail" width="30%">
<el-form ref="form" :model="form" label-width="60px"> <el-form ref="form" :model="form" label-width="60px">
<el-form-item label="邮箱"> <el-form-item label="邮箱">
<el-input style="width: 394px;" placeholder="请输入邮箱" v-model="email"></el-input> <el-input style="width: 394px;" placeholder="请输入邮箱" v-model="email"></el-input>
@ -171,7 +191,8 @@
<el-form-item label="验证码"> <el-form-item label="验证码">
<div class="flex"> <div class="flex">
<el-input v-model="emailCode" placeholder="请输入验证码" maxlength="6"></el-input> <el-input v-model="emailCode" placeholder="请输入验证码" maxlength="6"></el-input>
<el-button style="margin-left: 10px" type="text" @click="sendEmailCode" :disabled="emailDisabled">{{emailBtnText}}</el-button> <el-button style="margin-left: 10px" type="text" @click="sendEmailCode" :disabled="emailDisabled">{{
emailBtnText }}</el-button>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -181,7 +202,8 @@
</span> </span>
</el-dialog> </el-dialog>
<el-dialog :title="form.phone ? '更换手机号' : '绑定手机号'" :visible.sync="phoneVisible" :close-on-click-modal="false" @close="closePhone" width="30%"> <el-dialog :title="form.phone ? '更换手机号' : '绑定手机号'" :visible.sync="phoneVisible" :close-on-click-modal="false"
@close="closePhone" width="30%">
<el-form ref="form" :model="form" label-width="60px"> <el-form ref="form" :model="form" label-width="60px">
<el-form-item label="手机号"> <el-form-item label="手机号">
<el-input style="width: 404px;" placeholder="请输入手机号" v-model="phone" maxlength="11"></el-input> <el-input style="width: 404px;" placeholder="请输入手机号" v-model="phone" maxlength="11"></el-input>
@ -189,7 +211,8 @@
<el-form-item label="验证码"> <el-form-item label="验证码">
<div class="flex"> <div class="flex">
<el-input v-model="phoneCode" placeholder="请输入验证码" maxlength="6"></el-input> <el-input v-model="phoneCode" placeholder="请输入验证码" maxlength="6"></el-input>
<el-button style="margin-left: 10px" type="text" @click="sendPhoneCode" :disabled="phoneDisabled">{{phoneBtnText}}</el-button> <el-button style="margin-left: 10px" type="text" @click="sendPhoneCode" :disabled="phoneDisabled">{{
phoneBtnText }}</el-button>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -199,16 +222,19 @@
</span> </span>
</el-dialog> </el-dialog>
<el-dialog title="更换密码" :visible.sync="passwordVisible" :close-on-click-modal="false" @close="closePassword" width="30%"> <el-dialog title="更换密码" :visible.sync="passwordVisible" :close-on-click-modal="false" @close="closePassword"
width="30%">
<el-form ref="passwordForm" :model="form" label-width="82px"> <el-form ref="passwordForm" :model="form" label-width="82px">
<el-form-item label="原密码"> <el-form-item label="原密码">
<el-input type="password" v-model="passwordForm.password" placeholder="请输入原密码"></el-input> <el-input type="password" v-model="passwordForm.password" placeholder="请输入原密码"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="新密码"> <el-form-item label="新密码">
<el-input type="password" v-model="passwordForm.newPassword" placeholder="请输入新密码" @keyup.enter.native="editPassword"></el-input> <el-input type="password" v-model="passwordForm.newPassword" placeholder="请输入新密码"
@keyup.enter.native="editPassword"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="确认新密码"> <el-form-item label="确认新密码">
<el-input type="password" v-model="passwordForm.reNewPassword" placeholder="请确认新密码" @keyup.enter.native="editPassword"></el-input> <el-input type="password" v-model="passwordForm.reNewPassword" placeholder="请确认新密码"
@keyup.enter.native="editPassword"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
@ -835,37 +861,46 @@ export default {
.flex { .flex {
display: flex; display: flex;
} }
.m-r-10 { .m-r-10 {
margin-right: 10px; margin-right: 10px;
} }
.l-title { .l-title {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 12px; margin-bottom: 12px;
font-size: 14px; font-size: 14px;
color: #333; color: #333;
img { img {
margin-right: 5px; margin-right: 5px;
} }
} }
.scroll { .scroll {
max-height: calc(100vh - 218px); max-height: calc(100vh - 218px);
overflow: auto; overflow: auto;
} }
.page { .page {
margin-bottom: 12px; margin-bottom: 12px;
/deep/.el-input__inner { /deep/.el-input__inner {
border-color: #CACFDB; border-color: #CACFDB;
} }
.list { .list {
.line { .line {
display: flex; display: flex;
margin-bottom: 24px; margin-bottom: 24px;
&.info li:not(.selects) { &.info li:not(.selects) {
.el-input { .el-input {
flex: 1; flex: 1;
} }
} }
&.imp li { &.imp li {
&:nth-child(odd) { &:nth-child(odd) {
width: 360px; width: 360px;
@ -873,15 +908,20 @@ export default {
} }
} }
} }
.el-input, .el-select{
.el-input,
.el-select {
width: 220px; width: 220px;
.el-input__inner { .el-input__inner {
border-color: #CACFDB; border-color: #CACFDB;
} }
} }
li { li {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
&>label { &>label {
width: 100px; width: 100px;
margin-right: 5px; margin-right: 5px;
@ -889,23 +929,29 @@ export default {
font-size: 14px; font-size: 14px;
color: #4c4c4c; color: #4c4c4c;
} }
.el-select { .el-select {
flex: 1; flex: 1;
} }
.el-select .el-input.is-disabled .el-input__inner { .el-select .el-input.is-disabled .el-input__inner {
border-color: #ddd; border-color: #ddd;
} }
.val { .val {
margin-right: 15px; margin-right: 15px;
color: #606266; color: #606266;
font-size: 14px; font-size: 14px;
} }
.mul { .mul {
display: inline-flex; display: inline-flex;
.child { .child {
display: inline-flex; display: inline-flex;
width: 132px; width: 132px;
margin-right: 10px; margin-right: 10px;
&>span { &>span {
margin-bottom: 5px; margin-bottom: 5px;
font-size: 14px; font-size: 14px;
@ -913,12 +959,14 @@ export default {
} }
} }
} }
&:nth-child(odd) { &:nth-child(odd) {
width: 325px; width: 325px;
margin-right: 100px; margin-right: 100px;
} }
} }
} }
.archives { .archives {
position: relative; position: relative;
width: 862px; width: 862px;
@ -926,6 +974,7 @@ export default {
margin-bottom: 6px; margin-bottom: 6px;
border-radius: 4px; border-radius: 4px;
background-color: #FAFAFA; background-color: #FAFAFA;
.del { .del {
position: absolute; position: absolute;
top: 80px; top: 80px;
@ -933,28 +982,34 @@ export default {
cursor: pointer; cursor: pointer;
} }
} }
.fold { .fold {
margin-top: 20px; margin-top: 20px;
text-align: center; text-align: center;
font-size: 12px; font-size: 12px;
color: #006EFF; color: #006EFF;
span { span {
cursor: pointer; cursor: pointer;
i { i {
transition: .5s; transition: .5s;
} }
&.active i { &.active i {
transform: rotate(180deg); transform: rotate(180deg);
} }
} }
} }
} }
.btns { .btns {
width: 100%; width: 100%;
padding: 12px 0; padding: 12px 0;
text-align: center; text-align: center;
background-color: #fff; background-color: #fff;
box-shadow: 0px 0px 10px 0px rgba(188, 201, 218, 0.4); box-shadow: 0px 0px 10px 0px rgba(188, 201, 218, 0.4);
.el-button { .el-button {
width: 80px; width: 80px;
} }

Loading…
Cancel
Save