订单、赛事排名

fixLog
yujialong 1 year ago
parent f2dc1f8485
commit 7f1c4ef666
  1. 2
      src/setting.js
  2. 1
      src/utils/api.js
  3. 45
      src/views/match/manage/matchRank.vue
  4. 37
      src/views/order/AddOrder.vue
  5. 3
      src/views/serve/addModel.vue

@ -11,7 +11,7 @@ if (isDev) {
jumpPath = 'http://192.168.31.125:8087/' // 本地调试-需要启动本地判分点系统 jumpPath = 'http://192.168.31.125:8087/' // 本地调试-需要启动本地判分点系统
host = 'http://121.37.12.51/' host = 'http://121.37.12.51/'
// host = 'https://huorantech.cn/' // host = 'https://huorantech.cn/'
// host = 'http://192.168.31.152:9000/'// 榕 host = 'http://192.168.31.152:9000/'// 榕
// host = 'http://192.168.31.51:9000/'// 赓 // host = 'http://192.168.31.51:9000/'// 赓
} else if (isPro) { } else if (isPro) {
jumpPath = 'https://www.huorantech.cn/judgmentPoint/' jumpPath = 'https://www.huorantech.cn/judgmentPoint/'

@ -407,6 +407,7 @@ export default {
addCompetitionStageRankingTime: `competition/competitionReleaseTime/addCompetitionStageRankingTime`, addCompetitionStageRankingTime: `competition/competitionReleaseTime/addCompetitionStageRankingTime`,
cancelCompetitionStageRankingTime: `competition/competitionReleaseTime/cancelCompetitionStageRankingTime`, cancelCompetitionStageRankingTime: `competition/competitionReleaseTime/cancelCompetitionStageRankingTime`,
getCompetitionStageRankingTime: `competition/competitionReleaseTime/getCompetitionStageRankingTime`, getCompetitionStageRankingTime: `competition/competitionReleaseTime/getCompetitionStageRankingTime`,
frontOfficeCompetitionRanking: `competition/competition/rank/frontOfficeCompetitionRanking`,
gradeImport: `https://www.occupationlab.com/template/赛事成绩导入模板.xlsx`, gradeImport: `https://www.occupationlab.com/template/赛事成绩导入模板.xlsx`,
rankImportTeam: `https://www.occupationlab.com/template/赛事排名导入模板(团队赛).xlsx`, rankImportTeam: `https://www.occupationlab.com/template/赛事排名导入模板(团队赛).xlsx`,
rankImportPerson: `https://www.occupationlab.com/template/赛事排名导入模板(个人赛).xlsx`, rankImportPerson: `https://www.occupationlab.com/template/赛事排名导入模板(个人赛).xlsx`,

@ -356,7 +356,7 @@ 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)
}).then(({ page, publishStatus }) => { }).then(({ page, publishStatus, total }) => {
this.published = publishStatus this.published = publishStatus
this.list = page this.list = page
this.total = total this.total = total
@ -392,13 +392,7 @@ export default {
// //
typeChange (val) { typeChange (val) {
this.$post(`${this.api.toggleTheSortingMode}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}&whetherToManuallyPublish=${this.type}`).then(res => { }).catch(res => { }) this.$post(`${this.api.toggleTheSortingMode}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}&whetherToManuallyPublish=${this.type}`).then(res => { }).catch(res => { })
// this.$post(`${this.api.whetherToPublish}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}&publicationType=${this.type}`).then(({ whetherToPublish }) => {
// if (whetherToPublish && !val) this.sourceType = '0'
this.getRank() this.getRank()
// this.published = whetherToPublish
// }).catch(res => {})
}, },
initData () { initData () {
this.page = 1 this.page = 1
@ -499,12 +493,10 @@ export default {
}, },
// //
publishSubmit () { publishSubmit () {
const { startTime, endTime } = this.grades[this.index]
if (Date.now() <= new Date(endTime)) return util.errorMsg('当前阶段还在进行中,请在本阶段结束后再发布!')
if (this.type) { // if (this.type) { //
this.$post(this.api.batchRelease, this.list.map(e => e.id)).then(res => { this.$post(this.api.batchRelease, this.list.map(e => e.id)).then(res => {
this.getData() // this.getData()
util.successMsg('发布成功!') // util.successMsg('')
}).catch(res => { }) }).catch(res => { })
} else { } else {
let data = [] // data let data = [] // data
@ -533,27 +525,14 @@ export default {
// this.$post(`${this.api.releaseVerification}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}&whetherToManuallyPublish=${this.type}`).then(res => { // this.$post(`${this.api.releaseVerification}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}&whetherToManuallyPublish=${this.type}`).then(res => {
this.$post(this.api.publishRanking, data).then(res => { this.$post(this.api.publishRanking, data).then(res => {
this.uploadData = [] this.uploadData = []
this.getData() // this.getData()
util.successMsg('发布成功!') // util.successMsg('')
}).catch(res => { }) }).catch(res => { })
// }).catch(res => {}) // }).catch(res => {})
} }
}, },
// //
publish () { publish () {
//
// if (this.published && this.sourceType != this.type) {
// this.$confirm(this.sourceType == 1 && !this.type ?
// '' :
// '', '', {
// type: 'success'
// }).then(() => {
// this.publishSubmit()
// }).catch(() => {})
// } else {
// this.publishSubmit()
// }
this.$post(`${this.api.whetherToPublish}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}&publicationType=${this.type}`).then(({ whetherToPublish }) => { this.$post(`${this.api.whetherToPublish}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}&publicationType=${this.type}`).then(({ whetherToPublish }) => {
whetherToPublish ? whetherToPublish ?
this.$confirm('排名已经发布,是否直接覆盖?', '提示', { this.$confirm('排名已经发布,是否直接覆盖?', '提示', {
@ -563,7 +542,6 @@ export default {
}).catch(() => { }) : }).catch(() => { }) :
this.publishSubmit() this.publishSubmit()
}).catch(res => { }) }).catch(res => { })
// this.publishSubmit()
}, },
// //
async getPublishTime () { async getPublishTime () {
@ -585,13 +563,18 @@ export default {
}, },
// //
async publishTimeSubmit () { async publishTimeSubmit () {
this.$post(this.api.addCompetitionStageRankingTime, { const { startTime, endTime } = this.grades[this.index]
if (Date.now() <= new Date(endTime)) return util.errorMsg('当前阶段还在进行中,请在本阶段结束后再发布!')
this.publishSubmit()
await this.$post(this.api.addCompetitionStageRankingTime, {
competitionId: this.id, competitionId: this.id,
isOverallRanking: this.active ? 0 : 1, isOverallRanking: this.active ? 0 : 1,
publicationType: this.type, publicationType: this.type,
stageId: this.active || this.stageId, stageId: this.active || this.stageId,
releaseTime: util.formatDate("yyyy-MM-dd hh:mm:ss", this.publishTime) releaseTime: util.formatDate("yyyy-MM-dd hh:mm:ss", this.publishTime)
}) })
util.successMsg('发布成功') util.successMsg('发布成功')
this.getData() this.getData()
this.uploaded = 0 this.uploaded = 0
@ -609,7 +592,7 @@ export default {
// //
if (publish) { if (publish) {
// //
if (this.type && !this.uploaded) { if (this.type && !this.uploaded && !this.list.length) {
return util.errorMsg('请先上传数据!') return util.errorMsg('请先上传数据!')
} else { } else {
this.publishTime = new Date() this.publishTime = new Date()
@ -619,9 +602,9 @@ export default {
try { try {
// //
// if (this.timeId) { // if (this.timeId) {
await this.$post(`${this.api.cancelCompetitionStageRankingTime}?competitionId=${this.id}&releaseId=${this.timeId}&isOverallRanking=${this.active ? 0 : 1}&stageId=${this.active || this.stageId}`) // await this.$post(`${this.api.cancelCompetitionStageRankingTime}?competitionId=${this.id}&releaseId=${this.timeId}&isOverallRanking=${this.active ? 0 : 1}&stageId=${this.active || this.stageId}`)
// } else { // } else {
await this.$post(`${this.api.cancelRanking}?competitionId=${this.id}&isOverallRanking=${this.active ? 0 : 1}&${this.active ? 'stageIds=' + this.active : query.join('&')}`) await this.$post(`${this.api.cancelRanking}?competitionId=${this.id}&isOverallRanking=${this.active ? 0 : 1}&${this.active ? 'stageIds=' + this.active : query.join('&')}&releaseId=${this.timeId}`)
// } // }
this.sourceType = '' this.sourceType = ''
this.type = 0 this.type = 0

@ -2015,7 +2015,8 @@ export default {
profit: form.profit, profit: form.profit,
purchaseCost: form.purchaseCost, purchaseCost: form.purchaseCost,
businessManagerId: form.businessManagerId ? +form.businessManagerId : '', businessManagerId: form.businessManagerId ? +form.businessManagerId : '',
businessManagerName: form.businessManagerName businessManagerName: form.businessManagerName,
notification: form.notification
}; };
this.$nextTick(() => { this.$nextTick(() => {
form.provinceId && this.getCityData() form.provinceId && this.getCityData()
@ -2030,7 +2031,8 @@ export default {
this.$post(this.api.renew, { this.$post(this.api.renew, {
authority: 1, authority: 1,
customerId, customerId,
productId: orderOther.filter(e => e.authority === 1).map(e => e.dataOrCourseId) productId: orderOther.filter(e => e.authority === 1).map(e => e.dataOrCourseId),
mallId: orderOther.filter(e => e.authority === 1).map(e => e.mallId),
}).then(({ orderOthers }) => { }).then(({ orderOthers }) => {
list.push(...orderOthers) list.push(...orderOthers)
resolve() resolve()
@ -2042,7 +2044,8 @@ export default {
this.$post(this.api.renew, { this.$post(this.api.renew, {
authority: 0, authority: 0,
customerId, customerId,
productId: orderOther.filter(e => !e.authority).map(e => e.dataOrCourseId) productId: orderOther.filter(e => !e.authority).map(e => e.dataOrCourseId),
mallId: orderOther.filter(e => !e.authority).map(e => e.mallId),
}).then(({ orderOthers }) => { }).then(({ orderOthers }) => {
list.push(...orderOthers) list.push(...orderOthers)
resolve() resolve()
@ -2054,7 +2057,8 @@ export default {
this.$post(this.api.renew, { this.$post(this.api.renew, {
authority: 2, authority: 2,
customerId, customerId,
productId: orderOther.filter(e => e.authority === 2).map(e => e.dataOrCourseId) productId: orderOther.filter(e => e.authority === 2).map(e => e.dataOrCourseId),
mallId: orderOther.filter(e => e.authority === 2).map(e => e.mallId),
}).then(({ orderOthers }) => { }).then(({ orderOthers }) => {
list.push(...orderOthers) list.push(...orderOthers)
resolve() resolve()
@ -2066,7 +2070,8 @@ export default {
this.$post(this.api.renew, { this.$post(this.api.renew, {
authority: 3, authority: 3,
customerId, customerId,
productId: orderOther.filter(e => e.authority === 3).map(e => e.dataOrCourseId) productId: orderOther.filter(e => e.authority === 3).map(e => e.dataOrCourseId),
mallId: orderOther.filter(e => e.authority === 3).map(e => e.mallId),
}).then(({ orderOthers }) => { }).then(({ orderOthers }) => {
list.push(...orderOthers) list.push(...orderOthers)
resolve() resolve()
@ -2079,19 +2084,8 @@ export default {
authority: 4, authority: 4,
// authority: 3, // authority: 3,
customerId, customerId,
productId: orderOther.filter(e => e.authority === 4).map(e => e.dataOrCourseId) productId: orderOther.filter(e => e.authority === 4).map(e => e.dataOrCourseId),
}).then(({ orderOthers }) => { mallId: orderOther.filter(e => e.authority === 4).map(e => e.mallId),
list.push(...orderOthers)
resolve()
}).catch(err => { })
}))
}
if (orderOther.find(e => e.authority === 5)) {
promises.push(new Promise((resolve, reject) => {
this.$post(this.api.renew, {
authority: 5,
customerId,
productId: orderOther.filter(e => e.authority === 5).map(e => e.dataOrCourseId)
}).then(({ orderOthers }) => { }).then(({ orderOthers }) => {
list.push(...orderOthers) list.push(...orderOthers)
resolve() resolve()
@ -2586,11 +2580,13 @@ export default {
}) })
}; };
const productId = [] const productId = []
const mallId = []
this.practicalCoursesSelect.map(e => {// this.practicalCoursesSelect.map(e => {//
e.associatedProduct && productId.push(+e.associatedProduct); e.associatedProduct && productId.push(+e.associatedProduct);
mallId.push(e.mallId)
let find = this[name].some(i => e.mallId === i.mallId);// id let find = this[name].some(i => e.mallId === i.mallId);// id
if (!find) { if (!find) {
// //
this.$post(`${this.api.queryCitySettlementPrice}?mallId=${e.mallId}&provinceId=${this.form.provinceId}&cityId=${this.form.cityId}`).then(res => { this.$post(`${this.api.queryCitySettlementPrice}?mallId=${e.mallId}&provinceId=${this.form.provinceId}&cityId=${this.form.cityId}`).then(res => {
const mall = res.mallPrice const mall = res.mallPrice
if (mall) { if (mall) {
@ -2608,7 +2604,8 @@ export default {
productId.length && await this.$post(this.api.renew, { productId.length && await this.$post(this.api.renew, {
authority, authority,
customerId: this.form.customerId, customerId: this.form.customerId,
productId productId,
mallId
}).then(res => { }).then(res => {
this[name].map(e => { this[name].map(e => {
res.orderOthers.map(el => { res.orderOthers.map(el => {

@ -163,8 +163,9 @@ export default {
modelName, modelName,
modelDemo, modelDemo,
postStatus, postStatus,
founder: this.isSchool ? 1 : 0 founder: this.isSchool ? 1 : 0,
} }
if (this.isSchool) data.isAdmin = 1
if (id) { if (id) {
data.id = id data.id = id
this.$post(this.api.updateSysModelDemo, data).then(res => { this.$post(this.api.updateSysModelDemo, data).then(res => {

Loading…
Cancel
Save