Переглянути джерело

我的赛事 管理 详细信息

zs 2 роки тому
батько
коміт
041582c521

+ 15 - 1
pages/referee/eliminate.js

@@ -7,12 +7,26 @@ Page({
     data: {
         frameStyle: { useTop: true, name: '淘汰赛管理', leftArrow: true, useBar: false },
         searchInfo: {},
-        list: []
+        list: [],
+        dialog: { title: '详细信息', show: false, type: '1' },
+        info: {},
     },
     // 跳转菜单
     back(e) {
         wx.navigateBack({ delta: 1 })
     },
+    // 查看
+    toView: async function (e) {
+        const that = this;
+        const { item } = e.currentTarget.dataset;
+        that.setData({ info: item })
+        that.setData({ dialog: { title: '详细信息', show: true, type: '1' } })
+    },
+    // 关闭弹框
+    toClose: function () {
+        const that = this;
+        that.setData({ dialog: { title: '详细信息', show: false, type: '1' } })
+    },
     /**
      * 生命周期函数--监听页面加载
      */

+ 6 - 5
pages/referee/eliminate.json

@@ -1,6 +1,7 @@
 {
-    "component": true,
-    "usingComponents": {
-      "mobile-main": "/commpents/mobile-frame/index"
-    }
-  }
+  "component": true,
+  "usingComponents": {
+    "mobile-main": "/commpents/mobile-frame/index",
+    "e-dialog": "/commpents/dialog/index"
+  }
+}

+ 24 - 0
pages/referee/eliminate.less

@@ -79,4 +79,28 @@
             }
         }
     }
+}
+.dialog_one {
+    margin: 10px 0 0 0;
+
+    .one_1 {
+        display: flex;
+        flex-direction: row;
+        justify-content: space-between;
+        border: 1px solid #ccc;
+        border-radius: 5px;
+        margin: 0 0 10px 0;
+        padding: 10px;
+
+        .text {
+            width: 40vw;
+            color: #666;
+            font-size: 15px;
+        }
+
+        .text1 {
+            font-size: 15px;
+            color: #000;
+        }
+    }
 }

+ 60 - 1
pages/referee/eliminate.wxml

@@ -31,6 +31,7 @@
                             </view>
                         </view>
                         <view class="btn">
+                            <button type="primary" size="mini" bindtap="toView" data-item="{{item}}">详细信息</button>
                             <button type="primary" size="mini">赛事比分</button>
                         </view>
                     </view>
@@ -38,4 +39,62 @@
             </scroll-view>
         </view>
     </view>
