dev_review
yujialong 7 months ago
parent 267dd86ac0
commit 5fdb75fec9
  1. 4
      src/utils/http.js
  2. 41
      src/views/customer/AddCustomer.vue
  3. 4
      src/views/match/manage/matchArchList.vue
  4. 65
      src/views/match/manage/matchInfo.vue
  5. 2
      src/views/match/manage/matchRank.vue
  6. 12
      src/views/match/manage/matchReport.vue
  7. 6
      src/views/match/manage/matchSignup.vue

@ -30,6 +30,7 @@ axios.interceptors.request.use(config => {
return Promise.reject(err);
})
let logouted = 0;
// 响应拦截器
axios.interceptors.response.use(
response => {
@ -62,6 +63,7 @@ axios.interceptors.response.use(
// 未登录则跳转登录页面,并携带当前页面的路径
// 在登录成功后返回当前页面,这一步需要在登录页操作。
case 401:
if (!logouted) {
Message.error('登录过期,请重新登录!');
setTimeout(() => {
router.replace({
@ -71,6 +73,8 @@ axios.interceptors.response.use(
}
});
}, 1000);
logouted = 1
}
break;
// 403 token过期
// 登录过期对用户进行提示

@ -522,7 +522,7 @@
alt="">
</el-dialog>
<el-dialog :title="curRow ? '编辑客户' : '创建客户'"
<el-dialog :title="curRow ? '编辑客户' : '添加客户'"
:visible.sync="customerVisible"
width="300px"
class="dialog"
@ -942,10 +942,10 @@ export default {
this.dataPermissionss = res.result.dataPermissionss
this.getCityData()
this.changIndustryData()
this.getSchoolData()
this.getSchool()
}).catch((res) => { })
} else {
this.getSchoolData()
this.getSchool()
}
},
methods: {
@ -1064,7 +1064,6 @@ export default {
setCustomer () {
this.initCustomer()
this.customerListVisible = true
// this.customerVisible = true
},
handleCurrentChangeCustomer (val) {
this.pageCustomer = val
@ -1088,6 +1087,13 @@ export default {
//
addCustomer () {
this.curRow = null
this.customerForm = {
schoolName: '',
provinceId: '',
cityId: '',
customerId: '',
schoolId: '',
}
this.customerVisible = true
},
//
@ -1110,6 +1116,7 @@ export default {
}).then(async () => {
await this.$post(`${this.api.delClientsOrSchools}?schoolId=${row.schoolId}`).then(res => {
this.$message.success('删除成功')
this.getSchool(row.schoolId)
this.getCustomer()
})
}).catch(() => { })
@ -1134,24 +1141,28 @@ export default {
const row = this.curRow
form.customerName = form.schoolName
let res
try {
if (this.curRow) {
if (row.bindOrNot) {
//
await this.$post(this.api.clientSettingsEditClient, form)
res = await this.$post(this.api.clientSettingsEditClient, form)
} else {
//
await this.$post(this.api.editClientsOrSchools, form)
res = await this.$post(this.api.editClientsOrSchools, form)
}
} else {
//
await this.$get(this.api.addNewCustomersByOneself, form)
res = await this.$get(this.api.addNewCustomersByOneself, form)
}
} finally {
this.submiting = false
}
this.customerVisible = false
this.submiting = false
this.$message.success('添加成功')
this.getCustomer()
this.getSchoolData(res.schoolId)
this.getSchool(res.schoolId || '')
},
//
getCategory () {
@ -1289,12 +1300,7 @@ export default {
this.form.customerName = ''
},
// /
getSchoolData (schoolId) {
let data = {
schoolName: '',
provinceId: '',
cityId: ''
}
getSchool (schoolId) {
this.$get(this.api.querySchoolData).then(({ list }) => {
this.schoolList = list
// schoolId
@ -1305,6 +1311,8 @@ export default {
this.form.provinceId = item.provinceId
this.getCityData()
this.form.cityId = item.cityId
} else {
this.form.schoolId = ''
}
}
}).catch(res => { });
@ -1451,12 +1459,13 @@ export default {
}, 1500)
this.$store.commit('schoolIdData', { schoolId: this.form.schoolId })
this.$message.success('添加成功')
tab ? this.tabChange(tab, 1) : this.router.push('list')
tab ? this.tabChange(tab, 1) : this.$router.push('/customer')
}).catch((res) => {
this.submiting = false
})
}
} else {
this.submiting = false
this.$message.warning('该客户已存在')
}
}

@ -92,7 +92,7 @@
min-width="100"
align="center"></el-table-column>
<el-table-column prop="realSchool"
label="学生所院校"
label="学生所院校"
min-width="100"
align="center"></el-table-column>
<el-table-column v-if="competitionType"
@ -185,7 +185,7 @@
label="学生账号归属"
align="center"></el-table-column>
<el-table-column prop="realSchool"
label="学生所院校"
label="学生所院校"
align="center"></el-table-column>
<el-table-column v-if="competitionType"
prop="teamName"

