赛事联调

dev_2022-06-14
yujialong 3 years ago
parent f11780ee8f
commit af85874783
  1. 2
      src/assets/css/main.css
  2. BIN
      src/assets/img/label.png
  3. BIN
      src/assets/img/mini.jpg
  4. 4
      src/setting.js
  5. 14
      src/utils/api.js
  6. 3
      src/views/join/index.vue
  7. 92
      src/views/match/add/index.vue
  8. 18
      src/views/match/list/index.vue
  9. 55
      src/views/match/manage/index.vue
  10. 39
      src/views/match/manage/matchDetail.vue
  11. 4
      src/views/match/manage/matchProgress.vue
  12. 53
      src/views/match/manage/matchSignup.vue
  13. 10
      src/views/match/manage/noticeDetail.vue
  14. 8
      src/views/order/AddOrder.vue
  15. 2
      src/views/parner/mobileRole.vue
  16. 28
      src/views/parner/staff.vue
  17. 2
      src/views/system/manageLog.vue

@ -48,7 +48,7 @@ li {
.content { .content {
width: auto; width: auto;
height: 100%; min-height: 100%;
padding: 20px; padding: 20px;
box-sizing: border-box; box-sizing: border-box;
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 47 KiB

@ -9,7 +9,7 @@ let jumpPath = `${location.origin}/judgmentPoint`
let host = `${location.origin}:9000/` let host = `${location.origin}:9000/`
if (isDev) { if (isDev) {
jumpPath = "http://192.168.31.125:8087/"; // 本地调试-需要启动本地判分点系统 jumpPath = "http://192.168.31.125:8087/"; // 本地调试-需要启动本地判分点系统
// host = 'http://39.108.250.202:9000/' // host = 'http://121.37.12.51:9000/'
host = 'http://192.168.31.151:9000/'// 榕 host = 'http://192.168.31.151:9000/'// 榕
// host = 'http://192.168.31.137:9000/'// 赓 // host = 'http://192.168.31.137:9000/'// 赓
} else if (isPro) { } else if (isPro) {
@ -24,7 +24,7 @@ const Setting = {
platformId: 3, // 平台标识,1职站,2数据平台,3中台,4合伙人 platformId: 3, // 平台标识,1职站,2数据平台,3中台,4合伙人
jumpPath, // 判分点系统跳转路径前缀 jumpPath, // 判分点系统跳转路径前缀
apiBaseURL: host, // 请求路径前缀 apiBaseURL: host, // 请求路径前缀
uploadURL: 'http://39.108.250.202:9000/', // 阿里云oss域名 uploadURL: 'http://121.37.12.51:9000/', // 阿里云oss域名
// 平台列表 // 平台列表
platformList: [ platformList: [
{ {

@ -1,7 +1,7 @@
import Setting from "@/setting"; import Setting from "@/setting";
const host = Setting.apiBaseURL const host = Setting.apiBaseURL
const host1 = 'http://192.168.31.151:9000/' const host1 = 'http://192.168.31.137:9000/'
const uploadURL = Setting.uploadURL const uploadURL = Setting.uploadURL
export default { export default {
@ -9,7 +9,7 @@ export default {
logins: `users/users/user/login`, //登录 logins: `users/users/user/login`, //登录
verification: `${host}users/users/user/captcha`,// 验证码图片 保留host verification: `${host}users/users/user/captcha`,// 验证码图片 保留host
bindPhoneOrEmail: `users/users/userAccount/bindPhoneOrEmail`,// 绑定手机 bindPhoneOrEmail: `users/users/userAccount/bindPhoneOrEmail`,// 绑定手机
sendPhoneOrEmailCode: `users/users/userAccount/sendPhoneOrEmailCode`,// 手机验证码 sendPhoneOrEmailCode: `${host1}users/users/userAccount/sendPhoneOrEmailCode`,// 手机验证码
getUserRolesPermissionMenu: `users/user-role/getUserRolesPermissionMenu`, getUserRolesPermissionMenu: `users/user-role/getUserRolesPermissionMenu`,
staffTemplate: `http://www.huorantech.cn/template/%E6%89%B9%E9%87%8F%E5%AF%BC%E5%85%A5%E5%91%98%E5%B7%A5%E6%A8%A1%E6%9D%BF.xlsx`, // 后台账号模板 staffTemplate: `http://www.huorantech.cn/template/%E6%89%B9%E9%87%8F%E5%AF%BC%E5%85%A5%E5%91%98%E5%B7%A5%E6%A8%A1%E6%9D%BF.xlsx`, // 后台账号模板
@ -268,15 +268,16 @@ export default {
modifyPartnerAccount: `nakadai/partnerAccount/modifyPartnerAccount`, modifyPartnerAccount: `nakadai/partnerAccount/modifyPartnerAccount`,
partnerAccountDetail: `nakadai/partnerAccount/partnerAccountDetail`, partnerAccountDetail: `nakadai/partnerAccount/partnerAccountDetail`,
partnerAccountList: `nakadai/partnerAccount/partnerAccountList`, partnerAccountList: `nakadai/partnerAccount/partnerAccountList`,
savePartnerAccount: `nakadai/partnerAccount/savePartnerAccount`, savePartnerAccount: `${host1}nakadai/partnerAccount/savePartnerAccount`,
generateInvitationCode: `nakadai/partnerAccount/generateInvitationCode`, generateInvitationCode: `nakadai/partnerAccount/generateInvitationCode`,
generationQrCode: `nakadai/partnerAccount/generationQrCode`, generationQrCode: `nakadai/partnerAccount/generationQrCode`,
queryUserInfoByPhone: `nakadai/partner-team/queryUserInfoByPhone`, queryUserInfoByPhone: `${host1}nakadai/partner-team/queryUserInfoByPhone`,
getAllTeam: `nakadai/partnerClassification/getAllTeam`, getAllTeam: `nakadai/partnerClassification/getAllTeam`,
partnerRemoval: `nakadai/partnerAccount/partnerRemoval`, partnerRemoval: `nakadai/partnerAccount/partnerRemoval`,
generateTransferCode: `nakadai/partnerAccount/generateTransferCode`, generateTransferCode: `nakadai/partnerAccount/generateTransferCode`,
transferAdmin: `nakadai/partnerAccount/transferAdmin`, transferAdmin: `nakadai/partnerAccount/transferAdmin`,
transferTeam: `nakadai/partnerAccount/transferTeam`, transferTeam: `nakadai/partnerAccount/transferTeam`,
partnerAccountMergeList: `nakadai/partnerAccount/partnerAccountMergeList`,
// 赛事 // 赛事
contestPageConditionQueryByNakadai: `occupationlab/enterprise/match/contest/contestPageConditionQueryByNakadai`, contestPageConditionQueryByNakadai: `occupationlab/enterprise/match/contest/contestPageConditionQueryByNakadai`,
@ -287,6 +288,7 @@ export default {
deleteAnnex: `occupationlab/contest/annex/delete`, deleteAnnex: `occupationlab/contest/annex/delete`,
saveAnnex: `occupationlab/contest/annex/save`, saveAnnex: `occupationlab/contest/annex/save`,
getSchoolsByProvince: `nakadai/nakadai/school/getSchoolsByProvince`, getSchoolsByProvince: `nakadai/nakadai/school/getSchoolsByProvince`,
disabledEvents: `occupationlab/enterprise/match/contest/disabledEvents`,
// 竞赛进展 // 竞赛进展
addContestProgress: `occupationlab/enterprise/match/contest-progress/addContestProgress`, addContestProgress: `occupationlab/enterprise/match/contest-progress/addContestProgress`,
@ -296,10 +298,10 @@ export default {
// 报名人员 // 报名人员
addApplicant: `occupationlab/enterprise/match/applicant/addApplicant`, addApplicant: `occupationlab/enterprise/match/applicant/addApplicant`,
disableContests: `occupationlab/enterprise/match/applicant/disableContests`, disableContests: `occupationlab/enterprise/match/applicant/disableContests`,
excelExport: `occupationlab/enterprise/match/applicant/excelExport`, excelExport: `${host}occupationlab/enterprise/match/applicant/excelExport`,
queryApplicantByCondition: `occupationlab/enterprise/match/applicant/queryApplicantByCondition`, queryApplicantByCondition: `occupationlab/enterprise/match/applicant/queryApplicantByCondition`,
disableApplicant: `occupationlab/enterprise/match/applicant/disableApplicant`, disableApplicant: `occupationlab/enterprise/match/applicant/disableApplicant`,
batchExport: `occupationlab/enterprise/match/applicant/batchExport`, exportDataInBatches: `${host}occupationlab/enterprise/match/applicant/exportDataInBatches`,
// 赛事公告 // 赛事公告
addAnnouncement: `occupationlab/contest/announcement/addAnnouncement`, addAnnouncement: `occupationlab/contest/announcement/addAnnouncement`,
amendmentAnnouncement: `occupationlab/contest/announcement/amendmentAnnouncement`, amendmentAnnouncement: `occupationlab/contest/announcement/amendmentAnnouncement`,

@ -126,8 +126,6 @@ export default {
}, },
// //
phoneChange() { phoneChange() {
//
if (this.form.isTeam == 0) {
const { form } = this const { form } = this
this.$get(this.api.queryUserInfoByPhone, { this.$get(this.api.queryUserInfoByPhone, {
phone: form.phone phone: form.phone
@ -141,7 +139,6 @@ export default {
this.repeat = false this.repeat = false
} }
}).catch(res => {}) }).catch(res => {})
}
}, },
// //
submit() { submit() {

@ -150,6 +150,27 @@
<el-button size="small" type="primary" @click="rangeSubmit"> </el-button> <el-button size="small" type="primary" @click="rangeSubmit"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog title="预览" :visible.sync="previewVisible" width="1080px" custom-class="preview-dia" :close-on-click-modal="false">
<div class="match">
<div class="info">
<h6 class="title">{{ form.name }}</h6>
<div class="meta">最近编辑时间{{ form.updateTime }}</div>
</div>
<div class="l-title" id="part1"><img src="@/assets/img/label.png" alt=""> 竞赛信息</div>
<div v-if="form.description" class="texts ql-editor" v-html="form.description"></div>
<template v-if="form.contestAnnexList">
<h6 class="p-title">附件下载</h6>
<ul class="files">
<li v-for="(item, i) in form.contestAnnexList" :key="i">
<el-link class="file-name" type="primary" @click="previewFile(item)">{{ item.fileName }}</el-link>
<el-link type="primary" :underline="false" @click="download(item)">下载</el-link>
</li>
</ul>
</template>
</div>
</el-dialog>
</div> </div>
</template> </template>
@ -208,14 +229,16 @@ export default {
const { level, value } = node const { level, value } = node
// //
if (!level) { if (!level) {
that.$get(that.api.queryProvince).then(({ list }) => {
const data = [] const data = []
that.$store.state.provinceList.map(e => { list.map(e => {
data.push({ data.push({
value: e.provinceId, value: e.provinceId,
label: e.provinceName label: e.provinceName
}) })
}) })
resolve(data) resolve(data)
}).catch(res => {})
} else if (level === 1) { } else if (level === 1) {
// //
that.$get(that.api.queryCity, { that.$get(that.api.queryCity, {
@ -254,7 +277,8 @@ export default {
} }
}, },
submiting: false, submiting: false,
updateTime: 0 updateTime: 0,
previewVisible: false
}; };
}, },
components: { components: {
@ -309,7 +333,6 @@ export default {
type: e.length > 2 ? 0 : 1 type: e.length > 2 ? 0 : 1
}) })
}) })
console.log(44, this.range, this.$refs.range.getCheckedNodes())
this.form.contestRangeList = data this.form.contestRangeList = data
// name // name
@ -377,6 +400,16 @@ export default {
this.carouselUrl = '' this.carouselUrl = ''
}).catch(res => {}) }).catch(res => {})
}, },
//
previewFile(item) {
const { filePath } = item
const suffix = filePath.substr(filePath.lastIndexOf('.') + 1)
window.open((util.isDoc(suffix) || suffix === 'pdf' ? 'https://view.officeapps.live.com/op/view.aspx?src=' : '') + item.filePath)
},
//
download(item) {
util.downloadFile(item.fileName, item.filePath)
},
// //
save(status) { save(status) {
if (this.submiting) return false; if (this.submiting) return false;
@ -385,7 +418,7 @@ export default {
form.undertaker = this.undertakerList.filter(d => d).join(); form.undertaker = this.undertakerList.filter(d => d).join();
if (form.competitionScope == 2 && !form.contestRangeList.length) return util.warningMsg('请选择区域、院校') if (form.competitionScope == 2 && !form.contestRangeList.length) return util.warningMsg('请选择区域、院校')
if (!form.name) return util.warningMsg("请填写竞赛名称"); if (!form.name) return util.warningMsg("请填写竞赛名称");
if (status == 0) { if (status == 1) {
if (!form.sponsor) return util.warningMsg("请填写主办方"); if (!form.sponsor) return util.warningMsg("请填写主办方");
if (!form.signUpStartTime) return util.warningMsg("请选择报名时间"); if (!form.signUpStartTime) return util.warningMsg("请选择报名时间");
} }
@ -394,9 +427,9 @@ export default {
let signUpEndTime = new Date(form.signUpEndTime).getTime(); let signUpEndTime = new Date(form.signUpEndTime).getTime();
let playStartTime = new Date(form.playStartTime).getTime(); let playStartTime = new Date(form.playStartTime).getTime();
if (signUpStartTime && now > signUpStartTime) return util.warningMsg("报名时间不能早于当前时间"); if (signUpStartTime && now > signUpStartTime) return util.warningMsg("报名时间不能早于当前时间");
if (!form.playStartTime && status == 0) return util.warningMsg("请选择竞赛时间"); if (!form.playStartTime && status == 1) return util.warningMsg("请选择竞赛时间");
if (playStartTime && playStartTime < signUpEndTime) return util.warningMsg("竞赛时间不能早于报名结束时间"); if (playStartTime && playStartTime < signUpEndTime) return util.warningMsg("竞赛时间不能早于报名结束时间");
if (!form.description && status == 0) return util.warningMsg("请填写竞赛详情"); if (!form.description && status == 1) return util.warningMsg("请填写竞赛详情");
this.submiting = true this.submiting = true
form.publishStatus = status form.publishStatus = status
@ -422,17 +455,16 @@ export default {
}, },
// //
preview() { preview() {
this.previewVisible = true
}, },
back(i) { back() {
const id = this.form.cid
const updateTime = this.updateTime const updateTime = this.updateTime
// //
if ((id && updateTime > 1) || (!id && updateTime)) { if (updateTime) {
this.$confirm(`编辑的内容未保存,是否保存?`, '提示', { this.$confirm(`编辑的内容未保存,是否保存?`, '提示', {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.save(1) this.save(0)
}).catch(() => { }).catch(() => {
this.backPage() this.backPage()
}) })
@ -591,4 +623,42 @@ $upload-lg-height: 150px;
font-weight: bold; font-weight: bold;
} }
} }
.match {
.l-title{
display: flex;
align-items: center;
margin-bottom: 12px;
font-size: 14px;
color: #333;
img{
margin-right: 5px;
}
}
.title{
width: 67%;
margin: 0 auto;
font-size: 28px;
text-align: center;
color: #0B1D30;
}
.info .meta{
padding: 16px 0;
font-size: 12px;
color: #999;
text-align: center;
}
.texts {
margin-bottom: 30px;
}
.files {
li {
display: flex;
align-items: center;
margin: 10px 0;
}
.file-name {
margin-right: 10px;
}
}
}
</style> </style>

@ -84,11 +84,11 @@
<el-table-column label="发布状态" align="center" width="120"> <el-table-column label="发布状态" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch
v-model="scope.row.isOpen" v-model="scope.row.ztOpen"
:active-value="0" :active-value="0"
:inactive-value="1" :inactive-value="1"
style="margin: 0 10px 0 5px" style="margin: 0 10px 0 5px"
:active-text="scope.row.isOpen ? '关' : '开'" :active-text="scope.row.ztOpen ? '关' : '开'"
@change="switchOff($event,scope.row,scope.$index)" @change="switchOff($event,scope.row,scope.$index)"
></el-switch> ></el-switch>
</template> </template>
@ -108,6 +108,7 @@ export default {
name: "match", name: "match",
data() { data() {
return { return {
timer: null,
keyword: "", keyword: "",
sourceList: [ sourceList: [
{ {
@ -204,10 +205,14 @@ export default {
}, },
mounted() { mounted() {
this.getData() this.getData()
this.$once('hook:beforeDestroy', function() {
clearInterval(this.timer)
})
}, },
methods: { methods: {
getData() { getData() {
const { form } = this const { form } = this
// this.timer = setInterval(() => {
this.$post(this.api.contestPageConditionQueryByNakadai, { this.$post(this.api.contestPageConditionQueryByNakadai, {
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
@ -225,6 +230,7 @@ export default {
this.getData() this.getData()
} }
}).catch(res => {}) }).catch(res => {})
// }, 1000)
}, },
initData() { initData() {
this.page = 1; this.page = 1;
@ -289,9 +295,13 @@ export default {
return date; return date;
}, },
switchOff(val, row, index) { switchOff(val, row, index) {
this.$put(`${this.api.publishContest}/${row.id}/${val}`) this.$post(this.api.disabledEvents, {
contestId: row.id,
isOpen: val,
type: 0 // (01)
})
.then(res => { .then(res => {
val == 1 ? util.warningMsg("该赛事信息已隐藏对学生端用户不可见") : util.successMsg("该赛事信息已对学生端用户公开"); val == 1 ? util.warningMsg('禁用成功') : util.successMsg('启用成功')
}) })
.catch(err => { .catch(err => {
}); });

@ -3,15 +3,15 @@
<div> <div>
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
<div class="flex-between"> <div class="flex-between">
<el-page-header @back="goBack" :content="'赛事管理'"></el-page-header> <el-page-header @back="back" :content="'赛事管理'"></el-page-header>
</div> </div>
</el-card> </el-card>
<div class="page" style="margin-bottom: 24px"> <div class="page" style="margin-bottom: 24px">
<div class="tabs"> <div class="tabs">
<a class="item" v-for="(item,index) in tabs" @waitChange="tabChangeWait()" :key="index" :class="{active: index == active}" @click="tabChange(index)">{{ item }}</a> <a class="item" v-for="(item,index) in tabs" :key="index" :class="{active: index == active}" @click="tabChange(index)">{{ item }}</a>
</div> </div>
<!-- 大赛详情 --> <!-- 大赛详情 -->
<MatchDetail v-if="active == 'first'" /> <MatchDetail v-if="active == 'first'" ref="detail" />
<!-- 竞赛进展 --> <!-- 竞赛进展 -->
<MatchProgress v-else-if="active == 'second'" /> <MatchProgress v-else-if="active == 'second'" />
<!-- 公告通知 --> <!-- 公告通知 -->
@ -28,13 +28,11 @@ import MatchDetail from "./matchDetail";
import MatchProgress from "./matchProgress"; import MatchProgress from "./matchProgress";
import notice from "./notice"; import notice from "./notice";
import MatchSignup from "./matchSignup"; import MatchSignup from "./matchSignup";
import EventBus from "@/libs/bus.js";
export default { export default {
name: "matchManage", name: "matchManage",
data() { data() {
return { return {
active: "first", active: this.$route.query.tab || "first",
tabs: { tabs: {
first: "大赛详情", first: "大赛详情",
second: "竞赛进展", second: "竞赛进展",
@ -50,19 +48,44 @@ export default {
MatchSignup MatchSignup
}, },
methods: { methods: {
goBack() { back() {
this.$router.back(); this.handleSave(0) && this.$router.back()
},
tabChange(index) {
this.active = index
}, },
tabChangeWait(index) { // confirm
this.tabChange(index) handleSave(i) {
//
if (this.active === 'first') {
const detail = this.$refs.detail
console.log(11, detail.updateTime, i)
if (detail.updateTime > 1) {
this.$confirm(`编辑的内容未保存,是否保存?`, '提示', {
type: 'warning'
}).then(() => {
detail.save(1)
this.backOrTab(i)
}).catch(() => {
this.backOrTab(i)
})
} else {
this.backOrTab(i)
}
return false
} else {
return true
} }
}, },
computed: { backPage(){
wait() { this.$router.back()
return this.$store.state.wait },
tabSwitch(i) {
this.active = i
this.$router.push(`/matchManage?id=${this.$route.query.id}&tab=${i}`)
},
backOrTab(i) {
i ? this.tabSwitch(i) : this.backPage()
},
tabChange(i) {
this.handleSave(i) && this.tabSwitch(i)
} }
} }
}; };

@ -124,7 +124,7 @@
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="save(0)">发布</el-button> <el-button type="primary" @click="save(1)">发布</el-button>
<el-button @click="$router.back()">取消</el-button> <el-button @click="$router.back()">取消</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -203,14 +203,16 @@ export default {
// //
console.log('lazy', node) console.log('lazy', node)
if (!level) { if (!level) {
that.$get(that.api.queryProvince).then(({ list }) => {
const data = [] const data = []
that.$store.state.provinceList.map(e => { list.map(e => {
data.push({ data.push({
value: e.provinceId, value: e.provinceId,
label: e.provinceName label: e.provinceName
}) })
}) })
resolve(data) resolve(data)
}).catch(res => {})
} else if (level === 1) { } else if (level === 1) {
// //
that.$get(that.api.queryCity, { that.$get(that.api.queryCity, {
@ -310,17 +312,31 @@ export default {
} }
// //
const ranges = contest.contestRangeList
if (ranges) {
const range = [] const range = []
contest.contestRangeList.map(e => { ranges.map(e => {
const item = [+e.provinceId] const item = [+e.provinceId]
e.cityId && item.push(+e.cityId) e.cityId && item.push(+e.cityId)
e.schoolId && item.push(+e.schoolId) e.schoolId && item.push(+e.schoolId)
range.push(item) range.push(item)
}) })
this.range = range this.range = range
}
// name
const rangeName = contest.contestRangeRespList
if (rangeName) {
const range = []
rangeName.map(e => {
range.push(e.type ? (e.provinceName || e.cityName) : e.schoolName)
})
this.rangeName = range.join(',')
}
this.form = contest
// name // name
this.$nextTick(() => { this.$nextTick(() => {
this.updateTime = 1
// const checked = this.$refs.range.getCheckedNodes() // const checked = this.$refs.range.getCheckedNodes()
// console.log(444, contest, checked) // console.log(444, contest, checked)
// const name = [] // const name = []
@ -329,9 +345,6 @@ export default {
// }) // })
// this.rangeName = name.join('') // this.rangeName = name.join('')
}) })
this.form = contest
}).catch(err => {}) }).catch(err => {})
}, },
// //
@ -431,7 +444,7 @@ export default {
form.undertaker = this.undertakerList.filter(d => d).join(); form.undertaker = this.undertakerList.filter(d => d).join();
if (form.competitionScope == 2 && !form.contestRangeList.length) return util.warningMsg('请选择区域、院校') if (form.competitionScope == 2 && !form.contestRangeList.length) return util.warningMsg('请选择区域、院校')
if (!form.name) return util.warningMsg("请填写竞赛名称"); if (!form.name) return util.warningMsg("请填写竞赛名称");
if (status == 0) { if (status == 1) {
if (!form.sponsor) return util.warningMsg("请填写主办方"); if (!form.sponsor) return util.warningMsg("请填写主办方");
if (!form.signUpStartTime) return util.warningMsg("请选择报名时间"); if (!form.signUpStartTime) return util.warningMsg("请选择报名时间");
} }
@ -440,15 +453,16 @@ export default {
let signUpEndTime = new Date(form.signUpEndTime).getTime(); let signUpEndTime = new Date(form.signUpEndTime).getTime();
let playStartTime = new Date(form.playStartTime).getTime(); let playStartTime = new Date(form.playStartTime).getTime();
if (signUpStartTime && now > signUpStartTime) return util.warningMsg("报名时间不能早于当前时间"); if (signUpStartTime && now > signUpStartTime) return util.warningMsg("报名时间不能早于当前时间");
if (!form.playStartTime && status == 0) return util.warningMsg("请选择竞赛时间"); if (!form.playStartTime && status == 1) return util.warningMsg("请选择竞赛时间");
if (playStartTime && playStartTime < signUpEndTime) return util.warningMsg("竞赛时间不能早于报名结束时间"); if (playStartTime && playStartTime < signUpEndTime) return util.warningMsg("竞赛时间不能早于报名结束时间");
if (!form.description && status == 0) return util.warningMsg("请填写竞赛详情"); if (!form.description && status == 1) return util.warningMsg("请填写竞赛详情");
this.submiting = true this.submiting = true
form.publishStatus = status form.publishStatus = status
if (form.id) delete form.contestAnnexList
if (this.form.id) { if (this.form.id) {
delete form.contestAnnexList
this.$post(this.api.editContest, form).then(res => { this.$post(this.api.editContest, form).then(res => {
this.updateTime = 1
this.submiting = false; this.submiting = false;
util.successMsg("修改成功"); util.successMsg("修改成功");
this.$router.back(); this.$router.back();
@ -471,11 +485,10 @@ export default {
preview() { preview() {
}, },
back(i) { back() {
const id = this.form.cid
const updateTime = this.updateTime const updateTime = this.updateTime
// //
if ((id && updateTime > 1) || (!id && updateTime)) { if (updateTime > 1) {
this.$confirm(`编辑的内容未保存,是否保存?`, '提示', { this.$confirm(`编辑的内容未保存,是否保存?`, '提示', {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {

@ -77,7 +77,9 @@ export default {
row.operate = true row.operate = true
}, },
getData() { getData() {
this.$get(`${this.api.getContestProgress}/${this.id}`).then(res => { this.$get(this.api.getContestProgress, {
contestId: this.id
}).then(res => {
this.listData = res.contestProgressList; this.listData = res.contestProgressList;
for(let index=0; index<this.listData.length; index++) { for(let index=0; index<this.listData.length; index++) {
// //

@ -15,10 +15,10 @@
</div> </div>
<el-table ref="table" :data="listData" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id"> <el-table ref="table" :data="listData" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id">
<el-table-column type="selection" :selectable="row => row.isDisable!=0" width="80" align="center" :reserve-selection="true"></el-table-column> <el-table-column type="selection" :selectable="row => row.isDisable!=1" width="80" 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 + (pageNo - 1) * pageSize + 1 }} {{ scope.$index + (page - 1) * pageSize + 1 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="school" label="学校"> <el-table-column prop="school" label="学校">
@ -33,9 +33,9 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch
v-model="scope.row.isDisable" v-model="scope.row.isDisable"
:active-text="scope.row.isDisable ? '开' : '关'" :active-text="scope.row.isDisable ? '关' : '开'"
:active-value="1" active-value="0"
:inactive-value="0" inactive-value="1"
style="margin: 0 10px 0 5px" style="margin: 0 10px 0 5px"
@change="switchOff($event,scope.row,scope.$index)" @change="switchOff($event,scope.row,scope.$index)"
></el-switch> ></el-switch>
@ -43,7 +43,7 @@
</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="totals" @current-change="handleCurrentChange" :current-page="pageNo"> <el-pagination background layout="total, prev, pager, next" :total="totals" @current-change="handleCurrentChange" :current-page="page">
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
@ -51,18 +51,18 @@
<script> <script>
import util from "@/libs/util"; import util from "@/libs/util";
import Setting from "@/setting"; import axios from 'axios'
export default { export default {
name: "matchSignup", name: "matchSignup",
data() { data() {
return { return {
token: util.local.get(Setting.tokenKey), token: sessionStorage.getItem('token'),
id: this.$route.query.id, id: this.$route.query.id,
keyword: "", keyword: "",
listData: [], listData: [],
multipleSelection: [], multipleSelection: [],
pageNo: 1, page: 1,
pageSize: 10, pageSize: 10,
totals: 0 totals: 0
}; };
@ -80,13 +80,14 @@ export default {
}, },
methods: { methods: {
getData() { getData() {
let data = { this.$post(this.api.queryApplicantByCondition, {
contestId: this.id pageNum: this.page,
}; pageSize: this.pageSize,
if (this.keyword) data.name = this.keyword; contestId: this.id,
this.$get(`${this.api.queryApplicantByCondition}/${this.pageNo}/${this.pageSize}`, data).then(res => { keyWord: this.keyword,
this.listData = res.applicantList; }).then(({ data }) => {
this.totals = res.total; this.listData = data.records;
this.totals = data.total;
this.$refs.table.clearSelection(); this.$refs.table.clearSelection();
}).catch(res => { }).catch(res => {
}); });
@ -95,7 +96,7 @@ export default {
this.multipleSelection = val; this.multipleSelection = val;
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.pageNo = val; this.page = val;
this.getData(); this.getData();
}, },
switchOff(val, row, index) { switchOff(val, row, index) {
@ -133,16 +134,20 @@ export default {
location.href = `${this.api.excelExport}?contestId=${this.id}`; location.href = `${this.api.excelExport}?contestId=${this.id}`;
}, },
exportBatch() { exportBatch() {
if (this.multipleSelection.length != "") { const data = this.multipleSelection
let newArr = this.multipleSelection; if (data.length) {
let data = newArr.map(item => { data.map((e, i) => e.id = i + 1)
return item.id; axios.post(this.api.exportDataInBatches, data, {
}); headers: {
location.href = `${this.api.batchExport}?ids=${data.join(",")}`; token: this.token
},
responseType: 'blob'
}).then((res) => {
util.downloadFileDirect(`报名人员.xls`, new Blob([res.data]))
}).catch(res => {})
} else { } else {
util.errorMsg("请先选择数据 !"); util.errorMsg("请先选择数据 !");
} }
} }
} }
}; };

@ -11,7 +11,7 @@
<el-form label-width="170px" label-suffix=":" size="small"> <el-form label-width="170px" label-suffix=":" size="small">
<el-form-item label="公告标题"> <el-form-item label="公告标题">
<div class="d-inline-block"> <div class="d-inline-block">
<el-input placeholder="请输入竞赛名称" v-model="form.announcementTitle" clearable></el-input> <el-input placeholder="请输入公告名称" v-model="form.announcementTitle" clearable></el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="正文"> <el-form-item label="正文">
@ -106,12 +106,14 @@ export default {
} }
}).catch(err => {}) }).catch(err => {})
}, },
//
save(status) { save(status) {
const form = this.form const form = this.form
if (!form.announcementTitle) return util.warningMsg('请填写公告标题') if (!form.announcementTitle) return util.warningMsg('请填写公告标题')
if (!form.announcementText) return util.warningMsg('请填写正文') if (!form.announcementText) return util.warningMsg('请填写正文')
form.status = status form.status = status
if (form.id) { if (form.id) {
delete form.announcementAnnexList
this.$post(this.api.amendmentAnnouncement, form).then(res => { this.$post(this.api.amendmentAnnouncement, form).then(res => {
util.successMsg("修改成功") util.successMsg("修改成功")
this.$router.back() this.$router.back()
@ -126,18 +128,18 @@ export default {
handleExceed(files, fileList) { handleExceed(files, fileList) {
util.warningMsg(`当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!`); util.warningMsg(`当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!`);
}, },
//
uploadSuccess(res) { uploadSuccess(res) {
const file = res.data.filesResult const file = res.data.filesResult
const { id } = this.form const { id } = this.form
this.form.announcementAnnexList.push({ const data = {
announcementId: id || '', announcementId: id || '',
fileName: this.fileName, fileName: this.fileName,
filePath: file.fileUrl || file.fileId filePath: file.fileUrl || file.fileId
}) }
this.form.contestAnnexList.push(data) this.form.contestAnnexList.push(data)
// //
id && this.$post(this.api.saveAnnouncementAnnex, data).then(res => {}).catch(res => {}) id && this.$post(this.api.saveAnnouncementAnnex, data).then(res => {}).catch(res => {})
console.log(44, this.form)
}, },
// //
beforeUpload(file) { beforeUpload(file) {

@ -1045,7 +1045,6 @@ export default {
order: form,// order: form,//
orderOther: tempArr// orderOther: tempArr//
}; };
debugger
this.loading = true; this.loading = true;
if (this.editDisabled) { if (this.editDisabled) {
this.$post(this.api.orderUpdate, param).then(res => { this.$post(this.api.orderUpdate, param).then(res => {
@ -1695,6 +1694,13 @@ export default {
.mag { .mag {
margin-right: 20px; margin-right: 20px;
} }
.small {
display: flex;
align-items: center;
.el-input {
margin-right: 5px;
}
}
.uploadTitle { .uploadTitle {
width: 100%; width: 100%;
height: 40px; height: 40px;

@ -25,7 +25,7 @@
<el-table-column label="操作" align="center" width="200"> <el-table-column label="操作" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="showRole(scope.row)" v-auth="'/system:角色权限:查看'">查看</el-button> <el-button type="text" @click="showRole(scope.row)" v-auth="'/system:角色权限:查看'">查看</el-button>
<el-button v-if="scope.row.roleName !== '超级管理员'" type="text" @click="editRole(scope.row)" v-auth="'/system:角色权限:编辑'">编辑</el-button> <el-button type="text" @click="editRole(scope.row)" v-auth="'/system:角色权限:编辑'">编辑</el-button>
<el-button v-if="scope.row.roleName !== '超级管理员' && scope.row.roleName !== '管理员'" type="text" @click="handleDelete(scope.row)" v-auth="'/system:角色权限:删除'">删除</el-button> <el-button v-if="scope.row.roleName !== '超级管理员' && scope.row.roleName !== '管理员'" type="text" @click="handleDelete(scope.row)" v-auth="'/system:角色权限:删除'">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>

@ -4,15 +4,16 @@
<div class="side"> <div class="side">
<div class="m-b-20"> <div class="m-b-20">
<h6 class="p-title">或然城市合伙人</h6> <h6 class="p-title">或然城市合伙人</h6>
<el-radio-group v-model="type" @change="initData"> <el-radio-group v-model="type" @change="typeChange">
<div class="m-b-20"> <div class="m-b-20">
<el-radio :label="1">团队合伙人</el-radio> <el-radio :label="1">城市合伙人</el-radio>
</div> </div>
<div> <div>
<el-radio :label="2">未加入团队的合伙人</el-radio> <el-radio :label="2">未加入团队的合伙人</el-radio>
</div> </div>
</el-radio-group> </el-radio-group>
</div> </div>
<el-divider></el-divider>
<div> <div>
<div class="flex-between"> <div class="flex-between">
<h6 class="p-title" style="margin-bottom: 0">组织架构</h6> <h6 class="p-title" style="margin-bottom: 0">组织架构</h6>
@ -110,13 +111,13 @@
<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" width="120"></el-table-column> <el-table-column prop="phone" label="手机号" align="center" width="120"></el-table-column>
<el-table-column prop="partnerClassificationName" label="团队名称" align="center" min-width="200" show-overflow-tooltip></el-table-column> <el-table-column prop="partnerClassificationName" label="团队名称" align="center" min-width="200" show-overflow-tooltip></el-table-column>
<el-table-column prop="roleName" label="授权角色" align="center" min-width="200" show-overflow-tooltip></el-table-column> <el-table-column v-if="!type" prop="roleName" label="授权角色" align="center" min-width="200" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" align="center" width="300"> <el-table-column label="操作" align="center" width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" v-auth="'/system:后台账号:重置密码'" @click="resetPassword(scope.row)">重置密码</el-button> <el-button type="text" v-auth="'/system:后台账号:重置密码'" @click="resetPassword(scope.row)">重置密码</el-button>
<el-button v-if="type === 2" type="text" v-auth="'/system:后台账号:删除'" @click="del(scope.row)">删除</el-button> <el-button v-if="type" type="text" v-auth="'/system:后台账号:删除'" @click="del(scope.row)">删除</el-button>
<el-button v-else-if="scope.row.isTeam == 1" type="text" v-auth="'/system:后台账号:删除'" @click="transfer(scope.row)">转让超管</el-button>
<el-button v-if="scope.row.isTeam == 0" type="text" v-auth="'/system:后台账号:删除'" @click="remove(scope.row)">移除</el-button> <el-button v-if="scope.row.isTeam == 0" type="text" v-auth="'/system:后台账号:删除'" @click="remove(scope.row)">移除</el-button>
<el-button v-if="scope.row.isTeam == 1 && type === 1" type="text" v-auth="'/system:后台账号:删除'" @click="transfer(scope.row)">转让超管</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -322,6 +323,12 @@ export default {
}) })
this.getList() this.getList()
}, },
//
typeChange() {
this.$refs.orgTree.setCurrentKey(null)
this.curTeamId = ''
this.initData()
},
// //
addOrg(node, data) { addOrg(node, data) {
this.typeForm = { this.typeForm = {
@ -341,7 +348,8 @@ export default {
this.orgListDia = list this.orgListDia = list
this.typeForm = { this.typeForm = {
id: data.id, id: data.id,
partnerClassificationName: data.partnerClassificationName partnerClassificationName: data.partnerClassificationName,
isTeam: data.isTeam
} }
this.orgVisible = true this.orgVisible = true
const { ids } = data const { ids } = data
@ -420,7 +428,7 @@ export default {
}, },
// //
handleNodeClick(data) { handleNodeClick(data) {
this.type = 1 this.type = ''
this.curTeamId = '' this.curTeamId = ''
if (data.isTeam) { if (data.isTeam) {
this.curTeamId = data.id this.curTeamId = data.id
@ -428,7 +436,6 @@ export default {
this.getTeamId(data.children) this.getTeamId(data.children)
} }
if (!this.curTeamId) this.curTeamId = data.id if (!this.curTeamId) this.curTeamId = data.id
// this.$refs.orgTree.setCurrentKey(this.curTeamId)
this.initData() this.initData()
this.$refs.table.clearSelection() this.$refs.table.clearSelection()
}, },
@ -445,8 +452,8 @@ export default {
}, },
// //
getList() { getList() {
this.$post(this.api.partnerAccountList, { this.$post(this.api[this.type ? 'partnerAccountMergeList' : 'partnerAccountList'], {
type: this.type, type: this.type || 1,
partnerClassificationId: this.curTeamId, partnerClassificationId: this.curTeamId,
keyWord: this.keyWord, keyWord: this.keyWord,
pageNum: this.page, pageNum: this.page,
@ -591,7 +598,6 @@ export default {
} }
.wrap { .wrap {
display: flex; display: flex;
height: calc(100vh - 223px);
padding: 0 24px; padding: 0 24px;
.side { .side {
width: 300px; width: 300px;

@ -32,7 +32,7 @@
</div> </div>
<el-timeline class="timeline"> <el-timeline class="timeline">
<el-timeline-item placement="top" v-for="(item, i) in listData" :key="i" :class="['item' + i, {draft: item.draft}]"> <el-timeline-item placement="top" v-for="(item, i) in listData" :key="i" :class="['item' + i, {draft: item.draft}]">
<p class="sign">{{ item.draft ? '未发布' : item.updateTime }}</p> <p class="sign">{{ item.draft ? '未发布' : item.createTime }}</p>
<div class="ver"> <div class="ver">
<div> <div>
{{ item.versionName + (item.draft ? '(草稿)' : '') }} {{ item.versionName + (item.draft ? '(草稿)' : '') }}

Loading…
Cancel
Save