|
@@ -49,74 +49,11 @@
|
|
@click="() => selectFlag(i, item[5])"
|
|
@click="() => selectFlag(i, item[5])"
|
|
></text>
|
|
></text>
|
|
</svg>
|
|
</svg>
|
|
- <!-- <div class="row">
|
|
|
|
- <div class="col" v-for="i in 8" :key="i">
|
|
|
|
- <img
|
|
|
|
- :style="'width:' + fontSize + 'px'"
|
|
|
|
- :src="require('../../../assets/img/china.png')"
|
|
|
|
- />
|
|
|
|
- <p>中国</p>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div class="row">
|
|
|
|
- <div class="col" v-for="i in 4" :key="i">
|
|
|
|
- <img
|
|
|
|
- :style="'width:' + fontSize + 'px'"
|
|
|
|
- :src="require('../../../assets/img/china.png')"
|
|
|
|
- />
|
|
|
|
- <p>中国</p>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div class="row">
|
|
|
|
- <div class="col" v-for="i in 2" :key="i">
|
|
|
|
- <img
|
|
|
|
- :style="'width:' + fontSize + 'px'"
|
|
|
|
- :src="require('../../../assets/img/china.png')"
|
|
|
|
- />
|
|
|
|
- <p>中国</p>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div class="row">
|
|
|
|
- <div class="col">
|
|
|
|
- <img
|
|
|
|
- :style="'width:' + fontSize + 'px'"
|
|
|
|
- :src="require('../../../assets/img/china.png')"
|
|
|
|
- />
|
|
|
|
- <p>中国</p>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div class="row">
|
|
|
|
- <div class="col" v-for="i in 2" :key="i">
|
|
|
|
- <img
|
|
|
|
- :style="'width:' + fontSize + 'px'"
|
|
|
|
- :src="require('../../../assets/img/china.png')"
|
|
|
|
- />
|
|
|
|
- <p>中国</p>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div class="row">
|
|
|
|
- <div class="col" v-for="i in 4" :key="i">
|
|
|
|
- <img
|
|
|
|
- :style="'width:' + fontSize + 'px'"
|
|
|
|
- :src="require('../../../assets/img/china.png')"
|
|
|
|
- />
|
|
|
|
- <p>中国</p>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div class="row">
|
|
|
|
- <div class="col" v-for="i in 8" :key="i">
|
|
|
|
- <img
|
|
|
|
- :style="'width:' + fontSize + 'px'"
|
|
|
|
- :src="require('../../../assets/img/china.png')"
|
|
|
|
- />
|
|
|
|
- <p>中国</p>
|
|
|
|
- </div>
|
|
|
|
- </div> -->
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script setup>
|
|
<script setup>
|
|
-import { ref, reactive } from "vue";
|
|
|
|
|
|
+import { ref, reactive, inject } from "vue";
|
|
// import { onMounted, reactive } from "vue";
|
|
// import { onMounted, reactive } from "vue";
|
|
// import { isIpad, isIpod, isIphone } from "../../utils/isTerminal";
|
|
// import { isIpad, isIpod, isIphone } from "../../utils/isTerminal";
|
|
/**
|
|
/**
|
|
@@ -124,30 +61,28 @@ import { ref, reactive } from "vue";
|
|
* window.$originData.orginParames.parameters 固定参数值
|
|
* window.$originData.orginParames.parameters 固定参数值
|
|
* window.$originData.urlParames url参数
|
|
* window.$originData.urlParames url参数
|
|
*/
|
|
*/
|
|
-const availWidth =
|
|
|
|
- window.$originData.orginParames.availWidth > 1440
|
|
|
|
- ? 1440
|
|
|
|
- : window.$originData.orginParames.availWidth;
|
|
|
|
-const fontSize = ref(availWidth / 10);
|
|
|
|
|
|
+const fontSize = inject("fontSize"); // 接收父级传参
|
|
|
|
+const availWidth = inject("availWidth");
|
|
|
|
+const maxcol = inject("maxcol");
|
|
|
|
+const team = inject("team");
|
|
const width = ref(availWidth - 4);
|
|
const width = ref(availWidth - 4);
|
|
const flag = reactive([]);
|
|
const flag = reactive([]);
|
|
const line = reactive([]);
|
|
const line = reactive([]);
|
|
-const maxcol = [8, 4, 2, 1, 1, 1, 2, 4, 8];
|
|
|
|
const rowHeight = fontSize.value / 1.5 + 30;
|
|
const rowHeight = fontSize.value / 1.5 + 30;
|
|
const height = ref(rowHeight * maxcol.length + 25);
|
|
const height = ref(rowHeight * maxcol.length + 25);
|
|
let textSize = 12;
|
|
let textSize = 12;
|
|
let id = "";
|
|
let id = "";
|
|
|
|
+console.log(team);
|
|
for (let row = 0; row < maxcol.length; row++) {
|
|
for (let row = 0; row < maxcol.length; row++) {
|
|
let imgUrl = {
|
|
let imgUrl = {
|
|
isDefault: true,
|
|
isDefault: true,
|
|
selectId: undefined,
|
|
selectId: undefined,
|
|
file: undefined,
|
|
file: undefined,
|
|
|
|
+ ed: false,
|
|
};
|
|
};
|
|
let text = "?";
|
|
let text = "?";
|
|
if (row === 0 || row === maxcol.length - 1) {
|
|
if (row === 0 || row === maxcol.length - 1) {
|
|
imgUrl.isDefault = false;
|
|
imgUrl.isDefault = false;
|
|
- imgUrl.file = require("../../../assets/img/china.png");
|
|
|
|
- text = "中国" + row;
|
|
|
|
} else if (row == 4) {
|
|
} else if (row == 4) {
|
|
imgUrl.file = require("../../../assets/img/default_big.png");
|
|
imgUrl.file = require("../../../assets/img/default_big.png");
|
|
} else {
|
|
} else {
|
|
@@ -164,6 +99,14 @@ for (let row = 0; row < maxcol.length; row++) {
|
|
const x = colWidth * col + colWidth / 2;
|
|
const x = colWidth * col + colWidth / 2;
|
|
const textY = y + fSize / 1.5 + textSize;
|
|
const textY = y + fSize / 1.5 + textSize;
|
|
id = [row, col].join("-");
|
|
id = [row, col].join("-");
|
|
|
|
+ const teamItem = team[row][col] || {};
|
|
|
|
+ if (teamItem.team) text = teamItem.team;
|
|
|
|
+ if (teamItem.teamlogo) {
|
|
|
|
+ imgUrl.file = teamItem.teamlogo;
|
|
|
|
+ imgUrl.isDefault = false;
|
|
|
|
+ imgUrl.ed = !(row !== 3 || row !== 5);
|
|
|
|
+ } else if (!imgUrl.file)
|
|
|
|
+ imgUrl.file = require("../../../assets/img/china.png");
|
|
// 前两位 坐标, 第三位行数, 第四位 列数, 第五位 文本配置;
|
|
// 前两位 坐标, 第三位行数, 第四位 列数, 第五位 文本配置;
|
|
flag.push([
|
|
flag.push([
|
|
x - fSize / 2,
|
|
x - fSize / 2,
|
|
@@ -171,7 +114,7 @@ for (let row = 0; row < maxcol.length; row++) {
|
|
row,
|
|
row,
|
|
col,
|
|
col,
|
|
{
|
|
{
|
|
- text: text + col,
|
|
|
|
|
|
+ text: text,
|
|
x: colWidth * col + colWidth / 2 - (text.length * textSize) / 2,
|
|
x: colWidth * col + colWidth / 2 - (text.length * textSize) / 2,
|
|
y: textY + 1,
|
|
y: textY + 1,
|
|
fontSize: textSize,
|
|
fontSize: textSize,
|
|
@@ -228,7 +171,7 @@ function line3(x, textY, col, colWidth) {
|
|
|
|
|
|
function selectFlag(index) {
|
|
function selectFlag(index) {
|
|
const select = flag[index];
|
|
const select = flag[index];
|
|
- if (select[2] == 4 || select[6].isDefault) return;
|
|
|
|
|
|
+ if (select[2] == 4 || select[6].isDefault || select[6].ed) return;
|
|
// 更新选中划线
|
|
// 更新选中划线
|
|
const linkID = [
|
|
const linkID = [
|
|
select[2],
|
|
select[2],
|