@ -146,7 +146,7 @@
<td>
<span v-if="item.score >= 0"
class="m-r-10">分数{{item.score}}</span>
<el-button v-if="form.completeCompetitionSetup.competitionType || (!form.completeCompetitionSetup.competitionType && item.resultsDetails === 0 && item.reportId)"
<el-button v-if="form.completeCompetitionSetup.competitionType || (!form.completeCompetitionSetup.competitionType && item.reportId)"
type="text"
@click="show(item)">查看成绩详情</el-button>
</td>
@ -268,7 +268,7 @@
<td>{{ item.timeSum }}min</td>
<td>{{ item.score }}</td>
<td>
<el-button v-if="curRow.resultsDetails === 0 && item.reportId"
<el-button :disabled="!item.reportId"
type="text"
@click="toReport(item)">查看</el-button>
</td>
@ -278,6 +278,15 @@
<td colspan="6">暂无数据</td>
</tr>
</table>
<div class="pagination">
<el-pagination background
layout="total, prev, pager, next"
:total="total"
@current-change="handleCurrentChange"
:current-page="page"
:page-size="pageSize">
</el-pagination>
</div>
<span slot="footer"
class="dialog-footer">
<el-button size="small"
@ -289,7 +298,6 @@
</template>
<script>
import Setting from "@/setting";
import Util from "@/libs/util";
export default {
data () {
@ -316,6 +324,9 @@ export default {
},
memberVisible: false,
members: [],
page: 1,
pageSize: 10,
total: 0,
curRow: {},
teamVisible: false,
teams: [],
@ -347,17 +358,12 @@ export default {
checkedMember: '',
checkedMembers: [],
chooses: [],
timerList: [],
timer: null
};
},
mounted () {
this.$once('hook:beforeDestroy', function () {
clearInterval(this.timer)
this.timerList.forEach(n => {
clearTimeout(n)
})
this.timerList = []
})
this.getData()
},
@ -400,19 +406,6 @@ export default {
e.participants = participants
}
})
//
const now = Date.now()
this.form.competitionStage.map(e => {
//
if (!e.resultsDetails) {
const endTime = new Date(e.endTime).getTime() + e.resultAnnouncementTime * 3600000 // +
if (now > endTime) { //
info.stages.find(n => n.stageId == e.stageId).showDetail = 1
} else if (endTime - now < 86400000) { //
this.timerList.push(setTimeout(this.getInfo, endTime - now))
}
}
})
this.info = info
}).catch(err => { });
},
@ -619,23 +612,27 @@ export default {
this.chooseVisible = false
}).catch(res => { })
},
async getMembers () {
try {
const { page } = await this.$post(this.api.stageTeamScoreDetails, {
pageNum: this.page,
pageSize: this.pageSize,
competitionId: this.id,
stageId: this.curRow.stageId,
teamId: this.info.teamId
})
this.members = page.records
this.total = page.total
} catch (e) { }
},
//
show (row) {
//
if (this.form.completeCompetitionSetup.competitionType) { //
this.curRow = row
this.memberVisible = true
const teamId = this.info.teamId
if (teamId) {
this.$post(this.api.frontOfficeCompetitionRanking, {
pageNum: 1,
pageSize: 1000,
competitionId: this.id,
isOverallRanking: 0,
teamId
}).then(({ list }) => {
this.members = list
}).catch(res => { })
if (this.info.teamId) {
this.getMembers()
} else {
this.members = []
}
@ -643,6 +640,10 @@ export default {
this.toReport(row)
}
},
handleCurrentChange (val) {
this.page = val;
this.getMembers()
},
//
toReport (row) {
this.$router.push(`/matchReport?reportId=${row.reportId}`)

@ -95,7 +95,7 @@
min-width="100"
align="center"></el-table-column>
<el-table-column prop="realSchool"
label="学生所院校"
label="学生所院校"
min-width="100"
align="center"></el-table-column>
<el-table-column prop="timeSum"

@ -6,7 +6,8 @@
content="查看报告"></el-page-header>
</el-card>
<div class="content">
<div class="content"
v-loading="loading">
<div class="text-right">
<el-button type="primary"
@click="exportPage">导出报告</el-button>
@ -232,6 +233,7 @@ export default {
},
methods: {
getData () { //
this.loading = true
this.$get(`${this.api.reportDetail}?reportId=${this.reportId}`).then(({ report, userScores }) => {
this.form = report
this.expData = userScores
@ -260,7 +262,9 @@ export default {
} else {
this.handleList(userScores.find(e => e.lcRuleRecords) ? userScores : JSON.parse(data))
}
}).catch(res => { })
}).catch(res => {
this.loading = false
})
},
//
handleList (list) {
@ -283,6 +287,7 @@ export default {
})
}
this.expData = list
this.loading = false
},
exportPage () {
const form = Object.assign(this.form, this.infoData)
@ -340,9 +345,6 @@ samp {
.content {
padding: 16px 40px;
background: #fff;
&.loading {
padding-top: 30px;
}
.r-title {
margin-bottom: 40px;
font-size: 24px;

@ -74,7 +74,7 @@
min-width="180"
align="center"></el-table-column>
<el-table-column prop="realSchool"
label="学生所院校"
label="学生所院校"
min-width="180"
align="center"></el-table-column>
<el-table-column v-if="info.completeCompetitionSetup.competitionType"
@ -183,7 +183,7 @@
</el-select>
</el-form-item>
<el-form-item prop="studentAffiliatedInstitutionId"
label="学生所院校">
label="学生所院校">
<el-select v-model="form.studentAffiliatedInstitutionId"
filterable
style="width: 100%">
@ -440,7 +440,7 @@ export default {
}
},
mounted () {
this.initData()
this.getData()
this.getInfo()
this.getTeam()
},

Loading…
Cancel
Save