订单、赛事排名

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/' // 本地调试-需要启动本地判分点系统
host = 'http://121.37.12.51/'
// 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/'// 赓
} else if (isPro) {
jumpPath = 'https://www.huorantech.cn/judgmentPoint/'

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

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

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

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

Loading…
Cancel
Save