| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250 |
- <!DOCTYPE html>
- <html>
- <head>
- <title>实时告警</title>
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
- <meta content="IE=edge" http-equiv="X-UA-Compatible"/>
- <meta content="width=device-width, initial-scale=1" name="viewport"/>
- <link href="favicon.ico" rel="icon" type="image/x-icon"/>
- <link href="css/theme-dark-blue.css" id='theme' rel="stylesheet" type="text/css"/>
- </head>
- <body>
- <div class="main_dsm_page">
- <div class="container-fluid">
- <div class="panel_box">
- <div class="panel_title">
- <div class="col-md-12">
- <h4>告警类别统计表</h4>
- </div>
- </div>
- <div class="iPanel clearfix" style="padding-top:0px; padding-bottom:0px;">
- <div class="col-md-6 right-border">
- <div class="content">
- <div class="chart-wrap">
- <div id="rose1"></div>
- </div>
- </div>
- </div>
- <div class="col-md-6">
- <div class="content">
- <div class="chart-wrap">
- <div id="rose2"></div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="panel_box">
- <div class="table_title blue">
- <p>未处理告警</p>
- </div>
- <table data-height="405" data-mobile-responsive="true" id="TContact" style="table-layout:fixed;">
- <thead>
- <tr class="hidden-em">
- <th data-field="upload_date_value">告警时间</th>
- <th data-field="warn_type_value" data-formatter="formatterColT">告警类别</th>
- <th data-field="areaName">市县区</th>
- <th data-field="park_id_name">园区</th>
- <th data-field="org_name">企业</th>
- <th data-align="center" data-field="solveStatusName" data-formatter="formatterColS">处理状态</th>
- <th data-align="center" data-field="operate" data-formatter="OperatingFomatterO">操作</th>
- </tr>
- </thead>
- </table>
- </div>
- </div>
- </div>
- </body>
- <script src="js/import.js" type='text/javascript'></script>
- <script src="js/pages/common.js" type='text/javascript'></script>
- <script src="js/pages/CURDTable.js" type='text/javascript'></script>
- <script src="js/charts/echart_yarn.min.js" type='text/javascript'></script>
- <script>
- var urlparams = new cur({}).parserUrl(location.href, 'obj').params;
- var cid = urlparams.auth_cid;
- $("body").append('<script src="/system/lang/desktop/config.json?script=1&auth_cid=' + cid + '"><\/script>');
- window.document.domain = AUTH.site.domain || 'shvber.com';
- var host = "http://" + eval("(" + AUTH.site.config + ")").platform["01200014"] + "." + AUTH.site.domain;
- function OperatingFomatterO(value, row, index) {
- var uuid = 'id';
- return '<span class="operate"><a href="javascript:void(0);" onclick="operate(' + '\'' + row['terminal_id'] + '\'' + ',' + row['upload_date'] + ',' + '\'' + row['warn_type'] + '\'' + ')">处理</a> | <a href="javascript:void(0);" onclick="viewDetail(' + '\'' + row['terminal_id'] + '\'' + ',' + row['upload_date'] + ',' + '\'' + row['warn_type'] + '\'' + ',' + '\'' + row['org_id'] + '\'' + ')">查看详情</a></span>';
- }
- function formatterColT(value, row, index) {
- switch (value) {
- case '减产':
- return `<span class="circle-icon circle-icon06"></span>${value}`
- break;
- case '停产':
- return `<span class="circle-icon circle-icon07"></span>${value}`
- break;
- case '离线':
- default:
- return `<span class="circle-icon circle-icon08"></span>${value}`
- break;
- }
- }
- function formatterColS(value, row, index) {
- switch (value) {
- case '已经处理':
- return `<span class="circle-icon circle-icon09"></span>${value}`
- break;
- case '未处理':
- default:
- return `<span class="circle-icon circle-icon10"></span>${value}`
- break;
- }
- }
- function operate(terminal_id, upload_date, warn_type) {
- var url = host + '/alarmOperate.html?auth_aid=' + urlparams.auth_aid + '&auth_mid=' + urlparams.auth_mid + '&auth_cid=' + urlparams.auth_cid + '&terminal_id=' + terminal_id + '&upload_date=' + upload_date + '&warn_type=' + warn_type;
- // if (window.top.$('#tab').tabs('exists', '告警处理')) {
- // window.top.$('#tab').tabs('select', '告警处理')
- // window.top.updateTab('告警处理', url)
- // }else{
- // window.top.addTab('告警处理', url);
- // }
- window.top.updateTab('告警处理', url);
- }
- function viewDetail(terminal_id, upload_date, warn_type, org_id) {
- var url = host + '/enterpriseRealtimeAlarm.html?auth_aid=' + urlparams.auth_aid + '&auth_mid=' + urlparams.auth_mid + '&auth_cid=' + urlparams.auth_cid + '&terminal_id=' + terminal_id + '&upload_date=' + upload_date + '&warn_type=' + warn_type + '&org_id=' + org_id;
- if (window.top.$('#tab').tabs('exists', '企业实时告警')) {
- window.top.$('#tab').tabs('select', '企业实时告警')
- window.top.updateTab('企业实时告警', url)
- } else {
- window.top.addTab('企业实时告警', url);
- }
- }
- function initPage() {
- new yarn({
- charts: [{
- el: 'rose1',
- type: 'pie',
- theme: 'pie-color1',
- url: "/web/onlineWarn/queryPie1?auth_aid=" + urlparams.auth_aid + '&auth_mid=' + urlparams.auth_mid + '&auth_cid=' + urlparams.auth_cid,
- // url:'js/charts/demos/dsm/realTimeAlarm_pie1.json',
- theme_obj: {
- showLabel: false,
- radius: ['0%', '50%'],
- center: ['35%', '50%'],
- label: {
- showPercent: false,
- Unit: '家'
- },
- legend: {
- show: true,
- showPercent: true,
- type: 'plain',
- selectedMode: true,
- left: '60%',
- top: 'middle'
- }
- },
- h: 400
- }]
- }).init();
- new yarn({
- charts: [{
- el: 'rose2',
- type: 'pie',
- theme: 'pie-color2',
- url: "/web/onlineWarn/queryPie2?auth_aid=" + urlparams.auth_aid + '&auth_mid=' + urlparams.auth_mid + '&auth_cid=' + urlparams.auth_cid,
- // url:'js/charts/demos/dsm/realTimeAlarm_pie2.json',
- theme_obj: {
- showLabel: false,
- radius: ['0%', '50%'],
- center: ['35%', '50%'],
- label: {
- showPercent: false,
- Unit: '家'
- },
- legend: {
- show: true,
- showPercent: true,
- type: 'plain',
- selectedMode: true,
- left: '60%',
- top: 'middle'
- }
- },
- h: 400
- }]
- }).init();
- var c = new cur({
- t: "#TContact",
- m: "#modal",
- pageSize: 15,
- height: 610,
- // dataSourceType:'local',
- queryUrl: "/web/onlineWarn/queryTable?auth_aid=" + urlparams.auth_aid + "&auth_mid=" + urlparams.auth_mid + "&auth_cid=" + urlparams.auth_cid,
- // queryUrl:'js/charts/demos/dsm/realTimeAlarm_table.json',
- addUrl: "/sysbase/process/add",
- editUrl: "/sysbase/process/update",
- // columns: [{
- // title: '告警时间',
- // align: "left",
- // valign: "middle",
- // field: 'upload_date_value'
- // }, {
- // title: '告警类别',
- // align: "left",
- // valign: "middle",
- // field: 'warn_type_value',
- // formatter:formatterColT
- // }, {
- // title: '市县区',
- // align: "left",
- // valign: "middle",
- // field: 'areaName'
- // }, {
- // title: '园区',
- // align: "left",
- // valign: "middle",
- // field: 'park_id_name'
- // }, {
- // title: '企业',
- // align: "left",
- // valign: "middle",
- // field: 'org_name'
- // }, {
- // title: '处理状态',
- // align: "center",
- // valign: "middle",
- // field: 'solveStatusName',
- // formatter:formatterColS
- // }, {
- // title: '操作',
- // align: "center",
- // valign: "middle",
- // field: 'operate',
- // formatter:OperatingFomatterO
- // }]
- });
- c.init();
- setTimeout(function () {
- $('#TContact').bootstrapTable('resetView');
- }, 500);
- }
- initPage();
- </script>
- </html>
|