|
@@ -9,48 +9,61 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="two">
|
|
|
- <scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-view" @scrolltolower="toPage"
|
|
|
- @scroll="toScroll">
|
|
|
- <view class="list-scroll-view">
|
|
|
- <view class="list" v-for="(item, index) in list" :key="index">
|
|
|
- <view class="value">
|
|
|
- <view class="title">流程名称:</view>
|
|
|
- <view class="label">{{item.matchPath_name||'暂无'}}</view>
|
|
|
+ <tabs :tabs="tabs" @tabsChange="tabsChange">
|
|
|
+ <view class="tabsList">
|
|
|
+ <scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-view" @scrolltolower="toPage"
|
|
|
+ @scroll="toScroll">
|
|
|
+ <view class="list-scroll-view">
|
|
|
+ <view class="list" v-for="(item, index) in list" :key="index">
|
|
|
+ <view class="value">
|
|
|
+ <view class="title">流程名称:</view>
|
|
|
+ <view class="label">{{item.matchPath_name||'暂无'}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="value">
|
|
|
+ <view class="title">选手名称:</view>
|
|
|
+ <view class="label">{{item.sign_name||'暂无'}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="value">
|
|
|
+ <view class="title">分数:</view>
|
|
|
+ <view class="label">{{item.score||'暂无'}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="value">
|
|
|
+ <view class="title">时间:</view>
|
|
|
+ <view class="label">{{item.time||'暂无'}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="bottom">
|
|
|
+ <button class="button button_1" type="default" size="mini"
|
|
|
+ @tap.stop="toEdit(item)">修改</button>
|
|
|
+ <button class="button button_2" type="default" size="mini"
|
|
|
+ @tap.stop="toDelete(item)">删除</button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="is_bottom" v-if="is_bottom">
|
|
|
+ <text>{{config.bottom_title||'到底了!'}}</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view class="value">
|
|
|
- <view class="title">选手名称:</view>
|
|
|
- <view class="label">{{item.sign_name||'暂无'}}</view>
|
|
|
- </view>
|
|
|
- <view class="value">
|
|
|
- <view class="title">分数:</view>
|
|
|
- <view class="label">{{item.score||'暂无'}}</view>
|
|
|
- </view>
|
|
|
- <view class="value">
|
|
|
- <view class="title">时间:</view>
|
|
|
- <view class="label">{{item.time||'暂无'}}</view>
|
|
|
- </view>
|
|
|
- <view class="bottom">
|
|
|
- <button class="button button_1" type="default" size="mini"
|
|
|
- @tap.stop="toEdit(item)">修改</button>
|
|
|
- <button class="button button_2" type="default" size="mini"
|
|
|
- @tap.stop="toDelete(item)">删除</button>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="is_bottom" v-if="is_bottom">
|
|
|
- <text>{{config.bottom_title||'到底了!'}}</text>
|
|
|
- </view>
|
|
|
+ </scroll-view>
|
|
|
</view>
|
|
|
- </scroll-view>
|
|
|
+ </tabs>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import tabs from '../../components/tabs/index.vue';
|
|
|
export default {
|
|
|
+ components: {
|
|
|
+ tabs
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
id: '',
|
|
|
user: {},
|
|
|
+ tabs: {
|
|
|
+ active: '',
|
|
|
+ bgColor: '#ffffff',
|
|
|
+ menu: []
|
|
|
+ },
|
|
|
config: {},
|
|
|
searchInfo: {},
|
|
|
list: [],
|
|
@@ -72,11 +85,13 @@
|
|
|
onShow: async function() {
|
|
|
const that = this;
|
|
|
that.clearPage();
|
|
|
+ await that.searchOther();
|
|
|
await that.search();
|
|
|
},
|
|
|
onPullDownRefresh: async function() {
|
|
|
const that = this;
|
|
|
that.clearPage();
|
|
|
+ await that.searchOther();
|
|
|
await that.search();
|
|
|
uni.stopPullDownRefresh();
|
|
|
},
|
|
@@ -92,6 +107,23 @@
|
|
|
}
|
|
|
} catch (e) {}
|
|
|
},
|
|
|
+ async searchOther() {
|
|
|
+ const that = this;
|
|
|
+ const res = await that.$api(`/matchPath`, 'GET', {
|
|
|
+ match: that.id
|
|
|
+ })
|
|
|
+ if (res.errcode == '0' && res.total > 0) {
|
|
|
+ that.$set(that.tabs, `active`, res.data[0].id)
|
|
|
+ const menu = []
|
|
|
+ for (let val of res.data) {
|
|
|
+ menu.push({
|
|
|
+ title: val.name,
|
|
|
+ active: val.id
|
|
|
+ })
|
|
|
+ }
|
|
|
+ that.$set(that.tabs, `menu`, menu)
|
|
|
+ }
|
|
|
+ },
|
|
|
searchConfig() {
|
|
|
const that = this;
|
|
|
try {
|
|
@@ -106,6 +138,7 @@
|
|
|
skip: that.skip,
|
|
|
limit: that.limit,
|
|
|
match: that.id,
|
|
|
+ matchPath: that.tabs.active
|
|
|
}
|
|
|
const res = await that.$api(`/score/list`, 'GET', {
|
|
|
...info,
|
|
@@ -133,9 +166,16 @@
|
|
|
toAdd() {
|
|
|
const that = this;
|
|
|
uni.navigateTo({
|
|
|
- url: `/pagesMy/match/add?match=${that.id}`
|
|
|
+ url: `/pagesMy/match/add?match=${that.id}&matchPath=${that.tabs.active}`
|
|
|
})
|
|
|
},
|
|
|
+ // 选择选项卡
|
|
|
+ tabsChange(e) {
|
|
|
+ const that = this;
|
|
|
+ that.$set(that.tabs, `active`, e.active)
|
|
|
+ that.clearPage();
|
|
|
+ that.search()
|
|
|
+ },
|
|
|
// 修改
|
|
|
toEdit(item) {
|
|
|
const that = this;
|
|
@@ -241,54 +281,61 @@
|
|
|
}
|
|
|
|
|
|
.two {
|
|
|
- position: relative;
|
|
|
- flex-grow: 1;
|
|
|
background-color: var(--f1Color);
|
|
|
|
|
|
- .list {
|
|
|
- background-color: var(--mainColor);
|
|
|
- border-bottom: 1px solid var(--f5Color);
|
|
|
- margin: 2vw 2vw 0 2vw;
|
|
|
- border-radius: 4px;
|
|
|
- padding: 3vw;
|
|
|
+ .tabsList {
|
|
|
+ position: relative;
|
|
|
+ flex-grow: 1;
|
|
|
+ width: 100vw;
|
|
|
+ height: 90vh;
|
|
|
+ margin: 10px 0 0 0;
|
|
|
|
|
|
+ .list {
|
|
|
+ background-color: var(--mainColor);
|
|
|
+ border-bottom: 1px solid var(--f5Color);
|
|
|
+ margin: 2vw 2vw 0 2vw;
|
|
|
+ border-radius: 4px;
|
|
|
+ padding: 3vw;
|
|
|
|
|
|
- .value {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
|
|
|
- .title {
|
|
|
- font-size: var(--font14Size);
|
|
|
- font-weight: bold;
|
|
|
- }
|
|
|
+ .value {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ .title {
|
|
|
+ font-size: var(--font14Size);
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
|
|
|
- .label {
|
|
|
- font-size: var(--font12Size);
|
|
|
- color: var(--f85Color);
|
|
|
+ .label {
|
|
|
+ font-size: var(--font12Size);
|
|
|
+ color: var(--f85Color);
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- .bottom {
|
|
|
- margin: 2vw 0 0 0;
|
|
|
- text-align: center;
|
|
|
+ .bottom {
|
|
|
+ margin: 2vw 0 0 0;
|
|
|
+ text-align: center;
|
|
|
|
|
|
- .button {
|
|
|
- color: var(--mainColor);
|
|
|
- font-size: var(--font14Size);
|
|
|
- border-radius: 2vw;
|
|
|
- }
|
|
|
+ .button {
|
|
|
+ color: var(--mainColor);
|
|
|
+ font-size: var(--font14Size);
|
|
|
+ border-radius: 2vw;
|
|
|
+ }
|
|
|
|
|
|
- .button_1 {
|
|
|
- margin: 0 2vw 0 0;
|
|
|
- background-color: var(--f3CColor);
|
|
|
- }
|
|
|
+ .button_1 {
|
|
|
+ margin: 0 2vw 0 0;
|
|
|
+ background-color: var(--f3CColor);
|
|
|
+ }
|
|
|
|
|
|
- .button_2 {
|
|
|
- background-color: var(--fF0Color);
|
|
|
+ .button_2 {
|
|
|
+ background-color: var(--fF0Color);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
.scroll-view {
|