|
@@ -1,12 +1,6 @@
|
|
|
<template>
|
|
|
<view class="form">
|
|
|
<form @submit="formSubmit">
|
|
|
- <view class="value other">
|
|
|
- <view class="title">名称</view>
|
|
|
- <view class="label">
|
|
|
- <input name="name" class="input" :value="form.name" placeholder="请输入名称" />
|
|
|
- </view>
|
|
|
- </view>
|
|
|
<view class="value other">
|
|
|
<view class="title">类型</view>
|
|
|
<view class="label">
|
|
@@ -15,48 +9,115 @@
|
|
|
</picker>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="value other">
|
|
|
- <view class="title">成立时间</view>
|
|
|
+ <view class="value other margin">
|
|
|
+ <view class="title">人数</view>
|
|
|
<view class="label">
|
|
|
- <picker name="date" mode="date" @change="dateChange" :value="index" fields="month">
|
|
|
- <view class="picker">{{form.date||'请选择成立时间'}}</view>
|
|
|
+ <picker name="number" @change="numberChange" :value="index" :range="numberList"
|
|
|
+ range-key="dictLabel">
|
|
|
+ <view class="picker">{{form.number||'请选择人数'}}</view>
|
|
|
</picker>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="value other">
|
|
|
- <view class="title">成立时间</view>
|
|
|
+ <view class="title">对手</view>
|
|
|
+ <view class="label">
|
|
|
+ <input name="name" class="input" :value="form.name" placeholder="请选择" />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="value other">
|
|
|
+ <view class="title">日期</view>
|
|
|
<view class="label">
|
|
|
- <picker name="date" mode="date" @change="dateChange" :value="index" fields="month">
|
|
|
- <view class="picker">{{form.date||'请选择成立时间'}}</view>
|
|
|
+ <picker name="date" mode="date" @change="dateChange" :value="index">
|
|
|
+ <view class="picker">{{form.date||'请选择日期'}}</view>
|
|
|
</picker>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="value other">
|
|
|
- <view class="title">成立时间</view>
|
|
|
+ <view class="title">时间</view>
|
|
|
<view class="label">
|
|
|
- <picker name="date" mode="date" @change="dateChange" :value="index" fields="month">
|
|
|
- <view class="picker">{{form.date||'请选择成立时间'}}</view>
|
|
|
+ <picker name="time" mode="time" @change="timeChange" :value="index">
|
|
|
+ <view class="picker">{{form.time||'请选择时间'}}</view>
|
|
|
</picker>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="value other">
|
|
|
- <view class="title">成立时间</view>
|
|
|
+ <view class="title">时长</view>
|
|
|
<view class="label">
|
|
|
- <picker name="date" mode="date" @change="dateChange" :value="index" fields="month">
|
|
|
- <view class="picker">{{form.date||'请选择成立时间'}}</view>
|
|
|
+ <picker name="duration" @change="durationChange" :value="index" :range="durationList"
|
|
|
+ range-key="dictLabel">
|
|
|
+ <view class="picker">{{form.duration||'请选择时长'}}</view>
|
|
|
</picker>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="value other">
|
|
|
+ <view class="title">地点</view>
|
|
|
+ <view class="label">
|
|
|
+ <input name="name" class="input" :value="form.address" placeholder="请选择" />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="value other margin">
|
|
|
<view class="title">队服颜色</view>
|
|
|
<view class="label">
|
|
|
<input name="color" class="input" :value="form.color" placeholder="请输入队服颜色" />
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <view class="value other">
|
|
|
+ <view class="title">费用</view>
|
|
|
+ <view class="label">
|
|
|
+ <input name="money" class="input" :value="form.money" placeholder="请输入费用" />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="value other">
|
|
|
+ <view class="title">人数上限</view>
|
|
|
+ <view class="label">
|
|
|
+ <input name="name" class="input" :value="form.address" placeholder="请选择" />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="value other">
|
|
|
+ <view class="title">公开报名</view>
|
|
|
+ <view class="label">
|
|
|
+ <input name="name" class="input" :value="form.address" placeholder="请选择" />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="value other">
|
|
|
+ <view class="title">定时开启报名</view>
|
|
|
+ <view class="label">
|
|
|
+ <input name="name" class="input" :value="form.address" placeholder="请选择" />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="value other">
|
|
|
+ <view class="title">报名截止时间</view>
|
|
|
+ <view class="label">
|
|
|
+ <input name="name" class="input" :value="form.address" placeholder="请选择" />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="value other">
|
|
|
+ <view class="title">限定人员标签</view>
|
|
|
+ <view class="label">
|
|
|
+ <input name="name" class="input" :value="form.address" placeholder="请选择" />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="value other margin">
|
|
|
+ <view class="title">允许待定</view>
|
|
|
+ <view class="label">
|
|
|
+ <input name="name" class="input" :value="form.address" placeholder="请选择" />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="value other">
|
|
|
+ <view class="title">活动标题</view>
|
|
|
+ <view class="label">
|
|
|
+ <input name="title" class="input" :value="form.title" placeholder="请输入活动标题" />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
<view class="remark">
|
|
|
- <view class="title">简介</view>
|
|
|
<view class="label">
|
|
|
- <textarea name="brief" :value="form.brief" placeholder="请简单描述球队" />
|
|
|
+ <textarea name="brief" :value="form.brief" placeholder="请输入简介" />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="value other">
|
|
|
+ <view class="title">上传图片</view>
|
|
|
+ <view class="label">
|
|
|
+
|
|
|
</view>
|
|
|
</view>
|
|
|
</form>
|
|
@@ -79,6 +140,8 @@
|
|
|
const form = ref({});
|
|
|
// 字典表
|
|
|
const typeList = ref([]);
|
|
|
+ const numberList = ref([]);
|
|
|
+ const durationList = ref([]);
|
|
|
onShow(async () => {
|
|
|
await searchOther();
|
|
|
await search();
|
|
@@ -89,6 +152,12 @@
|
|
|
// 类型
|
|
|
res = await $api(`dict/data/list`, 'GET', { dictType: 'sys_user_type' });
|
|
|
if (res.code === 200 && res.total > 0) typeList.value = res.rows
|
|
|
+ // 人数
|
|
|
+ res = await $api(`dict/data/list`, 'GET', { dictType: 'sys_match_number' });
|
|
|
+ if (res.code === 200 && res.total > 0) numberList.value = res.rows
|
|
|
+ // 时长
|
|
|
+ res = await $api(`dict/data/list`, 'GET', { dictType: 'sys_match_duration' });
|
|
|
+ if (res.code === 200 && res.total > 0) durationList.value = res.rows
|
|
|
};
|
|
|
// 查询
|
|
|
const search = async () => { };
|
|
@@ -97,10 +166,24 @@
|
|
|
const data = typeList.value[e.detail.value]
|
|
|
if (data) form.value.type = data.dictLabel
|
|
|
};
|
|
|
- // 时间选择器
|
|
|
+ // 人数选择
|
|
|
+ const numberChange = (e) => {
|
|
|
+ const data = numberList.value[e.detail.value]
|
|
|
+ if (data) form.value.number = data.dictLabel
|
|
|
+ };
|
|
|
+ // 时长选择选择
|
|
|
+ const durationChange = (e) => {
|
|
|
+ const data = durationList.value[e.detail.value]
|
|
|
+ if (data) form.value.duration = data.dictLabel
|
|
|
+ };
|
|
|
+ // 日期选择器
|
|
|
const dateChange = (e) => {
|
|
|
form.value.date = e.detail.value
|
|
|
};
|
|
|
+ // 时间选择器
|
|
|
+ const timeChange = (e) => {
|
|
|
+ form.value.time = e.detail.value
|
|
|
+ };
|
|
|
// 上传图片
|
|
|
const Preview = () => {
|
|
|
uni.chooseImage({
|
|
@@ -131,13 +214,19 @@
|
|
|
.form {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
+ background-color: var(--f9Color);
|
|
|
|
|
|
.other {
|
|
|
- padding: 3vw 2vw;
|
|
|
+ padding: 4vw 2vw;
|
|
|
border-bottom: 1px solid var(--footColor);
|
|
|
}
|
|
|
|
|
|
+ .margin {
|
|
|
+ margin: 0 0 3vw 0;
|
|
|
+ }
|
|
|
+
|
|
|
.remark {
|
|
|
+ background-color: var(--mainColor);
|
|
|
padding: 3vw 2vw 0 2vw;
|
|
|
|
|
|
.title {
|