zs 3 달 전
부모
커밋
10e2222027
2개의 변경된 파일56개의 추가작업 그리고 3개의 파일을 삭제
  1. 16 1
      src/views/home/index.vue
  2. 40 2
      src/views/match/thr.vue

+ 16 - 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" @step5Order="step5Order" @toMessage="toMessage" @toStep6="toStep6" @toPerson="toPerson" @toStep7="toStep7" @toStep8="toStep8" @step7Score="step7Score" @totalScore="totalScore"></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" @step7Score="step7Score" @totalScore="totalScore" @LastOrder="LastOrder"></thr>
         </div>
       </div>
     </div>
@@ -340,6 +340,21 @@ const toStep8 = () => {
     })
     .catch(() => {})
 }
+// 最终排名
+const LastOrder = (data) => {
+  ElMessageBox.confirm('是否确定修改最后的名次?', '最终排名', {
+    confirmButtonText: '确认',
+    cancelButtonText: '取消',
+    type: 'warning'
+  })
+    .then(async () => {
+      const res = await matchRegStore.update(data)
+      if ($checkRes(res, true)) {
+        search()
+      }
+    })
+    .catch(() => {})
+}
 provide('extList', extList)
 provide('isUseList', isUseList)
 </script>

+ 40 - 2
src/views/match/thr.vue

@@ -44,12 +44,14 @@
           </template>
         </el-table-column>
         <el-table-column prop="final_order_no" align="center" label="排序"> </el-table-column>
+        <el-table-column prop="last_order_no" align="center" label="最后名称"> </el-table-column>
         <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)" style="margin-right: 10px">排序</el-link>
             <el-link :underline="false" v-if="info.ext_status == '7'" type="primary" size="mini" @click="toScore(row)" style="margin-right: 10px">上传决赛分数</el-link>
-            <el-link :underline="false" v-if="info.ext_status == '7'" type="primary" size="mini" @click="toTotalScore(row)">总分</el-link>
+            <el-link :underline="false" v-if="info.ext_status == '7'" type="primary" size="mini" @click="toTotalScore(row)" style="margin-right: 10px">总分</el-link>
+            <el-link :underline="false" v-if="info.ext_status == '8'" type="primary" size="mini" @click="toOrder(row)">修改最终排名</el-link>
           </template>
         </el-table-column>
       </el-table>
@@ -153,6 +155,16 @@
           </div>
         </el-form>
       </div>
+      <div v-else-if="dialog.type == '6'">
+        <el-form ref="lastFormRef" :model="lastForm" :rules="lastRules" label-width="auto" class="form" label-position="left">
+          <el-form-item label="最终排名" prop="last_order_no">
+            <el-input v-model="lastForm.last_order_no" type="number" placeholder="请输入最终排名" />
+          </el-form-item>
+          <div style="text-align: center">
+            <el-button type="primary" @click="onLSubmit(lastFormRef)">保存</el-button>
+          </div>
+        </el-form>
+      </div>
     </el-dialog>
     <el-dialog v-model="dialogVisible" title="分数信息填写" width="800" :destroy-on-close="false" @close="toSclose">
       <el-form ref="scoreFormRef" :model="scoreForm" :rules="scoreRules" label-width="auto" class="form" label-position="left">
@@ -254,13 +266,20 @@ const orderRules = reactive({
   order_no: [{ required: true, message: '请输入顺序', trigger: 'blur' }]
 })
 
+// 顺序
+const lastForm = ref({})
+// 表单
+const lastFormRef = ref()
+const lastRules = reactive({
+  last_order_no: [{ required: true, message: '请输入最终排名', trigger: 'blur' }]
+})
 // 补充人员列表
 const supplementList = ref([])
 
 // 分数设置
 const detailsList = ref([])
 
-const emits = defineEmits(['step5Time', 'toExport', 'toMessage', 'toStep6', 'toPerson', 'toStep7', 'toStep8', 'step7Score', 'totalScore'])
+const emits = defineEmits(['step5Time', 'toExport', 'toMessage', 'toStep6', 'toPerson', 'toStep7', 'toStep8', 'step7Score', 'totalScore', 'LastOrder'])
 
 const search = async (query = { skip, limit }) => {
   skip = query.skip
@@ -352,6 +371,11 @@ const toScore = (data) => {
   if (match.value.ext_finals && match.value.ext_finals.length > 0) scoreForm.value.details = cloneDeep(match.value.ext_finals)
   dialog.value = { type: '2', show: true, title: '上传决赛分数' }
 }
+// 修改最终排名
+const toOrder = (data) => {
+  lastForm.value = data
+  dialog.value = { type: '6', show: true, title: '修改最终排名' }
+}
 // 保存决赛分数
 const onSubmit = async (formEl) => {
   if (!formEl) return
@@ -385,6 +409,20 @@ const onTSubmit = async (formEl) => {
     }
   })
 }
+// 最终排名
+const onLSubmit = async (formEl) => {
+  if (!formEl) return
+  await formEl.validate((valid, fields) => {
+    if (valid) {
+      const data = cloneDeep(lastForm.value)
+      emits('LastOrder', { id: lastForm.value.id, last_order_no: data.last_order_no })
+      toClose()
+    } else {
+      console.log('error submit!', fields)
+    }
+  })
+}
+
 // 分页
 const changePage = (page = currentPage.value) => {
   search({ skip: (page - 1) * limit, limit: limit })