-</mobile-main>
+</mobile-main>
+<e-dialog dialog="{{dialog}}" bind:toClose="toClose">
+    <view slot="info">
+        <view class="dialog_one" wx:if="{{dialog.type=='1'}}">
+            <view class="one_1">
+                <text class="text">赛事名称:</text>
+                <text class="text1">{{info.match_name||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">赛事组别:</text>
+                <text class="text1">{{info.grouping_name||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">比赛项目:</text>
+                <text class="text1">{{info.project_name||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">赛事场地:</text>
+                <text class="text1">{{info.ground_name||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">选手1:</text>
+                <text class="text1">{{info.player_one_name||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">选手2:</text>
+                <text class="text1">{{info.player_two_name||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">裁判名称:</text>
+                <text class="text1">{{info.referee_name||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">选手1的比分纪录:</text>
+                <text class="text1">{{info.score_one||0}}分</text>
+            </view>
+            <view class="one_1">
+                <text class="text">选手2的比分纪录:</text>
+                <text class="text1">{{info.score_two||0}}分</text>
+            </view>
+            <view class="one_1">
+                <text class="text">小组名:</text>
+                <text class="text1">{{info.team_name||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">胜者:</text>
+                <text class="text1">{{info.winner||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">比赛时间:</text>
+                <text class="text1">{{info.match_time||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">比赛状态:</text>
+                <text class="text1">{{info.status=='0'?'已安排':info.status=='1'?'待开赛':info.status=='2'?'已开赛':info.status=='3'?'已结束':'暂无'}}</text>
+            </view>
+        </view>
+    </view>
+</e-dialog>

+ 21 - 0
pages/referee/eliminate.wxss

@@ -63,3 +63,24 @@
 .main .two .scroll-view .list-scroll-view .list:last-child {
   border-bottom: none;
 }
+.dialog_one {
+  margin: 10px 0 0 0;
+}
+.dialog_one .one_1 {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  border: 1px solid #ccc;
+  border-radius: 5px;
+  margin: 0 0 10px 0;
+  padding: 10px;
+}
+.dialog_one .one_1 .text {
+  width: 40vw;
+  color: #666;
+  font-size: 15px;
+}
+.dialog_one .one_1 .text1 {
+  font-size: 15px;
+  color: #000;
+}

+ 16 - 2
pages/referee/group.js

@@ -7,12 +7,26 @@ Page({
     data: {
         frameStyle: { useTop: true, name: '小组赛管理', leftArrow: true, useBar: false },
         searchInfo: {},
-        list: []
+        list: [],
+        dialog: { title: '详细信息', show: false, type: '1' },
+        info: {},
     },
     // 跳转菜单
     back(e) {
         wx.navigateBack({ delta: 1 })
     },
+    // 查看
+    toView: async function (e) {
+        const that = this;
+        const { item } = e.currentTarget.dataset;
+        that.setData({ info: item })
+        that.setData({ dialog: { title: '详细信息', show: true, type: '1' } })
+    },
+    // 关闭弹框
+    toClose: function () {
+        const that = this;
+        that.setData({ dialog: { title: '详细信息', show: false, type: '1' } })
+    },
     /**
      * 生命周期函数--监听页面加载
      */
@@ -40,7 +54,7 @@ Page({
         wx.getStorage({
             key: 'user',
             success: async (res) => {
-                let info = { skip: 0, limit: 1000, referee_id: res.data.opneid || 'oH0y05QJCvBQQpoobbtHTkpL4z4I' };
+                let info = { skip: 0, limit: 1000, referee_id: res.data.openid };
                 // if (searchInfo && searchInfo.name) info.name = searchInfo.name;
                 const arr = await app.$get(`/newCourt/api/race`, { ...info });
                 if (arr.errcode == '0') {

+ 6 - 5
pages/referee/group.json

@@ -1,6 +1,7 @@
 {
-    "component": true,
-    "usingComponents": {
-      "mobile-main": "/commpents/mobile-frame/index"
-    }
-  }
+  "component": true,
+  "usingComponents": {
+    "mobile-main": "/commpents/mobile-frame/index",
+    "e-dialog": "/commpents/dialog/index"
+  }
+}

+ 25 - 0
pages/referee/group.less

@@ -79,4 +79,29 @@
             }
         }
     }
+}
+
+.dialog_one {
+    margin: 10px 0 0 0;
+
+    .one_1 {
+        display: flex;
+        flex-direction: row;
+        justify-content: space-between;
+        border: 1px solid #ccc;
+        border-radius: 5px;
+        margin: 0 0 10px 0;
+        padding: 10px;
+
+        .text {
+            width: 40vw;
+            color: #666;
+            font-size: 15px;
+        }
+
+        .text1 {
+            font-size: 15px;
+            color: #000;
+        }
+    }
 }

+ 60 - 1
pages/referee/group.wxml

@@ -31,6 +31,7 @@
                             </view>
                         </view>
                         <view class="btn">
+                            <button type="primary" size="mini" bindtap="toView" data-item="{{item}}">详细信息</button>
                             <button type="primary" size="mini">赛事比分</button>
                         </view>
                     </view>
@@ -38,4 +39,62 @@
             </scroll-view>
         </view>
     </view>
-</mobile-main>
+</mobile-main>
+<e-dialog dialog="{{dialog}}" bind:toClose="toClose">
+    <view slot="info">
+        <view class="dialog_one" wx:if="{{dialog.type=='1'}}">
+            <view class="one_1">
+                <text class="text">赛事名称:</text>
+                <text class="text1">{{info.match_name||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">赛事组别:</text>
+                <text class="text1">{{info.grouping_name||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">比赛项目:</text>
+                <text class="text1">{{info.project_name||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">赛事场地:</text>
+                <text class="text1">{{info.ground_name||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">选手1:</text>
+                <text class="text1">{{info.player_one_name||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">选手2:</text>
+                <text class="text1">{{info.player_two_name||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">裁判名称:</text>
+                <text class="text1">{{info.referee_name||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">选手1的比分纪录:</text>
+                <text class="text1">{{info.score_one||0}}分</text>
+            </view>
+            <view class="one_1">
+                <text class="text">选手2的比分纪录:</text>
+                <text class="text1">{{info.score_two||0}}分</text>
+            </view>
+            <view class="one_1">
+                <text class="text">小组名:</text>
+                <text class="text1">{{info.team_name||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">胜者:</text>
+                <text class="text1">{{info.winner||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">比赛时间:</text>
+                <text class="text1">{{info.match_time||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">比赛状态:</text>
+                <text class="text1">{{info.status=='0'?'已安排':info.status=='1'?'待开赛':info.status=='2'?'已开赛':info.status=='3'?'已结束':'暂无'}}</text>
+            </view>
+        </view>
+    </view>
+</e-dialog>

+ 21 - 0
pages/referee/group.wxss

@@ -63,3 +63,24 @@
 .main .two .scroll-view .list-scroll-view .list:last-child {
   border-bottom: none;
 }
+.dialog_one {
+  margin: 10px 0 0 0;
+}
+.dialog_one .one_1 {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  border: 1px solid #ccc;
+  border-radius: 5px;
+  margin: 0 0 10px 0;
+  padding: 10px;
+}
+.dialog_one .one_1 .text {
+  width: 40vw;
+  color: #666;
+  font-size: 15px;
+}
+.dialog_one .one_1 .text1 {
+  font-size: 15px;
+  color: #000;
+}