add pulic floder

This commit is contained in:
brige 2025-03-10 07:23:50 +08:00
parent 1ec5cd41a7
commit 89b0ecd4cb
1274 changed files with 506333 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1 @@
PROJCS["China_Lambert_Conformal_Conic",GEOGCS["GCS_Beijing_1954",DATUM["D_Beijing_1954",SPHEROID["Krasovsky_1940",6378245.0,298.3]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",105.0],PARAMETER["Standard_Parallel_1",30.0],PARAMETER["Standard_Parallel_2",62.0],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]

Binary file not shown.

50754
public/Data/data.txt Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
回传设备组ID,回传设备ID,GPS类型,当前GPS的HZ数,UTC时间,UTC日,UTC月,UTC年,导航模式,DGPS,Fix,Gps Fix Valid,Spare,卫星数量,纬度GPS,经度GPS,高度GPS,速度东,速度北,速度上,帧标志,帧序号,故障字标志,硬复位故障,程序飞,记录器接收数据校验和不为零,EEPROM编程错误,采样定时错误,未用,HDLC通信错误,变量非法,接收记录器应答超时,模拟量板错误,同步器板或429板错误,采集器FIFO溢出,记录器响应错,记录器通讯错,记录器记录错,指示空速,升降速率,主油量,主油量补偿,副油量,副油量补偿,横滚角,无线电高度,升降舵角位移,法向加速度,电源电压,发动机超温节油,起落架手柄放下位置信号,无线电发话按钮按下,左主轮着地信号,直发断电信号,滑油压降告警,燃油切断告警,燃油泵故障,副翼角位移,气压高度,航向角,油门杆角位移,方向舵角位移,俯仰角,后舱座椅弹射,纵向加速度,应急系统压力,马赫数,可靠性电压,火警,侧向加速度,攻角,前舱座椅弹射,低压转子转速,高压转子转速,座舱盖未上锁,前起落架放下,主液压压力降,WS11起动按钮按下,DF22起动指示灯,DF22起动按钮按下,右起落架放下,左起落架放下,襟翼放下35度,涡轮后温度,大气总温,全机剩余油量Gt0,高程高度

View File

File diff suppressed because one or more lines are too long

152256
public/Data/test_data.json Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,3 @@
var dataInterfaceURL="http://139.159.228.85:8080/"
var ImgURL = "http://localhost:9876/mapdata/Img/"
var paramsType = 1 //1为测试参数传参状态 2为真实参数传参状态

168
public/config/config.json Normal file
View File

@ -0,0 +1,168 @@
{
"serverURL": "http://localhost:5237/mapdata",
"xj3d": {
"homeButton": false,
"sceneModePicker": false,
"navigationHelpButton": false,
"animation": false,
"timeline": false,
"infoBox": false,
"vrButton": false,
"fullscreenButton": false,
"geocoder": false,
"showRenderLoopErrors": false,
"center":{"y":11.862015,"x":100.491438,"z":14350334.7,"heading":0,"pitch":-89,"roll":0},
"minzoom": 1,
"maxzoom": 50000000,
"style": { "atmosphere": false, "lighting": false, "fog": false, "testTerrain": false },
"contextmenu":true,
"mouseZoom": false,
"location": {
"fps":true,
"format":"<div>经度:{x}</div> <div>纬度:{y}</div> <div>海拔:{z}米</div> <div>方向:{heading}度</div> <div>俯仰角:{pitch}度</div> <div>视高:{height}米</div>",
"crs":"degrese"
},
"navigation": {
"legend": { "left": "0px", "bottom": "-1px"},
"compass": { "bottom": "0px", "right": "0px","display": "none"}
},
"terrain": {
"url": "http://data.marsgis.cn/terrain",
"visible": true
},
"basemaps": [
{
"id": 10,
"name": "地图底图",
"type": "group"
},
{
"id": 10,
"name": "地图底图",
"type": "group"
},
{
"pid": 10,
"name": "谷歌卫星",
"icon": "img/basemaps/google_img.png",
"type": "www_google",
"crs": "wgs84",
"layer": "img_d",
"visible": false
},
{
"pid": 10,
"name": "ArcGIS卫星",
"icon": "img/basemaps/esriWorldImagery.png",
"type": "arcgis",
"url": "https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",
"enablePickFeatures": false
},
{
"pid": 10,
"name": "微软卫星",
"icon": "img/basemaps/bingAerial.png",
"type": "www_bing",
"layer": "Aerial"
},
{
"pid": 10,
"name": "天地图卫星",
"icon": "img/basemaps/tdt_img.png",
"type": "www_tdt",
"layer": "img_d",
"key": [
"313cd4b28ed520472e8b43de00b2de56",
"83b36ded6b43b9bc81fbf617c40b83b5",
"0ebd57f93a114d146a954da4ecae1e67",
"6c99c7793f41fccc4bd595b03711913e",
"56b81006f361f6406d0e940d2f89a39c"
],
"visible": true
},
{
"pid": 10,
"name": "天地图电子",
"icon": "img/basemaps/tdt_vec.png",
"type": "group",
"layers": [
{ "name": "底图", "type": "www_tdt", "layer": "vec_d", "key": ["313cd4b28ed520472e8b43de00b2de56" ] },
{ "name": "注记", "type": "www_tdt", "layer": "vec_z", "key": [ "83b36ded6b43b9bc81fbf617c40b83b5" ] }
]
},
{
"pid": 10,
"name": "OSM地图",
"type": "xyz",
"icon": "img/basemaps/osm.png",
"url": "http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
"subdomains": "abc"
},
{
"pid": 10,
"name": "离线地图",
"type": "group",
"icon": "img/basemaps/google_img.png",
"visible": false,
"layers": [
{
"name": "世界影像",
"type": "tms",
"url": "$serverURL$/worldimage/tiles/"
}
]
}
],
"operationallayers": [
{
"name": "行政区划界线",
"type": "xyz",
"url": "https://t{s}.tianditu.gov.cn/DataServer?T=ibo_w&x={x}&y={y}&l={z}&tk=56b81006f361f6406d0e940d2f89a39c",
"subdomains": "01234567",
"maximumLevel": 10,
"visible": true
},
{
"pid": 10,
"name": "天地图注记",
"type": "www_tdt",
"layer": "img_z",
"key": [
"313cd4b28ed520472e8b43de00b2de56",
"83b36ded6b43b9bc81fbf617c40b83b5",
"0ebd57f93a114d146a954da4ecae1e67",
"6c99c7793f41fccc4bd595b03711913e",
"56b81006f361f6406d0e940d2f89a39c"
],
"proxy": "http://data.marsgis.cn/proxy/",
"visible": false
},
{
"id": 60,
"name": "地形",
"type": "group"
},
{
"pid": 60,
"type": "terrain",
"name": "地形数据",
"terrain": {
"type": "default",
"url": "$serverURL$/terrain/terrain1"
},
"radio":false
},
{
"pid": 60,
"type": "terrain",
"name": "无地形",
"terrain": {
"type": "ellipsoid"
},
"radio":false
}
]
}
}

317
public/config/widget.json Normal file
View File

@ -0,0 +1,317 @@
{
"debugger": false,
"version": "20200510",
"defaultOptions": {
"style": "dark",
"windowOptions": {
"skin": "layer-mars-dialog animation-scale-up",
"position": {
"top": 50,
"right": 10
},
"maxmin": false,
"resize": true
},
"autoReset":false,
"autoDisable": true,
"disableOther": true
},
"widgetsAtStart": [
{
"name": "右上角工具栏",
"uri": "widgets/toolBarRight/widget.js",
"css":{
"top": "10px",
"left": "auto",
"right": "10px"
}
},
{
"name": "放大缩小工具按钮",
"uri": "widgets/toolbtn-zoom/widget.js"
},
{
"name": "poi查询",
"uri": "widgets/queryBaiduPOI/widget.js"
}
],
"widgets": [
{
"name": "模板",
"type": "group",
"children": [
{
"name": "iframe弹窗模板",
"uri": "widgets/_example/widget.js",
"windowOptions": {
"width": 300,
"height": 400,
"position": {
"bottom": 10,
"right": 10
},
"maxmin": true,
"resize": true
},
"openAtStart": false
},
{
"name": "div弹窗模板",
"uri": "widgets/_example_divwin/widget.js"
},
{
"name": "append模板",
"uri": "widgets/_example_append/widget.js"
}
]
},
{
"name": "地图工具",
"type": "group",
"children": [
{
"id": "manageBasemaps",
"name": "地图切换",
"uri": "widgets/manageBasemaps/widget.js",
"group": "forlayer",
"autoDisable": false,
"disableOther": false
},
{
"name": "图层管理",
"uri": "widgets/manageLayers/widget.js",
"group": "forlayer",
"autoCenter": true,
"windowOptions": {
"position": {
"top": 50,
"bottom": 30,
"right": 10
}
},
"css":{
"max-width":"300px"
},
"autoDisable": false,
"disableOther": false
},
{
"name": "图上量算",
"uri": "widgets/measure/widget.js"
},
{
"name": "空间分析",
"uri": "widgets/analysis/widget.js"
},
{
"name": "剖面分析图表",
"uri": "widgets/measureChars/widget.js",
"windowOptions": {
"noTitle": true,
"position": {
"bottom": 30,
"left": 30,
"right": 60
}
},
"disableOther": false
},
{
"name": "视角书签",
"uri": "widgets/bookmark/widget.js",
"windowOptions": {
"position": {
"top": 50,
"bottom": 30,
"right": 10
}
}
},
{
"name": "坐标定位",
"uri": "widgets/centerXY/widget.js"
},
{
"name": "标记",
"uri": "widgets/addmarker/widget.js"
},
{
"name": "地区导航",
"uri": "widgets/navXZQH/widget.js"
},
{
"name": "漫游路线设置",
"uri": "widgets/roamLine/widget.js",
"windowOptions": {
"position": {
"top": 45,
"bottom": 30,
"right": 5
}
}
},
{
"name": "漫游路线",
"uri": "widgets/roamFly/widget.js",
"windowOptions": {
"position": {
"bottom": 60,
"right": 5
}
}
},
{
"name": "路线剖面",
"uri": "widgets/roamChars/widget.js",
"windowOptions": {
"noTitle": true,
"position": {
"top": 10,
"left": 10,
"right": 10
}
},
"disableOther": false
},
{
"name": "双屏对比",
"uri": "widgets/mapCompare/widget.js",
"autoDisable": false,
"disableOther": false,
"group": "mapCompare",
"windowOptions": {
"position": {
"top": 160,
"bottom": 40,
"left": 10
},
"maxmin": true
}
},
{
"name": "卷帘对比",
"uri": "widgets/mapSwipe/widget.js",
"group": "mapCompare",
"autoDisable": false,
"disableOther": false
},
{
"name": "标绘",
"uri": "widgets/plot/widget.js",
"windowOptions": {
"position": {
"top": 45,
"bottom": 30,
"right": 5
}
},
"openAtStart": false
},
{
"name": "模型库",
"uri": "widgets/plot-model/widget.js",
"windowOptions": {
"position": {
"top": 45,
"bottom": 30,
"right": 5
}
}
},
{
"name": "属性编辑",
"uri": "widgets/plotAttr/widget.js",
"windowOptions": {
"position": {
"top": 60,
"bottom": 30,
"left": 10
}
},
"disableOther": false
},
{
"name": "Socket通信设置",
"uri": "widgets/plotSocket/widget.js",
"windowOptions": {
"position": {
"top": 10
}
},
"disableOther": false
},
{
"name": "路线导航",
"uri": "widgets/queryRoute/widget.js",
"windowOptions": {
"position": {
"top": 45,
"bottom": 30,
"right": 5
}
}
},
{
"name": "打印",
"uri": "widgets/print/widget.js",
"autoDisable": false,
"disableOther": false
},
{
"name": "分享当前地图位置",
"uri": "widgets/shareUrl/widget.js",
"windowOptions": {
"position": {
"top": 1
}
}
},
{
"name": "参数设置",
"uri": "widgets/setting/widget.js"
}
]
},
{
"name": "业务演示功能",
"type": "group",
"children": [
{
"name": "企业-地图点",
"uri": "widgetsTS/qyPoint/widget.js",
"autoDisable": false,
"disableOther": false
},
{
"name": "企业详情",
"uri": "widgetsTS/qyDetailsView/widget.js",
"windowOptions": {
"skin": "layer-mars-dialog2",
"position": {
"top": 50,
"bottom": 50,
"left": 120,
"right": 120
}
},
"disableOther": false
},
{
"name": "企业视频监控",
"uri": "widgetsTS/qyVideo/widget.js",
"windowOptions": {
"skin": "layer-mars-dialog2",
"position": {
"top": 50,
"bottom": 50,
"left": 120,
"right": 120
}
},
"disableOther": false
}
]
}
]
}

11
public/config/xjsdkUrl.js Normal file
View File

@ -0,0 +1,11 @@
//涉及mars的在线服务地址统一配置入口
//除了该文件,地图图层的配置在 \config\config.json文件中。
var serverURL = "http://data.marsgis.cn";
//gltf小模型服务主目录
var serverURL_gltf = "http://data.marsgis.cn/gltf";
//geojson等一些文件主目录
var serverURL_file = "http://data.marsgis.cn/file";

460
public/css/style.css Normal file
View File

@ -0,0 +1,460 @@
/* 2019-7-14 09:06:53 | 修改 木遥(微信: http://marsgis.cn/weixin.html */
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
*:before,
*:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
html,
body {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
border: none;
overflow: hidden;
overflow-x: hidden;
overflow-y: hidden;
font-family: "Helvetica Neue", Helvetica, Tahoma, Arial, "Microsoft Yahei", "Hiragino Sans GB", "WenQuanYi Micro Hei", sans-serif;
font-size: 14px;
background:#000;
-webkit-overflow-scrolling: touch;
}
body {
position: relative;
}
input,
button,
select,
textarea {
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
a {
color: #62a8ea;
text-decoration: none;
}
a:hover,
a:focus {
color: #89bceb;
text-decoration: underline;
}
a:focus {
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline: none;
outline-offset: -2px;
}
ul,
li {
list-style: none;
}
#centerDiv {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
border: none;
overflow: hidden;
position: relative;
}
.signmask {
height: 100%;
width: 100%;
background: rgba(0, 0, 0, .5);
filter: alpha(opacity=50);
position: fixed;
display: block;
z-index: 20180910;
top: 0;
left: 0;
background: rgba(0, 0, 0, .5) url("../img/icon-operate.png") center no-repeat;
}
/*dark样式*/
.dark {
color: #ffffff;
}
.dark a {
color: #ffffff;
text-decoration: none;
margin-top: 1px;
margin-right: 2px;
}
.dark a:hover {
color: #CC3300;
text-decoration: underline;
}
.dark .content {
overflow: auto;
position: relative;
background: transparent;
height: 400px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.dark .form-control,
.dark .input-group-addon,
.dark .btn-default,
.dark input,
.dark .dropdown-menu {
color: #ffffff;
background-color: rgba(63, 72, 84, 0.7);
border: none;
}
.dark .btn-info {
background-color: rgba(119, 214, 225, 0.2);
}
.dark .btn-primary {
background-color: rgba(32, 160, 255, 0.2);
}
.dark .btn-danger {
background-color: rgba(255, 109, 109, 0.2);
}
.dark .btn-warning {
background-color: rgba(244, 176, 102, 0.2);
}
.dark .table-hover>tbody>tr:hover {
background-color: rgba(63, 72, 84, 1);
}
.dark .dropdown-menu>li>a {
color: #ffffff;
}
.dark .dropdown-menu>li>a:hover,
.dark .dropdown-menu>li>a:focus {
background-color: #4db3ff;
}
.dark .mars3d-popup-color {
color: #ffffff;
}
.dark .mars3d-popup-background {
background: rgba(63, 72, 84, 0.9);
}
/**cesium按钮背景色*/
.cesium-button {
background-color: #3f4854;
color: #e6e6e6;
fill: #e6e6e6;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
line-height: 32px;
}
.cesium-viewer-geocoderContainer .cesium-geocoder-input {
background-color: rgba(63, 72, 84, 0.7);
}
.cesium-viewer-geocoderContainer .cesium-geocoder-input:focus {
background-color: rgba(63, 72, 84, 0.9);
}
.cesium-viewer-geocoderContainer .search-results {
background-color: #3f4854;
}
.cesium-geocoder-searchButton {
background-color: #3f4854;
}
.cesium-infoBox-title {
background-color: #3f4854;
}
.cesium-infoBox {
background: rgba(63, 72, 84, 0.9);
}
.cesium-toolbar-button img{
height:100%;
}
.cesium-performanceDisplay-defaultContainer {
top: auto;
bottom: 35px;
right: 50px;
}
.cesium-performanceDisplay-ms,.cesium-performanceDisplay-fps{
color: #fff;
}
/**cesium工具栏位置*/
.cesium-viewer-toolbar {
top: auto;
left: auto;
right: 12px;
bottom: 35px;
}
.cesium-viewer-toolbar>.cesium-toolbar-button,
.cesium-navigationHelpButton-wrapper,
.cesium-viewer-geocoderContainer {
margin-bottom: 5px;
float: right;
clear: both;
text-align: center;
}
.cesium-baseLayerPicker-dropDown {
bottom: 0;
right: 40px;
max-height: 700px;
margin-bottom: 5px;
}
.cesium-navigation-help {
top: auto;
bottom: 0;
right: 40px;
transform-origin: right bottom;
}
.cesium-sceneModePicker-wrapper {
width: auto;
}
.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-dropDown-icon {
float: left;
margin: 0 3px;
}
.cesium-viewer-geocoderContainer .search-results {
left: 0;
right: 40px;
width: auto;
z-index: 9999;
}
.cesium-infoBox-title {
background-color: #3f4854;
}
.cesium-infoBox {
top: 50px;
background: rgba(63, 72, 84, 0.9);
}
/**左下工具栏菜单*/
.toolbar-dropdown-menu-div {
background: rgba(43, 44, 47, 0.8);
border: 1px solid #2b2c2f;
z-index: 991;
position: absolute;
right: 60px;
bottom: 40px;
display:none;
}
.toolbar-dropdown-menu {
min-width: 110px;
padding: 0;
}
.toolbar-dropdown-menu > li {
padding: 0 3px;
margin: 2px 0;
}
.toolbar-dropdown-menu > li > a {
color: #edffff;
display: block;
padding: 4px 10px;
clear: both;
font-weight: normal;
line-height: 1.6;
white-space: nowrap;
text-decoration: none;
}
.toolbar-dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus {
color: #fff;
background-color: #444d59;
}
.toolbar-dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus {
color: #fff;
background-color: #444d59;
}
.toolbar-dropdown-menu i {
padding-right: 5px;
}
/**infoview浮动面板*/
.infoview {
position: absolute;
top: 10px;
left: 10px;
padding: 10px 15px;
border-radius: 4px;
border: 1px solid rgba(128, 128, 128, 0.5);
color: #ffffff;
background: rgba(0, 0, 0, 0.4);
box-shadow: 0 3px 14px rgba(128, 128, 128, 0.5);
z-index: 999;
}
.infoview input,
.infoview select,
.infoview textarea {
color: #ffffff;
background-color: rgba(32, 160, 255, 0.2);
border: 1px solid #e4eaec;
font-size: 14px;
}
.info-tips {
top: auto;
bottom: 70px;
left: 2px;
color: #cad1d1;
}
.rightbottom {
top: auto;
bottom: 60px;
left: auto;
right: 50px;
}
.loadingIndicator {
display: block;
position: absolute;
top: 50%;
left: 50%;
margin-top: -33px;
margin-left: -33px;
width: 66px;
height: 66px;
background-position: center;
background-repeat: no-repeat;
background-image: url(../img/loader.gif);
}
.mars-table {
width: 100%;
border-collapse: collapse;
border-spacing: 0;
margin-top: 5px;
margin-bottom: 5px;
}
.mars-table tr td {
padding: 5px 10px;
text-align: left;
white-space: nowrap;
}
.mars-table tr td:first-child {
border-left: none;
}
.mars-table .nametd {
padding: 5px 20px 5px 10px;
}
.tb-border {
border: #cde1de 1px solid;
}
.tb-border tr td {
border: #cde1de 1px solid;
}
/*滚动条*/
body,
html {
scrollbar-base-color: #f4f7fc;
scrollbar-track-color: #f4f7fc;
scrollbar-face-color: #797979;
scrollbar-arrow-color: #f4f7fc;
scrollbar-shadow-color: #f4f7fc;
scrollbar-3dlight-color: #f4f7fc;
scrollbar-highlight-color: #f4f7fc;
scrollbar-darkshadow-color: #f4f7fc;
}
::-webkit-scrollbar-button {
height: 0;
width: 0;
display: none
}
::-webkit-scrollbar-track {
background: transparent
}
::-webkit-scrollbar-track,
::-webkit-scrollbar-thumb {
border: 0
}
::-webkit-scrollbar {
height: 10px;
width: 10px;
background: transparent;
border-radius: 5px
}
::-webkit-scrollbar-thumb {
padding-top: 100px;
-webkit-box-shadow: inset 1px 1px 0 rgba(0, 0, 0, .1), inset -1px -1px 0 rgba(0, 0, 0, .07);
background-color: #797979;
min-height: 28px;
border-radius: 4px;
background-clip: padding-box
}
::-webkit-scrollbar-track,
::-webkit-scrollbar-thumb {
border: 0
}
::-webkit-scrollbar-thumb:hover {
-webkit-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, .25);
background-color: rgba(0, 0, 0, .4)
}
::-webkit-scrollbar-thumb:active {
-webkit-box-shadow: inset 1px 1px 3px rgba(0, 0, 0, .35);
background-color: rgba(0, 0, 0, .5)
}

139
public/css/widget-win.css Normal file
View File

@ -0,0 +1,139 @@
@charset "utf-8";
/* widget view公共css
* 2019-6-3 09:02:24 | 修改 木遥微信: http://marsgis.cn/weixin.html
*/
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
*:before, *:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
html, body {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
border: none;
overflow: hidden;
font-family: "Helvetica Neue", Helvetica, Tahoma, Arial, "Microsoft Yahei", "Hiragino Sans GB", "WenQuanYi Micro Hei", sans-serif;
font-size: 14px;
background-color:transparent!important;
}
body {
padding:1px;
}
input, button, select, textarea {
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
a { color: #62a8ea;text-decoration: none;}
a:hover, a:focus {
color: #89bceb;
text-decoration: underline;
}
a:focus {
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline: none;
outline-offset: -2px;
}
ul, li {list-style: none;}
.dark { color: #ffffff; }
.dark a{color:#ffffff;text-decoration: none;}
.dark a:hover {color:#CC3300;text-decoration:underline;}
.dark .content{
overflow: auto;
position: relative;
background: transparent;
height: 400px;
-webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;
}
.dark .form-control,.dark .input-group-addon,.dark .btn-default,.dark input ,.dark .dropdown-menu {
color: #ffffff;
background-color: rgba(63, 72, 84, 0.6);
}
.input-group{
width:100%;
}
.dark .btn-primary {
background-color: rgba(32, 160, 255, 0.2);
}
.dark .btn-danger {
background-color: rgba(255, 109, 109, 0.2);
}
.dark .btn-warning {
background-color: rgba(196, 188, 181, 0.2);
}
.dark .table-hover > tbody > tr:hover {
background-color: rgba(63, 72, 84, 1);
}
.dark .dropdown-menu > li > a {
color: #ffffff;
}
.dark .dropdown-menu > li > a:hover,.dark .dropdown-menu > li > a:focus {
background-color: #4db3ff;
}
/*滚动条*/
body, html {
scrollbar-base-color:#f4f7fc;
scrollbar-track-color:#f4f7fc;
scrollbar-face-color:#797979;
scrollbar-arrow-color:#f4f7fc;
scrollbar-shadow-color:#f4f7fc;
scrollbar-3dlight-color:#f4f7fc;
scrollbar-highlight-color:#f4f7fc;
scrollbar-darkshadow-color:#f4f7fc;
}
::-webkit-scrollbar-button {
height: 0;
width: 0;
display: none
}
::-webkit-scrollbar-track {
background: transparent
}
::-webkit-scrollbar-track, ::-webkit-scrollbar-thumb {
border: 0
}
::-webkit-scrollbar {
height: 10px;
width: 10px;
background: transparent;
border-radius: 5px
}
::-webkit-scrollbar-thumb {
padding-top: 100px;
-webkit-box-shadow: inset 1px 1px 0 rgba(0, 0, 0, .1), inset -1px -1px 0 rgba(0, 0, 0, .07);
background-color: #797979;
min-height: 28px;
border-radius: 4px;
background-clip:
padding-box
}
::-webkit-scrollbar-track, ::-webkit-scrollbar-thumb {
border: 0
}
::-webkit-scrollbar-thumb:hover {
-webkit-box-shadow:inset 1px 1px 1px rgba(0, 0, 0, .25);
background-color:rgba(0, 0, 0, .4)
}
::-webkit-scrollbar-thumb:active {
-webkit-box-shadow:inset 1px 1px 3px rgba(0, 0, 0, .35);
background-color:rgba(0, 0, 0, .5)
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
public/img/basemaps/osm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
public/img/basemaps/sea.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
public/img/icon-operate.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

BIN
public/img/marker/mark1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
public/img/marker/mark2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
public/img/marker/mark3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
public/img/marker/mark4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
public/img/target_icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 521 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

BIN
public/img/tietu/gugong.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 760 KiB

BIN
public/img/tietu/leida.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 KiB

BIN
public/img/tietu/world.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 KiB

201
public/jmmap/JmMap.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

14063
public/lib/admui/css/site.css Normal file

File diff suppressed because it is too large Load Diff

137
public/lib/admui/js/app.js Normal file
View File

@ -0,0 +1,137 @@
/**
* UI v1.1.0
* Copyright 2017-2018 Muyao
* Licensed under the Muyao License 1.0
*/
(function (window, document, $) {
'use strict';
// 父级dom节点
$.parentFrame = $(window.parent.document);
// 父级方法&属性
var parentFrame = window.parentFrame = window.parent;
// 项目名称
$.ctx = parentFrame.$.ctx;
// 配置颜色获取方法
$.colors = parentFrame.$.colors;
// 注册组件默认配置参数获取方法
$.po = parentFrame.$.po;
// 本地存储对象操作
$.storage = parentFrame.$.storage;
$.sessionStorage = parentFrame.$.sessionStorage;
// 网址基础设置对象
$.site = parentFrame.$.site;
if ($.site && $.site.contentTabs)
$.site.contentTabs.ifameTabs(document);
// 配置信息存储管理
$.configs = parentFrame.$.configs;
// 注册组件初始化
if (parentFrame.$.components)
parentFrame.$.components.init(document, window);
// 公用对象
window.Breakpoints = parentFrame.Breakpoints;
window.toastr = parentFrame.toastr;
window.layer = parentFrame.layer;
window.haoutil = parentFrame.haoutil;
window.notifyFn = parentFrame.$.notifyFn;
// 自定义扩展对象
var _objExtend = _objExtend || {};
$.extend(_objExtend, {
_queue: {
prepare: [],
run: [],
complete: []
},
run: function () {
var self = this;
this._dequeue('prepare', function () {
self._trigger('before.run', self);
});
this._dequeue('run', function () {
self._dequeue('complete', function () {
self._trigger('after.run', self);
});
});
},
_dequeue: function (name, done) { // 队列当前状态离队,进行下一步操作
var self = this,
queue = this._getQueue(name),
fn = queue.shift(),
next = function () {
self._dequeue(name, done);
};
if (fn) {
fn.call(this, next);
} else if ($.isFunction(done)) {
done.call(this);
}
},
_getQueue: function (name) { // 获取队列状态信息
if (!$.isArray(this._queue[name])) {
this._queue[name] = [];
}
return this._queue[name];
},
extend: function (obj) { // 公用模块对象扩展方法
$.each(this._queue, function (name, queue) {
if ($.isFunction(obj[name])) {
queue.unshift(obj[name]);
delete obj[name];
}
});
$.extend(this, obj);
return this;
},
_trigger: function (name, data, $el) { // 离队状态执行动作
if (typeof name === 'undefined') {
return;
}
if (typeof $el === 'undefined') {
$el = $("#admui-pageContent");
}
$el.trigger(name + '.app', data);
}
});
// 通用功能对象(可配置增加,也可扩展)
var _app = {
pageAside: function () { // 小屏幕下侧边栏(展开&收起)操作
var pageAside = $(".page-aside"),
isOpen = pageAside.hasClass('open');
pageAside.toggleClass('open', !isOpen);
},
run: function (next) {
var self = this;
// 侧边栏开关
$(document).on('click', '.page-aside-switch', function (e) {
self.pageAside();
e.stopPropagation();
});
next();
}
};
window.App = $.extend({}, _objExtend);
App.extend(_app);
})(window, document, jQuery);

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,174 @@
/**
* UI v1.1.0
* Copyright 2017-2018 Muyao
* Licensed under the Muyao License 1.0
*/
(function (window, $) {
"use strict";
/* global layer */
$.configs.set('site', {
fontFamily: '"Helvetica Neue", Helvetica, Tahoma, Arial, "Microsoft Yahei", "Hiragino Sans GB", "WenQuanYi Micro Hei", sans-serif'
});
$.configs.colors = {
"red": {
"100": "#ffeaea",
"200": "#fad3d3",
"300": "#fab4b4",
"400": "#fa9898",
"500": "#fa7a7a",
"600": "#f96868",
"700": "#e9595b",
"800": "#d6494b"
},
"pink": {
"100": "#fce4ec",
"200": "#ffccde",
"300": "#fba9c6",
"400": "#fb8db4",
"500": "#f978a6",
"600": "#f96197",
"700": "#f44c87",
"800": "#e53b75"
},
"purple": {
"100": "#f6f2ff",
"200": "#e3dbf4",
"300": "#d2c5ec",
"400": "#bba7e4",
"500": "#a58add",
"600": "#926dde",
"700": "#7c51d1",
"800": "#6d45bc"
},
"indigo": {
"100": "#edeff9",
"200": "#dadef5",
"300": "#bcc5f4",
"400": "#9daaf3",
"500": "#8897ec",
"600": "#677ae4",
"700": "#5166d6",
"800": "#465bd4"
},
"blue": {
"100": "#e8f1f8",
"200": "#d5e4f1",
"300": "#bcd8f1",
"400": "#a2caee",
"500": "#89bceb",
"600": "#62a8ea",
"700": "#4e97d9",
"800": "#3583ca"
},
"cyan": {
"100": "#ecf9fa",
"200": "#d3eff2",
"300": "#baeaef",
"400": "#9ae1e9",
"500": "#77d6e1",
"600": "#57c7d4",
"700": "#47b8c6",
"800": "#37a9b7"
},
"teal": {
"100": "#ecfdfc",
"200": "#cdf4f1",
"300": "#99e1da",
"400": "#79d1c9",
"500": "#56bfb5",
"600": "#3aa99e",
"700": "#269b8f",
"800": "#178d81"
},
"green": {
"100": "#e7faf2",
"200": "#bfedd8",
"300": "#9fe5c5",
"400": "#7dd3ae",
"500": "#5cd29d",
"600": "#46be8a",
"700": "#36ab7a",
"800": "#279566"
},
"light-green": {
"100": "#f1f7ea",
"200": "#e0ecd1",
"300": "#cadfb1",
"400": "#bad896",
"500": "#acd57c",
"600": "#9ece67",
"700": "#83b944",
"800": "#70a532"
},
"yellow": {
"100": "#fffae7",
"200": "#f9eec1",
"300": "#f6e7a9",
"400": "#f8e59b",
"500": "#f7e083",
"600": "#f7da64",
"700": "#f9cd48",
"800": "#fbc02d"
},
"orange": {
"100": "#fff3e6",
"200": "#ffddb9",
"300": "#fbce9d",
"400": "#f6be80",
"500": "#f4b066",
"600": "#f2a654",
"700": "#ec9940",
"800": "#e98f2e"
},
"brown": {
"100": "#fae6df",
"200": "#e2bdaf",
"300": "#d3aa9c",
"400": "#b98e7e",
"500": "#a17768",
"600": "#8d6658",
"700": "#7d5b4f",
"800": "#715146"
},
"grey": {
"100": "#fafafa",
"200": "#eeeeee",
"300": "#e0e0e0",
"400": "#bdbdbd",
"500": "#9e9e9e",
"600": "#757575",
"700": "#616161",
"800": "#424242"
},
"blue-grey": {
"100": "#f3f7f9",
"200": "#e4eaec",
"300": "#ccd5db",
"400": "#a3afb7",
"500": "#76838f",
"600": "#526069",
"700": "#37474f",
"800": "#263238"
}
};
// 检查IE在IE环境下设置ajax禁止缓存
var isIE = (function () {
return !!window.ActiveXObject || "ActiveXObject" in window;
});
if(isIE){
$.ajaxSetup({cache: false});
}
//// layer 弹层组件配置
//if(typeof layer !== 'undefined'){
// layer.config({
// extend: '../retina.css'
// });
//}
})(window, $);

View File

@ -0,0 +1,359 @@
/**
* UI v1.1.0
* Copyright 2017-2018 Muyao
* Licensed under the Muyao License 1.0
*/
(function (window, document, $) {
'use strict';
// 项目名称
$.ctx = location.pathname.substring(0,location.pathname.lastIndexOf("/")+1);
// 获取颜色配置信息
$.colors = function (name, level) {
if (!$.configs.colors && typeof $.configs.colors[name] === 'undefined') {
return null;
}
if (level && typeof $.configs.colors[name][level] !== 'undefined') {
return $.configs.colors[name][level];
} else {
return $.configs.colors[name];
}
};
// 3rd调用参数
$.po = function (name, options) {
var defaults = $.components.getDefaults(name);
return $.extend(true, {}, defaults, options);
};
// 配置信息存储管理
$.configs = $.configs || {};
$.extend($.configs, {
_data: {},
get: function () {
var data = this._data, name,
_argLen = arguments.length;
if (_argLen === 0) {
return;
}
for (var i = 0; i < _argLen; i++) {
name = arguments[i];
data = data[name];
}
return data;
},
set: function (name, value) {
if (this.get(name)) {
console.error('configs:' + name + '对象已经存在了');
} else {
this._data[name] = value;
}
},
extend: function (name, options) {
return $.extend(true, this.get(name), options);
}
});
// 实现插件的提前检测和调用
$.components = $.components || {};
$.extend($.components, {
_components: {},
register: function (name, obj) {
this._components[name] = obj;
},
init: function (context, iframe, name, args) {
var self = this, obj;
args = args || true;
if (typeof name === 'undefined') {
$.each(this._components, function (name) {
self.init(context, iframe, name, args);
});
} else {
context = context || document;
obj = this.get(name);
if (!obj) {
return;
}
switch (obj.mode) {
case 'default':
return this._initDefault(name, context, iframe);
case 'init':
return this._initComponent(obj, context, iframe);
case 'api':
return this._initApi(obj, context, args, iframe);
default:
this._initApi(obj, context, args, iframe);
this._initComponent(obj, context, iframe);
return;
}
}
},
_initDefault: function (name, context, iframe) { // jquery 3rd的基本用法
var iframe$ = iframe ? iframe.$ : $, defaults;
if (!iframe$.fn[name]) {
return;
}
defaults = this.getDefaults(name);
$('[data-plugin=' + name + ']', context).each(function () {
var $this = iframe$(this),
options = $.extend(true, {}, defaults, $this.data());
$this[name](options);
});
},
_initComponent: function (obj, context, iframe) { // jquery 3rd的高级用法
if ($.isFunction(obj.init)) {
obj.init.call(obj, context, iframe);
}
},
_initApi: function (obj, context, args, iframe) { // 其他处理
if (args && $.isFunction(obj.api)) {
obj.api.call(obj, context, iframe);
}
},
getDefaults: function (name) {
var component = this.get(name);
return component && typeof component.defaults !== "undefined" ? component.defaults : {};
},
get: function (name) {
if (typeof this._components[name] !== "undefined") {
return this._components[name];
} else {
console.error('component:' + name + ' 脚本文件没有注册任何信息!');
return undefined;
}
}
});
// 本地存储对象操作 localStorage
$.storage = $.storage || {};
$.extend($.storage, {
set: function (key, value, time) { //存入缓存
var cacheExpireDate, cacheVal;
if (!localStorage) {
console.error('该浏览器不支持localStorage对象');
}
if (!key || !value) {
return null;
}
// 定时情况
if (!time || isNaN(time)) {
cacheExpireDate = null;
} else {
cacheExpireDate = (new Date() - 1) + time * 1000 * 60;
}
cacheVal = {val: value, exp: cacheExpireDate};
if (typeof value === "object") {
cacheVal = JSON.stringify(cacheVal);
}
localStorage.setItem(key, cacheVal);
},
get: function (key) { // 获取存储内容
var value, now, exp;
if (!localStorage) {
console.error('该浏览器不支持localStorage对象');
}
value = localStorage.getItem(key);
if (!value) {
return null;
}
if (typeof value === 'string') {
value = JSON.parse(value);
}
now = new Date() - 1;
exp = value.exp;
if (exp && now > exp) { // 缓存内容已过期
this.remove(key);
return null;
}
return value.val;
},
remove: function (key) { // 删除指定缓存
if (!localStorage) {
console.error('该浏览器不支持localStorage对象');
}
localStorage.removeItem(key);
}
});
// 本地存储对象操作 sessionStorage
$.sessionStorage = $.sessionStorage || {};
$.extend($.sessionStorage, {
set: function (key, value) { //存入缓存
if (!sessionStorage) {
console.error('该浏览器不支持sessionStorage对象');
}
if (!key || !value) {
return null;
}
if (typeof value === "object") {
value = JSON.stringify(value);
}
sessionStorage.setItem(key, value);
},
get: function (key) { // 获取存储内容
var value;
if (!sessionStorage) {
console.error('该浏览器不支持sessionStorage对象');
}
value = sessionStorage.getItem(key);
if (!value) {
return null;
}
if (typeof value === 'string') {
value = JSON.parse(value);
}
return value;
},
remove: function (key) { // 删除指定缓存
if (!sessionStorage) {
console.error('该浏览器不支持sessionStorage对象');
}
sessionStorage.removeItem(key);
}
});
// 网站基础设置
$.site = $.site || {};
function dataAttr(elem, key, data, iJquery) {
var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
rmultiDash = /([A-Z])/g;
// If nothing was found internally, try to fetch any
// data from the HTML5 data-* attribute
if (data === undefined && elem.nodeType === 1) {
var name = "data-" + key.replace(rmultiDash, "-$1").toLowerCase();
data = elem.getAttribute(name);
if (typeof data === "string") {
try {
data = data === "true" ? true :
data === "false" ? false :
data === "null" ? null :
// Only convert to a number if it doesn't change the string
+data + "" === data ? +data :
rbrace.test(data) ? $.parseJSON(data) :
data;
} catch (e) {
}
// Make sure we set the data so it isn't changed later
iJquery.data(elem, key, data);
} else {
data = undefined;
}
}
return data;
}
$.fn.extend({
data: function (key, value, iJquery) {
var i, name, data,
elem = this[0],
attrs = elem && elem.attributes;
// Special expections of .data basically thwart jQuery.access,
// so implement the relevant behavior ourselves
// Gets all values
if (key === undefined || $.isFunction(key)) {
iJquery = key || $;
if (this.length) {
data = iJquery.data(elem);
if (elem.nodeType === 1 && !iJquery._data(elem, "parsedAttrs")) {
i = attrs.length;
while (i--) {
// Support: IE11+
// The attrs elements can be null (#14894)
if (attrs[i]) {
name = attrs[i].name;
if (name.indexOf("data-") === 0) {
name = iJquery.camelCase(name.slice(5));
dataAttr(elem, name, data[name], iJquery);
}
}
}
iJquery._data(elem, "parsedAttrs", true);
}
}
return data;
}
if($.isFunction(value) && value.fn.jquery){
return elem ? dataAttr(elem, key, value.data(elem, key), value) : undefined;
}
// Sets multiple values
if (typeof key === "object") {
return this.each(function () {
value && value.data(this, key);
});
}
iJquery = iJquery || $;
return arguments.length > 1 ?
// Sets one value
this.each(function () {
iJquery.data(this, key, value);
}) :
// Gets one value
// Try to fetch any internally stored data first
elem ? dataAttr(elem, key, iJquery.data(elem, key), iJquery) : undefined;
}
});
})(window, document, jQuery);

View File

@ -0,0 +1,359 @@
/**
* UI v1.1.0
* Copyright 2017-2018 Muyao
* Licensed under the Muyao License 1.0
*/
(function (docuemnt, window, $) {
'use strict';
/* globals Breakpoints, screenfull*/
$.extend($.site, {
theme: function () { // 主题渲染
var $body = $('body'),
settingsName = 'admui.base.skinTools',
$parentLink = $('#admui-siteStyle', $('head')),
settings = localStorage.getItem(settingsName),
parentEtx = $parentLink.prop('href').indexOf('?v=') === -1 ? '' : '.min', themeColor, sidebar, navbar,
menuDisplay, menuTxtIcon;
if (!settings) {
return;
}
settings = JSON.parse(settings).val;
themeColor = this.themeColor = settings.themeColor;
sidebar = settings.sidebar;
navbar = settings.navbar;
menuDisplay = settings.menuDisplay;
menuTxtIcon = settings.menuTxtIcon;
// 在前端渲染主题不是最优雅体验最好的,建议通过后端渲染
if (themeColor && themeColor !== 'primary') {
setTimeout(function () {
$parentLink.attr('href', 'lib/admui/skins/' + themeColor + '/index' + parentEtx + '.css');
}, 130);
}
if (sidebar && sidebar === 'site-menubar-light') {
$('#admui-siteMenubar').addClass('site-menubar-light');
}
if (navbar && navbar !== '') {
$('.site-navbar').addClass(navbar);
}
if (settings.navbarInverse === '') {
$('.site-navbar').removeClass('navbar-inverse');
}
if (menuDisplay && menuDisplay === 'site-menubar-fold') {
$.site.menubar.fold();
if (menuTxtIcon && menuTxtIcon === 'site-menubar-keep') {
$body.addClass('site-menubar-keep');
} else {
$body.addClass('site-menubar-fold-alt');
}
}
if (settings.tabFlag === '') {
$body.removeClass('site-contabs-open');
}
},
iframeTheme: function () { // 子框架主体内容部分主题
var $iframeLink = $('#admui-siteStyle', this.iframeDocument),
iframeEtx = $iframeLink.prop('href').indexOf('?v=') === -1 ? '' : '.min',
themeColor = this.themeColor;
if (themeColor && themeColor !== 'primary') {
$iframeLink.attr('href', 'lib/admui/skins/' + this.themeColor + '/site' + iframeEtx + '.css');
}
},
_tabsDraw: function () { // 标签页重绘
var self = this,
settingsName = 'admui.base.contentTabs',
settings = $.sessionStorage.get(settingsName),
tab, checkedTabId, checkedTabUrl, tabTpl, tabUrl, tabName, tabIframe,
locationUrl = location.hash.substring(2),
$conTabs = $('.con-tabs'),
contentTabs = $.site.contentTabs,
callback = function (key, tabId, url) {
var $firstIframe = self.$content.find('iframe:first');
if (key === tabId || !locationUrl) {
checkedTabUrl = url;
$conTabs.find('li:first').addClass('active');
$firstIframe.attr('src', url);
self.iframeEvents($firstIframe);
}else{
$firstIframe.removeClass('active');
}
};
checkedTabId = settings.checked;
for (var key in settings) {
tab = settings[key];
if (key === 'checked' || key === 'tabId') {
continue;
} else if (key === 'iframe-0') {
callback(key, checkedTabId, tab.url);
continue;
}
tabUrl = tab.url;
tabName = tab.name;
tabTpl = '<a href="' + tabUrl + '" ' + 'target="' + key + '"' +
'" title="' + tabName + '' + '" rel="contents"><span>' + tabName + '</span><i class="icon' +
' wb-close-mini">' + '</i></a></li>';
if (key === checkedTabId && locationUrl) {
checkedTabUrl = tabUrl;
tabTpl = '<li class="active">' + tabTpl;
tabIframe = '<iframe src="' + tabUrl + '" frameborder="0" name="' + key + '" class="page-frame animation-fade active"></iframe>';
} else {
tabTpl = '<li>' + tabTpl;
tabIframe = '<iframe src="" frameborder="0" name="' + key + '" class="page-frame animation-fade"></iframe>';
}
$conTabs.append(tabTpl);
self.$content.append(tabIframe);
}
if (locationUrl !== checkedTabUrl && locationUrl) {
this._urlRequest(locationUrl);
}
contentTabs.enable($conTabs.find('.active'));
if (Object.keys(settings).length >= 19) {
contentTabs.tabSize();
contentTabs.tabEvent($conTabs, 'media');
}
},
_urlRequest: function (url) { // 处理存储信息中没有的页面访问(创建新的标签页)
var title = '未知页面';
$('.site-menu a').each(function () {
var $item = $(this);
if ($item.attr('href') === url) {
title = $.trim($item.attr('title') || $item.text());
return false;
}
});
$.site.contentTabs.buildTab({name: title, url: url});
},
_hideNavbar: function () { // 隐藏导航条
var $body = $('body');
$body.addClass('site-navbar-collapsing');
$('#admui-navbarCollapse').collapse('hide');
setTimeout(function () {
$body.removeClass('site-navbar-collapsing');
}, 10);
$body.removeClass('site-navbar-collapse-show');
},
iframeEvents: function ($el) { // 子框架主体内容事件处理
var self = this, _callback = function (obj) {
$('#admui-siteStyle', obj).load(function () {
self.iframeTheme();
});
};
/*
* 菜单收起
* 导航条收起
* */
$el.load(function () {
var iframeDocument = self.iframeDocument = $.content.document();
$(iframeDocument).on('click', function () {
// 小屏下收起顶部导航条和左侧菜单
if (Breakpoints.is('xs') && $('body').hasClass('site-menubar-open')) {
$.site.menubar.hide();
self._hideNavbar();
}
// 核心框架中下拉菜单切换操作
$('[data-toggle="dropdown"]').parent().removeClass('open');
});
_callback(iframeDocument);
});
},
run: function () {
var self = this,
$content = this.$content = $('#admui-pageContent');
// 获取iframe框架中变量&方法
$.content = $.content || {};
$.extend($.content, {
window: function () {
var name = $content.find('iframe.active').attr('name');
return window.frames[name];
},
document: function () { // 获取iframe框架中document
var name = $content.find('iframe.active').attr('name');
return window.frames[name].document;
}
});
// 当前iframe框架document
this.iframeDocument = null;
// 项目名称获取
$.ctx = $('#admui-signOut').data('ctx') || $.ctx;
if (typeof $.site.menu !== 'undefined') {
$.site.menu.init();
}
if (typeof $.site.contentTabs !== 'undefined') {
$.site.contentTabs.init();
}
// 导航条响应式
$('#admui-navbar').responsiveHorizontalTabs({
tabParentSelector: '#admui-navTabs',
fnCallback: function (el) {
if ($('#admui-navbar').is(':visible')) {
el.removeClass('is-load');
}
}
});
// 导航条&菜单的响应式工作
if (typeof $.site.menubar !== 'undefined') {
$('#admui-siteMenubar').on('changing.site.menubar', function () {
var $menubar = $('[data-toggle="menubar"]');
$menubar.toggleClass('hided', !$.site.menubar.opened);
$menubar.toggleClass('unfolded', !$.site.menubar.folded);
});
$.site.menubar.init();
Breakpoints.on('change', function () {
$.site.menubar.change();
});
/*
* 小屏幕下导航条展开 | 收起按钮
* 搜索按钮href
* */
$(document).on('click', '[data-toggle="collapse"]', function (e) {
var $trigger = $(e.target),
href, target, $target;
if (!$trigger.is('[data-toggle="collapse"]')) {
$trigger = $trigger.parents('[data-toggle="collapse"]');
}
target = $trigger.attr('data-target') || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '');
$target = $(target);
if ($target.hasClass('navbar-search-overlap')) {
$target.find('input').focus();
e.preventDefault();
} else if ($target.attr('id') === 'admui-navbarCollapse') {
var isOpen = !$trigger.hasClass('collapsed'),
$body = $(document.body);
$body.addClass('site-navbar-collapsing');
$body.toggleClass('site-navbar-collapse-show', isOpen);
$('#admui-navbar').responsiveHorizontalTabs({
tabParentSelector: '#admui-navTabs',
fnCallback: function (el) {
el.removeClass('is-load');
}
});
setTimeout(function () {
$body.removeClass('site-navbar-collapsing');
}, 350);
}
});
$(document).on('click', '[data-toggle="menubar"]', function () { // 菜单展开|收起控制按钮
if (Breakpoints.is('xs') && $('body').hasClass('site-menubar-open')) {
self._hideNavbar();
}
$.site.menubar.toggle();
});
// 图标对应菜单展开
$('#admui-navbar >.nav-tabs >li:not(.no-menu)').on('click', function (e) {
if ($(e.target).closest('li').is('.dropdown')) {
return;
}
if (Breakpoints.is('xs')) {
$.site.menubar.open();
}
});
}
// 全屏模式操作
if (typeof screenfull !== 'undefined') {
$(document).on('click', '[data-toggle="fullscreen"]', function () {
if (screenfull.enabled) {
screenfull.toggle();
}
return false;
});
if (screenfull.enabled) {
document.addEventListener(screenfull.raw.fullscreenchange, function () {
$('[data-toggle="fullscreen"]').toggleClass('active', screenfull.isFullscreen);
});
}
}
// 对下拉列表的其他功能
$(document).on('show.bs.dropdown', function (e) {
var $target = $(e.target), $menu,
$trigger = e.relatedTarget ? $(e.relatedTarget) : $target.children('[data-toggle="dropdown"]'),
animation = $trigger.data('animation');
if (animation) {
$menu = $target.children('.dropdown-menu');
$menu.addClass('animation-' + animation);
$menu.one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
$menu.removeClass('animation-' + animation);
});
}
});
// 父框架工具提示和弹框初始化
$('[data-toggle="tooltip"]').tooltip({trigger: 'hover'});
$('[data-toggle="popover"]').popover();
if (window.localStorage) {
this.theme();
this._tabsDraw();
}
$.components.init();
}
});
$.site.run();
})(document, window, jQuery);

View File

@ -0,0 +1,490 @@
/**
* UI v1.1.0
* Copyright 2017-2018 Muyao
* Licensed under the Muyao License 1.0
*/
(function (window, document, $) {
'use strict';
$.site.contentTabs = {
$instance: $('#admui-navTabs .site-menu'),
$content: $('#admui-pageContent'),
storageKey: 'admui.base.contentTabs',
tabId: 0,
relative: 0,
tabTimeout: 30,
init: function () {
this.bind();
this._defaultTab();
},
bind: function () {
var self = this,
$navContabs = $("#admui-siteConTabs"),
$navContent = $navContabs.find("ul.con-tabs");
this.tabWidth = $navContent.find("li").width();
this.view = $navContabs.find(".contabs-scroll").width();
this.ifameTabs();
// 标签页的左右移动 && 关闭单个标签页 && 切换标签页
$navContabs
.on('click.site.contabs', 'button.pull-left', function () {
self.tabPosition($navContent, self.tabWidth, "right");
})
.on('click.site.contabs', '.pull-right>.btn-icon', function () {
var content = $navContent.width();
self.tabPosition($navContent, self.tabWidth, "left", self.view, content);
})
.on('click.site.contabs', 'ul.con-tabs>li', function (e) {
var $target = $(e.target), $item = $(this);
if ($target.is("i.wb-close-mini")) { // 关闭
self.closeTab($item);
} else if (!$item.is(".active")) { // 切换
$item.siblings("li").removeClass("active");
$item.addClass("active");
self._checkoutTab($item.find('a'));
self.enable($item);
}
e.preventDefault();
});
// 刷新当前页 && 关闭其他 && 所有标签页
$navContabs
.on('click.site.contabs', '.pull-right li.reload-page', function () {
var $navLi = $navContabs.find('ul.con-tabs>li.active>a'),
tabUrl = $navLi.attr('href');
// 刷新当前页
self.$content.children('[src="' + tabUrl + '"]').attr('src', tabUrl);
})
.on('click.site.contabs', '.pull-right li.close-other', function () {
var $navLis = $navContabs.find('ul.con-tabs>li');
$navLis.each(function () {
var $that = $(this), tabId;
if (!$that.is('.active') && $that.index() !== 0) {
tabId = $that.find('a').attr('target');
$that.remove();
self.$content.children('[name="' + tabId + '"]').remove();
self._updateSetting(tabId);
}
});
$navContent.animate({left: 0}, 100);
self.btnView('hide');
})
.on('click.site.contabs', '.pull-right li.close-all', function () {
var $tabs = $navContabs.find('ul.con-tabs>li'),
$checked = $tabs.eq(0);
$tabs.each(function () {
var $that = $(this), tabId;
if ($that.index() !== 0) {
tabId = $that.find('a').attr('target');
$that.remove();
self._updateSetting(tabId);
}
});
$navContent.animate({left: 0}, 100);
self.btnView('hide');
$checked.addClass('active');
self.enable($tabs.eq(0));
self._checkoutTab($checked.find('a'));
// 关闭所有
self.$content.children(':not(:first)').remove();
self.tabSize();
});
// 登出清楚标签页缓存
$(document).on('click', '#admui-signOut', function () {
$.sessionStorage.remove(self.storageKey);
});
// 浏览器窗口大小改变,标签页的对应状态
$(window).on('resize', this.resize);
},
ifameTabs: function (el) { // 为当前doc对象中的a[data-iframe]标签绑定创建标签页功能
var self = this,
doc = el === undefined ? document : el;
// 新建标签页
$(doc).on('click', 'a[data-iframe]', function (e) {
var $item = $(this), urlResult,
url = $item.attr('href'),
title = $.trim($item.text()) || $.trim($item.attr('title')),
iframeContent = $item.data('iframe') || '#admui-pageContent',
tabResult = $item.is('[target="_blank"]');
urlResult = new RegExp(/^([a-zA-z]+:|#|javascript|www\.)/); // 不执行新建标签页操作的地址
if (urlResult.test(url)) {
return;
}
if (tabResult && iframeContent === '#admui-pageContent') {
window.history.replaceState(null, '', '#!' + url);
self.tabType = true;
self.buildTab({name: title, url: url});
if (!self.$instance.find($item).length) {
self.enable($item.parent());
}
} else if (!tabResult) {
$(iframeContent).find('iframe.active').attr('src', url);
}
e.preventDefault();
});
},
_checkoutTab: function (tab) { // 标签页的切换
var $content = this.$content,
tabId = tab.attr('target'),
tabTitle = $.trim(tab.attr('title')),
tabUrl = tab.attr('href'),
$checkedTab = $content.children('iframe[name="' + tabId + '"]');
$('title').text(tabTitle);
if (!this.tabType) {
window.history.replaceState(null, '', '#!' + tabUrl);
}
if (!$checkedTab.attr('src')) {
$checkedTab.attr('src', tabUrl);
}
$content.children('.active').removeClass('active');
$checkedTab.addClass('active');
$.site.iframeEvents($checkedTab);
this._updateSetting('checked', tabId);
this.tabType = false;
},
_defaultTab: function () { // 存储默认标签的信息
var $defaultTab = $('#admui-siteConTabs').find('li:first > a'), settings;
settings = this.settings = $.sessionStorage.get(this.storageKey);
if (settings === null) {
settings = $.extend(true, {}, {
'iframe-0': {
'url': $defaultTab.attr('href'),
'name': $defaultTab.text()
},
'checked': $defaultTab.attr('target'),
'tabId': this.tabId
});
this._updateSetting(settings);
} else {
this.tabId = settings.tabId;
}
},
_updateSetting: function (item, value) {
var settings = $.sessionStorage.get(this.storageKey);
settings = settings ? settings : {};
if (typeof item === 'object') {
$.extend(true, settings, item);
} else if (!value) {
delete settings[item];
} else {
settings[item] = value;
}
$.sessionStorage.set(this.storageKey, settings, this.tabTimeout);
},
resize: function () {
var self = $.site.contentTabs,
$navContabs = $(".site-contabs"),
$navContent = $navContabs.find("ul.con-tabs");
self._throttle(function () {
self.view = $navContabs.find(".contabs-scroll").width();
self.tabEvent($navContent, 'media');
}, 200)();
},
enable: function ($el) { // 左侧菜单定位
var $instance = this.$instance,
href = $.trim($el.find('a').attr('href')),
_result = href.indexOf('#'),
tabUrl = _result > 0 ? href.substring(0, _result) : href,
$current = $instance.find('a[href="' + tabUrl + '"]'),
$currentParents, $currentLi, $currentHasSub, $instanceLi, checkedId, currentId;
if ($current.length === 0) {
$.site.menu.refresh();
return;
}
checkedId = $.trim($instance.closest('div.tab-pane.active').attr('id'));
currentId = $.trim($current.closest('div.tab-pane').attr('id'));
if (checkedId !== currentId) {
$('#admui-navbar a[href="#' + currentId + '"]').tab('show');
}
$currentLi = $current.closest('li').siblings('li.open');
$currentParents = $current.parents('li.has-sub');
$currentHasSub = $current.closest('li.has-sub').siblings('li.open');
$instanceLi = $instance.find('li.open');
$instance.find('li.active').trigger('deactive.site.menu');
$current.closest('li').trigger('active.site.menu');
if ($currentLi.length) {
$currentLi.trigger('close.site.menu');
}
if (!$current.closest('li.has-sub').hasClass('open')) {
if ($currentHasSub.length) {
$currentHasSub.trigger('close.site.menu');
}
if ($instanceLi.length) {
$instanceLi.not($currentParents).trigger('close.site.menu');
}
$currentParents.trigger('open.site.menu');
}
},
buildTab: function (opt) { // 新建标签页
var $tabNav = $(".con-tabs"), tabName, obj = {}, tabId,
_url = opt.url,
_result = _url.indexOf('#'),
tabUrl = _result > 0 ? _url.substring(0, _result) : _url;
if (this._checkTabs($tabNav, tabUrl)) { // 标签查重
return;
}
tabId = ++this.tabId;
tabName = 'iframe-' + tabId;
// 修改当前选中的标签页
$tabNav.find("li.active").removeClass("active");
$tabNav.append('<li class="active"><a href="' + tabUrl + '" target="' + tabName +
'" title="' + opt.name + '' + '" rel="contents"><span>' + opt.name + '</span><i class="icon' +
' wb-close-mini">' + '</i></a></li>');
obj[tabName] = {
'url': tabUrl,
'name': opt.name
};
$.extend(obj, {
'checked': tabName,
'tabId': tabId
});
this._updateSetting(obj);
// 修改页面标题
opt.name = opt.name === '' ? '无标题' : opt.name;
$('title').text($.trim(opt.name));
this.buildIframe(_url);
this.tabSize();
this.tabEvent($tabNav, 'media');
this.tabType = false;
},
_checkTabs: function (doc, url) { // 标签查重
var x, prevAll, nextAll, contentW,
_view = this.view, _tab = this.tabWidth,
$currenttab = doc.find("a[href='" + url + "']").closest('li');
if ($currenttab.hasClass('active')) { // 标签存在&已选中
return true;
}
if ($currenttab.size() <= 0) { // 标签不存在
return false;
}
// 标签存在未选中
doc.find("li.active").removeClass("active");
$currenttab.addClass("active");
// 切换标签页
this._checkoutTab($currenttab.find('a'));
// 标签位移到可视界面显示
x = doc.position().left;
contentW = doc.width();
prevAll = $currenttab.prevAll('li').size() * _tab;
nextAll = $currenttab.nextAll('li').size() * _tab;
if (-prevAll < x) {
if (prevAll + x < _view) {
return true;
}
x = -(prevAll - _view + _tab);
} else {
if (-x < contentW - nextAll) {
return true;
}
x = -(contentW - nextAll - _tab);
}
doc.animate({
left: x
}, 100);
return true;
},
buildIframe: function (url) { // 创建iframe窗口
var $content = this.$content,
iframeName = 'iframe-' + this.tabId, $checkedIframe;
$content.children('.active').removeClass('active');
$content.append('<iframe src="' + url + '" frameborder="0" name="' + iframeName + '" class="page-frame animation-fade active"></iframe>');
$checkedIframe = $content.find('iframe[name="' + iframeName + '"]');
$.site.iframeEvents($checkedIframe);
},
tabSize: function () { // 修改标签页盒子尺寸
var content, $tabNav = $(".con-tabs"),
_num = $tabNav.find("li").size();
content = this.tabWidth * _num;
$tabNav.css("width", content);
},
tabEvent: function (doc, media) { // 增删标签页的对应状态
var content = $(".con-tabs").width(),
_view = this.view, _tab = this.tabWidth;
if (content > this.view) {
this.tabPosition(doc, _tab, "left", _view, content, media);
this.btnView('visible');
} else {
this.btnView('hide');
}
if (this.currentView < _view || this.currentContent > content) {
this.tabPosition(doc, _tab, "right", _view, content, media);
}
this.currentView = _view;
this.currentContent = content;
},
tabPosition: function (doc, width, dir, view, content, media) { // 标签页的位移
var self = this,
x = doc.position().left,
callback = function (x) {
var flag = x + width;
if (flag > 0) {
self.relative = x;
return 0;
} else {
return x;
}
};
if (dir === "left") {
if (x <= view - content) {
return false;
}
if (typeof media !== 'undefined') {
x = view - content;
} else {
x = this.relative !== 0 ? x - width + this.relative : x - width;
this.relative = 0;
}
} else if (dir === "right") {
if (x === 0) {
return false;
}
if (typeof media !== 'undefined') {
x = content <= view ? 0 : view - content;
} else {
x = callback(x + width);
}
}
doc.animate({
left: x
}, 100);
},
_throttle: function (fn, interval) { // 函数节流操作
var _fn = fn,
timer,
firstTime = true;
return function () {
var args = arguments,
self = this;
if (firstTime) {
_fn.apply(self, args);
firstTime = false;
}
if (timer) {
return false;
}
timer = setTimeout(function () {
clearTimeout(timer);
timer = null;
_fn.apply(self, args);
}, interval || 500);
};
},
closeTab: function ($item) {
var checkedTabId = $item.children('a').attr('target'), $checked = '',
$nextLi = $item.next('li'),
$content = this.$content;
if ($item.is('.active')) { // 关闭选中标签
if ($nextLi.size() > 0) {
$checked = $nextLi;
} else {
$checked = $item.prev('li');
}
$checked.addClass("active");
this.enable($checked);
this._checkoutTab($checked.find('a'));
}
$item.remove();
$content.children('[name="' + checkedTabId + '"]').remove();
this._updateSetting(checkedTabId);
this.tabSize();
this.tabEvent($(".con-tabs"), 'media');
},
btnView: function (status) { // 标签页左右移动按钮状态
var $siteContabs = $('.site-contabs'),
$contabsLeftBtn = $siteContabs.children('button.pull-left'),
$contabsRightBtn = $siteContabs.find('.pull-right > button.btn-icon');
if (status === 'visible') {
$contabsLeftBtn.removeClass('hide');
$contabsRightBtn.removeClass('hide');
} else if (status === 'hide') {
$contabsLeftBtn.addClass('hide');
$contabsRightBtn.addClass('hide');
}
}
};
})(window, document, jQuery);

View File

@ -0,0 +1,304 @@
/**
* UI v1.1.0
* Copyright 2017-2018 Muyao
* Licensed under the Muyao License 1.0
*/
(function (window, document, $) {
'use strict';
/***
* 左侧菜单响应式操作
*
* **/
$.site.menubar = {
opened: null,
folded: null,
top: false,
foldAlt: false,
auto: true,
init: function () {
var self = this,
$body = this.$body = $('body'),
$html = this.$html = $('html'),
$instance = this.$instance = $("#admui-navTabs");
$html.removeClass('css-menubar').addClass('js-menubar');
this.tabId = $('#admui-navbar').find('li.active > a').attr('href');
if (this.tabId === '#') {
this.tabId = $('.nav-tabs li.active').find('ul>li.active>a').attr('href');
}
if (!$instance.length) {
return;
}
// 鼠标经过左侧菜单显示图标
if ($body.is('.site-menubar-fold-alt')) {
this.foldAlt = true;
}
// 鼠标经过左侧菜单显示文字
if ($body.is('.site-menubar-keep')) {
if ($body.hasClass('site-menubar-fold')) { // 收起
this.auto = 'fold';
} else if ($body.hasClass('site-menubar-unfold')) { //展开
this.auto = 'unfold';
}
}
$instance.on('changed.site.menubar', function () {
self.update();
});
$('.nav-tabs li:not(.no-menu)').on('shown.bs.tab', function (event) {
var tabId = self.tabId = $(event.target).attr('href');
if ($body.hasClass('site-menubar-fold')) {
self.hoverscroll.enable(tabId);
} else if ($body.hasClass('site-menubar-unfold')) {
self.slimScroll.enable();
}
});
this.change();
},
change: function () {
var breakpoint = Breakpoints.current();
if (this.auto !== true) {
switch (this.auto) {
case 'fold':
this.reset();
if (breakpoint.name === 'xs') {
this.hide();
} else {
this.fold();
}
return;
case 'unfold':
this.reset();
if (breakpoint.name === 'xs') {
this.hide();
} else {
this.unfold();
}
return;
}
}
this.reset();
if (breakpoint) {
switch (breakpoint.name) {
case 'lg':
this.unfold();
break;
case 'md':
case 'sm':
this.fold();
break;
case 'xs':
this.hide();
break;
}
}
Breakpoints.on('xs', 'leave', function () {
$('#admui-navbar').responsiveHorizontalTabs({
tabParentSelector: '#admui-navTabs',
fnCallback: function (el) {
if ($('#admui-navbar').is(':visible')) {
el.removeClass('is-load');
}
}
});
});
},
animate: function (doing, callback) {
var self = this,
$body = self.$body;
$body.addClass('site-menubar-changing');
doing.call(self);
this.$instance.trigger('changing.site.menubar');
callback.call(self);
$body.removeClass('site-menubar-changing');
self.$instance.trigger('changed.site.menubar');
},
reset: function () {
this.opened = null;
this.folded = null;
this.$body.removeClass('site-menubar-hide site-menubar-open site-menubar-fold site-menubar-unfold');
this.$html.removeClass('disable-scrolling');
},
open: function () {
if (this.opened !== true) {
this.animate(function () {
this.$body.removeClass('site-menubar-hide').addClass('site-menubar-open site-menubar-unfold');
this.opened = true;
this.$html.addClass('disable-scrolling');
}, function () {
this.slimScroll.enable();
});
}
},
hide: function () {
this.hoverscroll.disable();
if (this.opened !== false) {
this.animate(function () {
this.$html.removeClass('disable-scrolling');
this.$body.removeClass('site-menubar-open').addClass('site-menubar-hide site-menubar-unfold');
this.opened = false;
}, function () {
this.slimScroll.enable();
});
}
},
unfold: function () {
this.hoverscroll.disable();
if (this.folded !== false) {
this.animate(function () {
this.$body.removeClass('site-menubar-fold').addClass('site-menubar-unfold');
this.folded = false;
}, function () {
this.slimScroll.enable();
});
}
},
fold: function () {
this.slimScroll.destroy();
if (this.folded !== true) {
this.animate(function () {
this.$body.removeClass('site-menubar-unfold').addClass('site-menubar-fold');
this.folded = true;
}, function () {
this.hoverscroll.enable(this.tabId);
});
}
},
toggle: function () {
var breakpoint = Breakpoints.current(),
folded = this.folded,
opened = this.opened;
switch (breakpoint.name) {
case 'lg':
if (folded === null || folded === false) {
this.fold();
} else {
this.unfold();
}
break;
case 'md':
case 'sm':
if (folded === null || folded === true) {
this.unfold();
} else {
this.fold();
}
$('#admui-navbar').responsiveHorizontalTabs({
tabParentSelector: '#admui-navTabs'
});
break;
case 'xs':
if (opened === null || opened === false) {
this.open();
} else {
this.hide();
}
break;
}
},
update: function () {
this.hoverscroll.update();
},
slimScroll: {
api: null,
native: false,
init: function () {
// if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
// this.native = true;
// $body.addClass('site-menubar-native');
// return;
// }
if ($('body').is('.site-menubar-native')) {
this.native = true;
return;
}
$.site.menubar.$instance.slimScroll($.po('slimScroll'));
},
enable: function () {
if (this.native) {
return;
}
this.init();
},
destroy: function () {
$.site.menubar.$instance.slimScroll({destroy: true});
$.site.menubar.$instance.removeAttr('style');
}
},
hoverscroll: {
api: null,
init: function (tabId) {
$.site.menubar.$instance.find(tabId).children('div').attr('style', '');
this.api = $.site.menubar.$instance.find(tabId).asHoverScroll({
namespace: 'hoverscorll',
direction: 'vertical',
list: '.site-menu',
item: '> li',
exception: '.site-menu-sub',
fixed: false,
boundary: 100,
onEnter: function () {
//$(this).siblings().removeClass('hover');
//$(this).addClass('hover');
},
onLeave: function () {
//$(this).removeClass('hover');
}
}).data('asHoverScroll');
},
update: function () {
if (this.api) {
this.api.update();
}
},
enable: function (tabId) {
if (tabId !== this.tabId) {
this.tabId = tabId;
this.init(tabId);
} else {
this.api.enable();
}
},
disable: function () {
if (this.api) {
this.api.disable();
}
}
}
};
})(window, document, jQuery);

View File

@ -0,0 +1,191 @@
/**
* UI v1.1.0
* Copyright 2017-2018 Muyao
* Licensed under the Muyao License 1.0
*/
(function (window, document, $) {
'use strict';
/***
* 左侧菜单相关事件功能默认为折叠效果
*
* 提供了多个可触发事件
* deactive.site.menu : 取消菜单选中项
* active.site.menu : 设置菜单选中项
* open.site.menu : 展开子菜单
* close.site.menu : 收起子菜单
*
* 可自定义事件
* expanded.site.menu : 子菜单展开后动作
* collapsed.site.menu : 子菜单收起后动作
* **/
$.site.menu = {
speed: 250,
accordion: true, // 手风琴效果标识
init: function () {
var $siteMenubar = this.$siteMenubar = $('#admui-navTabs .site-menu');
if (!$siteMenubar.length) {
return;
}
this._bind();
},
_bind: function () {
var self = this,
$body = $('body'),
$siteMenubar = this.$siteMenubar;
$siteMenubar
.on('mouseenter.site.menu', '.site-menu-item', function () {
var $item = $(this),
folded = $body.hasClass('site-menubar-fold');
if (folded === true && $item.is('.has-sub') && $item.parent('.site-menu').length) {
self.position($item, $item.children('.site-menu-sub'));
}
$item.addClass('hover');
})
.on('mouseleave.site.menu', '.site-menu-item', function () {
var $item = $(this),
folded = $body.hasClass('site-menubar-fold');
if (folded === true && $item.is('.has-sub') && $item.parent('.site-menu').length) {
$item.children('.site-menu-sub').css("max-height", "");
}
$item.removeClass('hover');
})
.on('deactive.site.menu', '.site-menu-item.active', function () {
$(this).removeClass('active');
})
.on('active.site.menu', '.site-menu-item', function () {
$(this).addClass('active');
})
.on('open.site.menu', '.site-menu-item', function (e) {
var $item = $(this);
self._expand($item, function () {
$item.addClass('open');
});
if (self.accordion && $item.closest('li.has-sub').length <= 1) {
$item.siblings('.open').trigger('close.site.menu');
}
e.stopPropagation();
})
.on('close.site.menu', '.site-menu-item.open', function (e) {
var $item = $(this);
self._collapse($item, function () {
$item.removeClass('open');
});
e.stopPropagation();
})
.on('click.site.menu ', '.site-menu-item > a', function () {
var $item = $(this),
$parent = $item.parent();
if ($parent.is('.has-sub')) {
if ($parent.is('.open')) {
$parent.trigger('close.site.menu');
} else {
$parent.trigger('open.site.menu');
}
} else {
$item.closest('li').siblings('.open').trigger('close.site.menu');
$item.closest('li.has-sub').siblings('.open').trigger('close.site.menu');
$item.parents('div.tab-pane').siblings().find('li.open').trigger('close.site.menu');
$siteMenubar.find('li.active').trigger('deactive.site.menu');
$parent.trigger('active.site.menu');
}
})
//.on('tap.site.menu', '> .site-menu-item > a', function () { // 左侧菜单在移动设备下事件操作
/*var link = $(this).attr('href');
if (link) {
window.location = link;
}*/
// })
.on('touchend.site.menu', '> .site-menu-item > a', function () {
var $item = $(this).parent('.site-menu-item'),
folded = $body.hasClass('site-menubar-fold');
if (!folded) {
return;
}
if ($item.is('.has-sub') && $item.parent('.site-menu').length) {
$item.siblings('.hover').removeClass('hover');
if ($item.is('.hover')) {
$item.removeClass('hover');
} else {
$item.addClass('hover');
}
}
})
.on('scroll.site.menu', '.site-menu-sub', function (e) {
e.stopPropagation();
});
},
_collapse: function ($item, callback) { // 子菜单的收起动作
var self = this;
$item.children('.site-menu-sub').slideUp(self.speed, function () {
if (callback) {
callback();
}
// 触发该元素上绑定的'collapsed.site.menu'事件
self.$siteMenubar.trigger('collapsed.site.menu');
});
},
_expand: function ($item, callback) { // 子菜单的展开动作
var self = this;
$item.children('.site-menu-sub').slideDown(self.speed, function () {
if (callback) {
callback();
}
// 触发该元素上绑定的'expanded.site.menu'事件
self.$siteMenubar.trigger('expanded.site.menu');
});
},
refresh: function () { // 重置左侧菜单状态
var $siteMenubar = this.$siteMenubar;
$siteMenubar.find('li.open').trigger('close.site.menu');
$siteMenubar.find('li.active').trigger('deactive.site.menu');
},
position: function ($item, $dropdown) { // 窗口 | 在小屏幕设备上,左侧系统菜单的下拉列表的位置操作功能
var offsetTop = $item.position().top,
menubarHeight = $("#admui-navTabs").outerHeight(),
itemHeight = $item.find("> a").outerHeight();
$dropdown.removeClass('site-menu-sub-up').css('max-height', "");
if (offsetTop > menubarHeight / 2) {
$dropdown.addClass('site-menu-sub-up');
if ($.site.menubar.foldAlt) {
offsetTop = offsetTop - itemHeight;
}
$dropdown.css('max-height', offsetTop + itemHeight);
} else {
if ($.site.menubar.foldAlt) {
offsetTop = offsetTop + itemHeight;
}
$dropdown.removeClass('site-menu-sub-up');
$dropdown.css('max-height', menubarHeight - offsetTop);
}
}
};
})(window, document, jQuery);

View File

@ -0,0 +1,14 @@
#bootstrap
是目前最流行的 HTML, CSS 和 JavaScript 框架,用于开发响应式,移动端先行的 web 项目。
github地址https://github.com/twbs/bootstrap
中文文档http://www.bootcss.com/
本地版本: 3.3.7
更新日期:
介绍:
Bootstrap来自 Twitter是目前最受欢迎的前端框架。Bootstrap 是基于 HTML、CSS、JAVASCRIPT 的,它简洁灵活,使得 Web 开发更加快捷。
基于bootstrop的插件放在当前目录下面

View File

@ -0,0 +1,327 @@
.checkbox {
padding-left: 20px;
}
.checkbox label {
display: inline-block;
vertical-align: middle;
position: relative;
padding-left: 5px;
}
.checkbox label::before {
content: "";
display: inline-block;
position: absolute;
width: 17px;
height: 17px;
left: 0;
margin-left: -20px;
border: 1px solid #cccccc;
border-radius: 3px;
background-color: #fff;
-webkit-transition: border 0.15s ease-in-out, color 0.15s ease-in-out;
-o-transition: border 0.15s ease-in-out, color 0.15s ease-in-out;
transition: border 0.15s ease-in-out, color 0.15s ease-in-out;
}
.checkbox label::after {
display: inline-block;
position: absolute;
width: 16px;
height: 16px;
left: 0;
top: 0;
margin-left: -20px;
padding-left: 3px;
padding-top: 1px;
font-size: 11px;
color: #555555;
line-height: 1.4;
}
.checkbox input[type="checkbox"],
.checkbox input[type="radio"] {
opacity: 0;
z-index: 1;
cursor: pointer;
}
.checkbox input[type="checkbox"]:focus + label::before,
.checkbox input[type="radio"]:focus + label::before {
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
.checkbox input[type="checkbox"]:checked + label::after,
.checkbox input[type="radio"]:checked + label::after {
font-family: "FontAwesome";
content: "\f00c";
}
.checkbox input[type="checkbox"]:indeterminate + label::after,
.checkbox input[type="radio"]:indeterminate + label::after {
display: block;
content: "";
width: 10px;
height: 3px;
background-color: #555555;
border-radius: 2px;
margin-left: -16.5px;
margin-top: 7px;
}
.checkbox input[type="checkbox"]:disabled,
.checkbox input[type="radio"]:disabled {
cursor: not-allowed;
}
.checkbox input[type="checkbox"]:disabled + label,
.checkbox input[type="radio"]:disabled + label {
opacity: 0.65;
}
.checkbox input[type="checkbox"]:disabled + label::before,
.checkbox input[type="radio"]:disabled + label::before {
background-color: #eeeeee;
cursor: not-allowed;
}
.checkbox.checkbox-circle label::before {
border-radius: 50%;
}
.checkbox.checkbox-inline {
margin-top: 0;
}
.checkbox-primary input[type="checkbox"]:checked + label::before,
.checkbox-primary input[type="radio"]:checked + label::before {
background-color: #337ab7;
border-color: #337ab7;
}
.checkbox-primary input[type="checkbox"]:checked + label::after,
.checkbox-primary input[type="radio"]:checked + label::after {
color: #fff;
}
.checkbox-danger input[type="checkbox"]:checked + label::before,
.checkbox-danger input[type="radio"]:checked + label::before {
background-color: #d9534f;
border-color: #d9534f;
}
.checkbox-danger input[type="checkbox"]:checked + label::after,
.checkbox-danger input[type="radio"]:checked + label::after {
color: #fff;
}
.checkbox-info input[type="checkbox"]:checked + label::before,
.checkbox-info input[type="radio"]:checked + label::before {
background-color: #5bc0de;
border-color: #5bc0de;
}
.checkbox-info input[type="checkbox"]:checked + label::after,
.checkbox-info input[type="radio"]:checked + label::after {
color: #fff;
}
.checkbox-warning input[type="checkbox"]:checked + label::before,
.checkbox-warning input[type="radio"]:checked + label::before {
background-color: #f0ad4e;
border-color: #f0ad4e;
}
.checkbox-warning input[type="checkbox"]:checked + label::after,
.checkbox-warning input[type="radio"]:checked + label::after {
color: #fff;
}
.checkbox-success input[type="checkbox"]:checked + label::before,
.checkbox-success input[type="radio"]:checked + label::before {
background-color: #5cb85c;
border-color: #5cb85c;
}
.checkbox-success input[type="checkbox"]:checked + label::after,
.checkbox-success input[type="radio"]:checked + label::after {
color: #fff;
}
.checkbox-primary input[type="checkbox"]:indeterminate + label::before,
.checkbox-primary input[type="radio"]:indeterminate + label::before {
background-color: #337ab7;
border-color: #337ab7;
}
.checkbox-primary input[type="checkbox"]:indeterminate + label::after,
.checkbox-primary input[type="radio"]:indeterminate + label::after {
background-color: #fff;
}
.checkbox-danger input[type="checkbox"]:indeterminate + label::before,
.checkbox-danger input[type="radio"]:indeterminate + label::before {
background-color: #d9534f;
border-color: #d9534f;
}
.checkbox-danger input[type="checkbox"]:indeterminate + label::after,
.checkbox-danger input[type="radio"]:indeterminate + label::after {
background-color: #fff;
}
.checkbox-info input[type="checkbox"]:indeterminate + label::before,
.checkbox-info input[type="radio"]:indeterminate + label::before {
background-color: #5bc0de;
border-color: #5bc0de;
}
.checkbox-info input[type="checkbox"]:indeterminate + label::after,
.checkbox-info input[type="radio"]:indeterminate + label::after {
background-color: #fff;
}
.checkbox-warning input[type="checkbox"]:indeterminate + label::before,
.checkbox-warning input[type="radio"]:indeterminate + label::before {
background-color: #f0ad4e;
border-color: #f0ad4e;
}
.checkbox-warning input[type="checkbox"]:indeterminate + label::after,
.checkbox-warning input[type="radio"]:indeterminate + label::after {
background-color: #fff;
}
.checkbox-success input[type="checkbox"]:indeterminate + label::before,
.checkbox-success input[type="radio"]:indeterminate + label::before {
background-color: #5cb85c;
border-color: #5cb85c;
}
.checkbox-success input[type="checkbox"]:indeterminate + label::after,
.checkbox-success input[type="radio"]:indeterminate + label::after {
background-color: #fff;
}
.radio {
padding-left: 20px;
}
.radio label {
display: inline-block;
vertical-align: middle;
position: relative;
padding-left: 5px;
}
.radio label::before {
content: "";
display: inline-block;
position: absolute;
width: 17px;
height: 17px;
left: 0;
margin-left: -20px;
border: 1px solid #cccccc;
border-radius: 50%;
background-color: #fff;
-webkit-transition: border 0.15s ease-in-out;
-o-transition: border 0.15s ease-in-out;
transition: border 0.15s ease-in-out;
}
.radio label::after {
display: inline-block;
position: absolute;
content: " ";
width: 11px;
height: 11px;
left: 3px;
top: 3px;
margin-left: -20px;
border-radius: 50%;
background-color: #555555;
-webkit-transform: scale(0, 0);
-ms-transform: scale(0, 0);
-o-transform: scale(0, 0);
transform: scale(0, 0);
-webkit-transition: -webkit-transform 0.1s cubic-bezier(0.8, -0.33, 0.2, 1.33);
-moz-transition: -moz-transform 0.1s cubic-bezier(0.8, -0.33, 0.2, 1.33);
-o-transition: -o-transform 0.1s cubic-bezier(0.8, -0.33, 0.2, 1.33);
transition: transform 0.1s cubic-bezier(0.8, -0.33, 0.2, 1.33);
}
.radio input[type="radio"] {
opacity: 0;
z-index: 1;
cursor: pointer;
}
.radio input[type="radio"]:focus + label::before {
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
.radio input[type="radio"]:checked + label::after {
-webkit-transform: scale(1, 1);
-ms-transform: scale(1, 1);
-o-transform: scale(1, 1);
transform: scale(1, 1);
}
.radio input[type="radio"]:disabled {
cursor: not-allowed;
}
.radio input[type="radio"]:disabled + label {
opacity: 0.65;
}
.radio input[type="radio"]:disabled + label::before {
cursor: not-allowed;
}
.radio.radio-inline {
margin-top: 0;
}
.radio-primary input[type="radio"] + label::after {
background-color: #337ab7;
}
.radio-primary input[type="radio"]:checked + label::before {
border-color: #337ab7;
}
.radio-primary input[type="radio"]:checked + label::after {
background-color: #337ab7;
}
.radio-danger input[type="radio"] + label::after {
background-color: #d9534f;
}
.radio-danger input[type="radio"]:checked + label::before {
border-color: #d9534f;
}
.radio-danger input[type="radio"]:checked + label::after {
background-color: #d9534f;
}
.radio-info input[type="radio"] + label::after {
background-color: #5bc0de;
}
.radio-info input[type="radio"]:checked + label::before {
border-color: #5bc0de;
}
.radio-info input[type="radio"]:checked + label::after {
background-color: #5bc0de;
}
.radio-warning input[type="radio"] + label::after {
background-color: #f0ad4e;
}
.radio-warning input[type="radio"]:checked + label::before {
border-color: #f0ad4e;
}
.radio-warning input[type="radio"]:checked + label::after {
background-color: #f0ad4e;
}
.radio-success input[type="radio"] + label::after {
background-color: #5cb85c;
}
.radio-success input[type="radio"]:checked + label::before {
border-color: #5cb85c;
}
.radio-success input[type="radio"]:checked + label::after {
background-color: #5cb85c;
}
input[type="checkbox"].styled:checked + label:after,
input[type="radio"].styled:checked + label:after {
font-family: 'FontAwesome';
content: "\f00c";
}
input[type="checkbox"] .styled:checked + label::before,
input[type="radio"] .styled:checked + label::before {
color: #fff;
}
input[type="checkbox"] .styled:checked + label::after,
input[type="radio"] .styled:checked + label::after {
color: #fff;
}

View File

@ -0,0 +1,263 @@
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>awesome bootstrap checkbox demo</title>
<link href="../../bootstrap.css" rel="stylesheet" />
<link href="../../../fonts/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
<link href="../awesome-bootstrap-checkbox.css" rel="stylesheet" />
</head>
<body>
<div class="container">
<h2>Checkboxes</h2>
<form role="form">
<div class="row">
<div class="col-md-4">
<fieldset>
<legend>
Basic
</legend>
<p>
Supports bootstrap brand colors: <code>.checkbox-primary</code>, <code>.checkbox-info</code> etc.
</p>
<div class="checkbox">
<input id="checkbox1" class="styled" type="checkbox">
<label for="checkbox1">
Default
</label>
</div>
<div class="checkbox checkbox-primary">
<input id="checkbox2" class="styled" type="checkbox" checked>
<label for="checkbox2">
Primary
</label>
</div>
<div class="checkbox checkbox-success">
<input id="checkbox3" class="styled" type="checkbox">
<label for="checkbox3">
Success
</label>
</div>
<div class="checkbox checkbox-info">
<input id="checkbox4" class="styled" type="checkbox">
<label for="checkbox4">
Info
</label>
</div>
<div class="checkbox checkbox-warning">
<input id="checkbox5" type="checkbox" class="styled" checked>
<label for="checkbox5">
Warning
</label>
</div>
<div class="checkbox checkbox-danger">
<input id="checkbox6" type="checkbox" class="styled" checked>
<label for="checkbox6">
Check me out
</label>
</div>
<p>Checkboxes without label text</p>
<div class="checkbox">
<input type="checkbox" class="styled" id="singleCheckbox1" value="option1" aria-label="Single checkbox One">
<label></label>
</div>
<div class="checkbox checkbox-primary">
<input type="checkbox" class="styled styled-primary" id="singleCheckbox2" value="option2" checked aria-label="Single checkbox Two">
<label></label>
</div>
<p>Checkboxes with indeterminate state</p>
<div class="checkbox checkbox-primary">
<input id="indeterminateCheckbox" class="styled" type="checkbox" onclick="changeState(this)">
<label></label>
</div>
<p>Inline checkboxes</p>
<div class="checkbox checkbox-inline">
<input type="checkbox" class="styled" id="inlineCheckbox1" value="option1">
<label for="inlineCheckbox1"> Inline One </label>
</div>
<div class="checkbox checkbox-success checkbox-inline">
<input type="checkbox" class="styled" id="inlineCheckbox2" value="option1" checked>
<label for="inlineCheckbox2"> Inline Two </label>
</div>
<div class="checkbox checkbox-inline">
<input type="checkbox" class="styled" id="inlineCheckbox3" value="option1">
<label for="inlineCheckbox3"> Inline Three </label>
</div>
</fieldset>
</div>
<div class="col-md-4">
<fieldset>
<legend>
Circled
</legend>
<p>
<code>.checkbox-circle</code> for roundness.
</p>
<div class="checkbox checkbox-circle">
<input id="checkbox7" class="styled" type="checkbox">
<label for="checkbox7">
Simply Rounded
</label>
</div>
<div class="checkbox checkbox-info checkbox-circle">
<input id="checkbox8" class="styled" type="checkbox" checked>
<label for="checkbox8">
Me too
</label>
</div>
</fieldset>
</div>
<div class="col-md-4">
<fieldset>
<legend>
Disabled
</legend>
<p>
Disabled state also supported.
</p>
<div class="checkbox">
<input class="styled" id="checkbox9" type="checkbox" disabled>
<label for="checkbox9">
Can't check this
</label>
</div>
<div class="checkbox checkbox-success">
<input class="styled styled" id="checkbox10" type="checkbox" disabled checked>
<label for="checkbox10">
This too
</label>
</div>
<div class="checkbox checkbox-warning checkbox-circle">
<input class="styled" id="checkbox11" type="checkbox" disabled checked>
<label for="checkbox11">
And this
</label>
</div>
</fieldset>
</div>
</div>
</form>
<h2>Radios</h2>
<form role="form">
<div class="row">
<div class="col-md-4">
<fieldset>
<legend>
Basic
</legend>
<p>
Supports bootstrap brand colors: <code>.radio-primary</code>, <code>.radio-danger</code> etc.
</p>
<div class="row">
<div class="col-sm-6">
<div class="radio">
<input type="radio" name="radio1" id="radio1" value="option1" checked>
<label for="radio1">
Small
</label>
</div>
<div class="radio">
<input type="radio" name="radio1" id="radio2" value="option2">
<label for="radio2">
Big
</label>
</div>
</div>
<div class="col-sm-6">
<div class="radio radio-danger">
<input type="radio" name="radio2" id="radio3" value="option1">
<label for="radio3">
Next
</label>
</div>
<div class="radio radio-danger">
<input type="radio" name="radio2" id="radio4" value="option2" checked>
<label for="radio4">
One
</label>
</div>
</div>
</div>
<p>Radios without label text</p>
<div class="radio">
<input type="radio" id="singleRadio1" value="option1" name="radioSingle1" aria-label="Single radio One">
<label></label>
</div>
<div class="radio radio-success">
<input type="radio" id="singleRadio2" value="option2" name="radioSingle1" checked aria-label="Single radio Two">
<label></label>
</div>
<p>Inline radios</p>
<div class="radio radio-info radio-inline">
<input type="radio" id="inlineRadio1" value="option1" name="radioInline" checked>
<label for="inlineRadio1"> Inline One </label>
</div>
<div class="radio radio-inline">
<input type="radio" id="inlineRadio2" value="option2" name="radioInline">
<label for="inlineRadio2"> Inline Two </label>
</div>
</fieldset>
</div>
<div class="col-md-4">
<fieldset>
<legend>
Disabled
</legend>
<p>
Disabled state also supported.
</p>
<div class="radio radio-danger">
<input type="radio" name="radio3" id="radio5" value="option1" disabled>
<label for="radio5">
Next
</label>
</div>
<div class="radio">
<input type="radio" name="radio3" id="radio6" value="option2" checked disabled>
<label for="radio6">
One
</label>
</div>
</fieldset>
</div>
<div class="col-md-4">
<fieldset>
<legend>
As Checkboxes
</legend>
<p>
Radios can be made to look like checkboxes.
</p>
<div class="checkbox checkbox">
<input type="radio" name="radio4" id="radio7" value="option1" checked>
<label for="radio7">
Default
</label>
</div>
<div class="checkbox checkbox-success">
<input type="radio" name="radio4" id="radio8" value="option2">
<label for="radio8">
Success
</label>
</div>
<div class="checkbox checkbox-danger">
<input type="radio" name="radio4" id="radio9" value="option3">
<label for="radio9">
Danger
</label>
</div>
</fieldset>
</div>
</div>
</form>
</div>
<script type="text/javascript">
function changeState(el) {
if (el.readOnly) el.checked=el.readOnly=false;
else if (!el.checked) el.readOnly=el.indeterminate=true;
}
</script>
</body>
</html>

View File

@ -0,0 +1,300 @@
/**
* Admui-iframe v1.0.0
* Copyright 2015-2017 Admui Team
* Licensed under the Muyao License 1.0
*/
.btn-select {
height: 32px;
padding: 4px 12px;
font-size: 14px;
line-height: 1.6;
color: #76838f;
background-color: #fff;
background-image: none;
border: 1px solid #e4eaec;
border-radius: 3px;
}
.btn-group.open .btn-select, .btn-select:focus {
border-color: #62a8ea !important;
-webkit-box-shadow: none;
box-shadow: none;
}
select.bs-select-hidden, select.selectpicker {
display: none !important;
}
.bootstrap-select {
z-index:19910501;
width: 220px;
}
.bootstrap-select > .dropdown-toggle {
z-index: 1;
width: 100%;
padding-right: 25px;
}
.bootstrap-select > .dropdown-toggle.bs-placeholder, .bootstrap-select > .dropdown-toggle.bs-placeholder:hover, .bootstrap-select > .dropdown-toggle.bs-placeholder:focus, .bootstrap-select > .dropdown-toggle.bs-placeholder:active {
color: #a3afb7;
}
.bootstrap-select > select {
position: absolute;
bottom: 0;
left: 50%;
display: block !important;
width: .5px !important;
height: 100% !important;
padding: 0 !important;
border: none;
opacity: 0 !important;
}
.bootstrap-select > select.mobile-device {
position: absolute !important;
top: 0;
left: 0;
z-index: 2;
display: block !important;
width: 100%;
height: 100% !important;
opacity: 0;
}
.bootstrap-select .icon {
width: 1em;
text-align: center;
}
.has-error .bootstrap-select .dropdown-toggle, .error .bootstrap-select .dropdown-toggle {
border-color: #f85974 !important;
}
.has-success .bootstrap-select .dropdown-toggle {
border-color: #3dae6a;
}
.bootstrap-select.fit-width {
width: auto !important;
}
.bootstrap-select:not([class*="col-"]):not([class*="form-control"]):not(.input-group-btn) {
width: 220px;
}
.bootstrap-select.form-control {
padding: 0;
margin-bottom: 0;
border: none;
}
.bootstrap-select.form-control:not([class*="col-"]) {
width: 100%;
}
.bootstrap-select.form-control.input-group-btn {
z-index: auto;
}
.bootstrap-select.btn-group:not(.input-group-btn), .bootstrap-select.btn-group[class*="col-"] {
display: inline-block;
float: none;
margin-left: 0;
}
.bootstrap-select.btn-group.dropdown-menu-right, .bootstrap-select.btn-group[class*="col-"].dropdown-menu-right, .row .bootstrap-select.btn-group[class*="col-"].dropdown-menu-right {
float: right;
}
.form-inline .bootstrap-select.btn-group, .form-horizontal .bootstrap-select.btn-group, .form-group .bootstrap-select.btn-group {
margin-bottom: 0;
}
.form-group-lg .bootstrap-select.btn-group.form-control, .form-group-sm .bootstrap-select.btn-group.form-control {
padding: 0;
}
.form-inline .bootstrap-select.btn-group .form-control {
width: 100%;
}
.bootstrap-select.btn-group.disabled, .bootstrap-select.btn-group > .disabled {
cursor: not-allowed;
}
.bootstrap-select.btn-group.disabled:focus, .bootstrap-select.btn-group > .disabled:focus {
outline: none !important;
}
.bootstrap-select.btn-group.bs-container {
position: absolute;
}
.bootstrap-select.btn-group.bs-container .dropdown-menu {
z-index: 1450;
}
.bootstrap-select.btn-group .dropdown-toggle .filter-option {
display: inline-block;
width: 100%;
overflow: hidden;
text-align: left;
}
.bootstrap-select.btn-group .dropdown-toggle .filter-option > .icon {
margin-right: .3em;
}
.bootstrap-select.btn-group .dropdown-toggle .caret {
position: absolute;
top: 50%;
right: 12px;
margin-top: -2px;
vertical-align: middle;
}
.bootstrap-select.btn-group[class*="col-"] .dropdown-toggle {
width: 100%;
}
.bootstrap-select.btn-group .dropdown-menu {
min-width: 100%;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.bootstrap-select.btn-group .dropdown-menu.inner {
position: static;
float: none;
padding: 0;
margin: 0;
border: 0;
border-radius: 0;
-webkit-box-shadow: none;
box-shadow: none;
}
.bootstrap-select.btn-group .dropdown-menu li {
position: relative;
}
.bootstrap-select.btn-group .dropdown-menu li.active small {
color: #fff;
}
.bootstrap-select.btn-group .dropdown-menu li.disabled a {
cursor: not-allowed;
}
.bootstrap-select.btn-group .dropdown-menu li a {
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.bootstrap-select.btn-group .dropdown-menu li a > .icon {
margin-right: .3em;
}
.bootstrap-select.btn-group .dropdown-menu li a.opt {
position: relative;
padding-left: 2.25em;
}
.bootstrap-select.btn-group .dropdown-menu li a span.check-mark {
display: none;
}
.bootstrap-select.btn-group .dropdown-menu li a span.text {
display: inline-block;
}
.bootstrap-select.btn-group .dropdown-menu li small {
padding-left: .5em;
}
.bootstrap-select.btn-group .dropdown-menu .notify {
position: absolute;
bottom: 6px;
width: 94%;
min-height: 26px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 3px 5px;
margin: 0 3%;
color: #76838f;
pointer-events: none;
background-color: #f3f7f9;
border: 1px solid #e4eaec;
border-radius: 3px;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
opacity: .9;
}
.bootstrap-select.btn-group .no-results {
padding: 5px 10px;
margin: 0 8px 3px;
color: #76838f;
white-space: nowrap;
background-color: #f3f7f9;
border-radius: 3px;
}
.bootstrap-select.btn-group.fit-width .dropdown-toggle .filter-option {
position: static;
}
.bootstrap-select.btn-group.fit-width .dropdown-toggle .caret {
position: static;
top: auto;
margin-top: -1px;
}
.bootstrap-select.btn-group.show-tick .dropdown-menu li.selected a span.check-mark {
position: absolute;
right: 15px;
display: inline-block;
margin-top: 5px;
}
.bootstrap-select.btn-group.show-tick .dropdown-menu li a span.text {
margin-right: 34px;
}
.bootstrap-select.show-menu-arrow.open > .dropdown-toggle {
z-index: 1451;
}
.bootstrap-select.show-menu-arrow .dropdown-toggle:before {
position: absolute;
bottom: -9px;
left: 9px;
display: none;
content: "";
border-right: 8px solid transparent;
border-bottom: 8px solid #e4eaec;
border-left: 8px solid transparent;
}
.bootstrap-select.show-menu-arrow .dropdown-toggle:after {
position: absolute;
bottom: -9px;
left: 10px;
display: none;
content: "";
border-right: 7px solid transparent;
border-bottom: 7px solid white;
border-left: 7px solid transparent;
}
.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:before {
top: -8px;
bottom: auto;
border-top: 8px solid #e4eaec;
border-bottom: 0;
}
.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:after {
top: -8px;
bottom: auto;
border-top: 7px solid white;
border-bottom: 0;
}
.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:before {
right: 12px;
left: auto;
}
.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:after {
right: 13px;
left: auto;
}
.bootstrap-select.show-menu-arrow.open > .dropdown-toggle:before, .bootstrap-select.show-menu-arrow.open > .dropdown-toggle:after {
display: block;
}
.bs-searchbox, .bs-actionsbox, .bs-donebutton {
padding: 4px 8px;
}
.bs-actionsbox {
width: 100%;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.bs-actionsbox .btn-group button {
width: 50%;
}
.bs-donebutton {
float: left;
width: 100%;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.bs-donebutton .btn-group button {
width: 100%;
}
.bs-searchbox + .bs-actionsbox {
padding: 0 8px 4px;
}
.bs-searchbox input.form-control {
float: none;
width: 100%;
margin-bottom: 0;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,4 @@
#bootstrap-table
API文档https://bootstrap-table.com/docs/api/table-options/

View File

@ -0,0 +1,319 @@
/**
* @author zhixin wen <wenzhixin2010@gmail.com>
* version: 1.12.1
* https://github.com/wenzhixin/bootstrap-table/
*/
.bootstrap-table .table {
margin-bottom: 0 !important;
border-bottom: 1px solid #dddddd;
border-collapse: collapse !important;
border-radius: 1px;
}
.bootstrap-table .table:not(.table-condensed),
.bootstrap-table .table:not(.table-condensed) > tbody > tr > th,
.bootstrap-table .table:not(.table-condensed) > tfoot > tr > th,
.bootstrap-table .table:not(.table-condensed) > thead > tr > td,
.bootstrap-table .table:not(.table-condensed) > tbody > tr > td,
.bootstrap-table .table:not(.table-condensed) > tfoot > tr > td {
padding: 8px;
word-break: break-word;
}
.bootstrap-table .table.table-no-bordered > thead > tr > th,
.bootstrap-table .table.table-no-bordered > tbody > tr > td {
border-right: 2px solid transparent;
}
.bootstrap-table .table.table-no-bordered > tbody > tr > td:last-child {
border-right: none;
}
.fixed-table-container {
position: relative;
clear: both;
border: 1px solid #dddddd;
border-radius: 4px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
}
.fixed-table-container.table-no-bordered {
border: 1px solid transparent;
}
.fixed-table-footer,
.fixed-table-header {
overflow: hidden;
}
.fixed-table-footer {
border-top: 1px solid #dddddd;
}
.fixed-table-body {
overflow-x: auto;
overflow-y: auto;
height: 100%;
}
.fixed-table-container table {
width: 100%;
}
.fixed-table-container thead th {
height: 0;
padding: 0;
margin: 0;
border-left: 1px solid #dddddd;
}
.fixed-table-container thead th:focus {
outline: 0 solid transparent;
}
.fixed-table-container thead th:first-child:not([data-not-first-th]) {
border-left: none;
border-top-left-radius: 4px;
-webkit-border-top-left-radius: 4px;
-moz-border-radius-topleft: 4px;
}
.fixed-table-container thead th .th-inner,
.fixed-table-container tbody td .th-inner {
padding: 8px;
line-height: 24px;
vertical-align: top;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.fixed-table-container thead th .sortable {
cursor: pointer;
background-position: right;
background-repeat: no-repeat;
padding-right: 30px;
}
.fixed-table-container thead th .both {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAkElEQVQoz7X QMQ5AQBCF4dWQSJxC5wwax1Cq1e7BAdxD5SL+Tq/QCM1oNiJidwox0355mXnG/DrEtIQ6azioNZQxI0ykPhTQIwhCR+BmBYtlK7kLJYwWCcJA9M4qdrZrd8pPjZWPtOqdRQy320YSV17OatFC4euts6z39GYMKRPCTKY9UnPQ6P+GtMRfGtPnBCiqhAeJPmkqAAAAAElFTkSuQmCC');
}
.fixed-table-container thead th .asc {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS/gDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM+wTENuQahAvEO9DMwiGdwAxOymGJQLxTyD+jgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg==');
}
.fixed-table-container thead th .desc {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZUlEQVQ4y2NgGAWjYBSggaqGu5FA/BOIv2PBIPFEUgxjB+IdQPwfC94HxLykus4GiD+hGfQOiB3J8SojEE9EM2wuSJzcsFMG4ttQgx4DsRalkZENxL+AuJQaMcsGxBOAmGvopk8AVz1sLZgg0bsAAAAASUVORK5CYII= ');
}
.fixed-table-container th.detail {
width: 30px;
}
.fixed-table-container tbody td {
border-left: 1px solid #dddddd;
}
.fixed-table-container tbody tr:first-child td {
border-top: none;
}
.fixed-table-container tbody td:first-child {
border-left: none;
}
/* the same color with .active */
.fixed-table-container tbody .selected td {
background-color: #f5f5f5;
}
.fixed-table-container .bs-checkbox {
text-align: center;
}
.fixed-table-container input[type="radio"],
.fixed-table-container input[type="checkbox"] {
margin: 0 auto !important;
}
.fixed-table-container .no-records-found {
text-align: center;
}
.fixed-table-pagination div.pagination,
.fixed-table-pagination .pagination-detail {
margin-top: 3px;
margin-bottom: 3px;
}
.fixed-table-pagination div.pagination .pagination {
margin: 0;
}
.fixed-table-pagination .pagination a {
padding: 6px 12px;
line-height: 1.428571429;
}
.fixed-table-pagination .pagination-info {
/*line-height: 34px;*/
margin-right: 5px;
}
.fixed-table-pagination .btn-group {
position: relative;
display: inline-block;
vertical-align: middle;
}
.fixed-table-pagination .dropup .dropdown-menu {
margin-bottom: 0;
}
.fixed-table-pagination .page-list {
display: inline-block;
}
.fixed-table-toolbar .columns-left {
margin-right: 5px;
}
.fixed-table-toolbar .columns-right {
margin-left: 5px;
}
.fixed-table-toolbar .columns label {
display: block;
padding: 3px 20px;
clear: both;
font-weight: normal;
line-height: 1.428571429;
}
.fixed-table-toolbar .bs-bars,
.fixed-table-toolbar .search,
.fixed-table-toolbar .columns {
position: relative;
margin-top: 3px;
margin-bottom: 3px;
line-height: 34px;
}
.fixed-table-pagination li.disabled a {
pointer-events: none;
cursor: default;
}
.fixed-table-loading {
display: none;
position: absolute;
top: 42px;
right: 0;
bottom: 0;
left: 0;
z-index: 99;
background-color: rgba(63, 72, 84, 1);
text-align: center;
}
.fixed-table-body .card-view .title {
font-weight: bold;
display: inline-block;
min-width: 30%;
text-align: left !important;
}
/* support bootstrap 2 */
.fixed-table-body thead th .th-inner {
box-sizing: border-box;
}
.table th, .table td {
vertical-align: middle;
box-sizing: border-box;
}
.fixed-table-toolbar .dropdown-menu {
text-align: left;
max-height: 300px;
overflow: auto;
}
.fixed-table-toolbar .btn-group > .btn-group {
display: inline-block;
margin-left: -1px !important;
}
.fixed-table-toolbar .btn-group > .btn-group > .btn {
border-radius: 0;
}
.fixed-table-toolbar .btn-group > .btn-group:first-child > .btn {
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
}
.fixed-table-toolbar .btn-group > .btn-group:last-child > .btn {
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
}
.bootstrap-table .table > thead > tr > th {
vertical-align: bottom;
border-bottom: 1px solid #ddd;
}
/* support bootstrap 3 */
.bootstrap-table .table thead > tr > th {
padding: 0;
margin: 0;
}
.bootstrap-table .fixed-table-footer tbody > tr > td {
padding: 0 !important;
}
.bootstrap-table .fixed-table-footer .table {
border-bottom: none;
border-radius: 0;
padding: 0 !important;
}
.bootstrap-table .pull-right .dropdown-menu {
right: 0;
left: auto;
}
/* calculate scrollbar width */
p.fixed-table-scroll-inner {
width: 100%;
height: 200px;
}
div.fixed-table-scroll-outer {
top: 0;
left: 0;
visibility: hidden;
width: 200px;
height: 150px;
overflow: hidden;
}
/* for get correct heights */
.fixed-table-toolbar:after, .fixed-table-pagination:after {
content: "";
display: block;
clear: both;
}
.fullscreen {
position: fixed;
top: 0;
left: 0;
z-index: 1050;
width: 100%!important;
background: #FFF;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,179 @@
/**
* @author zhixin wen <wenzhixin2010@gmail.com>
* extensions: https://github.com/kayalshri/tableExport.jquery.plugin
*/
(function ($) {
'use strict';
var sprintf = $.fn.bootstrapTable.utils.sprintf;
var TYPE_NAME = {
json: 'JSON',
xml: 'XML',
png: 'PNG',
csv: 'CSV',
txt: 'TXT',
sql: 'SQL',
doc: 'Word文档',
excel: 'Excel文档',
xlsx: 'MS-Excel (OpenXML)',
powerpoint: 'MS-Powerpoint',
pdf: 'PDF'
};
$.extend($.fn.bootstrapTable.defaults, {
showExport: false,
exportDataType: 'basic', // basic, all, selected
// 'json', 'xml', 'png', 'csv', 'txt', 'sql', 'doc', 'excel', 'powerpoint', 'pdf'
exportTypes: ['json', 'xml', 'csv', 'txt', 'sql', 'excel'],
exportOptions: {}
});
$.extend($.fn.bootstrapTable.defaults.icons, {
export: ' fa-download icon-share'
});
$.extend($.fn.bootstrapTable.locales, {
formatExport: function () {
return '导出数据';
}
});
$.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales);
var BootstrapTable = $.fn.bootstrapTable.Constructor,
_initToolbar = BootstrapTable.prototype.initToolbar;
BootstrapTable.prototype.initToolbar = function () {
this.showToolbar = this.showToolbar || this.options.showExport;
_initToolbar.apply(this, Array.prototype.slice.apply(arguments));
if (this.options.showExport) {
var that = this,
$btnGroup = this.$toolbar.find('>.btn-group'),
$export = $btnGroup.find('div.export');
if (!$export.length) {
$export = $([
'<div class="export btn-group">',
'<button class="btn' +
sprintf(' btn-%s', this.options.buttonsClass) +
sprintf(' btn-%s', this.options.iconSize) +
' dropdown-toggle" aria-label="export type" ' +
'title="' + this.options.formatExport() + '" ' +
'data-toggle="dropdown" type="button">',
sprintf('<i class="%s %s"></i> 导出', this.options.iconsPrefix, this.options.icons.export),
'<span class="caret"></span>',
'</button>',
'<ul class="dropdown-menu" role="menu">',
'</ul>',
'</div>'].join('')).appendTo($btnGroup);
var $menu = $export.find('.dropdown-menu'),
exportTypes = this.options.exportTypes;
if (typeof this.options.exportTypes === 'string') {
var types = this.options.exportTypes.slice(1, -1).replace(/ /g, '').split(',');
exportTypes = [];
$.each(types, function (i, value) {
exportTypes.push(value.slice(1, -1));
});
}
$.each(exportTypes, function (i, type) {
if (TYPE_NAME.hasOwnProperty(type)) {
$menu.append(['<li role="menuitem" data-type="' + type + '">',
'<a href="javascript:void(0)">',
TYPE_NAME[type],
'</a>',
'</li>'].join(''));
}
});
$menu.find('li').click(function () {
var type = $(this).data('type'),
doExport = function () {
if (!!that.options.exportFooter) {
var data = that.getData();
var $footerRow = that.$tableFooter.find("tr").first();
var footerData = { };
var footerHtml = [];
$.each($footerRow.children(), function (index, footerCell) {
var footerCellHtml = $(footerCell).children(".th-inner").first().html();
footerData[that.columns[index].field] = footerCellHtml == '&nbsp;' ? null : footerCellHtml;
// grab footer cell text into cell index-based array
footerHtml.push(footerCellHtml);
});
that.append(footerData);
var $lastTableRow = that.$body.children().last();
$.each($lastTableRow.children(), function (index, lastTableRowCell) {
$(lastTableRowCell).html(footerHtml[index]);
});
}
that.$el.tableExport($.extend({}, that.options.exportOptions, {
type: type,
escape: false
}));
if (!!that.options.exportFooter) {
that.load(data);
}
};
var stateField = that.header.stateField;
if (that.options.exportDataType === 'all' && that.options.pagination) {
that.$el.one(that.options.sidePagination === 'server' ? 'post-body.bs.table' : 'page-change.bs.table', function () {
if (stateField) {
that.hideColumn(stateField);
}
doExport();
that.togglePagination();
});
that.togglePagination();
} else if (that.options.exportDataType === 'selected') {
var data = that.getData(),
selectedData = that.getSelections();
if (!selectedData.length) {
return;
}
if (that.options.sidePagination === 'server') {
var dataServer = {total: that.options.totalRows};
dataServer[that.options.dataField] = data;
data = dataServer;
var selectedDataServer = {total: selectedData.length};
selectedDataServer[that.options.dataField] = selectedData;
selectedData = selectedDataServer;
}
that.load(selectedData);
if (stateField) {
that.hideColumn(stateField);
}
doExport();
that.load(data);
} else {
if (stateField) {
that.hideColumn(stateField);
}
doExport();
}
if (stateField) {
that.showColumn(stateField);
}
});
}
}
};
})(jQuery);

Some files were not shown because too many files have changed in this diff Show More