<template>
  <div>
    <MenuTitle title="任务信息" subtitle="Task Information" />
    <div class="backStyle" v-if="route.query.jump === 'yes'" @click="goToTaskInformation" />
    <div class="m-t-8" />
    <div>
      <taskCard :spiderType="spiderType" failTask="10" unusualTask="1" />
    </div>
  </div>
</template>

<script setup lang="ts">
import { ref } from "vue";
import taskCard from "./components/taskCard.vue";
import { useRouter } from "vue-router";
import { useRoute } from "vue-router";
import MenuTitle from "@/components/MenuTitle.vue";

const route = useRoute();
const router = useRouter();
const spiderType = ref<any>(route.query.spiderType);

const goToTaskInformation = () => {
  if (route.query.page === "spiderManager") {
    router.push({ path: "/osSpiderManager/list" });
  } else {
    router.push({ path: "/osStatus/list" });
  }
};
</script>

<style scoped>
.title {
  text-align: left;
  font-size: 18px;
  font-weight: 500;
  color: white;
}

.low-titme {
  color: #ccc;
  text-align: left;
  margin-left: 20px;
}
.divider {
  margin-top: 15px;
}
/* 返回样式 */
.backStyle {
  background-image: url("@/assets/picture/back.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  height: 7vh;
  width: 7%;
  display: flex;
  margin-left: 0.8%;
}

/* 卡片样式 */
.cardStyle {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  margin-top: 1.5%;
  padding: 8px;
  height: 26vh;
}

/* 文本样式 */
.el-text {
  color: #ffffff;
}

/* 工具栏样式 */
.toolbarStyle {
  background-image: url("@/assets/picture/box3.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

/* 表单样式 */
.formStyle {
  display: flex;
  justify-content: space-around;
  margin-top: 0.5%;
  padding: 2px;
}
</style>

<style>
/* 修改el选择器的样式 */
.el-select__wrapper {
  background-color: #1d5484;
  box-shadow: none;
}

/* 删除el选择器选中时的边框 */
.is-hovering {
  box-shadow: none !important;
}

/* 修改el输入框的样式 */
.el-input__wrapper {
  background-color: #1d5484;
  box-shadow: none;
}

/* 修改el下拉框的背景颜色 */
.el-select-dropdown {
  background-color: #1d5484;
}

/* 修改el下拉框选项的字体颜色 */
.el-select-dropdown__item {
  color: #ffffff;
}

/* 修改el下拉框选项选中时的文字颜色 */
.el-select-dropdown__item:hover {
  color: #409eff;
}

/* 去除按钮边框 */
.el-button:focus {
  outline: none;
}
</style>
