新增赛会设置页面

pull/371/head
wuyibo 3 years ago
parent d8273f8a2f
commit f320b1d36a

@ -120,6 +120,20 @@ export const dynamicRoutes = [
}
]
},
{
path: '/system/competition',
component: Layout,
hidden: true,
permissions: ['system:user:edit'],
children: [
{
path: 'set/:id(\\d+)',
component: () => import('@/views/system/competitionSet/index'),
name: 'competitionSet',
meta: { title: '赛会配置', activeMenu: '/system/competition' }
}
]
},
{
path: '/system/dict-data',
component: Layout,

@ -210,7 +210,8 @@
<el-avatar :src="scope.row.avatar"></el-avatar>
</template>
</el-table-column>
<el-table-column label="成员名称" align="center" prop="userName" ></el-table-column>
<el-table-column label="微信昵称" align="center" prop="userName" ></el-table-column>
<el-table-column label="成员名称" align="center" prop="realName" ></el-table-column>
<el-table-column label="球衣号" align="center" prop="jerseyNumber" ></el-table-column>
<el-table-column label="场上位置" align="center" prop="teamPosition" ></el-table-column>
<el-table-column label="身高(cm)" align="center" prop="height" ></el-table-column>

@ -187,7 +187,7 @@
<span>{{ parseTime(scope.row.createdTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
@ -203,6 +203,13 @@
@click="handleDelete(scope.row)"
v-hasPermi="['system:competition:remove']"
>删除</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-setting"
@click="handleCompetitionSet(scope.row)"
v-hasPermi="['system:competition:edit']"
>赛会设置</el-button>
</template>
</el-table-column>
</el-table>
@ -574,6 +581,11 @@ export default {
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 分配角色操作 */
handleCompetitionSet: function(row) {
const id = row.id;
this.$router.push("/system/competition/set/" + id);
},
/** 导出按钮操作 */
handleExport() {
this.download('system/competition/export', {

@ -0,0 +1,216 @@
<template>
<div>
<el-divider content-position="left" style="font-weight: bold">赛会信息
</el-divider>
<el-button type="primary" @click="close()" style="position: absolute;margin-left: 750px;margin-top: -40px" size="small">返回</el-button>
<el-descriptions style="margin-left: 20px" :column="4">
<el-descriptions-item label="赛会名称">{{competitionObj.competitionName}}</el-descriptions-item>
<el-descriptions-item label="赛会状态">
<el-tag size="small" v-if="competitionObj.auditStatus==1" type='success' >通过</el-tag>
<el-tag size="small" v-if="competitionObj.auditStatus==0" type='info' >待审核</el-tag>
<el-tag size="small" v-if="competitionObj.auditStatus==-1" type='danger' >未通过</el-tag>
</el-descriptions-item>
<el-descriptions-item label="比赛赛制">
<el-tag size="small" v-if="competitionObj.competitionType==1"></el-tag>
<el-tag size="small" v-if="competitionObj.competitionType==2"></el-tag>
<el-tag size="small" v-if="competitionObj.competitionType==3"></el-tag>
<el-tag size="small" v-if="competitionObj.competitionType==4"></el-tag>
<el-tag size="small" v-if="competitionObj.competitionType==5"></el-tag>
<el-tag size="small" v-if="competitionObj.competitionType==6"></el-tag>
</el-descriptions-item>
<el-descriptions-item label="报名起止时间">开始报名时间</el-descriptions-item>
<el-descriptions-item label="比赛起止时间">开始报名时间</el-descriptions-item>
<el-descriptions-item label="比赛地址">开始报名时间</el-descriptions-item>
<el-descriptions-item label="比赛主办方">{{competitionObj.organizer}}</el-descriptions-item>
<el-descriptions-item label="比赛承办商">{{competitionObj.undertake}}</el-descriptions-item>
<el-descriptions-item label="赛事联系人">{{competitionObj.contacts}}</el-descriptions-item>
<el-descriptions-item label="联系人电话">{{competitionObj.contactsTel}}</el-descriptions-item>
<el-descriptions-item label="比赛说明" style="width: 150px;overflow:hidden;">
<span style="width: 300px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;"> {{competitionObj.remark}}</span>
</el-descriptions-item>
<el-descriptions-item label="赛会地址" >
{{competitionObj.competitionAddress}}
</el-descriptions-item>
</el-descriptions>
<el-tabs type="border-card" tab-position="left" style="height: 900px">
<el-tab-pane>
<span slot="label"><i class="el-icon-date"></i> 我的行程</span>
我的行程
</el-tab-pane>
<el-tab-pane label="消息中心">消息中心</el-tab-pane>
<el-tab-pane label="角色管理">角色管理</el-tab-pane>
<el-tab-pane label="定时任务补偿">定时任务补偿</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import { listCompetition, getCompetition, delCompetition, addCompetition, updateCompetition } from "@/api/system/competition";
export default {
name: "CompetitionSet",
dicts: ['competition_status'],
data() {
return {
imgfit:"fill",
//
loading: true,
//
competitionObj: {},
//
title: "",
//
open: false,
//
//
rules: {
}
};
},
created() {
const id = this.$route.params && this.$route.params.id;
if (id) {
this.loading = true;
getCompetition(id).then((response) => {
this.competitionObj = response.data;
this.loading = false;
});
}
},
methods: {
/** 查询比赛信息列表 */
getList() {
this.loading = true;
listCompetition(this.queryParams).then(response => {
this.competitionList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
mainTeamId: null,
mainTeamName: null,
guestTeamId: null,
guestTeamName: null,
competitionCode: null,
competitionName: null,
designated: null,
competitionType: null,
competitionTime: null,
buildingId: null,
buildingName: null,
competitionAddress: null,
founder: null,
status: 0,
cityCode: null,
cityName: null,
maxPlayer: null,
createdTime: null,
lastUpdatedTime: null,
createdBy: null,
modifiedBy: null,
isDeleted: null,
longitude: null,
latitude: null,
remark: null,
competitionNature: null,
enrollBeginTime: null,
enrollEndTime: null,
contacts: null,
contactsAreaCode: null,
contactsTel: null,
competitionBeginTime: null,
competitionEndTime: null,
organizer: null,
undertake: null,
competitionBackImg: null,
createdId: null,
auditStatus: 0,
heightHide: null,
sponsor: null
};
this.resetForm("form");
},
/** 关闭按钮 */
close() {
const obj = { path: "/wechat/competition" };
this.$tab.closeOpenPage(obj);
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加比赛信息";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getCompetition(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改比赛信息";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateCompetition(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addCompetition(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除比赛信息编号为"' + ids + '"的数据项?').then(function() {
return delCompetition(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/competition/export', {
...this.queryParams
}, `competition_${new Date().getTime()}.xlsx`)
}
}
};
</script>
Loading…
Cancel
Save