Sfoglia il codice sorgente

小组赛 淘汰赛

zs 2 anni fa
parent
commit
bfc2d63553

+ 8 - 6
pagesMatch/refereeAdmin/mtschedule/list.js

@@ -5,6 +5,8 @@ Page({
         frameStyle: { useTop: true, name: '小组赛管理', leftArrow: true, useBar: false },
         frameStyle: { useTop: true, name: '小组赛管理', leftArrow: true, useBar: false },
         dialog: { title: '赛程上分', show: false, type: '1' },
         dialog: { title: '赛程上分', show: false, type: '1' },
         form: {},
         form: {},
+        //查询
+        searchInfo: {},
         // 赛事列表
         // 赛事列表
         matchList: [],
         matchList: [],
         // 组别列表
         // 组别列表
@@ -50,7 +52,7 @@ Page({
         const that = this;
         const that = this;
         let data = that.data.matchList[e.detail.value];
         let data = that.data.matchList[e.detail.value];
         if (data) {
         if (data) {
-            that.setData({ 'form.match_id': data._id, 'form.match_name': data.name, });
+            that.setData({ 'searchInfo.match_id': data._id, 'searchInfo.match_name': data.name, });
             const group = await app.$get(`/matchGroup`, { match_id: data._id }, 'race');
             const group = await app.$get(`/matchGroup`, { match_id: data._id }, 'race');
             if (group.errcode == '0') that.setData({ groupList: group.data });
             if (group.errcode == '0') that.setData({ groupList: group.data });
         }
         }
@@ -60,7 +62,7 @@ Page({
         const that = this;
         const that = this;
         let data = that.data.groupList[e.detail.value];
         let data = that.data.groupList[e.detail.value];
         if (data) {
         if (data) {
-            that.setData({ 'form.group_id': data._id, 'form.group_name': data.name });
+            that.setData({ 'searchInfo.group_id': data._id, 'searchInfo.group_name': data.name });
             const arr = await app.$get(`/matchProject`, { match_id: data.match_id, group_id: data._id }, 'race');
             const arr = await app.$get(`/matchProject`, { match_id: data.match_id, group_id: data._id }, 'race');
             if (arr.errcode == '0') { that.setData({ projectList: arr.data }) }
             if (arr.errcode == '0') { that.setData({ projectList: arr.data }) }
         }
         }
@@ -70,7 +72,7 @@ Page({
         const that = this;
         const that = this;
         let data = that.data.projectList[e.detail.value];
         let data = that.data.projectList[e.detail.value];
         if (data) {
         if (data) {
-            that.setData({ 'form.project_id': data._id, 'form.project_name': data.name });
+            that.setData({ 'searchInfo.project_id': data._id, 'searchInfo.project_name': data.name });
         }
         }
     },
     },
     toSubmit: function (e) {
     toSubmit: function (e) {
@@ -168,14 +170,14 @@ Page({
     // 监听用户是否登录
     // 监听用户是否登录
     watchLogin: async function () {
     watchLogin: async function () {
         const that = this;
         const that = this;
-        let form = that.data.form;
+        let searchInfo = that.data.searchInfo;
         wx.getStorage({
         wx.getStorage({
             key: 'raceuser',
             key: 'raceuser',
             success: async res => {
             success: async res => {
                 let match = await app.$get(`/match`, {}, 'race');
                 let match = await app.$get(`/match`, {}, 'race');
                 if (match.errcode == '0') { that.setData({ matchList: match.data }) }
                 if (match.errcode == '0') { that.setData({ matchList: match.data }) }
-                if (form.group_id && form.match_id && form.project_id) {
-                    let info = { skip: that.data.skip, limit: that.data.limit, referee_id: res.data._id, group_id: form.group_id, match_id: form.match_id, project_id: form.project_id }
+                if (searchInfo.group_id && searchInfo.match_id && searchInfo.project_id) {
+                    let info = { skip: that.data.skip, limit: that.data.limit, referee_id: res.data._id, group_id: searchInfo.group_id, match_id: searchInfo.match_id, project_id: searchInfo.project_id }
                     let arr = await app.$get(`/msgs`, { ...info }, 'race');
                     let arr = await app.$get(`/msgs`, { ...info }, 'race');
                     if (arr.errcode == '0') {
                     if (arr.errcode == '0') {
                         let list = [...that.data.list, ...arr.data]
                         let list = [...that.data.list, ...arr.data]

+ 6 - 6
pagesMatch/refereeAdmin/mtschedule/list.wxml

@@ -92,24 +92,24 @@
                 <view class="content">
                 <view class="content">
                     <view class="label">赛事名称:</view>
                     <view class="label">赛事名称:</view>
                     <view class="value">
                     <view class="value">
-                        <picker bindchange="matchChange" name="match_id" value="{{form.match_id}}" range-key='name' range="{{matchList}}">
-                            <view class="picker">{{form.match_name||'请选择赛事'}}</view>
+                        <picker bindchange="matchChange" name="match_id" value="{{searchInfo.match_id}}" range-key='name' range="{{matchList}}">
+                            <view class="picker">{{searchInfo.match_name||'请选择赛事'}}</view>
                         </picker>
                         </picker>
                     </view>
                     </view>
                 </view>
                 </view>
                 <view class="content">
                 <view class="content">
                     <view class="label">赛事分组:</view>
                     <view class="label">赛事分组:</view>
                     <view class="value">
                     <view class="value">
-                        <picker mode="selector" bindchange="groupChange" name="group_id" value="{{form.group_id}}" range="{{groupList}}" range-key="name">
-                            <view class="picker">{{form.group_name||'请选择赛事分组'}}</view>
+                        <picker mode="selector" bindchange="groupChange" name="group_id" value="{{searchInfo.group_id}}" range="{{groupList}}" range-key="name">
+                            <view class="picker">{{searchInfo.group_name||'请选择赛事分组'}}</view>
                         </picker>
                         </picker>
                     </view>
                     </view>
                 </view>
                 </view>
                 <view class="content">
                 <view class="content">
                     <view class="label">项目名称:</view>
                     <view class="label">项目名称:</view>
                     <view class="value">
                     <view class="value">
-                        <picker mode="selector" bindchange="projectChange" name="project_id" value="{{form.project_id}}" range="{{projectList}}" range-key="name">
-                            <view class="picker">{{form.project_name||'请选择项目名称'}}</view>
+                        <picker mode="selector" bindchange="projectChange" name="project_id" value="{{searchInfo.project_id}}" range="{{projectList}}" range-key="name">
+                            <view class="picker">{{searchInfo.project_name||'请选择项目名称'}}</view>
                         </picker>
                         </picker>
                     </view>
                     </view>
                 </view>
                 </view>

+ 9 - 7
pagesMatch/refereeAdmin/outschedule/list.js

@@ -5,6 +5,8 @@ Page({
         frameStyle: { useTop: true, name: '淘汰赛管理', leftArrow: true, useBar: false },
         frameStyle: { useTop: true, name: '淘汰赛管理', leftArrow: true, useBar: false },
         dialog: { title: '赛程上分', show: false, type: '1' },
         dialog: { title: '赛程上分', show: false, type: '1' },
         form: {},
         form: {},
+        //查询
+        searchInfo: {},
         // 赛事列表
         // 赛事列表
         matchList: [],
         matchList: [],
         // 组别列表
         // 组别列表
@@ -50,7 +52,7 @@ Page({
         const that = this;
         const that = this;
         let data = that.data.matchList[e.detail.value];
         let data = that.data.matchList[e.detail.value];
         if (data) {
         if (data) {
-            that.setData({ 'form.match_id': data._id, 'form.match_name': data.name, });
+            that.setData({ 'searchInfo.match_id': data._id, 'searchInfo.match_name': data.name, });
             const group = await app.$get(`/matchGroup`, { match_id: data._id }, 'race');
             const group = await app.$get(`/matchGroup`, { match_id: data._id }, 'race');
             if (group.errcode == '0') that.setData({ groupList: group.data });
             if (group.errcode == '0') that.setData({ groupList: group.data });
         }
         }
@@ -60,7 +62,7 @@ Page({
         const that = this;
         const that = this;
         let data = that.data.groupList[e.detail.value];
         let data = that.data.groupList[e.detail.value];
         if (data) {
         if (data) {
-            that.setData({ 'form.group_id': data._id, 'form.group_name': data.name });
+            that.setData({ 'searchInfo.group_id': data._id, 'searchInfo.group_name': data.name });
             const arr = await app.$get(`/matchProject`, { match_id: data.match_id, group_id: data._id }, 'race');
             const arr = await app.$get(`/matchProject`, { match_id: data.match_id, group_id: data._id }, 'race');
             if (arr.errcode == '0') { that.setData({ projectList: arr.data }) }
             if (arr.errcode == '0') { that.setData({ projectList: arr.data }) }
         }
         }
@@ -70,7 +72,7 @@ Page({
         const that = this;
         const that = this;
         let data = that.data.projectList[e.detail.value];
         let data = that.data.projectList[e.detail.value];
         if (data) {
         if (data) {
-            that.setData({ 'form.project_id': data._id, 'form.project_name': data.name });
+            that.setData({ 'searchInfo.project_id': data._id, 'searchInfo.project_name': data.name });
         }
         }
     },
     },
     toSubmit: function (e) {
     toSubmit: function (e) {
@@ -168,15 +170,15 @@ Page({
     // 监听用户是否登录
     // 监听用户是否登录
     watchLogin: async function () {
     watchLogin: async function () {
         const that = this;
         const that = this;
-        let form = that.data.form;
+        let searchInfo = that.data.searchInfo;
         wx.getStorage({
         wx.getStorage({
             key: 'raceuser',
             key: 'raceuser',
             success: async res => {
             success: async res => {
                 let match = await app.$get(`/match`, {}, 'race');
                 let match = await app.$get(`/match`, {}, 'race');
                 if (match.errcode == '0') { that.setData({ matchList: match.data }) }
                 if (match.errcode == '0') { that.setData({ matchList: match.data }) }
-                if (form.group_id && form.match_id && form.project_id) {
-                    let info = { skip: that.data.skip, limit: that.data.limit, referee_id: res.data._id, group_id: form.group_id, match_id: form.match_id, project_id: form.project_id }
-                    let arr = await app.$get(`/eliminate`, { ...info }, 'race');
+                if (searchInfo.group_id && searchInfo.match_id && searchInfo.project_id) {
+                    let info = { skip: that.data.skip, limit: that.data.limit, referee_id: res.data._id, group_id: searchInfo.group_id, match_id: searchInfo.match_id, project_id: searchInfo.project_id }
+                    let arr = await app.$get(`/msgs`, { ...info }, 'race');
                     if (arr.errcode == '0') {
                     if (arr.errcode == '0') {
                         let list = [...that.data.list, ...arr.data]
                         let list = [...that.data.list, ...arr.data]
                         for (const val of list) {
                         for (const val of list) {

+ 6 - 6
pagesMatch/refereeAdmin/outschedule/list.wxml

@@ -93,24 +93,24 @@
                 <view class="content">
                 <view class="content">
                     <view class="label">赛事名称:</view>
                     <view class="label">赛事名称:</view>
                     <view class="value">
                     <view class="value">
-                        <picker bindchange="matchChange" name="match_id" value="{{form.match_id}}" range-key='name' range="{{matchList}}">
-                            <view class="picker">{{form.match_name||'请选择赛事'}}</view>
+                        <picker bindchange="matchChange" name="match_id" value="{{searchInfo.match_id}}" range-key='name' range="{{matchList}}">
+                            <view class="picker">{{searchInfo.match_name||'请选择赛事'}}</view>
                         </picker>
                         </picker>
                     </view>
                     </view>
                 </view>
                 </view>
                 <view class="content">
                 <view class="content">
                     <view class="label">赛事分组:</view>
                     <view class="label">赛事分组:</view>
                     <view class="value">
                     <view class="value">
-                        <picker mode="selector" bindchange="groupChange" name="group_id" value="{{form.group_id}}" range="{{groupList}}" range-key="name">
-                            <view class="picker">{{form.group_name||'请选择赛事分组'}}</view>
+                        <picker mode="selector" bindchange="groupChange" name="group_id" value="{{searchInfo.group_id}}" range="{{groupList}}" range-key="name">
+                            <view class="picker">{{searchInfo.group_name||'请选择赛事分组'}}</view>
                         </picker>
                         </picker>
                     </view>
                     </view>
                 </view>
                 </view>
                 <view class="content">
                 <view class="content">
                     <view class="label">项目名称:</view>
                     <view class="label">项目名称:</view>
                     <view class="value">
                     <view class="value">
-                        <picker mode="selector" bindchange="projectChange" name="project_id" value="{{form.project_id}}" range="{{projectList}}" range-key="name">
-                            <view class="picker">{{form.project_name||'请选择项目名称'}}</view>
+                        <picker mode="selector" bindchange="projectChange" name="project_id" value="{{searchInfo.project_id}}" range="{{projectList}}" range-key="name">
+                            <view class="picker">{{searchInfo.project_name||'请选择项目名称'}}</view>
                         </picker>
                         </picker>
                     </view>
                     </view>
                 </view>
                 </view>