步骤1:在原有代码基础上增加完整的html标签,包含:<html><head><body>
等以及pc_index.jsp页面中的js和css。
步骤2:将原有javascript中这种写法$(function(){});
的代码改成 !function($) {}(jQuery);
写法。
代码调整模板:
(1)将下面代码复制到程序中,然后搜索并找到【包裹页面代码】位置,将原有页面代码复制到此处。
PS:如果原有页面存在布局代码(class=“easyui-layout”),则可直接用原有代码替换模板中的布局代码。
(2)在模板代码中搜索【嵌入原有JS脚本代码】,然后将原有页面中javascript代码$(function(){});
中的代码内容复制到此处。
(3)打开智能管控访问调整的页面,如果展示正常,再通过外系统进行访问,检查页面展示、功能是否正常。
<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/base.jsp" %>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<!-- 项目图标 ,默认更改WebRoot下的favicon.ico即可,也可以修改static/images/favicon.ico,此配置可选-->
<link type="image/x-icon" rel="shortcut icon" href="${basePath}static/images/favicon.ico"/>
<link rel="stylesheet" type="text/css" href="${basePath}static/ywzngk32/fonts/iconfont.css"/>
<link rel="stylesheet" type="text/css" href="${basePath}static/plug-in/jquery-easyui/1.3.2/themes/bootstrap/easyui.css">
<!-- 20171009 ----- 套用css,使用easyui原有的icon优先覆盖扩展的 -->
<link rel="stylesheet" type="text/css" href="${basePath}static/y/css/icon.css">
<!-- 20171009 ----- 套用css -->
<link rel="stylesheet" type="text/css" href="${basePath}static/plug-in/jquery-easyui/1.3.2/themes/icon.css">
<link rel="stylesheet" type="text/css" href="${basePath}static/plug-in/ztree/zTreeStyle/zTreeStyle.css">
<!-- 20171009 ----- 套用css -->
<link type="text/css" rel="stylesheet" href="${basePath}static/y/fontsawesome/css/font-awesome.css"/>
<link type="text/css" rel="stylesheet" href="${basePath}static/y/css/datepicker.css"/>
<link type="text/css" rel="stylesheet" href="${basePath}static/y/css/style.css"/>
<link type="text/css" rel="stylesheet" href="${basePath}static/J/new.css"/>
<link type="text/css" rel="stylesheet" href="${basePath}static/J/lStyle.css"/>
<link type="text/css" rel="stylesheet" href="${basePath}static/plug-in/rsframework/rs-style.css"/>
<script type="text/javascript" src="${basePath}static/libs/jquery/min/jquery.min.js"></script>
<script type="text/javascript" src="${basePath}static/plug-in/rsframework/global.js"></script>
<script type="text/javascript" src="${basePath}static/libs/jquery/extends/common.js"></script>
<script type="text/javascript" src="${basePath}static/mobilePage/commonjs/shuiyin_web.js"></script>
<script type="text/javascript" src="${basePath}static/plug-in/jquery-easyui/1.3.2/jquery.easyui.min.js"></script>
<script type="text/javascript" src="${basePath}static/plug-in/jquery-easyui/1.3.2/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="${basePath}static/plug-in/jquery-easyui/1.3.2/extends/jeasyui.extends.min.js"></script>
<script type="text/javascript" src="${basePath}static/plug-in/jeasyui-extensions/release/jquery.jdirk.min.js"></script>
<script type="text/javascript" src="${basePath}static/plug-in/jeasyui-extensions/jeasyui-extensions/jquery.portal.js"></script>
<script type="text/javascript" src="${basePath}static/plug-in/ztree/jquery.ztree.all-3.5.min.js"></script>
<script type="text/javascript" src="${basePath}static/plug-in/datePicker/WdatePicker.js"></script>
<!-- 兼容IE8加载脚本文件过大时,导致某部分图标样式失效的问题 -->
<link rel="stylesheet" type="text/css" href="${basePath}static/css/easyui-icon-base.css">
<link rel="stylesheet" type="text/css" href="${basePath}static/css/ztree-icon-base-1.css">
<link rel="stylesheet" type="text/css" href="${basePath}static/css/ztree-icon-base-2.css">
<link rel="stylesheet" type="text/css" href="${basePath}static/css/common.css">
<link rel="stylesheet" type="text/css" href="${basePath}static/css/global.css">
<link rel="stylesheet" type="text/css" href="${basePath}static/css/ztree-icon-extends.css">
<link rel="stylesheet" type="text/css" href="${basePath}static/css/easyui-icon-extends.css">
<script type="text/javascript" src="${basePath}static/plug-in/other/json2.min.js"></script>
<script type="text/javascript" src="${basePath}static/plug-in/jsMD5/20120227/md5.js"></script>
<script type="text/javascript" src="${basePath}static/y/js/tipSuppliers.js"></script>
<script type="text/javascript" src="${basePath}static/plug-in/rsframework/frag.js"></script>
<script type="text/javascript" src="${basePath}static/plug-in/rsframework/initial.js"></script>
<script type="text/javascript" src="${basePath}static/plug-in/echarts-2.2.7/build/dist/echarts-all.js"></script>
<script type="text/javascript" src="${basePath}static/plug-in/other/jquery.hz2py.min.js"></script>
<script type="text/javascript" src="${basePath}static/plug-in/ajaxfileupload/ajaxfileupload.js"></script>
<script type="text/javascript" src="${basePath}static/plug-in/ajaxfileupload/jquery.ajaxfileupload.js"></script>
<script type="text/javascript" src="${basePath}static/plug-in/blockUI/jquery.blockUI.js"></script>
<!--引在所有样式表的最后-->
<link type="text/css" rel="stylesheet" href="${basePath}static/J/wqstyle.css"/>
</head>
<body>
<div class="easyui-layout" data-options="fit:true,border:false">
<div data-options="region:'center',border:false" style="background: #f6f6f6;">
<!-- 包裹页面代码 -->
<!-- 将原有列表工具栏代码复制到此处 -->
</div>
</div>
<script type="text/javascript">
!function($) {
// 嵌入原有JS脚本代码
// 原有javascript代码复制到此处
}(jQuery);
</script>
</body>
</html>