<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport"
          content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <link rel="stylesheet" href="${ctx}/css/basic.css">
    <title>一次接线图</title>
    <style>

    </style>
</head>
<body>
    <div style="height: 100%;width: 100%">
        <embed id="svg" scrolling="no" frameborder="0" type="image/svg+xml"></embed>
    </div>
<input type="hidden" id="svgName" value="${svgName}">
<script src="${ctx}/js/plugin/jquery.min.js"></script>
<script>
    $(function () {
        let svgName = $('#svgName').val()
        if (svgName === '奥运村工程.svg'){
            $('#svg').prop('src','/pqs9200/images/svg/aycgc.svg');
        }
        else if (svgName === '奥林匹克公园1.svg') {
            $('#svg').prop('src','/pqs9200/images/svg/alpkgy1.svg');
        }
        else if (svgName === '奥林匹克公园2.svg') {
            $('#svg').prop('src','/pqs9200/images/svg/alpkgy2.svg');
        }
        else if (svgName === '奥林匹克公园3.svg') {
            $('#svg').prop('src','/pqs9200/images/svg/alpkgy3.svg');
        }
        else if (svgName === '云顶滑雪公园.svg') {
            $('#svg').prop('src','/pqs9200/images/svg/ydhxgy.svg');
        }

    })
</script>
</body>
</html>