<template>
  <div class="shop_list_cont">
    <el-container>
      <el-aside width="176px">
        <service-shop-menu></service-shop-menu>
      </el-aside>
      <el-main class="main_init">
        <service-list
          :filterNames="filterNames"
          :name="name"
          :url="url"
          :urlFilter="urlFilter"
        ></service-list>
      </el-main>
    </el-container>
  </div>
</template>

<script>
import ServiceShopMenu from "@/components/service-list/service_shop_menu-new";
import ServiceList from "@/components/service-list/service_list-new";
import BlockRadius from "@/components/general/block-radius";
export default {
  components: {
    ServiceShopMenu,
    ServiceList,
    BlockRadius,
  },
  data: () => ({
    urlFilter: "",
    url: "",
    name: "",
    filterNames: [],
  }),
  mounted() {
    this.getVal(this.$route.path);
  },
  methods: {
    getVal(val) {
      let uri = val.substring(6);
      uri = uri.substring(0, uri.indexOf("/"));
      switch (uri) {
        case "data_service_list":
          this.name = "数据服务";
          this.urlFilter = "5";
          this.url = "/shop/sjfwDetail";
          this.filterNames = ["数据服务类型", "服务领域", "数据来源机构"];
          break;
        case "space_time_service_list":
          this.name = "时空服务";
          this.urlFilter = "6";
          this.url = "/shop/skfwDetail";
          this.filterNames = ["时空服务类型", "服务领域", "服务来源组织"];
          break;
        case "video_service_list":
          this.name = "视频服务";
          this.urlFilter = "7";
          this.url = "/shop/spfwDetail";
          this.filterNames = ["", "服务领域", "服务来源组织"];
          break;
        case "perception_service_list":
          this.name = "感知服务";
          this.urlFilter = "10";
          this.url = "/shop/gzfwDetail";
          this.filterNames = ["", "服务领域", "服务来源组织"];
          break;
        case "comprehensive_app_list":
          this.name = "融合服务";
          this.urlFilter = "21";
          this.url = "/shop/zhfwDetail";
          this.filterNames = ["服务类型", "服务领域", "服务来源组织"];
          break;
        case "app_store_list":
          this.name = "应用商店";
          this.urlFilter = "app";
          this.url = "/shop/yysdDetail";
          this.filterNames = ["应用类型", "应用领域", "应用来源机构"];
          break;
        case "products_list":
          this.name = "产品资源";
          this.urlFilter = "36";
          this.url = "/shop/cpDetail";
          this.filterNames = ["产品类型", "产品领域", "产品来源组织"];
          break;
        default:
          this.name = "";
          this.urlFilter = "";
          this.url = "";
          this.filterNames = [];
          break;
      }
    },
  },
  watch: {
    "$route.path": {
      handler(val) {
        this.getVal(val);
      },
    },
  },
};
</script>
<style lang="less" scoped>
.default {
  height: calc(100vh - 180px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  .default_img {
    width: 1282px;
    height: 629px;
    .default_title {
      color: #264dd9;
      font-size: 44px;
      font-weight: bold;
      margin-bottom: 30px;
    }
    .default_msg {
      color: #58617a;
      font-size: 24px;
      line-height: 44px;
    }
  }
}
</style>
<style scoped>
.default_img {
  background: url("~@/assets/imgs/img_default_quesheng.png") no-repeat center
    center;
}
.shop_list_cont {
  width: 1200px;
  margin: 0 auto;
  position: relative;
}
.main_init {
  padding: 16px 0 16px 16px;
}
</style>