zs 1 年之前
父节点
当前提交
ccc8f1a1c6
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      src/views/match/course/index.vue

+ 6 - 1
src/views/match/course/index.vue

@@ -26,7 +26,10 @@
         <el-col :span="24" class="dialog_one" v-if="dialog.type == '1'">
           <cForm :span="24" :fields="formFields" :form="form" :rules="{}" @save="toSave" @dataChange="dataChange" label-width="auto">
             <template #winner>
-              <el-option v-for="i in winnerList" :key="i._id" :label="i.name" :value="i._id"></el-option>
+              <el-option v-for="item in winnerList" :key="item._id" :label="item.name" :value="item._id">
+                <span style="float: left">{{ item.name }}</span>
+                <span style="float: right; color: #8492a6; font-size: 13px">{{ item.color }}</span>
+              </el-option>
             </template>
             <template #status>
               <el-option v-for="i in statusList" :key="i.value" :label="i.label" :value="i.value"></el-option>
@@ -143,6 +146,8 @@ const toStatus = async (data) => {
     const red: any = await teamAxios.fetch(red_team_id);
     const blue: any = await teamAxios.fetch(blue_team_id);
     let list = [];
+    red.data.color = '红方';
+    blue.data.color = '蓝方';
     list.push(red.data);
     list.push(blue.data);
     winnerList.value = list;