zs 3 months ago
parent
commit
f16c1fe101
3 changed files with 57 additions and 1 deletions
  1. 6 0
      src/store/api/platform/matchExt.js
  2. 8 1
      src/views/home/index.vue
  3. 43 0
      src/views/match/thr.vue

+ 6 - 0
src/store/api/platform/matchExt.js

@@ -83,6 +83,11 @@ export const MatchExtStore = defineStore('matchExt', () => {
     const res = await axios.$post(`${url}/step5/supplement/${id}`, payload)
     return res
   }
+  const step5Order = async (payload) => {
+    const id = get(payload, 'match_id', get(payload, 'match_id'))
+    const res = await axios.$post(`${url}/step5/order/${id}`, payload)
+    return res
+  }
   const step6 = async (payload) => {
     const res = await axios.$post(`${url}/step6`, payload)
     return res
@@ -112,6 +117,7 @@ export const MatchExtStore = defineStore('matchExt', () => {
     step5Time,
     step5Sms,
     step5Sup,
+    step5Order,
     step6,
     step7,
     step8,

+ 8 - 1
src/views/home/index.vue

@@ -29,7 +29,7 @@
         <div class="content">
           <one v-if="info.ext_status == '0'" :info="info" @toExamtion="toExamtion" @toExport="toExport"></one>
           <two v-if="info.ext_status == '1' || info.ext_status == '2' || info.ext_status == '3' || info.ext_status == '4'" :info="info" @toStep2="toStep2" @stepFill="stepFill" @toStep3="toStep3" @toStep4="toStep4" @toExport="toExport" @step4Score="step4Score" @toStep5="toStep5" @toFinals="toFinals"></two>
-          <thr v-if="info.ext_status == '5' || info.ext_status == '6' || info.ext_status == '7' || info.ext_status == '8'" :info="info" @toExport="toExport" @step5Time="step5Time" @toMessage="toMessage" @toStep6="toStep6" @toPerson="toPerson" @toStep7="toStep7" @toStep8="toStep8"></thr>
+          <thr v-if="info.ext_status == '5' || info.ext_status == '6' || info.ext_status == '7' || info.ext_status == '8'" :info="info" @toExport="toExport" @step5Time="step5Time" @step5Order="step5Order" @toMessage="toMessage" @toStep6="toStep6" @toPerson="toPerson" @toStep7="toStep7" @toStep8="toStep8"></thr>
         </div>
       </div>
     </div>
@@ -259,6 +259,13 @@ const toMessage = () => {
     })
     .catch(() => {})
 }
+// 排序
+const step5Order = async (data) => {
+  const res = await matchExtStore.step5Order(data)
+  if ($checkRes(res, true)) {
+    search()
+  }
+}
 // 进入决赛名单公示阶段
 const toStep6 = () => {
   ElMessageBox.confirm('是否确定进入决赛名单公示阶段?', '赛事进行', {

+ 43 - 0
src/views/match/thr.vue

@@ -32,6 +32,7 @@
         <el-table-column prop="start_time" align="center" label="初审时间"> </el-table-column>
         <el-table-column prop="score" align="center" label="初审分数"> </el-table-column>
         <el-table-column prop="final_start_time" align="center" label="决赛时间"> </el-table-column>
+        <el-table-column prop="final_score" align="center" label="决赛分数"> </el-table-column>
         <el-table-column prop="ext_status" align="center" label="流程状态">
           <template #default="scope">
             {{ getDict(scope.row.ext_status, 'ext_status') || '暂无' }}
@@ -46,6 +47,7 @@
         <el-table-column align="center" label="操作" width="160">
           <template #default="{ row }">
             <el-link :underline="false" type="primary" size="mini" @click="toView(row, true)" style="margin-right: 10px">查看</el-link>
+            <el-link :underline="false" v-if="info.ext_status == '5' && row.final_confirm == '0'" type="primary" size="mini" @click="toLink(row)">排序</el-link>
             <el-link :underline="false" v-if="info.ext_status == '7'" type="primary" size="mini" @click="toScore(row)">上传决赛分数</el-link>
           </template>
         </el-table-column>
@@ -124,6 +126,16 @@
           </el-table-column>
         </el-table>
       </div>
+      <div v-else-if="dialog.type == '4'">
+        <el-form ref="orderFormRef" :model="orderForm" :rules="orderRules" label-width="auto" class="form" label-position="left">
+          <el-form-item label="顺序" prop="order_no">
+            <el-input v-model="orderForm.order_no" type="number" placeholder="请输入顺序" />
+          </el-form-item>
+          <div style="text-align: center">
+            <el-button type="primary" @click="onsubmitOrder(orderFormRef)">保存</el-button>
+          </div>
+        </el-form>
+      </div>
     </el-dialog>
   </div>
 </template>
@@ -178,6 +190,15 @@ const scoreFormRef = ref()
 const scoreRules = reactive({
   score: [{ required: true, message: '请输入初审分数', trigger: 'blur' }]
 })
+
+// 顺序
+const orderForm = ref({})
+// 表单
+const orderFormRef = ref()
+const orderRules = reactive({
+  order_no: [{ required: true, message: '请输入顺序', trigger: 'blur' }]
+})
+
 // 补充人员列表
 const supplementList = ref([])
 
@@ -228,6 +249,23 @@ const submitForm = async (formEl) => {
     }
   })
 }
+// 保存顺序
+const onsubmitOrder = async (formEl) => {
+  if (!formEl) return
+  await formEl.validate(async (valid, fields) => {
+    if (valid) {
+      const data = {
+        order_no: orderForm.value.order_no,
+        match_id: id.value,
+        id: orderForm.value.id
+      }
+      emits('step5Order', data)
+      toClose()
+    } else {
+      console.log('error submit!', fields)
+    }
+  })
+}
 // 审核
 const toView = (data, is_no) => {
   is_look.value = is_no
@@ -239,6 +277,11 @@ const toView = (data, is_no) => {
 const getUrl = (e) => {
   if (e) return `${import.meta.env.VITE_APP_HOST}${get(e, 'uri')}`
 }
+// 排序
+const toLink = (data) => {
+  orderForm.value = data
+  dialog.value = { type: '4', show: true, title: '排序' }
+}
 // 上传决赛分数
 const toScore = (data) => {
   scoreForm.value = data