|
@@ -33,69 +33,15 @@
|
|
|
font-weight: bold;
|
|
|
background-color: antiquewhite !important;
|
|
|
}
|
|
|
-
|
|
|
- /* 弹框的背景 干掉试试 */
|
|
|
- .mui-backdrop.mui-active.mui-backdrop-action {
|
|
|
- display: none;
|
|
|
- }
|
|
|
-
|
|
|
- .mui-popover-bottom .mui-bar {
|
|
|
- background-color: blue !important;
|
|
|
- }
|
|
|
-
|
|
|
- .mui-popover-bottom .mui-bar::after {
|
|
|
- font-family: 'iconfont', sans-serif !important;
|
|
|
- position: absolute;
|
|
|
- content: '\e614';
|
|
|
- height: 44px;
|
|
|
- line-height: 44px;
|
|
|
- width: 20px;
|
|
|
- right: 15px;
|
|
|
- padding: 0px;
|
|
|
- z-index: 10;
|
|
|
- color: rgb(255, 255, 255);
|
|
|
- font-weight: bold;
|
|
|
- font-size: 18px;
|
|
|
- }
|
|
|
-
|
|
|
- .mui-popover-bottom .mui-bar:active::after {
|
|
|
- color: rgb(255, 255, 0);
|
|
|
- }
|
|
|
</style>
|
|
|
</head>
|
|
|
<body>
|
|
|
- <button type="button" onclick="showPdf()">打开对话框</button>
|
|
|
- <div class="mui-input-row">
|
|
|
- <label>实例一</label>
|
|
|
- <input name="checkbox1" value="Item 1" type="checkbox" checked>
|
|
|
- </div>
|
|
|
- <div class="mui-input-row">
|
|
|
- <label>实例二</label>
|
|
|
- <input name="checkbox1" value="Item 1" type="checkbox">
|
|
|
- </div>
|
|
|
- <div class="mui-input-row">
|
|
|
- <label>实例三</label>
|
|
|
- <input name="checkbox1" value="Item 1" type="checkbox" checked>
|
|
|
- </div>
|
|
|
- <!-- 查询结果弹出层 -->
|
|
|
- <div id="queryResultPopover" class="mui-popover mui-popover-action mui-popover-bottom wc-popover-case">
|
|
|
- <header id="queryResultTitle" class="mui-bar">查询结果</header>
|
|
|
- <div class="mui-slider" id="slider">
|
|
|
- <!-- mui-slider-loop 如果需要轮循播放需要添加-->
|
|
|
- <div id="caseQueryResult" class="mui-slider-group">
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <button type="button" onclick="showPdf()">查询指定权限</button>
|
|
|
+
|
|
|
</body>
|
|
|
</html>
|
|
|
<script src="./js/mui.min.js" type="text/javascript"></script>
|
|
|
-<!-- 引入弹窗及选择器脚本 -->
|
|
|
-<script src="./js/mui.picker.min.js" type="text/javascript" charset="utf-8"></script>
|
|
|
-<script src="./js/mui.poppicker.js" type="text/javascript" charset="utf-8"></script>
|
|
|
-<script src="./js/MapManager.js"></script>
|
|
|
-<script src="./js/jquery.js"></script>
|
|
|
-<script src="./js/common.js"></script>
|
|
|
-<script src="./js/save.js"></script>
|
|
|
+<script src="./js/case.js"></script>
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
@@ -112,98 +58,23 @@
|
|
|
bounce: false, //是否启用回弹
|
|
|
});
|
|
|
|
|
|
- let chkObj = document.getElementsByName('checkbox1');
|
|
|
- for (let checkbox of chkObj) {
|
|
|
- checkbox.checked = false;
|
|
|
- }
|
|
|
+ var permissions = [{
|
|
|
+ "code": "1007",
|
|
|
+ "name": "派发员"
|
|
|
+ }, {
|
|
|
+ "code": "1003",
|
|
|
+ "name": "审核员"
|
|
|
+ }];
|
|
|
|
|
|
function showPdf() {
|
|
|
- mui("#queryResultPopover").popover('show');
|
|
|
- _initCSAData([{
|
|
|
- name: '第一条',
|
|
|
- }]);
|
|
|
+ console.log(permissionFind(permissions, userPermission.perSH));
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 展示通用占地分析结果数据集
|
|
|
- * @param {Array} datas 通用占地分析结果数据集
|
|
|
- */
|
|
|
- function _initCSAData(datas) {
|
|
|
- /* 初始化 加入根节点*/
|
|
|
- let divRoot = document.createElement('div');
|
|
|
- divRoot.className = 'jt-csa-count-result-panel';
|
|
|
- let rootHtml = "";
|
|
|
- /* 创建横向滚动tab */
|
|
|
- rootHtml +=
|
|
|
- "<div class='mui-scroll-wrapper mui-slider-indicator mui-segmented-control mui-segmented-control-inverted'>";
|
|
|
- rootHtml += "<div class='mui-scroll'>";
|
|
|
- for (let i = 0; i < datas.length; i++) {
|
|
|
- rootHtml += "<a href='#item_count" + i + "' class='mui-control-item";
|
|
|
- if (i === 0) {
|
|
|
- if (datas.length === 1) {
|
|
|
- rootHtml += " jt-control-item mui-active";
|
|
|
- } else {
|
|
|
- rootHtml += " mui-active";
|
|
|
- }
|
|
|
- }
|
|
|
- rootHtml += "' id='top" + i + "'>" + datas[i].name + "</a>";
|
|
|
- }
|
|
|
- rootHtml += "</div>";
|
|
|
- rootHtml += "</div>";
|
|
|
- /* 创建统计信息详细内容 */
|
|
|
- rootHtml += "<div class='mui-content-padded'>";
|
|
|
- for (let i = 0; i < datas.length; i++) {
|
|
|
- rootHtml += "<div id='item_count" + i + "' class='mui-control-content jt-mui-control-content";
|
|
|
- if (i === 0) {
|
|
|
- rootHtml += " mui-active";
|
|
|
- }
|
|
|
- rootHtml += "'>";
|
|
|
- rootHtml += "<div class='jt-row-content'>";
|
|
|
- rootHtml += "<div class='mui-scroll-wrapper'>";
|
|
|
- rootHtml += "<div class='mui-scroll'>";
|
|
|
- /* 以下是具体内容 */
|
|
|
- for (let j = 0; j < 10; j++) {
|
|
|
- if (j % 2 == 0) {
|
|
|
- rootHtml += "<div class='jt-feature-data-row jt-row-even-number'>";
|
|
|
- } else {
|
|
|
- rootHtml += "<div class='jt-feature-data-row jt-row-odd-number'>";
|
|
|
- }
|
|
|
- rootHtml += "<span>" + j + "</span>";
|
|
|
- rootHtml += "<span>" + i + "</span>";
|
|
|
- rootHtml += "<span>" + '0.00' + "亩</span>";
|
|
|
- rootHtml += "<button type='button' class='mui-btn app-icon app-icon-location jt-button'";
|
|
|
- rootHtml += " onclick = \"_queryFeatureWktAndLocation('','fx_common_spatial_analysis')\" />";
|
|
|
- rootHtml += "<button type='button' class='mui-btn app-icon app-iocn-details jt-button'";
|
|
|
- rootHtml += " onclick = \"openDetailsPage('','')\" />"
|
|
|
- rootHtml += "</div>";
|
|
|
- }
|
|
|
- /* 以上是具体内容 */
|
|
|
- rootHtml += "</div>";
|
|
|
- rootHtml += "</div>";
|
|
|
- rootHtml += "</div>";
|
|
|
- rootHtml += "</div>";
|
|
|
- }
|
|
|
- rootHtml += "</div>";
|
|
|
- divRoot.innerHTML = rootHtml;
|
|
|
- /* 创建弹窗的标题头 */
|
|
|
- var header = document.createElement('header');
|
|
|
- header.className = 'mui-bar';
|
|
|
- let headHtml = "<div class='jt-cnt-bar'>";
|
|
|
- headHtml +=
|
|
|
- "<button type='button' class='app-icon app-iocn-details jt-cnt-bar-button' onclick='_queryCSACount()'>统计信息</button>";
|
|
|
- headHtml += "<span class='jt-cnt-bar-title'>占压分析明细</span>";
|
|
|
- headHtml += "</div>";
|
|
|
- header.innerHTML = headHtml;
|
|
|
- /* 显示弹框 */
|
|
|
- _showMuiPopover(header, divRoot);
|
|
|
- $("#top0").addClass('jt-segmented-control-item');
|
|
|
-
|
|
|
- let divHtml = "<div class='jt-segmented-control-item-content'>";
|
|
|
- divHtml += "<span>你好</span>";
|
|
|
- divHtml += "<span class='jt-number'>1/2</span>";
|
|
|
- divHtml += "<button class='app-icon app-iocn-details jt-cnt-bar-button'>加载更多</button>";
|
|
|
- divHtml += "<div>"
|
|
|
+ function permissionFind(permissions, perCode) {
|
|
|
+ var result = permissions.find(function(item) {
|
|
|
+ return item.code === perCode;
|
|
|
+ });
|
|
|
|
|
|
- $("#top0").html(divHtml);
|
|
|
+ return result !== undefined;
|
|
|
}
|
|
|
</script>
|