dev_review
yujialong 6 months ago
parent 56565ded13
commit 0ba3475f1f
  1. 2
      .prettierrc
  2. 11
      src/utils/api.js
  3. 576
      src/views/customer/AddCustomer.vue
  4. 135
      src/views/customer/customer.vue
  5. 104
      src/views/match/add/index.vue
  6. 249
      src/views/match/add/step1.vue
  7. 178
      src/views/match/add/step2.vue
  8. 113
      src/views/match/add/step3.vue
  9. 269
      src/views/match/manage/abnormalTeam.vue
  10. 20
      src/views/match/manage/index.vue
  11. 260
      src/views/match/manage/matchInfo.vue
  12. 225
      src/views/user/User.vue

@ -1,5 +1,5 @@
{
"tabWidth": 4,
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 140

@ -9,9 +9,9 @@ export default {
bindPhoneOrEmail: `users/users/userAccount/bindPhoneOrEmail`,// 绑定手机
sendPhoneOrEmailCode: `users/users/userAccount/sendPhoneOrEmailCode`,// 手机验证码
getUserRolesPermissionMenu: `users/users/user-role/getUserRolesPermissionMenu`,
deleteProfile : `users/users/userInfo/deleteProfile`,
refreshPageNotification : `nakadai/message/refreshPageNotification`,
heartbeatDetection : `nakadai/message/heartbeatDetection`,
deleteProfile: `users/users/userInfo/deleteProfile`,
refreshPageNotification: `nakadai/message/refreshPageNotification`,
heartbeatDetection: `nakadai/message/heartbeatDetection`,
// 阿里云文件/视频管理
getPlayAuth: `${uploadURL}oss/manage/getPlayAuth`, // 获取播放凭证
@ -55,6 +55,7 @@ export default {
clientSettingsEditClient: `nakadai/nakadai/customer/clientSettingsEditClient`,
delClientsOrSchools: `nakadai/nakadai/school/delClientsOrSchools`,
editClientsOrSchools: `nakadai/nakadai/school/editClientsOrSchools`,
userManagementList: `users/users/userAccount/userManagementList`,
resetPwdCustomer: `nakadai/nakadai/customer/resetPwd`,
queryCustomerIsExists: `nakadai/nakadai/customer/queryCustomerIsExists`,
@ -66,7 +67,7 @@ export default {
getBusinessManagerOrder: `nakadai/nakadai/customer/getBusinessManagerOrder`,
// 用户管理
delUserAccounts: `users/users/userAccount/delUserAccounts`,
delUserAccountsByNakadai: `users/users/userAccount/delUserAccountsByNakadai`,
queryUserInfoDetails: `users/users/userAccount/queryUserInfoDetails`,
personalFile: `users/users/userAccount/personalFile`,
@ -332,6 +333,8 @@ export default {
updateEventAllocationRecord: `competition/competitionAutomaticAllocationRecord/updateEventAllocationRecord`,
editWhetherPopUpsAppear: `competition/competitionAutomaticAllocationRecord/editWhetherPopUpsAppear`,
automaticAllocation: `competition/competition/automaticAllocation/automaticAllocation`,
checkTeamStatus: `competition/teamAbnormalInformation/checkTeamStatus`,
queryAbnormalTeam: `competition/teamAbnormalInformation/queryAbnormalTeam`,
// 赛事内容
addCompetitionContent: `competition/competition/content/addCompetitionContent`,

@ -1,179 +1,106 @@
<template>
<div>
<el-card shadow="hover"
class="mgb20">
<el-card shadow="hover" class="mgb20">
<div class="flex-between">
<div class="per_title"
v-preventReClick
@click="goback(0)">
<div class="per_title" v-preventReClick @click="goback(0)">
<i class="el-icon-arrow-left"></i>
<span class="per_back">返回</span>
<span v-if="form.customerName || !customerId"
class="per_school"
<span v-if="form.customerName || !customerId" class="per_school"
v-text="isDetail ? form.customerName + '/查看' : (customerId ? form.customerName + '/编辑' : '新增')"></span>
</div>
</div>
</el-card>
<el-card shadow="hover"
class="card">
<div class="tabs"
v-if="customerId">
<a class="item"
v-for="(item, i) in tabs"
:key="i"
:class="{active: i == curTab}"
@click="tabChange(i)">{{ item }}</a>
<el-card shadow="hover" class="card">
<div class="tabs" v-if="customerId">
<a class="item" v-for="(item, i) in tabs" :key="i" :class="{ active: i == curTab }" @click="tabChange(i)">{{
item
}}</a>
</div>
<div v-show="curTab === 'tab1'">
<el-form :model="form"
:rules="rules"
ref="form"
label-width="120px"
class="flex-start-around info"
<el-form :model="form" :rules="rules" ref="form" label-width="120px" class="flex-start-around info"
:disabled="isDetail">
<el-col :span="6"
style="margin-right: 60px;">
<el-form-item prop="countries"
label="国家">
<el-select v-model="form.countries"
clearable
placeholder="请选择国家">
<el-option v-for="(item,index) in countryList"
:key="index"
:label="item.name"
<el-col :span="6" style="margin-right: 60px;">
<el-form-item prop="countries" label="国家">
<el-select v-model="form.countries" clearable placeholder="请选择国家">
<el-option v-for="(item, index) in countryList" :key="index" :label="item.name"
:value="item.name"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="schoolId"
label="客户名称">
<el-form-item prop="schoolId" label="客户名称">
<div class="flex a-center">
<el-select v-model="form.schoolId"
filterable
clearable
placeholder="请选择学校"
:disabled="!!customerId"
@change="SchoolChange"
@clear="clearSchool">
<el-option v-for="(item,index) in schoolList"
:key="index"
:label="item.schoolName"
<el-select v-model="form.schoolId" filterable clearable placeholder="请选择学校" :disabled="!!customerId"
@change="SchoolChange" @clear="clearSchool">
<el-option v-for="(item, index) in schoolList" :key="index" :label="item.schoolName"
:value="item.schoolId"></el-option>
</el-select>
<!-- <i v-if="!isDetail"
class="el-icon-circle-plus-outline plus-cus"
@click="addCustomer"></i> -->
<el-button v-if="!isDetail"
style="margin-left: 5px"
type="primary"
size="mini"
<el-button v-if="!isDetail" style="margin-left: 5px" type="primary" size="mini"
@click="setCustomer">设置</el-button>
</div>
</el-form-item>
<el-form-item prop="cityId"
label="城市">
<el-select v-model="form.cityId"
placeholder=""
disabled>
<el-option v-for="(item,index) in cityList"
:key="index"
:label="item.cityName"
<el-form-item prop="cityId" label="城市">
<el-select v-model="form.cityId" placeholder="" disabled>
<el-option v-for="(item, index) in cityList" :key="index" :label="item.cityName"
:value="item.cityId"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="industryId"
label="行业">
<el-select v-model="form.industryId"
clearable
placeholder="请选择行业"
<el-form-item prop="industryId" label="行业">
<el-select v-model="form.industryId" clearable placeholder="请选择行业"
:disabled="form.industryClassId ? false : true">
<el-option v-for="(item,index) in industryList"
:key="index"
:label="item.industryName"
<el-option v-for="(item, index) in industryList" :key="index" :label="item.industryName"
:value="item.industryId"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="account"
label="账号">
<el-input placeholder="请输入账号"
v-model.trim="form.account"></el-input>
<el-form-item prop="account" label="账号">
<el-input placeholder="请输入账号" v-model.trim="form.account"></el-input>
</el-form-item>
<el-form-item label="职务">
<el-input placeholder="请输入职务名称"
v-model.trim="form.position"
maxlength="11"></el-input>
<el-input placeholder="请输入职务名称" v-model.trim="form.position" maxlength="11"></el-input>
</el-form-item>
<el-form-item label="产品到期时间">
<el-date-picker type="date"
disabled
v-model="form.expireDate"
style="width: 100%;"
<el-date-picker type="date" disabled v-model="form.expireDate" style="width: 100%;"
value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6"
style="margin-left: 60px;">
<el-col :span="6" style="margin-left: 60px;">
<el-form-item label="客户类型">
<el-select v-model="form.customerType"
placeholder="下单后客户类型自动补充"
disabled>
<el-option v-for="(item,index) in customerTypeList"
:key="index"
:label="item.name"
<el-select v-model="form.customerType" placeholder="下单后客户类型自动补充" disabled>
<el-option v-for="(item, index) in customerTypeList" :key="index" :label="item.name"
:value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="provinceId"
label="省份">
<el-select v-model="form.provinceId"
placeholder=""
disabled>
<el-option v-for="(item,index) in provinceList"
:key="index"
:label="item.provinceName"
<el-form-item prop="provinceId" label="省份">
<el-select v-model="form.provinceId" placeholder="" disabled>
<el-option v-for="(item, index) in provinceList" :key="index" :label="item.provinceName"
:value="item.provinceId"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="industryClassId"
label="行业类型">
<el-select v-model="form.industryClassId"
clearable
placeholder="请选择行业类型"
@change="changIndustry"
<el-form-item prop="industryClassId" label="行业类型">
<el-select v-model="form.industryClassId" clearable placeholder="请选择行业类型" @change="changIndustry"
@clear="clearIndustry()">
<el-option v-for="(item,index) in IndustryClassList"
:key="index"
:label="item.industryClassName"
<el-option v-for="(item, index) in IndustryClassList" :key="index" :label="item.industryClassName"
:value="item.industryClassId"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="name"
label="联系人姓名">
<el-input placeholder="请输入联系人姓名"
v-model.trim="form.name"></el-input>
<el-form-item prop="name" label="联系人姓名">
<el-input placeholder="请输入联系人姓名" v-model.trim="form.name"></el-input>
</el-form-item>
<el-form-item prop="phone"
label="手机号">
<el-input placeholder="请输入联系人手机号"
v-model.trim="form.phone"
maxlength="11"></el-input>
<el-form-item prop="phone" label="手机号">
<el-input placeholder="请输入联系人手机号" v-model.trim="form.phone" maxlength="11"></el-input>
</el-form-item>
<el-form-item prop="email"
label="邮箱">
<el-input placeholder="请输入邮箱"
v-model.trim="form.email"></el-input>
<el-form-item prop="email" label="邮箱">
<el-input placeholder="请输入邮箱" v-model.trim="form.email"></el-input>
</el-form-item>
</el-col>
</el-form>
<div v-if="!isDetail"
style="margin-top: 20px;text-align: center">
<el-button type="primary"
v-preventReClick
@click="saveAdd(0)">确定</el-button>
<el-button v-preventReClick
@click="$router.back()">取消</el-button>
<div v-if="!isDetail" style="margin-top: 20px;text-align: center">
<el-button type="primary" v-preventReClick @click="saveAdd(0)">确定</el-button>
<el-button v-preventReClick @click="$router.back()">取消</el-button>
</div>
</div>
@ -182,69 +109,38 @@
<ul class="filter">
<li>
<label>产品分类</label>
<el-select v-model="form2.productType"
placeholder="请选择产品类型"
clearable
@change="filterForm2">
<el-option v-for="(item,index) in productTypeList"
:key="index"
:label="item.classificationName"
<el-select v-model="form2.productType" placeholder="请选择产品类型" clearable @change="filterForm2">
<el-option v-for="(item, index) in productTypeList" :key="index" :label="item.classificationName"
:value="item.classificationId"></el-option>
</el-select>
</li>
<li>
<label>订阅状态</label>
<el-select v-model="form2.status"
placeholder="请选择订阅状态"
@change="filterForm2">
<el-option v-for="(item,index) in subStatusList"
:key="index"
:label="item.name"
<el-select v-model="form2.status" placeholder="请选择订阅状态" @change="filterForm2">
<el-option v-for="(item, index) in subStatusList" :key="index" :label="item.name"
:value="item.name"></el-option>
</el-select>
</li>
<li>
<el-input style="width: 250px;"
placeholder="请输入产品名称"
prefix-icon="el-icon-search"
clearable
<el-input style="width: 250px;" placeholder="请输入产品名称" prefix-icon="el-icon-search" clearable
v-model="form2.keyword"></el-input>
</li>
</ul>
<div>
<el-button type="primary"
@click="exportList">导出列表</el-button>
<el-button type="primary" @click="exportList">导出列表</el-button>
</div>
</div>
<el-table :data="products"
class="orderTable"
stripe
header-align="center"
@selection-change="handleSelectionChange"
row-key="id">
<el-table-column type="selection"
width="55"
align="center"
:reserve-selection="true"></el-table-column>
<el-table-column type="index"
width="100"
label="序号"
align="center">
<el-table :data="products" class="orderTable" stripe header-align="center"
@selection-change="handleSelectionChange" row-key="id">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center">
</el-table-column>
<el-table-column prop="goodsName"
label="产品名称"
align="center"></el-table-column>
<el-table-column prop="productTypeName"
label="产品分类"
align="center"></el-table-column>
<el-table-column label="起止日期"
align="center">
<el-table-column prop="goodsName" label="产品名称" align="center"></el-table-column>
<el-table-column prop="productTypeName" label="产品分类" align="center"></el-table-column>
<el-table-column label="起止日期" align="center">
<template slot-scope="scope">
{{ scope.row.status === '已过期' ? '' : scope.row.startAndEndTime }}
<el-tooltip v-if="scope.row.other"
class="item"
effect="dark"
placement="top">
<el-tooltip v-if="scope.row.other" class="item" effect="dark" placement="top">
<div slot="content">
还有<span v-html="scope.row.other"></span><br>的订单还未生效
</div>
@ -252,34 +148,23 @@
</el-tooltip>
</template>
</el-table-column>
<el-table-column label="剩余期限"
align="center">
<el-table-column label="剩余期限" align="center">
<template slot-scope="scope">
{{scope.row.remain}}&nbsp;&nbsp;
{{ scope.row.remain }}&nbsp;&nbsp;
</template>
</el-table-column>
<el-table-column prop="status"
label="订阅状态"
align="center"></el-table-column>
<el-table-column label="产品状态"
align="center">
<el-table-column prop="status" label="订阅状态" align="center"></el-table-column>
<el-table-column label="产品状态" align="center">
<template slot-scope="scope">
<el-switch v-model="scope.row.isEnable"
:active-value="1"
:inactive-value="0"
:active-text="scope.row.isEnable ? '启用' : '禁用'"
:disabled="scope.row.status === '已过期'"
@change="switchOff($event,scope.row,scope.$index)"></el-switch>
<el-switch v-model="scope.row.isEnable" :active-value="1" :inactive-value="0"
:active-text="scope.row.isEnable ? '启用' : '禁用'" :disabled="scope.row.status === '已过期'"
@change="switchOff($event, scope.row, scope.$index)"></el-switch>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background
layout="total, prev, pager, next"
@current-change="handleCurrentChangeProduct"
:current-page="pageProduct"
:page-size="pageSizeProduct"
:total="totalProduct"></el-pagination>
<el-pagination background layout="total, prev, pager, next" @current-change="handleCurrentChangeProduct"
:current-page="pageProduct" :page-size="pageSizeProduct" :total="totalProduct"></el-pagination>
</div>
</div>
@ -288,68 +173,37 @@
<ul class="filter">
<li>
<label>订单类型</label>
<el-select v-model="form3.orderType"
clearable
placeholder="请选择订单类型"
@change="getOrder">
<el-option v-for="(item,index) in orderTypeList"
:key="index"
:label="item.name"
<el-select v-model="form3.orderType" clearable placeholder="请选择订单类型" @change="getOrder">
<el-option v-for="(item, index) in orderTypeList" :key="index" :label="item.name"
:value="item.value"></el-option>
</el-select>
</li>
<li>
<label>订单状态</label>
<el-select v-model="form3.orderStatus"
clearable
placeholder="请选择订单状态"
@change="getOrder">
<el-option v-for="(item,index) in orderStatusList"
:key="index"
:label="item.name"
<el-select v-model="form3.orderStatus" clearable placeholder="请选择订单状态" @change="getOrder">
<el-option v-for="(item, index) in orderStatusList" :key="index" :label="item.name"
:value="item.id"></el-option>
</el-select>
</li>
</ul>
<div>
<el-input style="width: 250px;"
placeholder="请输入订单编号、内容"
prefix-icon="el-icon-search"
clearable
<el-input style="width: 250px;" placeholder="请输入订单编号、内容" prefix-icon="el-icon-search" clearable
v-model="form3.keyword"></el-input>
</div>
</div>
<el-table :data="orders"
class="orderTable"
stripe
header-align="center"
@selection-change="handleSelectionChange"
row-key="orderId">
<el-table-column type="selection"
width="55"
align="center"
:reserve-selection="true"></el-table-column>
<el-table-column type="index"
width="100"
label="序号"
align="center">
<el-table :data="orders" class="orderTable" stripe header-align="center"
@selection-change="handleSelectionChange" row-key="orderId">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center">
</el-table-column>
<el-table-column prop="orderNumber"
label="订单编号"
align="center"></el-table-column>
<el-table-column prop="orderContent"
label="订单内容"
align="center">
<el-table-column prop="orderNumber" label="订单编号" align="center"></el-table-column>
<el-table-column prop="orderContent" label="订单内容" align="center">
<template slot-scope="scope">
<el-popover trigger="hover"
placement="top"
style='width: 500px'
v-if='scope.row.orderContent.length >14'>
<el-popover trigger="hover" placement="top" style='width: 500px'
v-if='scope.row.orderContent.length > 14'>
<p> {{ scope.row.orderContent }}</p>
<div slot="reference"
class="name-wrapper">
<el-tag size="medium"
class='tags'>{{ scope.row.orderContent }}</el-tag>
<div slot="reference" class="name-wrapper">
<el-tag size="medium" class='tags'>{{ scope.row.orderContent }}</el-tag>
</div>
</el-popover>
<span v-else>
@ -357,89 +211,53 @@
</span>
</template>
</el-table-column>
<el-table-column prop="orderAmount"
label="订单金额(元)"
align="center"></el-table-column>
<el-table-column prop="createTime"
label="订单日期"
align="center"></el-table-column>
<el-table-column prop="orderType"
label="订单类型"
align="center"></el-table-column>
<el-table-column prop="orderStatus"
label="订单状态"
align="center"></el-table-column>
<el-table-column label="操作"
align="center">
<el-table-column prop="orderAmount" label="订单金额(元)" align="center"></el-table-column>
<el-table-column prop="createTime" label="订单日期" align="center"></el-table-column>
<el-table-column prop="orderType" label="订单类型" align="center"></el-table-column>
<el-table-column prop="orderStatus" label="订单状态" align="center"></el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button type="text"
@click="toOrderDetail(scope.row)">订单详情</el-button>
<el-button type="text" @click="toOrderDetail(scope.row)">订单详情</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background
layout="total, prev, pager, next"
@current-change="handleCurrentChangeOrder"
:current-page="pageOrder"
:page-size="pageSizeOrder"
:total="totalOrder"></el-pagination>
<el-pagination background layout="total, prev, pager, next" @current-change="handleCurrentChangeOrder"
:current-page="pageOrder" :page-size="pageSizeOrder" :total="totalOrder"></el-pagination>
</div>
</div>
<div v-show="curTab === 'tab4'">
<div class="tool">
<div>
<el-input style="width: 350px;"
placeholder="请输入订单编号、合同名称、合同编号、产品内容"
prefix-icon="el-icon-search"
<el-input style="width: 350px;" placeholder="请输入订单编号、合同名称、合同编号、产品内容" prefix-icon="el-icon-search"
clearable></el-input>
</div>
</div>
<el-table :data="contractInformations"
class="table"
stripe
header-align="center">
<el-table-column type="index"
width="100"
label="序号"
align="center">
<el-table :data="contractInformations" class="table" stripe header-align="center">
<el-table-column type="index" width="100" label="序号" align="center">
</el-table-column>
<el-table-column prop="contractNumber"
label="订单号"
align="center"></el-table-column>
<el-table-column prop="contractNumber"
label="合同编号"
align="center"></el-table-column>
<el-table-column prop="contractName"
label="合同名称"
align="center">
<el-table-column prop="contractNumber" label="订单号" align="center"></el-table-column>
<el-table-column prop="contractNumber" label="合同编号" align="center"></el-table-column>
<el-table-column prop="contractName" label="合同名称" align="center">
</el-table-column>
<el-table-column prop="endTime"
label="合同期限"
align="center">
<el-table-column prop="endTime" label="合同期限" align="center">
<template slot-scope="scope">
{{scope.row.startTime?scope.row.startTime.split(' ').shift():''}}&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;{{scope.row.endTime?scope.row.endTime.split(' ').shift():''}}
{{ scope.row.startTime ? scope.row.startTime.split('').shift() : ''
}}&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;{{ scope.row.endTime ? scope.row.endTime.split('').shift() : '' }}
</template>
</el-table-column>
<el-table-column prop="dataOrCourseName"
label="产品内容"
align="center">
<el-table-column prop="dataOrCourseName" label="产品内容" align="center">
</el-table-column>
<el-table-column prop="contractMoney"
label="合同金额"
align="center">
<el-table-column prop="contractMoney" label="合同金额" align="center">
<template slot-scope="scope">
{{scope.row.contractMoney}}&nbsp;&nbsp;
{{ scope.row.contractMoney }}&nbsp;&nbsp;
</template>
</el-table-column>
<el-table-column label="操作"
align="center">
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button type="text"
@click="showContract(scope.row)">查看</el-button>
<el-button type="text"
@click="showContract(scope.row)">下载</el-button>
<el-button type="text" @click="showContract(scope.row)">查看</el-button>
<el-button type="text" @click="showContract(scope.row)">下载</el-button>
</template>
</el-table-column>
</el-table>
@ -448,196 +266,110 @@
<div v-show="curTab === 'tab5'">
<div class="tool">
<div>
<el-input style="width: 300px;"
placeholder="请输入商务经理、手机号"
prefix-icon="el-icon-search"
clearable
<el-input style="width: 300px;" placeholder="请输入商务经理、手机号" prefix-icon="el-icon-search" clearable
v-model="bmsKeyword"></el-input>
</div>
</div>
<el-table :data="bms"
class="table"
stripe
header-align="center">
<el-table-column type="index"
width="100"
label="序号"
align="center"></el-table-column>
<el-table-column prop="userName"
label="姓名"
width="200"
align="center">
<el-table :data="bms" class="table" stripe header-align="center">
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="userName" label="姓名" width="200" align="center">
<template slot-scope="scope">
{{ scope.row.userName }}{{ scope.row.peopleDel ? '(已被删除)' : '' }}
</template>
</el-table-column>
<el-table-column prop="phone"
label="手机号"
width="150"
align="center"></el-table-column>
<el-table-column prop="bmName"
label="所属团队"
align="center">
<el-table-column prop="phone" label="手机号" width="150" align="center"></el-table-column>
<el-table-column prop="bmName" label="所属团队" align="center">
<template slot-scope="scope">
<div v-html="scope.row.bmName"></div>
</template>
</el-table-column>
<el-table-column prop="quantityOfOrder"
label="订单数量"
width="100"
align="center"></el-table-column>
<el-table-column prop="latestTime"
label="最近下单时间"
width="200"
align="center"></el-table-column>
<el-table-column prop="productName"
label="产品"
align="center"
show-overflow-tooltip></el-table-column>
<el-table-column label="操作"
width="120"
align="center">
<el-table-column prop="quantityOfOrder" label="订单数量" width="100" align="center"></el-table-column>
<el-table-column prop="latestTime" label="最近下单时间" width="200" align="center"></el-table-column>
<el-table-column prop="productName" label="产品" align="center" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="120" align="center">
<template slot-scope="scope">
<el-button type="text"
@click="toOrder(scope.row)">查看</el-button>
<el-button type="text" @click="toOrder(scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background
layout="total, prev, pager, next"
@current-change="handleCurrentChangeBm"
:current-page="pageBm"
:page-size="pageSizeBm"
:total="totalBm"></el-pagination>
<el-pagination background layout="total, prev, pager, next" @current-change="handleCurrentChangeBm"
:current-page="pageBm" :page-size="pageSizeBm" :total="totalBm"></el-pagination>
</div>
</div>
</el-card>
<el-dialog :visible.sync="showImg"
width="70%"
center>
<img :src="fileSrc"
width="100%"
alt="">
<el-dialog :visible.sync="showImg" width="70%" center>
<img :src="fileSrc" width="100%" alt="">
</el-dialog>
<el-dialog :title="curRow ? '编辑客户' : '添加客户'"
:visible.sync="customerVisible"
width="300px"
class="dialog"
<el-dialog :title="curRow ? '编辑客户' : '添加客户'" :visible.sync="customerVisible" width="300px" class="dialog"
:close-on-click-modal="false">
<el-form label-width="70px">
<el-form-item label="客户名称">
<el-input v-model="customerForm.schoolName"
placeholder="请输入客户名称"></el-input>
<el-input v-model="customerForm.schoolName" placeholder="请输入客户名称"></el-input>
</el-form-item>
<el-form-item prop="userName"
label="省份">
<el-select v-model="customerForm.provinceId"
placeholder="请选择省份"
@change="provinceChange">
<el-option v-for="(item,index) in provinceList"
:key="index"
:label="item.provinceName"
<el-form-item prop="userName" label="省份">
<el-select v-model="customerForm.provinceId" placeholder="请选择省份" @change="provinceChange">
<el-option v-for="(item, index) in provinceList" :key="index" :label="item.provinceName"
:value="item.provinceId"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="userName"
label="城市">
<el-select v-model="customerForm.cityId"
placeholder="请选择城市"
<el-form-item prop="userName" label="城市">
<el-select v-model="customerForm.cityId" placeholder="请选择城市"
:disabled="customerForm.provinceId ? false : true">
<el-option v-for="(item,index) in cities"
:key="index"
:label="item.cityName"
<el-option v-for="(item, index) in cities" :key="index" :label="item.cityName"
:value="item.cityId"></el-option>
</el-select>
</el-form-item>
</el-form>
<span slot="footer"
class="dialog-footer">
<span slot="footer" class="dialog-footer">
<el-button @click="customerVisible = false">取消</el-button>
<el-button type="primary"
@click="submitCustomer">确定</el-button>
<el-button type="primary" @click="submitCustomer">确定</el-button>
</span>
</el-dialog>
<el-dialog title="客户设置"
:visible.sync="customerListVisible"
width="800px"
class="dialog"
:close-on-click-modal="false"
custom-class="customer-dia">
<el-dialog title="客户字典设置" :visible.sync="customerListVisible" width="800px" class="dialog"
:close-on-click-modal="false" custom-class="customer-dia">
<div style="display: flex;justify-content: space-between;align-items: center;margin-bottom: 10px">
<el-input style="width: 200px;"
placeholder="请输入客户名称"
prefix-icon="el-icon-search"
v-model="customerKeyword"
<el-input style="width: 200px;" placeholder="请输入客户名称" prefix-icon="el-icon-search" v-model="customerKeyword"
clearable></el-input>
<i class="el-icon-circle-plus plus-cus"
@click="addCustomer"></i>
<i class="el-icon-circle-plus plus-cus" @click="addCustomer"></i>
</div>
<el-table :data="customers"
class="table"
ref="table"
stripe
header-align="center"
row-key="customerId">
<el-table-column type="index"
width="100"
label="序号"
align="center">
<el-table :data="customers" class="table" ref="table" stripe header-align="center" row-key="customerId">
<el-table-column type="index" width="100" label="序号" align="center">
<template slot-scope="scope">
{{scope.$index + (pageCustomer - 1) * pageSizeCustomer + 1}}
{{ scope.$index + (pageCustomer - 1) * pageSizeCustomer + 1 }}
</template>
</el-table-column>
<el-table-column prop="customerName"
label="客户名称"
align="center">
<el-table-column prop="customerName" label="客户名称" align="center">
<template slot-scope="scope">
{{ scope.row.customerName || scope.row.schoolName }}
</template>
</el-table-column>
<el-table-column prop="provinceName"
label="省份"
align="center">
<el-table-column prop="provinceName" label="省份" align="center">
</el-table-column>
<el-table-column prop="cityName"
label="城市"
align="center">
<el-table-column prop="cityName" label="城市" align="center">
</el-table-column>
<el-table-column prop="countries"
label="是否创建"
align="center">
<el-table-column prop="countries" label="是否为客户" align="center">
<template slot-scope="scope">
{{ scope.row.bindOrNot ? '是' : '否' }}
</template>
</el-table-column>
<el-table-column label="操作"
width="100"
align="center">
<el-table-column label="操作" width="100" align="center">
<template slot-scope="scope">
<i class="el-icon-edit icon"
@click="editCustomer(scope.row)"></i>
<i v-if="!scope.row.bindOrNot"
class="el-icon-delete icon"
@click="delCustomer(scope.row, i)"></i>
<i class="el-icon-edit icon" @click="editCustomer(scope.row)"></i>
<i v-if="!scope.row.bindOrNot" class="el-icon-delete icon" @click="delCustomer(scope.row, i)"></i>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background
layout="total, prev, pager, next"
:total="totalCustomer"
@current-change="handleCurrentChangeCustomer"
:current-page="pageCustomer"
:page-size="pageSizeCustomer">
<el-pagination background layout="total, prev, pager, next" :total="totalCustomer"
@current-change="handleCurrentChangeCustomer" :current-page="pageCustomer" :page-size="pageSizeCustomer">
</el-pagination>
</div>
</el-dialog>
<pdf :visible.sync="pdfVisible"
:src.sync="fileSrc"></pdf>
<pdf :visible.sync="pdfVisible" :src.sync="fileSrc"></pdf>
</div>
</template>
@ -1516,24 +1248,29 @@ export default {
.tabs {
margin-bottom: 30px;
}
.card {
min-height: calc(100vh - 260px);
margin-bottom: 20px;
}
.addhr_tag {
background-color: #666;
width: 6px;
height: 17px;
margin-right: 5px;
}
.radio_icon {
font-size: 26px;
color: #9278ff;
}
/deep/.warning {
margin-left: 5px;
color: #9278ff;
}
.tags {
border: none;
background: none;
@ -1546,24 +1283,29 @@ export default {
line-clamp: 2;
-webkit-box-orient: vertical;
}
.info {
margin-top: 20px;
.el-select {
width: 100%;
}
}
.plus-cus {
margin-left: 10px;
font-size: 18px;
color: #9076ff;
cursor: pointer;
}
/deep/.customer-dia {
.icon {
margin-right: 10px;
font-size: 16px;
color: #7a7a7a;
cursor: pointer;
&:hover {
color: #9076ff;
}

@ -1,7 +1,6 @@
<template>
<div v-loading="loading">
<el-card shadow="hover"
class="mgb20">
<el-card shadow="hover" class="mgb20">
<div>
<div class="flex-center mgb20">
<p class="hr_tag"></p>
@ -11,49 +10,33 @@
<el-form label-width="80px">
<el-col :span="4">
<el-form-item label="省份">
<el-select v-model="form.provinces"
clearable
placeholder="请选择省份"
@change="getCity"
<el-select v-model="form.provinces" clearable placeholder="请选择省份" @change="getCity"
@clear="clearprovince">
<el-option v-for="(item,index) in provinceList"
:key="index"
:label="item.provinceName"
<el-option v-for="(item, index) in provinceList" :key="index" :label="item.provinceName"
:value="item.provinceId"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="城市">
<el-select v-model="form.city"
clearable
placeholder="请选择城市"
:disabled="form.provinces ? false : true"
<el-select v-model="form.city" clearable placeholder="请选择城市" :disabled="form.provinces ? false : true"
@change="initData">
<el-option v-for="(item,index) in cityList"
:key="index"
:label="item.cityName"
<el-option v-for="(item, index) in cityList" :key="index" :label="item.cityName"
:value="item.cityId"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="客户类型">
<el-select v-model="form.customerType"
placeholder="请选择客户类型"
@change="initData">
<el-option v-for="(item,index) in customerTypeList"
:key="index"
:label="item.name"
<el-select v-model="form.customerType" placeholder="请选择客户类型" @change="initData">
<el-option v-for="(item, index) in customerTypeList" :key="index" :label="item.name"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
<el-input placeholder="支持客户,联系人,账号搜索"
prefix-icon="el-icon-search"
v-model="form.keyword"
<el-input placeholder="支持客户,联系人,账号搜索" prefix-icon="el-icon-search" v-model="form.keyword"
clearable></el-input>
</el-form-item>
</el-col>
@ -62,109 +45,60 @@
</div>
</el-card>
<el-card shadow="hover"
class="card">
<el-card shadow="hover" class="card">
<div class="flex-between mgb20">
<div class="flex-center">
<p class="hr_tag"></p>
<span>客户列表</span>
</div>
<div>
<el-button type="primary"
round
class="mag"
@click="exportData">导出客户列表</el-button>
<el-button type="primary"
round
class="mag"
@click="addcustomer"
v-auth>新增</el-button>
<el-button type="primary"
round
@click="delAllSelection"
v-auth>批量删除</el-button>
<el-button type="primary" round class="mag" @click="exportData">导出客户列表</el-button>
<el-button type="primary" round class="mag" @click="addcustomer" v-auth>新增</el-button>
<el-button type="primary" round @click="delAllSelection" v-auth>批量删除</el-button>
</div>
</div>
<el-table :data="listData"
class="table"
ref="table"
stripe
header-align="center"
@selection-change="handleSelectionChange"
row-key="customerId">
<el-table-column type="selection"
width="55"
align="center"
:reserve-selection="true"></el-table-column>
<el-table-column type="index"
width="100"
label="序号"
align="center">
<el-table :data="listData" class="table" ref="table" stripe header-align="center"
@selection-change="handleSelectionChange" row-key="customerId">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center">
<template slot-scope="scope">
{{scope.$index + (page - 1) * pageSize + 1}}
{{ scope.$index + (page - 1) * pageSize + 1 }}
</template>
</el-table-column>
<el-table-column prop="customerName"
label="客户名称"
align="center">
<el-table-column prop="customerName" label="客户名称" align="center">
</el-table-column>
<el-table-column label="行业"
align="center">
<el-table-column label="行业" align="center">
<template slot-scope="scope">
<span class="ellipsis">{{scope.row.industryName}}</span>
<span class="ellipsis">{{ scope.row.industryName }}</span>
</template>
</el-table-column>
<el-table-column prop="countries"
label="客户类型"
align="center">
<el-table-column prop="countries" label="客户类型" align="center">
<template slot-scope="scope">
<span v-if="scope.row.customerType">{{ customerTypeList.find(e => e.value == scope.row.customerType).name }}</span>
<span v-if="scope.row.customerType">{{ customerTypeList.find(e => e.value == scope.row.customerType).name
}}</span>
</template>
</el-table-column>
<el-table-column prop="provinceName"
label="省份"
align="center">
<el-table-column prop="provinceName" label="省份" align="center">
</el-table-column>
<el-table-column prop="cityName"
label="城市"
align="center">
<el-table-column prop="cityName" label="城市" align="center">
</el-table-column>
<el-table-column prop="name"
label="联系人"
align="center">
<el-table-column prop="name" label="联系人" align="center">
</el-table-column>
<el-table-column prop="account"
label="账号"
align="center">
<el-table-column prop="account" label="账号" align="center">
</el-table-column>
<el-table-column prop="loginNumber"
label="登录次数"
align="center">
<el-table-column prop="loginNumber" label="登录次数" align="center">
</el-table-column>
<el-table-column label="操作"
width="270"
align="center">
<el-table-column label="操作" width="270" align="center">
<template slot-scope="scope">
<el-button type="text"
@click="resetPassword(scope.row)"
v-auth>重置密码</el-button>
<el-button type="text"
@click="show(scope.row)"
v-auth>查看</el-button>
<el-button type="text"
@click="edit(scope.row)"
v-auth>管理</el-button>
<el-button type="text"
@click="handleDelete(scope.row)"
v-auth>删除</el-button>
<el-button type="text" @click="resetPassword(scope.row)" v-auth>重置密码</el-button>
<el-button type="text" @click="show(scope.row)" v-auth>查看</el-button>
<el-button type="text" @click="edit(scope.row)" v-auth>管理</el-button>
<el-button type="text" @click="handleDelete(scope.row)" v-auth>删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background
layout="total, prev, pager, next"
:total="total"
@current-change="handleCurrentChange"
<el-pagination background layout="total, prev, pager, next" :total="total" @current-change="handleCurrentChange"
:current-page="page">
</el-pagination>
</div>
@ -404,4 +338,3 @@ export default {
min-height: calc(100vh - 300px);
}
</style>

@ -1,56 +1,38 @@
<template>
<div>
<el-card v-if="!id"
shadow="hover"
class="m-b-20">
<el-card v-if="!id" shadow="hover" class="m-b-20">
<div class="flex-between">
<el-page-header @back="back"
:content="'创建赛事'"></el-page-header>
<el-page-header @back="back" :content="'创建赛事'"></el-page-header>
</div>
</el-card>
<div v-if="step === 1 || (id && !editing)"
:class="['type-wrap', {pd: !id}]">
<div v-if="step === 1 || (id && !editing)" :class="['type-wrap', { pd: !id }]">
<div class="p-title">大赛发布类型</div>
<el-form label-width="100px"
label-suffix=":"
size="small"
:disabled="!editing && id != ''">
<el-form label-width="100px" label-suffix=":" size="small" :disabled="!editing && id != ''">
<el-form-item label="请选择类型">
<el-radio v-model="releaseType"
:label="0">仅发布信息</el-radio>
<el-radio v-model="releaseType"
:label="1">设置完整比赛</el-radio>
<el-radio v-model="releaseType" :label="0">仅发布信息</el-radio>
<el-radio v-model="releaseType" :label="1">设置完整比赛</el-radio>
</el-form-item>
</el-form>
<el-button v-if="!editing && id"
class="edit"
type="primary"
@click="editing = 1"
<el-button v-if="!editing && id" class="edit" type="primary" @click="editing = 1"
v-auth="'/match:管理:大赛详情:编辑'">编辑</el-button>
</div>
<el-card v-if="step !== 4"
shadow="hover"
class="m-b-20"
style="position: relative;margin-top: 20px">
<ul :class="['steps', {pointer: !editing && id && publishStatus}]">
<li :class="{active: step === 1,done: step > 1}"
@click="toStep(1)">
<el-card v-if="step !== 4" shadow="hover" class="m-b-20" style="position: relative;margin-top: 20px">
<ul :class="['steps', { pointer: !editing && id && publishStatus }]">
<li :class="{ active: step === 1, done: step > 1 }" @click="toStep(1)">
<span class="circle">1</span>
<p class="text">大赛信息填写</p>
</li>
<template v-if="releaseType">
<li :class="{active: step === 2,done: step > 2}"
@click="toStep(2)">
<li :class="{ active: step === 2, done: step > 2 }" @click="toStep(2)">
<span class="circle circle2">2</span>
<p class="text">赛程与规则设置</p>
</li>
<li :class="{active: step === 3,done: step > 3}"
@click="toStep(3)">
<li :class="{ active: step === 3, done: step > 3 }" @click="toStep(3)">
<span class="circle circle3">3</span>
<p class="text">比赛内容设置</p>
</li>
</template>
<li :class="{done: step > 3}">
<li :class="{ done: step > 3 }">
<span class="circle circle4">{{ releaseType ? 4 : 2 }}</span>
<p class="text">发布{{ !editing && id ? '成功' : '' }}</p>
</li>
@ -58,43 +40,21 @@
</el-card>
<div class="page">
<div class="page-content">
<step1 v-show="step === 1"
ref="step1"
:editing.sync="editing"
@next="next" />
<step2 v-if="step === 2"
ref="step2"
:editing.sync="editing"
:setupId.sync="setupId"
@next="next" />
<step3 v-if="step === 3"
ref="step3"
:editing.sync="editing"
:setupId.sync="setupId"
:competitionId.sync="competitionId"
@next="next" />
<step4 v-if="step === 4"
ref="step4" />
<step1 v-show="step === 1" ref="step1" :editing.sync="editing" @next="next" />
<step2 v-if="step === 2" ref="step2" :editing.sync="editing" :setupId.sync="setupId" @next="next" />
<step3 v-if="step === 3" ref="step3" :editing.sync="editing" :setupId.sync="setupId"
:competitionId.sync="competitionId" @next="next" />
<step4 v-if="step === 4" ref="step4" />
<div v-if="step !== 4 && showBtns"
class="btns">
<div v-if="step !== 4 && showBtns" class="btns">
<!-- 处于编辑状态(列表点编辑按钮进来默认是查看状态不可编辑点了编辑按钮才可编辑)或者新增才显示这几个按钮 -->
<template v-if="editing || !id">
<el-button v-if="!publishStatus"
@click="save(0)">保存{{ releaseType ? '草稿' : '' }}</el-button>
<el-button v-if="step === 2 || step === 3"
type="primary"
@click="prev">上一步</el-button>
<el-button v-if="!releaseType || (releaseType && step === 3)"
type="primary"
@click="save(1)">发布</el-button>
<el-button v-else
type="primary"
@click="save(0, 2)">保存并下一步</el-button>
<el-button v-if="!publishStatus" @click="save(0)">保存{{ releaseType ? '草稿' : '' }}</el-button>
<el-button v-if="step === 2 || step === 3" type="primary" @click="prev">上一步</el-button>
<el-button v-if="!releaseType || (releaseType && step === 3)" type="primary" @click="save(1)">发布</el-button>
<el-button v-else type="primary" @click="save(0, 2)">保存并下一步</el-button>
</template>
<el-button type="danger"
@click="preview"
v-auth="'/match:管理:大赛详情:预览'">预览</el-button>
<el-button type="danger" @click="preview" v-auth="'/match:管理:大赛详情:预览'">预览</el-button>
<el-button @click="cancel">{{ editing ? '取消' : '返回' }}</el-button>
</div>
</div>
@ -264,31 +224,38 @@ export default {
position: relative;
margin-top: 20px;
background: #fff;
&.pd {
padding: 15px;
}
}
.edit {
position: absolute;
top: 30px;
right: 30px;
}
.el-steps {
justify-content: center;
}
.steps {
display: flex;
justify-content: center;
&.pointer {
li {
cursor: pointer;
}
}
li {
position: relative;
margin-right: 100px;
text-align: center;
}
.circle {
display: inline-flex;
justify-content: center;
@ -301,6 +268,7 @@ export default {
background: #f9f9f9;
border: 5px solid #e1e1e1;
border-radius: 50%;
&:after {
content: '';
position: absolute;
@ -310,37 +278,45 @@ export default {
background: #e1e1e1;
}
}
.active {
.circle {
color: #fff;
border-color: #459ffb;
background: #007eff;
}
.text {
color: #007eff;
}
}
.done {
.circle {
color: #fff;
background: #9c86ff;
border-color: #bbacff;
&:after {
background: #bbacff;
}
}
.text {
color: #9178ff;
}
}
.circle2:after {
left: 71px;
width: 147px;
}
.circle4:after {
display: none;
}
}
.btns {
text-align: center;
}

@ -3,81 +3,46 @@
<div class="page">
<div class="page-content">
<div class="p-title">大赛信息</div>
<el-form label-width="170px"
label-suffix=":"
size="small"
:disabled="!editing && form.id !== ''">
<el-form label-width="170px" label-suffix=":" size="small" :disabled="!editing && form.id !== ''">
<el-form-item label="竞赛封面(选填)">
<el-upload class="avatar-uploader"
accept=".jpg,.png,.jpeg,.gif"
:on-remove="handleRemove"
:on-error="uploadError"
:before-remove="beforeRemove"
:limit="1"
:on-exceed="handleExceed"
action=""
<el-upload class="avatar-uploader" accept=".jpg,.png,.jpeg,.gif" :on-remove="handleRemove"
:on-error="uploadError" :before-remove="beforeRemove" :limit="1" :on-exceed="handleExceed" action=""
:http-request="handleRequest">
<img v-if="form.coverUrl"
:src="form.coverUrl"
class="avatar">
<div class="uploader-default"
v-else>
<img v-if="form.coverUrl" :src="form.coverUrl" class="avatar">
<div class="uploader-default" v-else>
<i class="el-icon-plus"></i>
<p>上传封面</p>
</div>
<div slot="tip"
class="el-upload__tip">
<div slot="tip" class="el-upload__tip">
<p>展示宽度为220高度140JPG/PNG/GIF3MB以内</p>
</div>
</el-upload>
</el-form-item>
<el-form-item label="竞赛封面长图(选填)">
<el-upload class="avatar-uploader avatar-uploader-lg"
accept=".jpg,.png,.jpeg,.gif"
:on-remove="handleLgRemove"
:on-error="uploadError"
:before-remove="beforeRemove"
:limit="1"
:on-exceed="handleExceed"
action=""
:http-request="handleRequestLg">
<img v-if="form.carouselUrl"
:src="form.carouselUrl"
class="avatar-lg">
<div class="uploader-default"
v-else>
<el-upload class="avatar-uploader avatar-uploader-lg" accept=".jpg,.png,.jpeg,.gif"
:on-remove="handleLgRemove" :on-error="uploadError" :before-remove="beforeRemove" :limit="1"
:on-exceed="handleExceed" action="" :http-request="handleRequestLg">
<img v-if="form.carouselUrl" :src="form.carouselUrl" class="avatar-lg">
<div class="uploader-default" v-else>
<i class="el-icon-plus"></i>
<p>上传封面</p>
</div>
<div slot="tip"
class="el-upload__tip">
<div slot="tip" class="el-upload__tip">
<p>展示宽度为1920高度300JPG/PNG/GIF3MB以内</p>
</div>
</el-upload>
</el-form-item>
<el-form-item class="req"
label="竞赛名称">
<el-form-item class="req" label="竞赛名称">
<div class="d-inline-block">
<el-input placeholder="请输入竞赛名称"
v-model="form.name"
clearable></el-input>
<el-input placeholder="请输入竞赛名称" v-model="form.name" clearable></el-input>
</div>
</el-form-item>
<el-form-item class="req"
label="主办方">
<el-form-item class="req" label="主办方">
<div class="inline-input">
<div class="input-wrap"
v-for="(item,index) in sponsorList"
:key="index">
<el-input placeholder="主办方名称"
v-model="sponsorList[index]"></el-input>
<i v-if="sponsorList.length > 1"
class="remove"
@click="delSponsor(index)"></i>
<button v-if="index == 0"
class="add-btn"
type="button"
:disabled="!editing && form.id !== ''"
<div class="input-wrap" v-for="(item, index) in sponsorList" :key="index">
<el-input placeholder="主办方名称" v-model="sponsorList[index]"></el-input>
<i v-if="sponsorList.length > 1" class="remove" @click="delSponsor(index)"></i>
<button v-if="index == 0" class="add-btn" type="button" :disabled="!editing && form.id !== ''"
@click="addSponsor">
<i class="el-icon-plus"></i>
<span>添加</span>
@ -87,181 +52,109 @@
</el-form-item>
<el-form-item label="承办方(选填)">
<div class="inline-input">
<div class="input-wrap"
v-for="(item,index) in undertakerList"
:key="index">
<el-input placeholder="承办方名称"
v-model="undertakerList[index]"></el-input>
<i v-if="undertakerList.length > 1"
class="remove"
@click="delOrganizer(index)"></i>
<button v-if="index == 0"
class="add-btn"
type="button"
:disabled="!editing && form.id !== ''"
<div class="input-wrap" v-for="(item, index) in undertakerList" :key="index">
<el-input placeholder="承办方名称" v-model="undertakerList[index]"></el-input>
<i v-if="undertakerList.length > 1" class="remove" @click="delOrganizer(index)"></i>
<button v-if="index == 0" class="add-btn" type="button" :disabled="!editing && form.id !== ''"
@click="addOrganizer">
<i class="el-icon-plus"></i>
<span>添加</span>
</button>
</div>
</div>
<button v-if="!undertakerList.length"
class="add-btn"
type="button"
@click="addOrganizer">
<button v-if="!undertakerList.length" class="add-btn" type="button" @click="addOrganizer">
<i class="el-icon-plus"></i>
<span>添加</span>
</button>
</el-form-item>
<el-form-item class="req"
label="报名时间">
<el-date-picker v-model="signupTime"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
<el-form-item class="req" label="报名时间">
<el-date-picker v-model="signupTime" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange"
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
:picker-options="pickerOptions"></el-date-picker>
</el-form-item>
<el-form-item class="req"
label="竞赛时间">
<el-date-picker v-model="playTime"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
<el-form-item class="req" label="竞赛时间">
<el-date-picker v-model="playTime" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange"
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
:picker-options="pickerOptions"></el-date-picker>
</el-form-item>
<el-form-item class="req"
label="比赛范围">
<el-form-item class="req" label="比赛范围">
<div v-if="form.id">
<el-radio v-model="form.competitionScope"
:label="0"
disabled>本校内</el-radio>
<el-radio v-model="form.competitionScope" :label="0" disabled>本校内</el-radio>
</div>
<div>
<el-radio v-model="form.competitionScope"
:label="1">全平台</el-radio>
<el-radio v-model="form.competitionScope" :label="1">全平台</el-radio>
</div>
<div>
<el-radio v-model="form.competitionScope"
:label="2">指定区域院校</el-radio>
<el-radio v-model="form.competitionScope" :label="2">指定区域院校</el-radio>
<template v-if="form.competitionScope === 2">
<el-button type="primary"
size="mini"
@click="showRange">选择院校</el-button>
<el-button type="primary" size="mini" @click="showRange">选择院校</el-button>
<span style="margin-left: 20px">{{ rangeName }}</span>
</template>
</div>
</el-form-item>
<el-form-item class="req"
label="竞赛类型">
<el-radio v-model="form.completeCompetitionSetup.competitionType"
:label="0">个人赛</el-radio>
<el-radio v-model="form.completeCompetitionSetup.competitionType"
:label="1">团队赛</el-radio>
<el-form-item class="req" label="竞赛类型">
<el-radio v-model="form.completeCompetitionSetup.competitionType" :label="0">个人赛</el-radio>
<el-radio v-model="form.completeCompetitionSetup.competitionType" :label="1">团队赛</el-radio>
</el-form-item>
<el-form-item class="req"
v-if="!form.completeCompetitionSetup.competitionType"
label="报名人数上限">
<el-form-item class="req" v-if="!form.completeCompetitionSetup.competitionType" label="报名人数上限">
<div class="input-center">
<el-input placeholder="请输入人数"
v-model.number="form.completeCompetitionSetup.quantityLimit"
type="number"></el-input>
<el-input placeholder="请输入人数" v-model.number="form.completeCompetitionSetup.quantityLimit"
type="number"></el-input>
</div>
</el-form-item>
<template v-if="form.completeCompetitionSetup.competitionType">
<el-form-item class="req"
label="报名团队数上限">
<el-form-item class="req" label="报名团队数上限">
<div class="input-center">
<el-input placeholder="请输入团队数"
v-model.number="form.completeCompetitionSetup.quantityLimit"
<el-input placeholder="请输入团队数" v-model.number="form.completeCompetitionSetup.quantityLimit"
type="number"></el-input>
</div>
</el-form-item>
<el-form-item class="req"
label="团队人数">
<div class="input-center"
style="width: 250px;">
<el-input v-model.number="form.completeCompetitionSetup.minTeamSize"
type="number"></el-input>
<el-input style="margin-left: 5px;"
v-model.number="form.completeCompetitionSetup.maxTeamSize"
<el-form-item class="req" label="团队人数">
<div class="input-center" style="width: 250px;">
<el-input v-model.number="form.completeCompetitionSetup.minTeamSize" type="number"></el-input>
<el-input style="margin-left: 5px;" v-model.number="form.completeCompetitionSetup.maxTeamSize"
type="number"></el-input> /
</div>
</el-form-item>
</template>
<el-form-item class="req"
label="报名邀请码">
<div class="input-center"
style="width: 550px;">
<el-radio v-model="form.completeCompetitionSetup.isNeedCode"
:label="0">不需要</el-radio>
<el-radio v-model="form.completeCompetitionSetup.isNeedCode"
:label="1">需要</el-radio>
<el-input style="width: 250px"
placeholder="请输入4位邀请码或点击随机生成"
<el-form-item class="req" label="报名邀请码">
<div class="input-center" style="width: 550px;">
<el-radio v-model="form.completeCompetitionSetup.isNeedCode" :label="0">不需要</el-radio>
<el-radio v-model="form.completeCompetitionSetup.isNeedCode" :label="1">需要</el-radio>
<el-input style="width: 250px" placeholder="请输入4位邀请码或点击随机生成"
v-model="form.completeCompetitionSetup.invitationCode"
:disabled="form.completeCompetitionSetup.isNeedCode === 0"></el-input>
<el-button v-if="form.completeCompetitionSetup.isNeedCode === 1"
@click="randomInv">随机</el-button>
<el-button v-if="form.completeCompetitionSetup.isNeedCode === 1" @click="randomInv">随机</el-button>
</div>
</el-form-item>
<el-form-item class="req"
label="竞赛详情">
<quill v-if="quillShow"
:border="true"
v-model="form.description"
:height="400"
<el-form-item class="req" label="竞赛详情">
<quill v-if="quillShow" :border="true" v-model="form.description" :height="400"
:readonly="!editing && form.id !== ''" />
</el-form-item>
<el-form-item label="附件">
<Upload :limit="5"
:file-list.sync="fileList"
:on-remove="handleAnnexRemove"
<Upload :limit="5" :file-list.sync="fileList" :on-remove="handleAnnexRemove"
@onSuccess="uploadAnnexSuccess" />
</el-form-item>
</el-form>
</div>
</div>
<el-dialog title="请勾选院校"
:visible.sync="rangeVisible"
width="580px"
custom-class="range-dia"
<el-dialog title="请勾选院校" :visible.sync="rangeVisible" width="580px" custom-class="range-dia"
:close-on-click-modal="false">
<div class="range-wrap">
<el-cascader ref="range"
class="range-cas"
key="range"
v-model="range"
:props="props"
:show-all-levels="false"
clearable
filterable
:before-filter="beforeFilter"
:options="rangeList"
@change="rangeChange"
@visible-change="rangeViChange"
@input.native="rangeSearch"></el-cascader>
<el-tag v-for="(tag, i) in rangeChecked"
:key="tag.value"
class="range-check"
closable
:disable-transitions="false"
@close="val => closeRange(i)">
{{tag.label}}
<el-cascader ref="range" class="range-cas" key="range" v-model="range" :props="props" :show-all-levels="false"
clearable filterable :before-filter="beforeFilter" :options="rangeList" @change="rangeChange"
@visible-change="rangeViChange" @input.native="rangeSearch"></el-cascader>
<el-tag v-for="(tag, i) in rangeChecked" :key="tag.value" class="range-check" closable
:disable-transitions="false" @close="val => closeRange(i)">
{{ tag.label }}
</el-tag>
</div>
<span slot="footer"
class="dialog-footer">
<el-button size="small"
@click="rangeVisible = false"> </el-button>
<el-button size="small"
type="primary"
@click="rangeSubmit"> </el-button>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="rangeVisible = false"> </el-button>
<el-button size="small" type="primary" @click="rangeSubmit"> </el-button>
</span>
</el-dialog>
</div>
@ -747,6 +640,7 @@ export default {
$upload-width: 220px;
$upload-height: 140px;
$upload-lg-height: 150px;
/deep/ .avatar-uploader {
.el-upload {
position: relative;
@ -831,6 +725,7 @@ $upload-lg-height: 150px;
width: 100%;
}
}
.inline-input {
.input-wrap {
display: flex;
@ -875,27 +770,33 @@ $upload-lg-height: 150px;
font-weight: bold;
}
}
.range-check {
display: inline-block;
margin: 0 0 10px 10px;
}
/deep/.range-cas {
.el-tag {
display: none;
}
}
.input-center {
display: flex;
align-items: center;
width: 216px;
white-space: nowrap;
.el-input {
margin-right: 5px;
}
}
.el-steps {
justify-content: center;
}
/deep/.req {
.el-form-item__label {
&:before {

@ -3,105 +3,70 @@
<div class="page">
<div class="page-content">
<div class="p-title">赛程与规则设置</div>
<el-form :model="form"
:rules="validRules"
label-width="170px"
label-suffix=":"
size="small"
<el-form :model="form" :rules="validRules" label-width="170px" label-suffix=":" size="small"
:disabled="!!(!editing && id)">
<el-form-item label="竞赛类型">
{{ step1.completeCompetitionSetup.competitionType ? '团队赛(' + step1.completeCompetitionSetup.minTeamSize + '-' + step1.completeCompetitionSetup.maxTeamSize + '人/队)' : '个人赛' }} <span class="tips">如需修改请返回上一步</span>
{{ step1.completeCompetitionSetup.competitionType ? '团队赛(' + step1.completeCompetitionSetup.minTeamSize +
'-' + step1.completeCompetitionSetup.maxTeamSize + '人/队)' : '个人赛' }} <span
class="tips">如需修改请返回上一步</span>
</el-form-item>
<el-form-item prop="rule"
label="赛制">
<el-radio v-for="(rule, i) in rules"
:key="i"
v-model="form.rule"
:label="rule.id">{{ rule.name }}</el-radio>
<el-form-item prop="rule" label="赛制">
<el-radio v-for="(rule, i) in rules" :key="i" v-model="form.rule" :label="rule.id">{{ rule.name
}}</el-radio>
<p class="tips">积分赛包含多个竞赛阶段每个阶段的成绩都包含在最终总成绩里最后一轮结束后总成绩排名靠前的参赛者得到获奖资格</p>
<p class="tips">淘汰赛包含多个竞赛阶段每个阶段结束后之后只有部分参赛者能晋级下一阶段晋级最后一轮且在最后一轮排名靠前的参赛者得到获奖资格</p>
<p class="tips">单项赛仅包含一个竞赛阶段单项的成绩排名即为最终排名排名靠前的参赛者得到获奖资格</p>
<p class="tips">系统默认排名规则优先按分数排名分数高则排名靠前分数相同则按用时排名用时短则排名靠前</p>
</el-form-item>
<template v-if="form.rule !== 2">
<el-form-item prop="stageNum"
label="阶段数量">
<el-form-item prop="stageNum" label="阶段数量">
<div class="input-center">
<el-select v-model="form.stageNum"
@change="stageChange">
<el-option v-for="i in 10"
:key="i"
:label="i"
:value="i"></el-option>
<el-select v-model="form.stageNum" @change="stageChange">
<el-option v-for="i in 10" :key="i" :label="i" :value="i"></el-option>
</el-select>
</div>
<div v-if="step1.completeCompetitionSetup.competitionType"
class="tips">
<div v-if="step1.completeCompetitionSetup.competitionType" class="tips">
(团队赛是否限制队内每个成员只能参加一个阶段赛项
<el-radio v-model="form.teamLimit"
:label="1"></el-radio>
<el-radio v-model="form.teamLimit"
:label="0"></el-radio>
<el-radio v-model="form.teamLimit" :label="1"></el-radio>
<el-radio v-model="form.teamLimit" :label="0"></el-radio>
)
</div>
</el-form-item>
<el-form-item v-if="!form.rule"
prop="resultCalculationMethod"
label="总成绩计算方式">
<el-radio v-model="form.resultCalculationMethod"
:label="0">各阶段成绩加权求和</el-radio>
<el-radio v-model="form.resultCalculationMethod"
:label="1">各阶段成绩直接求和</el-radio>
<el-radio v-model="form.resultCalculationMethod"
:label="2">各阶段成绩取平均值</el-radio>
<el-form-item v-if="!form.rule" prop="resultCalculationMethod" label="总成绩计算方式">
<el-radio v-model="form.resultCalculationMethod" :label="0">各阶段成绩加权求和</el-radio>
<el-radio v-model="form.resultCalculationMethod" :label="1">各阶段成绩直接求和</el-radio>
<el-radio v-model="form.resultCalculationMethod" :label="2">各阶段成绩取平均值</el-radio>
<p class="tips">若选择加权求和则需要设置每个阶段成绩所占权重且权重总和须为100%</p>
</el-form-item>
<el-form-item prop="stageNum"
label="阶段设置">
<div v-for="(item, i) in form.competitionStageList"
:key="i"
class="step-set">
<el-form-item prop="stageNum" label="阶段设置">
<div v-for="(item, i) in form.competitionStageList" :key="i" class="step-set">
<div class="line">
{{ serials[i] }}阶段 <el-input v-model="item.stageName"
clearable
placeholder="请输入阶段名称,如“初赛”"
{{ serials[i] }}阶段 <el-input v-model="item.stageName" clearable placeholder="请输入阶段名称,如“初赛”"
style="width: 200px"></el-input>
</div>
<div class="line">
<span class="req">*</span>
比赛方式
<el-radio v-for="(method, i) in methods"
:key="i"
v-model="item.method"
:label="method.id">{{ method.name }}</el-radio>
<el-radio v-for="(method, i) in methods" :key="i" v-model="item.method" :label="method.id">{{
method.name }}</el-radio>
</div>
<div v-if="step1.completeCompetitionSetup.competitionType"
class="line">
<div v-if="step1.completeCompetitionSetup.competitionType" class="line">
<span class="req">*</span>
团队参赛人数限制
<el-radio v-model="item.teamNumLimit"
:label="0">不限制</el-radio>
<el-radio v-model="item.teamNumLimit"
:label="1">自定义</el-radio>
<el-input v-model.number="item.customNumber"
type="number"
min="0"
style="width: 150px;"
<el-radio v-model="item.teamNumLimit" :label="0">不限制</el-radio>
<el-radio v-model="item.teamNumLimit" :label="1">自定义</el-radio>
<el-input v-model.number="item.customNumber" type="number" min="0" style="width: 150px;"
:disabled="item.teamNumLimit === 0"></el-input>
<span class="tips">可限制本阶段单个团队的出战人数</span>
</div>
<div v-if="step1.completeCompetitionSetup.competitionType"
class="line">
<div v-if="step1.completeCompetitionSetup.competitionType" class="line">
<span class="req">*</span>
团队成绩计算方式
<el-radio v-for="(j, i) in teamCalculationMethods"
:key="i"
v-model="item.teamCalculationMethod"
<el-radio v-for="(j, i) in teamCalculationMethods" :key="i" v-model="item.teamCalculationMethod"
:label="j.id">{{ j.name }}</el-radio>
<span class="tips">可设置本阶段的团队取分规则</span>
</div>
<div v-if="form.rule === 1 && i !== form.competitionStageList.length - 1"
class="line"
<div v-if="form.rule === 1 && i !== form.competitionStageList.length - 1" class="line"
style="display: flex;">
<p>
<span class="req">*</span>晋级规则
@ -109,63 +74,44 @@
<div>
<div class="line">
本阶段成绩排名前
<el-input v-model.number="item.peopleLimit"
type="number"
min="0"
style="width: 100px"></el-input>
<el-input v-model.number="item.peopleLimit" type="number" min="0" style="width: 100px"></el-input>
可晋级下一阶段比赛
</div>
<div class="line">
本阶段成绩排名前
<el-input v-model.number="item.percentageLimit"
type="number"
min="0"
<el-input v-model.number="item.percentageLimit" type="number" min="0"
style="width: 100px"></el-input>
%可晋级下一阶段比赛
</div>
<div>
本阶段成绩
<el-select v-model="item.operator"
style="width: 80px;margin-right: 10px">
<el-option v-for="i in operators"
:key="i"
:label="i"
:value="i"></el-option>
<el-select v-model="item.operator" style="width: 80px;margin-right: 10px">
<el-option v-for="i in operators" :key="i" :label="i" :value="i"></el-option>
</el-select>
<el-input v-model="item.score"
type="number"
min="0"
style="width: 100px"></el-input>
<el-input v-model="item.score" type="number" min="0" style="width: 100px"></el-input>
可晋级下一阶段比赛
</div>
</div>
</div>
<div v-if="!form.rule"
class="line">
<div v-if="!form.rule" class="line">
<span class="req">*</span>
占总成绩权重
<el-input v-model.number="item.pointWeight"
type="number"
min="0"
:disabled="form.resultCalculationMethod != 0"
style="width: 150px;"></el-input> %
<el-input v-model.number="item.pointWeight" type="number" min="0"
:disabled="form.resultCalculationMethod != 0" style="width: 150px;"></el-input> %
</div>
<div class="line">
成绩公布时间
阶段比赛结束后
<el-input v-model.number="item.resultAnnouncementTime"
type="number"
min="0"
<el-input v-model.number="item.resultAnnouncementTime" type="number" min="0"
style="width: 120px"></el-input>
小时公布阶段比赛成绩
</div>
<div v-if="item.resultAnnouncementTime !== '' && item.resultAnnouncementTime !== null && item.resultAnnouncementTime !== undefined"
<div
v-if="item.resultAnnouncementTime !== '' && item.resultAnnouncementTime !== null && item.resultAnnouncementTime !== undefined"
class="line">
是否公布成绩详情
<el-radio v-model="item.resultsDetails"
:label="0"></el-radio>
<el-radio v-model="item.resultsDetails"
:label="1"></el-radio>
<el-radio v-model="item.resultsDetails" :label="0"></el-radio>
<el-radio v-model="item.resultsDetails" :label="1"></el-radio>
<p class="tips">若选择则公布成绩详情竞赛结束后参赛者可查看自己的比赛成绩得分详情</p>
<p class="tips">若选择则不公布成绩详情参赛者只能知晓自己的分数及排名不能查看得分详情</p>
</div>
@ -173,44 +119,32 @@
</el-form-item>
</template>
<template v-else>
<el-form-item prop="stageNum"
label="规则设置">
<el-form-item prop="stageNum" label="规则设置">
<div class="step-set">
<div class="line">
<span class="req">*</span>
比赛方式
<el-radio v-for="(method, i) in methods"
:key="i"
v-model="form.competitionStageList[0].method"
<el-radio v-for="(method, i) in methods" :key="i" v-model="form.competitionStageList[0].method"
:label="method.id">{{ method.name }}</el-radio>
</div>
<div v-if="step1.completeCompetitionSetup.competitionType"
class="line">
<div v-if="step1.completeCompetitionSetup.competitionType" class="line">
<span class="req">*</span>
团队成绩计算方式
<el-radio v-for="(j, i) in teamCalculationMethods"
:key="i"
v-model="form.competitionStageList[0].teamCalculationMethod"
:label="j.id">{{ j.name }}</el-radio>
<el-radio v-for="(j, i) in teamCalculationMethods" :key="i"
v-model="form.competitionStageList[0].teamCalculationMethod" :label="j.id">{{ j.name }}</el-radio>
<span class="tips">可设置本阶段的团队取分规则</span>
</div>
</div>
</el-form-item>
<el-form-item prop="rule"
label="成绩公布时间">
<el-form-item prop="rule" label="成绩公布时间">
阶段比赛结束后
<el-input v-model.number="form.competitionStageList[0].resultAnnouncementTime"
type="number"
min="0"
<el-input v-model.number="form.competitionStageList[0].resultAnnouncementTime" type="number" min="0"
style="width: 120px"></el-input>
小时公布阶段比赛成绩
</el-form-item>
<el-form-item prop="resultsDetails"
label="是否公布成绩详情">
<el-radio v-model="form.competitionStageList[0].resultsDetails"
:label="0"></el-radio>
<el-radio v-model="form.competitionStageList[0].resultsDetails"
:label="1"></el-radio>
<el-form-item prop="resultsDetails" label="是否公布成绩详情">
<el-radio v-model="form.competitionStageList[0].resultsDetails" :label="0"></el-radio>
<el-radio v-model="form.competitionStageList[0].resultsDetails" :label="1"></el-radio>
<p class="tips">若选择则公布成绩详情竞赛结束后参赛者可查看自己的比赛成绩得分详情</p>
<p class="tips">若选择则不公布成绩详情参赛者只能知晓自己的分数及排名不能查看得分详情</p>
</el-form-item>
@ -529,11 +463,13 @@ export default {
<style scoped lang="scss">
/deep/ .d-inline-block {
width: 216px;
.el-select,
.el-input {
width: 100%;
}
}
.inline-input {
.input-wrap {
display: flex;
@ -558,26 +494,32 @@ export default {
margin-left: 32px;
}
}
.input-center {
display: flex;
align-items: center;
width: 216px;
white-space: nowrap;
.el-input {
margin-right: 5px;
}
}
.step-set {
padding: 15px;
background-color: #fbfbfb;
}
.tips {
font-size: 13px;
color: #959595;
}
.req {
color: #f00;
}
.line {
margin-bottom: 10px;
}

@ -1,75 +1,47 @@
<template>
<div>
<div v-show="!setVisible"
class="page">
<div v-show="!setVisible" class="page">
<div class="page-content">
<div class="p-title">比赛内容设置</div>
<el-form label-width="170px"
label-suffix=":"
size="small"
:disabled="!!(!editing && id)">
<div v-for="(item, i) in form"
:key="i"
class="step">
<el-form label-width="170px" label-suffix=":" size="small" :disabled="!!(!editing && id)">
<div v-for="(item, i) in form" :key="i" class="step">
<div class="title">
<span>{{ item.stageName }}{{ nums[i] }}阶段 | {{ methods.find(e => e.id === item.method).name }} </span>
<el-button v-if="item.method !== 2"
type="primary"
@click="toSet(i)">设置</el-button>
<el-button v-if="item.method !== 2" type="primary" @click="toSet(i)">设置</el-button>
</div>
<el-form-item class="req"
prop="time"
label="比赛时间">
<el-form-item class="req" prop="time" label="比赛时间">
<span v-if="item.method !== 2 && item.startTime">{{ item.startTime + ' ' + item.endTime }}</span>
<div style="display: flex;align-items: center;"
v-if="item.method === 2">
<el-date-picker v-model="item.time"
type="datetimerange"
range-separator="~"
start-placeholder="开始日期"
end-placeholder="结束日期"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
<div style="display: flex;align-items: center;" v-if="item.method === 2">
<el-date-picker v-model="item.time" type="datetimerange" range-separator="~" start-placeholder="开始日期"
end-placeholder="结束日期" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
@change="timeChange">
</el-date-picker>
<el-alert style="width: auto;padding: 0px 16px;margin-left: 10px;"
:title="'(请设置在 ' + step1.playStartTime + ' ~ ' + step1.playEndTime + '间)'"
type="error"
:closable="false"
effect="dark">
:title="'(请设置在 ' + step1.playStartTime + ' ~ ' + step1.playEndTime + '间)'" type="error"
:closable="false" effect="dark">
</el-alert>
</div>
</el-form-item>
<template v-if="item.method === 2">
<el-form-item class="req"
label="比赛地点">
<el-input v-model="item.offlineAddress"
style="width: 80%"></el-input>
<el-form-item class="req" label="比赛地点">
<el-input v-model="item.offlineAddress" style="width: 80%"></el-input>
</el-form-item>
<el-form-item label="系统链接">
<el-input v-model="item.competitionStageContentSetting.systemLink"
style="width: 80%"></el-input>
<el-input v-model="item.competitionStageContentSetting.systemLink" style="width: 80%"></el-input>
</el-form-item>
<el-form-item label="是否支持上传文件">
<div>
<el-radio v-model="item.competitionStageContentSetting.whetherToUploadFiles"
:label="0"></el-radio>
<el-radio v-model="item.competitionStageContentSetting.whetherToUploadFiles" :label="0"></el-radio>
</div>
<div class="flex a-center">
<el-radio v-model="item.competitionStageContentSetting.whetherToUploadFiles"
:label="1"></el-radio>
<el-radio v-model="item.competitionStageContentSetting.whetherToUploadFiles" :label="1"></el-radio>
<template v-if="item.competitionStageContentSetting.whetherToUploadFiles">
<el-upload class="file-upload"
:on-remove="(file, fileList) => handleRemove(file, fileList, item)"
:on-error="uploadError"
:before-remove="beforeRemove"
:on-preview="handlePreview"
action=""
<el-upload class="file-upload" :on-remove="(file, fileList) => handleRemove(file, fileList, item)"
:on-error="uploadError" :before-remove="beforeRemove" :on-preview="handlePreview" action=""
:file-list="item.competitionStageContentSetting.fileList"
:http-request="res => handleRequest(res, item)">
<el-button size="small"
type="primary">上传文件</el-button>
<el-button size="small" type="primary">上传文件</el-button>
<!-- <div slot="tip"
class="el-upload__tip"
style="position: relative">
@ -85,54 +57,34 @@
</div>
<div style="display: flex;align-items: flex-start;margin-top: 10px">
<span style="margin: 0 10px 0 30px;">说明</span>
<el-input maxlength="1000"
placeholder="请输入内容"
type="textarea"
<el-input maxlength="1000" placeholder="请输入内容" type="textarea"
v-model="item.competitionStageContentSetting.stageExplain"
style="width: calc(80% - 216px);"></el-input>
</div>
</el-form-item>
<el-form-item class="req"
label="比赛内容">
<el-input v-model="item.contentDescription"
type="textarea"
style="width: 80%"></el-input>
<el-form-item class="req" label="比赛内容">
<el-input v-model="item.contentDescription" type="textarea" style="width: 80%"></el-input>
</el-form-item>
<el-form-item class="req"
label="评分规则">
<el-input v-model="item.scoreRule"
type="textarea"
style="width: 80%"></el-input>
<el-form-item class="req" label="评分规则">
<el-input v-model="item.scoreRule" type="textarea" style="width: 80%"></el-input>
</el-form-item>
</template>
<template v-else>
<el-form-item class="req"
prop="cid"
label="课程系统">
<el-form-item class="req" prop="cid" label="课程系统">
{{ item.systemName }}
</el-form-item>
<el-form-item class="req"
prop="assessmentId"
label="已选择考核">
<el-form-item class="req" prop="assessmentId" label="已选择考核">
{{ item.projectName }}
</el-form-item>
<el-form-item class="req"
prop="resultAnnouncementTime"
label="比赛地点">
<el-form-item class="req" prop="resultAnnouncementTime" label="比赛地点">
<div class="line">
<el-checkbox v-model="item.onlineButton">线上</el-checkbox>
<el-input v-model="item.onlineAddress"
clearable
placeholder="请输入比赛网址"
:disabled="!item.onlineButton"
<el-input v-model="item.onlineAddress" clearable placeholder="请输入比赛网址" :disabled="!item.onlineButton"
style="width: 400px;margin-left: 10px"></el-input>
</div>
<div class="line">
<el-checkbox v-model="item.offlineButton">线下</el-checkbox>
<el-input v-model="item.offlineAddress"
clearable
placeholder="请输入地址"
:disabled="!item.offlineButton"
<el-input v-model="item.offlineAddress" clearable placeholder="请输入地址" :disabled="!item.offlineButton"
style="width: 400px;margin-left: 10px"></el-input>
</div>
</el-form-item>
@ -142,10 +94,7 @@
</div>
</div>
<set v-if="setVisible"
:form.sync="form[curStep]"
:step1.sync="step1"
@hideSet="hideSet" />
<set v-if="setVisible" :form.sync="form[curStep]" :step1.sync="step1" @hideSet="hideSet" />
</div>
</template>
@ -517,6 +466,7 @@ export default {
.step {
padding-bottom: 10px;
background-color: #f9f9f9;
.title {
display: flex;
justify-content: space-between;
@ -526,9 +476,11 @@ export default {
background-color: #ededed;
}
}
.line {
margin-bottom: 10px;
}
/deep/.req {
.el-form-item__label {
&:before {
@ -543,6 +495,7 @@ export default {
/deep/.file-upload {
width: 500px;
.download {
position: absolute;
bottom: -63px;

@ -1,273 +1,147 @@
<template>
<!-- 报名人员 -->
<div class="page-content"
style="padding: 24px">
<div class="page-content" style="padding: 24px">
<div class="tool">
<ul class="filter">
<li>
<label>搜索</label>
<el-input :placeholder="'请输入姓名、手机号、' + (info.completeCompetitionSetup.competitionType ? '团队名称、' : '') + '学号、学校'"
prefix-icon="el-icon-search"
v-model="keyword"
clearable
size="mini"
style="width: 350px"></el-input>
<el-input
:placeholder="'请输入姓名、手机号、' + (info.completeCompetitionSetup.competitionType ? '团队名称、' : '') + '学号、学校'"
prefix-icon="el-icon-search" v-model="keyword" clearable size="mini" style="width: 350px"></el-input>
</li>
<li v-if="info.releaseType">
<label>参赛人员状态</label>
<el-select v-model="isDisable"
@change="initData">
<el-option v-for="(item, i) in statusList"
:key="i"
:label="item.name"
:value="item.id"></el-option>
<el-select v-model="isDisable" @change="initData">
<el-option v-for="(item, i) in statusList" :key="i" :label="item.name" :value="item.id"></el-option>
</el-select>
</li>
</ul>
<div>
<el-button type="primary"
round
:loading="exporting"
@click="exportAll"
<el-button type="primary" round :loading="exporting" @click="exportAll"
v-auth="'/match:管理:报名人员:导出'">批量导出</el-button>
<el-button type="primary"
@click="batchDel"
round
v-auth="'/match:管理:报名人员:导出'">批量删除</el-button>
<el-button type="primary" @click="batchDel" round v-auth="'/match:管理:报名人员:导出'">批量删除</el-button>
</div>
</div>
<el-table ref="table"
:data="listData"
class="table"
stripe
header-align="center"
@selection-change="handleSelectionChange"
row-key="id"
v-loading="loading"
@sort-change="sortChange">
<el-table-column type="selection"
width="80"
align="center"
:reserve-selection="true"></el-table-column>
<el-table-column type="index"
width="60"
label="序号"
align="center">
<el-table ref="table" :data="listData" class="table" stripe header-align="center"
@selection-change="handleSelectionChange" row-key="id" v-loading="loading" @sort-change="sortChange">
<el-table-column type="selection" width="80" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center">
<template slot-scope="scope">
{{ scope.$index + (page - 1) * pageSize + 1 }}
</template>
</el-table-column>
<el-table-column prop="school"
label="学生账号归属"
sortable="custom"
min-width="180"
align="center"></el-table-column>
<el-table-column prop="realSchool"
label="学生所在院校"
min-width="180"
align="center"></el-table-column>
<el-table-column v-if="info.completeCompetitionSetup.competitionType"
prop="teamName"
label="团队名称"
sortable="custom"
min-width="140"
align="center">
<el-table-column prop="school" label="学生账号归属" sortable="custom" min-width="180" align="center"></el-table-column>
<el-table-column prop="realSchool" label="学生所在院校" min-width="180" align="center"></el-table-column>
<el-table-column v-if="info.completeCompetitionSetup.competitionType" prop="teamName" label="团队名称"
sortable="custom" min-width="140" align="center">
</el-table-column>
<el-table-column prop="username"
label="队长/成员"
min-width="140"
align="center">
<el-table-column prop="username" label="队长" min-width="140" align="center">
</el-table-column>
<el-table-column prop="workNumber"
label="队长/成员学号"
min-width="140"
align="center">
<el-table-column prop="workNumber" label="队长学号" min-width="140" align="center">
</el-table-column>
<el-table-column prop="phone"
label="队长/成员手机号"
min-width="140"
align="center">
<el-table-column prop="phone" label="队长手机号" min-width="140" align="center">
</el-table-column>
<el-table-column prop="captain"
label="是否为队长"
min-width="90"
align="center"></el-table-column>
<el-table-column prop="teachers"
label="指导老师"
min-width="200"
align="center"
show-overflow-tooltip>
<el-table-column prop="captain" label="是否为队长" min-width="90" align="center"></el-table-column>
<el-table-column prop="teachers" label="指导老师" min-width="200" align="center" show-overflow-tooltip>
<template slot-scope="scope">
<template v-if="scope.row.teachers">
<el-tooltip placement="top">
<div slot="content"
style="line-height: 1.8">
<div v-for="(item, i) in scope.row.teachers"
:key="i">
<div slot="content" style="line-height: 1.8">
<div v-for="(item, i) in scope.row.teachers" :key="i">
{{ item.name }}{{ item.phone ? ',' + item.phone : '' }}{{ item.position ? ',' + item.position : '' }}
</div>
</div>
<p>{{ scope.row.teachers[0].name }}{{ scope.row.teachers[0].phone ? ',' + scope.row.teachers[0].phone : '' }}{{ scope.row.teachers[0].position ? ',' + scope.row.teachers[0].position : '' }}</p>
<p>{{ scope.row.teachers[0].name }}{{ scope.row.teachers[0].phone ? ',' + scope.row.teachers[0].phone : ''
}}{{ scope.row.teachers[0].position ? ',' + scope.row.teachers[0].position : '' }}</p>
</el-tooltip>
</template>
</template>
</el-table-column>
<el-table-column prop="captain"
label="团队状态"
min-width="80"
align="center"></el-table-column>
<el-table-column label="操作"
align="center"
width="270">
<el-table-column prop="captain" label="团队状态" min-width="80" align="center">
<template slot-scope="scope">
<el-button v-auth="'/match:管理:报名人员:编辑'"
type="text"
@click="edit(scope.row)">编辑</el-button>
<el-button type="text"
@click="del(scope.row)">删除</el-button>
<p style="font-size: 16px;color: #f00;">异常</p>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="270">
<template slot-scope="scope">
<el-button v-auth="'/match:管理:报名人员:编辑'" type="text" @click="edit(scope.row)">编辑</el-button>
<el-button type="text" @click="del(scope.row)">删除</el-button>
<template v-if="info.releaseType">
<el-button v-auth="'/match:管理:报名人员:参赛信息与成绩'"
type="text"
@click="toInfo(scope.row)">参赛信息与成绩</el-button>
<el-switch v-auth="'/match:管理:报名人员:禁用'"
v-model="scope.row.isDisable"
:active-text="scope.row.isDisable ? '禁用' : '启用'"
:active-value="0"
:inactive-value="1"
style="margin: 0 10px 0 5px"
@change="switchOff($event,scope.row,scope.$index)"></el-switch>
<el-button v-auth="'/match:管理:报名人员:参赛信息与成绩'" type="text" @click="toInfo(scope.row)">参赛信息与成绩</el-button>
<el-switch v-auth="'/match:管理:报名人员:禁用'" v-model="scope.row.isDisable"
:active-text="scope.row.isDisable ? '禁用' : '启用'" :active-value="0" :inactive-value="1"
style="margin: 0 10px 0 5px" @change="switchOff($event, scope.row, scope.$index)"></el-switch>
</template>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background
layout="total, prev, pager, next"
:total="total"
@current-change="handleCurrentChange"
<el-pagination background layout="total, prev, pager, next" :total="total" @current-change="handleCurrentChange"
:current-page="page">
</el-pagination>
</div>
<el-dialog :title="(!isAdd ? '编辑' : '新增') + '参赛人员'"
:visible.sync="addVisible"
width="440px"
class="dialog"
:close-on-click-modal="false"
@close="closeAdd">
<el-form ref="form"
:model="form"
:rules="rules"
label-width="110px"
style='margin-right: 10px;'>
<el-form-item v-if="!schoolDisable"
prop="schoolId"
label="学生账号归属">
<el-select v-model="form.schoolId"
filterable
:disabled="!isAdd"
@change="schoolChange"
style="width: 100%">
<el-option v-for="(item, i) in clients"
:key="i"
:label="item.schoolName"
<el-dialog :title="(!isAdd ? '编辑' : '新增') + '参赛人员'" :visible.sync="addVisible" width="440px" class="dialog"
:close-on-click-modal="false" @close="closeAdd">
<el-form ref="form" :model="form" :rules="rules" label-width="110px" style='margin-right: 10px;'>
<el-form-item v-if="!schoolDisable" prop="schoolId" label="学生账号归属">
<el-select v-model="form.schoolId" filterable :disabled="!isAdd" @change="schoolChange" style="width: 100%">
<el-option v-for="(item, i) in clients" :key="i" :label="item.schoolName"
:value="item.schoolId"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="studentAffiliatedInstitutionId"
label="学生所在院校">
<el-select v-model="form.studentAffiliatedInstitutionId"
filterable
style="width: 100%">
<el-option v-for="(item, i) in schools"
:key="i"
:label="item.schoolName"
<el-form-item prop="studentAffiliatedInstitutionId" label="学生所在院校">
<el-select v-model="form.studentAffiliatedInstitutionId" filterable style="width: 100%">
<el-option v-for="(item, i) in schools" :key="i" :label="item.schoolName"
:value="item.schoolId"></el-option>
</el-select>
<p style="margin-top: 10px;line-height: 1.4;font-size: 12px;">学生所属院校为学生实际院校</p>
</el-form-item>
<el-form-item prop="workNumber"
label="学生学号">
<el-input v-model="form.workNumber"
placeholder="请输入学生学号"
@change="workNumberChange"></el-input>
<el-form-item prop="workNumber" label="学生学号">
<el-input v-model="form.workNumber" placeholder="请输入学生学号" @change="workNumberChange"></el-input>
</el-form-item>
<el-form-item prop="userName"
label="学生姓名">
<el-input v-model="form.userName"
placeholder="请输入学生姓名"
:disabled="isAdd"></el-input>
<el-form-item prop="userName" label="学生姓名">
<el-input v-model="form.userName" placeholder="请输入学生姓名" :disabled="isAdd"></el-input>
</el-form-item>
<el-form-item label="账号角色">
学生
</el-form-item>
<el-form-item v-if="info.completeCompetitionSetup.competitionType"
prop="teamId"
label="所属团队">
<el-form-item v-if="info.completeCompetitionSetup.competitionType" prop="teamId" label="所属团队">
<div style="display: flex;align-items: center">
<el-select v-model="form.teamId"
:disabled="formEnable && isAdd"
filterable
<el-select v-model="form.teamId" :disabled="formEnable && isAdd" filterable
style="width: 240px;margin-right: 10px">
<el-option v-for="(item, i) in teams"
:key="i"
:label="item.teamName"
:value="item.teamId"></el-option>
<el-option v-for="(item, i) in teams" :key="i" :label="item.teamName" :value="item.teamId"></el-option>
</el-select>
<el-button v-if="isAdd && !formEnable"
type="text"
@click="createTeam">创建团队</el-button>
<el-button v-if="isAdd && !formEnable" type="text" @click="createTeam">创建团队</el-button>
</div>
</el-form-item>
<el-form-item prop="phone"
label="手机号">
<el-input v-model="form.phone"
maxlength="11"
placeholder="请输入手机号"
:disabled="isAdd"></el-input>
<el-form-item prop="phone" label="手机号">
<el-input v-model="form.phone" maxlength="11" placeholder="请输入手机号" :disabled="isAdd"></el-input>
</el-form-item>
<el-form-item prop="email"
label="邮箱">
<el-input v-model="form.email"
placeholder="请输入邮箱"
:disabled="isAdd"></el-input>
<el-form-item prop="email" label="邮箱">
<el-input v-model="form.email" placeholder="请输入邮箱" :disabled="isAdd"></el-input>
</el-form-item>
</el-form>
<p v-if="!isAdd"
class="tips"
style="margin-left: 13px">当前页面信息修改会同步修改掉学生账号信息</p>
<span slot="footer"
class="dialog-footer">
<p v-if="!isAdd" class="tips" style="margin-left: 13px">当前页面信息修改会同步修改掉学生账号信息</p>
<span slot="footer" class="dialog-footer">
<el-button @click="addVisible = false">取消</el-button>
<el-button type="primary"
@click="submit">确定</el-button>
<el-button type="primary" @click="submit">确定</el-button>
</span>
</el-dialog>
<el-dialog title="创建团队"
:visible.sync="teamVisible"
:close-on-click-modal="false"
width="300px">
<el-dialog title="创建团队" :visible.sync="teamVisible" :close-on-click-modal="false" width="300px">
<el-form class="dia-form">
<el-form-item>
<el-input placeholder="请输入团队名称"
maxlength="10"
v-model="teamForm.teamName"></el-input>
<el-input placeholder="请输入团队名称" maxlength="10" v-model="teamForm.teamName"></el-input>
</el-form-item>
<el-form-item>
<el-input placeholder="请设置团队邀请码"
maxlength="6"
v-model="teamForm.invitationCode"></el-input>
<el-input placeholder="请设置团队邀请码" maxlength="6" v-model="teamForm.invitationCode"></el-input>
</el-form-item>
</el-form>
<span slot="footer"
class="dialog-footer">
<el-button size="small"
type="primary"
@click="teamSubmit">确定并使用</el-button>
<el-button size="small"
@click="teamVisible = false">取消</el-button>
<span slot="footer" class="dialog-footer">
<el-button size="small" type="primary" @click="teamSubmit">确定并使用</el-button>
<el-button size="small" @click="teamVisible = false">取消</el-button>
</span>
</el-dialog>
</div>
@ -392,7 +266,7 @@ export default {
},
async getData () {
this.loading = true
const { data } = await this.$post(this.api.queryRegistrationByCondition, {
const { data } = await this.$post(this.api.queryAbnormalTeam, {
pageNum: this.page,
pageSize: this.pageSize,
competitionId: this.id,
@ -667,7 +541,7 @@ export default {
},
//
toInfo (row) {
this.$store.commit('setInnerReferrer', `${this.$route.path}?id=${this.id}&tab=tab5&name=${this.$route.query.name}&keyword=${this.keyword}&page=${this.page}&isDisable=${this.isDisable}`)
this.$store.commit('setInnerReferrer', `${this.$route.path}?id=${this.id}&tab=tab6&name=${this.$route.query.name}&keyword=${this.keyword}&page=${this.page}&isDisable=${this.isDisable}`)
this.$router.push(`/matchInfo?id=${this.id}&accountId=${row.accountId}`)
},
exportAll () {
@ -731,16 +605,19 @@ export default {
.w-100 {
width: 100%;
}
.tips {
display: flex;
justify-content: center;
align-items: center;
}
}
.tips {
font-size: 12px;
color: #e90000;
}
/deep/.import-file {
.el-progress__text,
.el-progress,

@ -1,24 +1,17 @@
<template>
<!-- 赛事管理 -->
<div>
<el-card shadow="hover"
class="m-b-20">
<el-card shadow="hover" class="m-b-20">
<div class="flex-between">
<el-page-header @back="back"
:content="name + '/管理'"></el-page-header>
<el-page-header @back="back" :content="name + '/管理'"></el-page-header>
</div>
</el-card>
<div class="page"
style="margin-bottom: 24px">
<div class="page" style="margin-bottom: 24px">
<div class="tabs">
<a class="item"
v-for="(item,index) in tabs"
:key="index"
:class="{active: index == active}"
<a class="item" v-for="(item, index) in tabs" :key="index" :class="{ active: index == active }"
@click="tabChange(index)">{{ item }}</a>
</div>
<MatchDetail v-if="active == 'tab1'"
ref="detail" />
<MatchDetail v-if="active == 'tab1'" ref="detail" />
<MatchArch v-if="active == 'tab2'" />
<MatchProgress v-else-if="active == 'tab3'" />
<Notice v-else-if="active == 'tab4'" />
@ -138,5 +131,4 @@ export default {
};
</script>
<style scoped>
</style>
<style scoped></style>

@ -1,36 +1,27 @@
<template>
<div style="padding: 0 100px;">
<el-card shadow="hover"
class="m-b-20 head-card">
<el-card shadow="hover" class="m-b-20 head-card">
<div class="flex-between">
<el-page-header @back="back"
content="参赛信息与成绩"></el-page-header>
<el-page-header @back="back" content="参赛信息与成绩"></el-page-header>
</div>
</el-card>
<el-card shadow="hover"
class="m-b-20">
<el-card shadow="hover" class="m-b-20">
<div style="display: flex;align-items: center">
<table v-if="form.completeCompetitionSetup.competitionType"
class="table m-b-20 m-r-10">
<table v-if="form.completeCompetitionSetup.competitionType" class="table m-b-20 m-r-10">
<tr>
<th width="150">团队名称</th>
<td>
<el-input :disabled="!editing"
v-model="info.team.teamName"></el-input>
<el-input :disabled="!editing" v-model="info.team.teamName"></el-input>
</td>
<th width="150">团队邀请码</th>
<td>
<el-input :disabled="!editing"
maxlength="6"
v-model="info.team.invitationCode"></el-input>
<el-input :disabled="!editing" maxlength="6" v-model="info.team.invitationCode"></el-input>
</td>
</tr>
</table>
<div v-if="form.completeCompetitionSetup.competitionType && status < 4"
class="m-b-20 text-center">
<el-button type="primary"
@click="edit(1)">{{ editing ? '保存' : '编辑' }}</el-button>
<div v-if="form.completeCompetitionSetup.competitionType && status < 4" class="m-b-20 text-center">
<el-button type="primary" @click="edit(1)">{{ editing ? '保存' : '编辑' }}</el-button>
</div>
</div>
<table class="table">
@ -52,14 +43,14 @@
<template>
<tr>
<th>队长</th>
<td>{{ info.caption.userName }}{{ info.caption.schoolName && ',' + info.caption.schoolName }}{{ info.caption.workNumber && ',' + info.caption.workNumber }}</td>
<td>{{ info.caption.userName }}{{ info.caption.schoolName && ',' + info.caption.schoolName }}{{
info.caption.workNumber && ',' + info.caption.workNumber }}</td>
</tr>
<tr>
<th>团队成员</th>
<td>
<el-tag v-for="(item, i) in info.teamDetail"
:key="i"
style="margin-right: 5px">{{ item.userName }}</el-tag>
<el-tag v-for="(item, i) in info.teamDetail" :key="i" style="margin-right: 5px">{{ item.userName
}}</el-tag>
</td>
</tr>
</template>
@ -68,38 +59,18 @@
<th width="130">指导老师</th>
<td>
<div class="plus">
<i class="el-icon-circle-plus-outline icon"
@click="addAdvisor"></i>
<i class="el-icon-circle-plus-outline icon" @click="addAdvisor"></i>
</div>
<div v-for="(item, i) in info.teamInstructors"
:key="i"
class="line">
<el-input placeholder="请输入姓名"
v-model="item.name"
clearable
size="mini"
<div v-for="(item, i) in info.teamInstructors" :key="i" class="line">
<el-input placeholder="请输入姓名" v-model="item.name" clearable size="mini" :disabled="!item.edit"></el-input>
<el-input placeholder="请输入职务" maxlength="10" v-model="item.position" clearable size="mini"
:disabled="!item.edit"></el-input>
<el-input placeholder="请输入职务"
maxlength="10"
v-model="item.position"
clearable
size="mini"
:disabled="!item.edit"></el-input>
<el-input placeholder="请输入手机号"
maxlength="11"
v-model="item.phone"
clearable
size="mini"
<el-input placeholder="请输入手机号" maxlength="11" v-model="item.phone" clearable size="mini"
:disabled="!item.edit"></el-input>
<template>
<i v-if="item.edit"
class="el-icon-check icon"
@click="submitAdvisor(item, i)"></i>
<i v-else
class="el-icon-edit icon"
@click="editAdvisor(item)"></i>
<i class="el-icon-delete icon"
@click="delAdvisor(item, i)"></i>
<i v-if="item.edit" class="el-icon-check icon" @click="submitAdvisor(item, i)"></i>
<i v-else class="el-icon-edit icon" @click="editAdvisor(item)"></i>
<i class="el-icon-delete icon" @click="delAdvisor(item, i)"></i>
</template>
</div>
</td>
@ -113,42 +84,43 @@
<th>赛项阶段名称</th>
<template v-if="form.completeCompetitionSetup.competitionType">
<th width="110">参赛人数限制</th>
<th>允许参赛人员</th>
<th>
允许参赛人员
<el-tooltip v-if="stageTip" effect="dark" :content="stageTip" placement="bottom">
<i class="info el-icon-warning" style="margin-right: 10px;color: #ff1650;"></i>
</el-tooltip>
</th>
</template>
<th v-if="form.rule === 0">总分</th>
<th>竞赛成绩</th>
</tr>
<template v-if="info.stages.length">
<tr v-for="(item, i) in info.stages"
:key="i">
<tr v-for="(item, i) in info.stages" :key="i">
<td>{{ i + 1 }}</td>
<td>{{ item.stageName }}</td>
<template v-if="form.completeCompetitionSetup.competitionType">
<td>{{ item.customNumber || '不限制' }}</td>
<td>
<template v-if="item.participants">
<el-tag v-for="tag in item.participants"
:key="tag.name"
class="m-r-5"
closable
<el-tag v-for="tag in item.participants" :key="tag.name" class="m-r-5" closable
@close="removePar(tag, item)">
{{tag.name}}
{{ tag.name }}
</el-tag>
</template>
<span v-else
class="m-r-5"></span>
<i class="el-icon-edit icon"
@click="selectPar(item)"></i>
<span v-else class="m-r-5"></span>
<i class="el-icon-edit icon" @click="selectPar(item)"></i>
<el-tooltip v-if="stageTips.length && stageTips[i]" effect="dark" :content="stageTips[i]"
placement="bottom">
<el-tag type="danger" class="m-l-5">异常</el-tag>
</el-tooltip>
</td>
</template>
<td v-if="form.rule === 0 && !i"
:rowspan="info.stages.length">{{ info.totalScore }}</td>
<td v-if="form.rule === 0 && !i" :rowspan="info.stages.length">{{ info.totalScore }}</td>
<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.reportId)"
type="text"
@click="show(item)">查看成绩详情</el-button>
<span v-if="item.score >= 0" class="m-r-10">分数{{ item.score }}</span>
<el-button
v-if="form.completeCompetitionSetup.competitionType || (!form.completeCompetitionSetup.competitionType && item.reportId)"
type="text" @click="show(item)">查看成绩详情</el-button>
</td>
</tr>
</template>
@ -156,100 +128,62 @@
<td colspan="6">暂无数据</td>
</tr>
</table>
<el-alert v-if="form.completeCompetitionSetup.competitionType"
style="margin-top: 10px;"
<el-alert v-if="form.completeCompetitionSetup.competitionType" style="margin-top: 10px;"
:title="'注:请团长(团队创建人)设置各阶段参赛成员,只有被选择的允许参赛成员可进入对应阶段比赛' + (info.teamLimit ? ',每个团队成员只能参加一个赛项阶段' : '') + '!'"
type="warning"
show-icon>
type="warning" show-icon>
</el-alert>
</td>
</tr>
</table>
<template v-if="form.completeCompetitionSetup.competitionType">
<div class="l-title m-t-20">团队成员</div>
<div class="flex a-center" style="margin: 20px 0">
<div class="l-title" style="margin: 0 20px 0 0">团队成员</div>
<el-tag v-for="(item, i) in teamErrors" :key="i" type="danger" style="margin-right: 5px">{{ item
}}</el-tag>
</div>
<div class="flex-center">
<p>队长{{ info.caption.userName }}</p>
<el-button type="primary"
@click="transfer">转让队长</el-button>
<el-button type="primary" @click="transfer">转让队长</el-button>
</div>
<el-table :data="info.teamDetail"
stripe
header-align="center">
<el-table-column prop="userName"
label="成员姓名"
min-width="100"
align="center"></el-table-column>
<el-table-column prop="schoolName"
label="学校"
min-width="100"
align="center"></el-table-column>
<el-table-column prop="workNumber"
label="学号"
min-width="100"
align="center"></el-table-column>
<el-table-column prop="createTime"
label="加入时间"
width="180"
align="center"></el-table-column>
<el-table-column label="操作"
align="center"
width="160">
<el-table :data="info.teamDetail" stripe header-align="center">
<el-table-column prop="userName" label="成员姓名" min-width="100" align="center"></el-table-column>
<el-table-column prop="schoolName" label="学校" min-width="100" align="center"></el-table-column>
<el-table-column prop="workNumber" label="学号" min-width="100" align="center"></el-table-column>
<el-table-column prop="createTime" label="加入时间" width="180" align="center"></el-table-column>
<el-table-column label="操作" align="center" width="160">
<template slot-scope="scope">
<el-button v-if="scope.row.captain"
type="text"
@click="removeLine(scope.row)">踢出团队</el-button>
<el-button v-if="scope.row.captain" type="text" @click="removeLine(scope.row)">踢出团队</el-button>
</template>
</el-table-column>
</el-table>
</template>
</el-card>
<el-dialog title="选择参赛成员"
:visible.sync="transferVisible"
:close-on-click-modal="false"
width="400px">
<el-dialog title="选择参赛成员" :visible.sync="transferVisible" :close-on-click-modal="false" width="400px">
<template v-for="(item, i) in info.teamDetail">
<el-radio v-if="item.captain"
:key="i"
v-model="checkedPlayer"
:label="item.teamId">{{ item.userName }}</el-radio>
<el-radio v-if="item.captain" :key="i" v-model="checkedPlayer" :label="item.teamId">{{ item.userName
}}</el-radio>
</template>
<span slot="footer"
class="dialog-footer">
<el-button size="small"
type="primary"
@click="transferSubmit">确定</el-button>
<el-button size="small"
@click="transferVisible = false">取消</el-button>
<span slot="footer" class="dialog-footer">
<el-button size="small" type="primary" @click="transferSubmit">确定</el-button>
<el-button size="small" @click="transferVisible = false">取消</el-button>
</span>
</el-dialog>
<el-dialog title="选择参赛成员"
:visible.sync="chooseVisible"
:close-on-click-modal="false"
width="400px">
<el-dialog title="选择参赛成员" :visible.sync="chooseVisible" :close-on-click-modal="false" width="400px">
<el-checkbox-group v-model="checkedMembers">
<el-checkbox v-for="(item, i) in chooses"
:key="i"
:label="item.accountId">{{ item.userName }}</el-checkbox>
<el-checkbox v-for="(item, i) in chooses" :key="i" :label="item.accountId">{{ item.userName }}</el-checkbox>
</el-checkbox-group>
<p v-if="info.teamLimit && curRow.customNumber"
style="margin-top: 15px;font-size: 12px;">当前阶段限制{{ curRow.customNumber }}人参赛且此竞赛每个成员只能参加一个阶段赛项</p>
<span slot="footer"
class="dialog-footer">
<el-button size="small"
type="primary"
@click="chooseSubmit">确定</el-button>
<el-button size="small"
@click="chooseVisible = false">取消</el-button>
<p v-if="info.teamLimit && curRow.customNumber" style="margin-top: 15px;font-size: 12px;">当前阶段限制{{
curRow.customNumber }}人参赛且此竞赛每个成员只能参加一个阶段赛项</p>
<span slot="footer" class="dialog-footer">
<el-button size="small" type="primary" @click="chooseSubmit">确定</el-button>
<el-button size="small" @click="chooseVisible = false">取消</el-button>
</span>
</el-dialog>
<el-dialog title="团队得分详情"
:visible.sync="memberVisible"
width="900px"
:close-on-click-modal="false">
<h6 v-if="members.length"
style="margin-bottom: 10px;font-size: 16px;">团队名称{{ members[0].teamName }} 阶段名称{{ curRow.stageName }}</h6>
<el-dialog title="团队得分详情" :visible.sync="memberVisible" width="900px" :close-on-click-modal="false">
<h6 v-if="members.length" style="margin-bottom: 10px;font-size: 16px;">团队名称{{ members[0].teamName }} 阶段名称{{
curRow.stageName }}</h6>
<table class="table tc">
<tr>
<th width="60">序号</th>
@ -260,17 +194,14 @@
<th width="100">得分详情</th>
</tr>
<template v-if="members.length">
<tr v-for="(item, i) in members"
:key="i">
<tr v-for="(item, i) in members" :key="i">
<td>{{ i + 1 }}</td>
<td>{{ item.userName }}</td>
<td>{{ item.schoolName }}</td>
<td>{{ item.timeSum }}min</td>
<td>{{ item.score }}</td>
<td>
<el-button :disabled="!item.reportId"
type="text"
@click="toReport(item)">查看</el-button>
<el-button :disabled="!item.reportId" type="text" @click="toReport(item)">查看</el-button>
</td>
</tr>
</template>
@ -279,19 +210,12 @@
</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 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"
type="primary"
@click="memberVisible = false">确定</el-button>
<span slot="footer" class="dialog-footer">
<el-button size="small" type="primary" @click="memberVisible = false">确定</el-button>
</span>
</el-dialog>
</div>
@ -358,7 +282,10 @@ export default {
checkedMember: '',
checkedMembers: [],
chooses: [],
timer: null
timer: null,
teamErrors: [],
stageTip: '',
stageTips: [],
};
},
mounted () {
@ -407,8 +334,21 @@ export default {
}
})
this.info = info
this.form.completeCompetitionSetup.competitionType && this.getErrorInfo()
}).catch(err => { });
},
//
async getErrorInfo () {
const res = await this.$get(this.api.checkTeamStatus, {
competitionId: this.id,
teamId: this.info.teamId
})
this.teamErrors = res.teamTip.split(';').filter(e => e)
if (res.stageTip) {
this.stageTip = res.stageTip
this.stageTips = res.stageTip.split(';').filter(e => e)
}
},
//
handleStatus () {
let status
@ -659,53 +599,65 @@ export default {
.m-r-5 {
margin-right: 5px;
}
.l-title {
margin-top: 20px;
font-size: 18px;
}
.table {
width: 100%;
border-collapse: collapse;
th,
td {
padding: 12px;
border: 1px solid #ebeef5;
}
&.tc {
text-align: center;
}
th {
text-align: center;
background-color: #f8faff;
}
.icon {
margin-right: 10px;
font-size: 16px;
color: #7a7a7a;
cursor: pointer;
&:hover {
color: #007eff;
}
}
.plus {
margin-bottom: 10px;
text-align: right;
}
.line {
display: flex;
align-items: center;
margin-bottom: 10px;
.el-input {
margin-right: 15px;
}
}
}
.flex-center {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15px;
}
.text-center {
text-align: center;
}

@ -1,8 +1,6 @@
<template>
<div class="wrap"
v-loading="loading">
<el-card shadow="hover"
class="mgb20">
<div class="wrap" v-loading="loading">
<el-card shadow="hover" class="mgb20">
<div>
<div class="flex-center mgb20">
<p class="hr_tag"></p>
@ -13,56 +11,34 @@
<el-row>
<el-col :span="5">
<el-form-item label="省份">
<el-select v-model="form.provinces"
clearable
placeholder="请选择省份"
@change="getCity"
<el-select v-model="form.provinces" clearable placeholder="请选择省份" @change="getCity"
@clear="clearprovince()">
<el-option v-for="(item,index) in provinceList"
:key="index"
:label="item.provinceName"
<el-option v-for="(item, index) in provinceList" :key="index" :label="item.provinceName"
:value="item.provinceId"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="城市">
<el-select v-model="form.city"
clearable
placeholder="请选择城市"
:disabled="form.provinces ? false : true"
@clear="clearcity()"
@change="initData">
<el-option v-for="(item,index) in cityList"
:key="index"
:label="item.cityName"
<el-select v-model="form.city" clearable placeholder="请选择城市" :disabled="form.provinces ? false : true"
@clear="clearcity()" @change="initData">
<el-option v-for="(item, index) in cityList" :key="index" :label="item.cityName"
:value="item.cityId"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="来源">
<el-select v-model="form.platformId"
clearable
placeholder="请选择来源"
@change="initData">
<el-option v-for="item in platformList"
:key="item.value"
:label="item.label"
<el-select v-model="form.platformId" clearable placeholder="请选择来源" @change="initData">
<el-option v-for="item in platformList" :key="item.value" :label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="学校">
<el-select v-model="form.schoolId"
clearable
filterable
placeholder="请选择学校"
@change="initData">
<el-option v-for="(item,index) in schoolList"
:key="index"
:label="item.schoolName"
<el-select v-model="form.schoolId" clearable filterable placeholder="请选择学校" @change="initData">
<el-option v-for="(item, index) in schoolList" :key="index" :label="item.schoolName"
:value="item.schoolId"></el-option>
</el-select>
</el-form-item>
@ -77,34 +53,23 @@
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="创建时间"
class="userRadio">
<el-form-item label="创建时间" class="userRadio">
<el-radio-group v-model="form.month">
<el-radio v-for="(item,index) in dateList"
:key="index"
:label="item.id"
border>{{item.name}}</el-radio>
<el-radio v-for="(item, index) in dateList" :key="index" :label="item.id" border>{{ item.name
}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="自定义">
<el-date-picker v-model="form.date"
align="right"
unlink-panels
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
<el-date-picker v-model="form.date" align="right" unlink-panels type="daterange"
start-placeholder="开始日期" end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
clearable></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
<el-input placeholder="支持手机号,姓名"
prefix-icon="el-icon-search"
v-model="form.keyword"
<el-input placeholder="支持手机号,姓名" prefix-icon="el-icon-search" v-model="form.keyword"
clearable></el-input>
</el-form-item>
</el-col>
@ -115,87 +80,44 @@
</div>
</el-card>
<el-card shadow="hover"
class="card">
<el-card shadow="hover" class="card">
<div class="flex-between mgb20">
<div class="flex-center">
<p class="hr_tag"></p>
<span>用户列表</span>
</div>
<div>
<el-button type="primary"
round
@click="delAllSelection"
v-auth>批量删除</el-button>
<el-button type="primary" round @click="delAllSelection" v-auth>批量删除</el-button>
</div>
</div>
<el-table :data="userData"
class="table"
ref="table"
stripe
header-align="center"
@selection-change="handleSelectionChange"
row-key="userId">
<el-table-column type="selection"
width="55"
align="center"
:reserve-selection="true"></el-table-column>
<el-table-column type="index"
width="100"
label="序号"
align="center"></el-table-column>
<el-table-column prop="userName"
label="姓名"
align="center"></el-table-column>
<el-table-column prop="phone"
label="手机号"
align="center"></el-table-column>
<el-table-column prop="schoolName"
label="学校"
align="center"></el-table-column>
<el-table-column prop="platformName"
label="来源"
align="center"></el-table-column>
<el-table-column prop="createTime"
label="创建时间"
width="150"
align="center"></el-table-column>
<el-table-column prop="logInNumber"
label="登录次数"
align="center"></el-table-column>
<el-table-column prop="lastLoginTime"
label="最近登录时间"
align="center"></el-table-column>
<el-table-column label="操作"
width="300"
align="center">
<el-table :data="userData" class="table" ref="table" stripe header-align="center"
@selection-change="handleSelectionChange" row-key="userId">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="userName" label="姓名" align="center"></el-table-column>
<el-table-column prop="phone" label="手机号" align="center"></el-table-column>
<el-table-column prop="schoolName" label="学校" align="center"></el-table-column>
<el-table-column prop="platformName" label="来源" align="center"></el-table-column>
<el-table-column prop="createTime" label="创建时间" width="150" align="center"></el-table-column>
<el-table-column prop="logInNumber" label="登录次数" align="center"></el-table-column>
<el-table-column prop="lastLoginTime" label="最近登录时间" align="center"></el-table-column>
<el-table-column label="操作" width="300" align="center">
<template slot-scope="scope">
<el-button type="text"
@click="toDetail(scope.row, 1)"
v-auth>查看</el-button>
<el-button v-if="scope.row.userId!==1"
type="text"
@click="handleDelete(scope.row)"
v-auth>删除</el-button>
<el-button type="text"
@click="resetPassword(scope.row)"
v-auth>重置密码</el-button>
<el-switch v-if="scope.row.userId!==1"
v-model="scope.row.isEnable"
:active-value="1"
:inactive-value="0"
style="margin: 0 10px 0 5px"
:active-text="scope.row.isEnable ? '启用' : '禁用'"
@change="switchOff($event,scope.row,scope.$index)"
v-auth="'/user:启用'"></el-switch>
<el-button type="text" @click="toDetail(scope.row, 1)" v-auth>查看</el-button>
<el-button v-if="scope.row.userId !== 1" type="text" @click="handleDelete(scope.row)" v-auth>删除</el-button>
<el-button type="text" @click="resetPassword(scope.row)" v-auth>重置密码</el-button>
<!-- displayState 0禁用1启用2至少有一个状态为禁用变颜色展示为启用状态 -->
<el-switch v-if="scope.row.userId !== 1" :key="loading" v-model="scope.row.enable" :active-value="1"
:inactive-value="0" :class="{ error: scope.row.displayState === 2 }" style="margin: 0 10px 0 5px"
:active-text="scope.row.enable ? '启用' : '禁用'"
:active-color="scope.row.displayState === 2 ? '#ff552c' : '#9076FF'"
:inactive-color="scope.row.displayState === 2 ? '#ff552c' : '#dcdfe6'"
@change="switchOff($event, scope.row, scope.$index)" v-auth="'/user:启用'"></el-switch>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background
@current-change="currentChange"
:current-page="page"
layout="total, prev, pager, next"
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next"
:total="totals">
</el-pagination>
</div>
@ -286,7 +208,8 @@ export default {
pageSize: 10,
totals: 0,
multipleSelection: [],
loading: false
loading: false,
};
},
watch: {
@ -326,7 +249,8 @@ export default {
},
methods: {
getData () {
let data = {
this.loading = true
this.$post(this.api.userManagementList, {
countries: this.form.countries,
provinceId: this.form.provinces,
cityId: this.form.city,
@ -339,29 +263,17 @@ export default {
searchContent: this.form.keyword,
pageNum: this.page,
pageSize: this.pageSize
}).then(({ page }) => {
const { records, total } = page
records.map(e => {
e.enable = e.displayState
if (e.enable === 2) {
e.enable = 1
}
this.loading = true
this.$post(this.api.queryUserInfoList, data).then(({ page, total }) => {
const promises = []
page.map(e => {
promises.push(new Promise((resolve, reject) => {
//
this.$get(this.api.viewUserDetailsforNakadai, { userId: e.userId }).then(({ result }) => {
const platList = result.bindingPlatformAndUserList
// 1->0->
e.isEnable = platList.find(e => e.isEnable) ? 1 : 0
e.userIds = platList.map(e => e.userId) // userId
resolve()
}).catch((res) => {
reject()
})
}))
})
Promise.all(promises).then(_ => {
this.userData = page
this.userData = records
this.totals = total
this.loading = false
})
}).catch(res => {
this.loading = false
})
@ -423,7 +335,7 @@ export default {
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
}).then(() => {
this.$post(this.api.delUserAccounts, row.userIds).then(res => {
this.$post(this.api.delUserAccountsByNakadai, row.accountIds).then(res => {
this.$message.success('删除成功')
this.getData()
}).catch(res => { })
@ -452,6 +364,7 @@ export default {
phone: row.phone
}).then(res => {
this.$message.success(val ? '启用成功' : '禁用成功')
this.getData()
}).catch(res => { })
},
//
@ -459,7 +372,7 @@ export default {
//
if (val) {
//
this.$post(`${this.api.oneClickEnableVerification}?accountId=${row.accountId}`).then(({ result }) => {
this.$post(`${this.api.oneClickEnableVerification}?accountIds=${row.accountIds}`).then(({ result }) => {
this.switchUser(val, row)
}).catch((res) => {
//
@ -482,16 +395,14 @@ export default {
},
delAllSelection () {
if (this.multipleSelection.length) {
let delList = this.multipleSelection.map(e => e.userId);
let ids = []
this.multipleSelection.map(e => {
ids.push(...e.accountIds)
})
this.$confirm('确定要删除选中用户吗?', '提示', {
type: 'warning'
}).then(() => {
this.$post(this.api.delUserAccounts, delList).then(res => {
if (delList.length == this.userData.length) {
if (this.page > 1) {
this.page = this.page - 1
}
}
this.$post(this.api.delUserAccountsByNakadai, ids).then(res => {
this.$message.success('删除成功')
this.$refs.table.clearSelection()
this.getData()
@ -511,21 +422,31 @@ export default {
.el-form {
min-width: 1800px;
}
.card {
min-height: calc(100vh - 380px);
}
.el-form-item {
margin-bottom: 0;
/deep/.el-radio {
width: 87px;
text-align: center;
.el-radio__label {
padding-left: 0;
}
}
.el-radio.is-bordered + .el-radio.is-bordered {
.el-radio.is-bordered+.el-radio.is-bordered {
margin-left: 0;
}
}
</style>
/deep/.error {
.el-switch__label.is-active {
color: #ff552c;
}
}
</style>

Loading…
Cancel
Save