';
+ } else {
+ html += '
';
+ }
+ if (data.length > 0) {
+ for (var i = 0; i < data.length; i++) {
+ html += '
';
+ for (var k = 0; k < urgentGoodsDetailsHeaders.length; k++) {
+ html += '' + (data[i][urgentGoodsDetailsHeaders[k].dataIndex] || 0) + '';
+ }
+ html += '';
+ html += '
';
+ }
+ }
+ html += '
';
+ $('#urgentGoodsDetails').html(html)
+ $('#invoicePlanUrgentAmountID').text(urgentSumInfo.invoicePlanUrgentAmount);
+ $('#sendOutUrgentAmountID').text(urgentSumInfo.sendOutUrgentAmount);
+ $('#toBeSendOutUrgentAmountID').text(urgentSumInfo.toBeSendOutUrgentAmount);
+ }
+ }
+ })
+}
+
+//获取外来器械包汇总(仅查询指定周末申请单模式)数据
+function getForeignTousseSummarySpecifyPeriodData() {
+ var url = WWWROOT + '/jasperreports/jasperreportsAction!getDataByDataSources.do';
+ $.ajax({
+ type: 'post',
+ dataType: 'json',
+ url: url,
+ data: {
+ dataSources: 'foreignTousseSummary_SpecifyPeriod'
+ },
+ timeout: 300000,
+ success: function (result) {
+ if (result.success) {
+ //待处理 外来器械
+ var foreignToBeRecycledAmount = result.message.foreignToBeRecycledAmount || 0;
+ var foreignTobeWashAmount = result.message.foreignTobeWashAmount || 0;
+ var foreignToBePackAmount = result.message.foreignToBePackAmount || 0;
+ var foreignToBeSterilizationAmount = result.message.foreignToBeSterilizationAmount || 0;
+ var foreignToBeInvoiceAmount = result.message.foreignToBeInvoiceAmount || 0;
+ var foreignToBeSignAmount = result.message.foreignToBeSignAmount || 0;
+ //已处理 外来器械
+ var foreignApplyAmount = result.message.foreignApplyAmount || 0;
+ var foreignRecycledAmount = result.message.foreignRecycledAmount || 0;
+ var foreignWashedAmount = result.message.foreignWashedAmount || 0;
+ var foreignPackedAmount = result.message.foreignPackedAmount || 0;
+ var foreignSterilizationedAmount = result.message.foreignSterilizationedAmount || 0;
+ var foreignInvoicedAmount = result.message.foreignInvoicedAmount || 0;
+ var foreignSignedAmount = result.message.foreignSignedAmount || 0;
+ //总数量 外来器械
+ var sumForeignRecycledAmount = foreignToBeRecycledAmount + foreignRecycledAmount;
+ var sumForeignWashedAmount = foreignTobeWashAmount + foreignWashedAmount;
+ var sumForeignPackedAmount = foreignToBePackAmount + foreignPackedAmount;
+ var sumForeignSterilizationedAmount = foreignToBeSterilizationAmount + foreignSterilizationedAmount;
+ var sumForeignInvoicedAmount = foreignToBeInvoiceAmount + foreignInvoicedAmount;
+ var sumForeignSignedAmount = foreignSignedAmount + foreignToBeSignAmount;
+
+ //已发货申请单数
+ var invoiceAmount = result.message.invoiceAmount || 0;
+ //申请单总数
+ var invoicePlanAmount = result.message.invoicePlanAmount || 0;
+ //已回收申请单数
+ var recyAmount = result.message.recyAmount || 0;
+ //待处理申请单数
+ var toBeInvoicePlanAmount = result.message.toBeInvoicePlanAmount || 0;
+
+ var xAxisData = ['申请', '回收', '清洗消毒', '装配管理', '灭菌管理', '发货', '签收'];
+ var seriesData = [{
+ name: '总数量',
+ color: ['#46afab', '#049391', '#146f8e', '#2c3e7e', '#545a96'],
+ data: [foreignApplyAmount, sumForeignRecycledAmount, sumForeignWashedAmount, sumForeignPackedAmount, sumForeignSterilizationedAmount, sumForeignInvoicedAmount, sumForeignSignedAmount]
+ },
+ {
+ name: '已处理',
+ color: ['#e99b29', '#9a5037', '#923f49', '#353281', '#5a59a5'],
+ data: [foreignApplyAmount, foreignRecycledAmount, foreignWashedAmount, foreignPackedAmount, foreignSterilizationedAmount, foreignInvoicedAmount, foreignSignedAmount]
+ }];
+ var legendData = ['总数量', '已处理'];
+ createChartsForColunm('#foreignTousseSummarySpecifyPeriod', xAxisData, seriesData, legendData);
+ $('#invoiceAmountID').text(invoiceAmount);
+ $('#invoicePlanAmountID').text(invoicePlanAmount);
+ $('#recyAmountID').text(recyAmount);
+ $('#toBeInvoicePlanAmountID').text(toBeInvoicePlanAmount);
+ }
+ }
+ })
+}
+
+//获取模块函数
+function getModuleFun(realTimeDashboardsConfig) {
+ var realTimeDashboardsObj = JSON.parse(realTimeDashboardsConfig);
+ var title = realTimeDashboardsObj.title || '';
+ var height = realTimeDashboardsObj.height || 0;
+ var type = realTimeDashboardsObj.type || 1;
+ var headers = realTimeDashboardsObj.headers || [];
+ var name = realTimeDashboardsObj.dataSources + 'Box';
+ title = title || '';
+ if (name == 'urgentAmountBox') {
+ showUrgentAmount = true;
+ return urgentAmountBox(title);
+ } else if (name == 'operationReservationSummaryBox') {
+ showOperationReservationSummary = true;
+ if (height > 25) {
+ return operationReservationSummaryBox(title, 1);
+ } else {
+ return operationReservationSummaryBox(title, 2);
+ }
+ } else if (name == 'deviceUsageSummaryBox') {
+ showDeviceUsageSummary = true;
+ deviceUsageSummaryHeaders = headers
+ return deviceUsageSummaryBox(title);
+ } else if (name == 'tousseSummaryBox') {
+ showTousseSummary = true;
+ return tousseSummaryBox(title);
+ } else if (name == 'foreignTousseSummaryBox') {
+ showForeignTousseSummary = true;
+ return foreignTousseSummaryBox(title);
+ } else if (name == 'nowTimeBox') {
+ showNowTime = true;
+ return nowTimeBox(title);
+ } else if (name == 'onlineUserAmountBox') {
+ showOnlineUserAmount = true;
+ return onlineUserAmountBox(title, type);
+ } else if (name == 'workloadSummaryBox') {
+ showWorkloadSummary = true;
+ return workloadSummaryBox(title);
+ } else if (name == 'urgentGoodsSummaryBox') {
+ showUrgentGoodsSummary = true;
+ urgentGoodsSummaryHeaders = headers
+ return urgentGoodsSummaryBox(title);
+ } else if (name == 'urgentGoodsDetailsBox') {
+ showUrgentGoodsDetails = true;
+ return urgentGoodsDetailsBox(title);
+ } else if (name == 'foreignTousseSummary_SpecifyPeriodBox') {
+ showForeignTousseSummarySpecifyPeriod = true;
+ return foreignTousseSummarySpecifyPeriodBox(title);
+ }
+}
+
+(function () {
+ var setFont = function () {
+ var dom = document.documentElement;
+
+ var width = dom.clientWidth;
+ var height = dom.clientHeight;
+
+ var fontSize = width / 80 + 'px';
+ dom.style.fontSize = fontSize;
+ $('body').css({
+ width: width + 'px',
+ height: height + 'px'
+ });
+ }
+ setFont();
+ // 页面大小改变时尺寸实时变化
+ window.onresize = function () {
+ setFont();
+ }
+ if (isIE()) {
+ $('.nullText').html('该页面不支持IE,请更换谷歌或其他浏览器!')
+ return
+ }
+
+ //获取模块配置
+ if (realTimeDashboardsConfig) {
+ if (realTimeDashboardsConfig.columnLeft && realTimeDashboardsConfig.columnLeft.items.length > 0) {
+ var length = (realTimeDashboardsConfig.columnLeft.items.length > 3) ? 3 : realTimeDashboardsConfig.columnLeft.items.length;
+ if (realTimeDashboardsConfig.columnLeft && realTimeDashboardsConfig.columnLeft.width > 0) {
+ $('.columnLeft').css({
+ width: realTimeDashboardsConfig.columnLeft.width + '%'
+ })
+ var columnLeftHtml = ''
+ for (var i = 0; i < length; i++) {
+ var dataSources = realTimeDashboardsConfig.columnLeft.items[i].dataSources;
+ var title = realTimeDashboardsConfig.columnLeft.items[i].title;
+ var height = realTimeDashboardsConfig.columnLeft.items[i].height;
+ var type = realTimeDashboardsConfig.columnLeft.items[i].type;
+ var headers = realTimeDashboardsConfig.columnLeft.items[i].headers || [];
+ var realTimeDashboardsObj = {
+ dataSources: dataSources,
+ title: title,
+ height: height,
+ type: type,
+ headers: headers
+ }
+ if (height > 0) {
+ columnLeftHtml += '
';
+ }
+ }
+ $('.columnLeft').html(columnLeftHtml);
+ } else {
+ $('.columnLeft').css({
+ display: 'none'
+ })
+ }
+ }
+ if (realTimeDashboardsConfig.columnCenter && realTimeDashboardsConfig.columnCenter.items.length > 0) {
+ var length = (realTimeDashboardsConfig.columnCenter.items.length > 3) ? 3 : realTimeDashboardsConfig.columnCenter.items.length;
+ if (realTimeDashboardsConfig.columnCenter && realTimeDashboardsConfig.columnCenter.width > 0) {
+ $('.columnCenter').css({
+ width: realTimeDashboardsConfig.columnCenter.width + '%'
+ })
+ var columnCenterHtml = ''
+ for (var i = 0; i < length; i++) {
+ var dataSources = realTimeDashboardsConfig.columnCenter.items[i].dataSources;
+ var title = realTimeDashboardsConfig.columnCenter.items[i].title;
+ var height = realTimeDashboardsConfig.columnCenter.items[i].height;
+ var type = realTimeDashboardsConfig.columnCenter.items[i].type;
+ var headers = realTimeDashboardsConfig.columnCenter.items[i].headers || [];
+ var realTimeDashboardsObj = {
+ dataSources: dataSources,
+ title: title,
+ height: height,
+ type: type,
+ headers: headers
+ }
+ if (height > 0) {
+ columnCenterHtml += '
';
+ }
+ }
+ $('.columnCenter').html(columnCenterHtml);
+ } else {
+ $('.columnCenter').css({
+ display: 'none'
+ })
+ }
+ }
+ if (realTimeDashboardsConfig.columnRight && realTimeDashboardsConfig.columnRight.items.length > 0) {
+ var length = (realTimeDashboardsConfig.columnRight.items.length > 3) ? 3 : realTimeDashboardsConfig.columnRight.items.length;
+ if (realTimeDashboardsConfig.columnCenter && realTimeDashboardsConfig.columnRight.width > 0) {
+ $('.columnRight').css({
+ width: realTimeDashboardsConfig.columnRight.width + '%'
+ })
+ var columnRightHtml = ''
+ for (var i = 0; i < length; i++) {
+ var dataSources = realTimeDashboardsConfig.columnRight.items[i].dataSources;
+ var title = realTimeDashboardsConfig.columnRight.items[i].title;
+ var height = realTimeDashboardsConfig.columnRight.items[i].height;
+ var type = realTimeDashboardsConfig.columnRight.items[i].type;
+ var headers = realTimeDashboardsConfig.columnRight.items[i].headers || [];
+ var realTimeDashboardsObj = {
+ dataSources: dataSources,
+ title: title,
+ height: height,
+ type: type,
+ headers: headers
+ }
+ if (height > 0) {
+ columnRightHtml += '
';
+ }
+ }
+ $('.columnRight').html(columnRightHtml);
+ } else {
+ $('.columnRight').css({
+ display: 'none'
+ })
+ }
+ }
+ }
+
+ //当前时间
+ if (showNowTime) {
+ setInterval(getTime, 1000);
+ }
+
+ //在线人数
+ if (showOnlineUserAmount) {
+ getFirstSupplyRoomConfigOnlineUserDate();
+ }
+
+ //加急数量
+ if (showUrgentAmount) {
+ getUrgentAmountDate();
+ }
+
+ //器械包汇总(今日器械包处理量)
+ if (showTousseSummary) {
+ getTousseSummaryData();
+ }
+
+ //外来器械包汇总
+ if (showForeignTousseSummary) {
+ setTimeout(function () {
+ getForeignTousseSummaryData();
+ }, 1000);
+ }
+
+ //工作量汇总(今日工作量统计)
+ if (showWorkloadSummary) {
+ setTimeout(function () {
+ getWorkloadSummaryData();
+ }, 1100);
+ }
+
+ //设备使用情况汇总
+ if (showDeviceUsageSummary) {
+ getDeviceUsageSummaryData();
+ }
+
+ //手术预约汇总(今日手术预约信息)
+ if (showOperationReservationSummary) {
+ getOperationReservation();
+ }
+
+ //加急物品汇总
+ if (showUrgentGoodsSummary) {
+ setTimeout(function () {
+ getUrgentGoodsSummarData();
+ }, 1200);
+ }
+
+ //加急物品明细追溯模式
+ if (showUrgentGoodsDetails) {
+ setTimeout(function () {
+ getUrgentGoodsDetailsData();
+ }, 1300);
+ }
+
+ //外来器械包汇总(仅查询指定周末申请单模式)
+ if (showForeignTousseSummarySpecifyPeriod) {
+ setTimeout(function () {
+ getForeignTousseSummarySpecifyPeriodData();
+ }, 1400);
+ }
+
+ $(".loading").fadeOut();
+})();
+
+//加急数量模块
+function urgentAmountBox(title) {
+ var html = '';
+ if (sstsConfig.enableUrgentFunction) {
+ html += '
';
+ html += '
' + title + '
';
+ html += '
';
+ html += '
0
';
+ html += '';
+ html += '今日已处理物品';
+ html += '';
+ html += '';
+ html += '
';
+ html += '
0
';
+ html += '';
+ html += '待处理加急物品';
+ html += '';
+ html += '';
+ html += '
';
+ html += '
0
';
+ html += '';
+ html += '已处理加急物品';
+ html += '';
+ html += '';
+ }
+ return html;
+}
+
+//当前时间
+function nowTimeBox(title) {
+ var html = '';
+ html += '
';
+ return html;
+}
+
+//在线人数
+function onlineUserAmountBox(title, type) {
+ var html = '';
+ html += '
';
+ return html;
+}
+
+//手术预约汇总(今日手术预约信息)
+function operationReservationSummaryBox(title, mode) {
+ var html = '';
+ html += '
';
+ return html;
+}
+
+//设备使用情况汇总
+function deviceUsageSummaryBox(title) {
+ var html = '';
+ html += '
';
+ return html;
+}
+
+//器械包汇总(今日器械包处理量)
+function tousseSummaryBox(title) {
+ var html = '';
+ html += '
';
+ return html;
+}
+
+//外来器械包汇总
+function foreignTousseSummaryBox(title) {
+ var html = '';
+ html += '
';
+ return html;
+}
+
+//工作量汇总(今日工作量统计)
+function workloadSummaryBox(title) {
+ var html = '';
+ html += '
';
+ return html;
+}
+
+//加急物品汇总功能
+function urgentGoodsSummaryBox(title) {
+ var html = '';
+ html += '
';
+ return html;
+}
+
+//加急物品明细追溯模式
+function urgentGoodsDetailsBox(title) {
+ var html = '';
+ html += '
';
+ return html;
+}
+
+//外来器械包汇总(仅查询指定周末申请单模式)
+function foreignTousseSummarySpecifyPeriodBox(title) {
+ var html = '';
+ html += '
';
+ return html;
+}
+
+function initToTime() {
+ var time = 1 * 60 * 1000;
+ if (dashboardsRefreshFrequency && dashboardsRefreshFrequency > 0) {
+ time = dashboardsRefreshFrequency * 60 * 1000;
+ }
+ setTimeout(function () {
+ initToTime();
+ }, time);
+}
+
+function fillZero(str) {
+ var realNum;
+ if (str < 10) {
+ realNum = '0' + str;
+ } else {
+ realNum = str;
+ }
+ return realNum;
+}
+
+function createChartsForColunm(dom, xAxisData, seriesData, legendData) {
+ var series = [];
+ if (seriesData.length > 0) {
+ for (var i = 0; i < seriesData.length; i++) {
+ var colorArr = [
+ { offset: 0, color: seriesData[i].color[0] },
+ { offset: 0.3, color: seriesData[i].color[1] },
+ { offset: 0.5, color: seriesData[i].color[2] },
+ { offset: 0.8, color: seriesData[i].color[3] },
+ { offset: 1, color: seriesData[i].color[4] }
+ ]
+ series[i] = {
+ name: seriesData[i].name,
+ type: 'bar',
+ label: {
+ show: true,
+ color: '#fff',
+ position: 'top'
+ },
+ barWidth: '20%',
+ itemStyle: {
+ // 提供的工具函数生成渐变颜色
+ color: new echarts.graphic.LinearGradient(
+ 0, 0, 0, 1,
+ colorArr
+ )
+ },
+ data: seriesData[i].data,
+ }
+ }
+ }
+ var option = {
+ title: {
+ text: '',
+ subtext: '单位(包)',
+ subtextStyle: {
+ color: '#fff'
+ }
+ },
+ // 工具提示
+ tooltip: {
+ // 触发类型 经过轴触发axis 经过轴触发item
+ trigger: 'item',
+ // 轴触发提示才有效
+ axisPointer: {
+ type: 'shadow'
+ }
+ },
+ // 图表边界控制
+ grid: {
+ // 距离 上右下左 的距离
+ left: '0',
+ right: '0',
+ bottom: '0',
+ top: '15%',
+ // 大小是否包含文本【类似于boxsizing】
+ containLabel: true,
+ //显示边框
+ show: true,
+ //边框颜色
+ borderColor: 'rgba(0, 240, 255, 0.3)'
+ },
+ // 控制x轴
+ xAxis: [
+ {
+ // 使用类目,必须有data属性
+ type: 'category',
+ // 使用 data 中的数据设为刻度文字
+ data: xAxisData,
+ // 刻度设置
+ axisTick: {
+ // true意思:图形在刻度中间
+ // false意思:图形在刻度之间
+ alignWithLabel: false,
+ show: false
+ },
+ //文字
+ axisLabel: {
+ color: '#fff'
+ }
+ }
+ ],
+ // 控制y轴
+ yAxis: [
+ {
+ // 使用数据的值设为刻度文字
+ type: 'value',
+ axisTick: {
+ // true意思:图形在刻度中间
+ // false意思:图形在刻度之间
+ alignWithLabel: false,
+ show: false
+ },
+ //文字
+ axisLabel: {
+ color: '#fff'
+ },
+ splitLine: {
+ lineStyle: {
+ color: 'rgba(0, 240, 255, 0.3)'
+ }
+ }
+ }
+ ],
+ legend: {
+ data: legendData,
+ y: 'top',
+ x: 'center',
+ textStyle: {
+ color: '#fff',
+ fontSize: 12
+ }
+ },
+ // 控制x轴
+ series: series
+ };
+ var myechart = echarts.init($(dom)[0]);
+ myechart.setOption(option);
+}
+
+function createChartsForGauge(dom, onlineUserAmount, userAmount) {
+ var myechart = echarts.init($(dom)[0]);
+ var series = [
+ {
+ type: 'gauge', //类型:仪表盘图
+ name: '当前在线',
+ title: {
+ offsetCenter: [0, '120%'],
+ color: "#fff",
+ fontSize: 16,
+ },
+ center: ['50%', '45%'], //仪表盘图的中心点相对于dom容器的位置
+ detail: {
+ formatter: '{value} / ' + userAmount,
+ offsetCenter: [0, 0],
+ color: "#FFF",
+ fontSize: 18
+ },
+ data: [{
+ value: onlineUserAmount, //此处要改数据
+ name: '当前在线 / 人员总数'
+ }],
+ radius: '80%', //环形的大小
+ clockwise: true,
+ axisLine: {
+ show: true,
+ lineStyle: {
+ color: [
+ [onlineUserAmount / userAmount, '#1A8FC5'], //占总数的30.25%,即value/100,颜色为'#1A8FC5'
+ [1, '#fefefe'] //基底大圈比例为1,颜色为'#E1E8EE',
+ ],
+ width: 10, //环形的粗细
+ }
+ },
+ splitLine: {
+ show: false //不显示分隔线
+ },
+ axisTick: {
+ show: false //不显示仪表盘刻度
+ },
+ axisLabel: {
+ show: false
+ },
+ pointer: {
+ show: false //不显示仪表盘指针
+ }
+ }
+ ]
+ var option = {
+ tooltip: {
+ formatter: '{a}
{b} : {c}%'
+ },
+ color: ['#53f1f2', '#4ebefd'],
+ series: series
+ }
+ myechart.setOption(option);
+}
+
+function createChartsForPie(dom, value, title) {
+ var color = '';
+ if (title == '总台数') {
+ color = '#5FAAFF';
+ } else if (title == '已安排') {
+ color = '#5FCCFF';
+ } else if (title == '已完成') {
+ color = '#5FEEFF';
+ } else if (title == '未完成') {
+ color = '#F2C4C4';
+ }
+ var myechart = echarts.init($(dom)[0]);
+ var series = [
+ {
+ type: 'pie',
+ radius: ['80%', '100%'],
+ label: {
+ show: false,
+ position: 'center'
+ },
+ data: [
+ { value: value, name: title },
+ ]
+ }
+ ]
+ var option = {
+ color: [color, color],
+ graphic: [{ //环形图中间添加文字
+ type: 'text', //通过不同top值可以设置上下显示
+ left: 'center',
+ top: 'center',
+ style: {
+ text: value + '\n' + title,
+ textAlign: 'center',
+ fill: '#fff', //文字的颜色
+ fontSize: 16,
+ lineHeight: 60
+ }
+ }],
+ series: series
+ }
+ myechart.setOption(option);
+}
+
+function createChartsForLine(dom, xAxisData, seriesData) {
+ var myechart = echarts.init($(dom)[0]);
+ var xAxisData1 = xAxisData;
+ var option = {
+ title: {
+ text: ' ',
+ subtext: '单位(包)',
+ subtextStyle: {
+ color: '#fff'
+ }
+ },
+ tooltip: {
+ trigger: 'axis',
+ axisPointer: {
+ type: 'cross',
+ label: {
+ backgroundColor: '#6a7985'
+ }
+ }
+ },
+ grid: {
+ left: '3%',
+ right: '4%',
+ bottom: '3%',
+ containLabel: true
+ },
+ xAxis: [
+ {
+ type: 'category',
+ boundaryGap: false,
+ axisLine: {
+ lineStyle: {
+ color: '#fff'
+ }
+ },
+ data: xAxisData1
+ }
+ ],
+ yAxis: [
+ {
+ type: 'value',
+ axisLine: {
+ lineStyle: {
+ color: '#fff'
+ }
+ }
+ }
+ ],
+ series: [
+ {
+ name: '本日工作量统计',
+ type: 'line',
+ stack: 'Total',
+ label: {
+ show: true,
+ position: 'top'
+ },
+ lineStyle: {
+ color: 'rgba(246,197,14,1)'
+ },
+ itemStyle: {
+ normal: {
+ color: 'yellow'
+ }
+ },
+ areaStyle: {
+ color: {
+ type: 'linear',
+ x: 0,
+ y: 0,
+ x2: 0,
+ y2: 1,
+ colorStops: [
+ {
+ offset: 0.1,
+ color: 'rgba(246,197,14,0.9)'
+ },
+ {
+ offset: 0.3,
+ color: 'rgba(253,232,3,0.9)'
+ },
+ {
+ offset: 0.5,
+ color: 'rgba(253,232,3,0.7)'
+ },
+ {
+ offset: 1,
+ color: 'rgba(61,57,28,1)'
+ }
+ ]
+ }
+
+ },
+ emphasis: {
+ focus: 'series'
+ },
+ data: seriesData
+ }
+ ]
+ };
+
+ myechart.setOption(option);
+}
\ No newline at end of file
Index: ssts-web/src/main/webapp/disinfectsystem/realTimeDashboards/images/border.png
===================================================================
diff -u
Binary files differ
Index: ssts-web/src/main/webapp/disinfectsystem/realTimeDashboards/fonts/icomoon.ttf
===================================================================
diff -u
Binary files differ
Index: ssts-web/src/main/webapp/disinfectsystem/realTimeDashboards/images/line.png
===================================================================
diff -u
Binary files differ
Index: ssts-web/src/main/webapp/disinfectsystem/realTimeDashboards/js/bg.js
===================================================================
diff -u
--- ssts-web/src/main/webapp/disinfectsystem/realTimeDashboards/js/bg.js (revision 0)
+++ ssts-web/src/main/webapp/disinfectsystem/realTimeDashboards/js/bg.js (revision 38627)
@@ -0,0 +1,103 @@
+//宇宙特效
+"use strict";
+var canvas = document.getElementById('canvas'),
+ ctx = canvas.getContext('2d'),
+ w = canvas.width = window.innerWidth,
+ h = canvas.height = window.innerHeight,
+
+ hue = 217,
+ stars = [],
+ count = 0,
+ maxStars = 1300;//星星数量
+
+var canvas2 = document.createElement('canvas'),
+ ctx2 = canvas2.getContext('2d');
+canvas2.width = 100;
+canvas2.height = 100;
+var half = canvas2.width / 2,
+ gradient2 = ctx2.createRadialGradient(half, half, 0, half, half, half);
+gradient2.addColorStop(0.025, '#CCC');
+gradient2.addColorStop(0.1, 'hsl(' + hue + ', 61%, 33%)');
+gradient2.addColorStop(0.25, 'hsl(' + hue + ', 64%, 6%)');
+gradient2.addColorStop(1, 'transparent');
+
+ctx2.fillStyle = gradient2;
+ctx2.beginPath();
+ctx2.arc(half, half, half, 0, Math.PI * 2);
+ctx2.fill();
+
+// End cache
+
+function random(min, max) {
+ if (arguments.length < 2) {
+ max = min;
+ min = 0;
+ }
+
+ if (min > max) {
+ var hold = max;
+ max = min;
+ min = hold;
+ }
+
+ return Math.floor(Math.random() * (max - min + 1)) + min;
+}
+
+function maxOrbit(x, y) {
+ var max = Math.max(x, y),
+ diameter = Math.round(Math.sqrt(max * max + max * max));
+ return diameter / 2;
+ //星星移动范围,值越大范围越小,
+}
+
+var Star = function() {
+
+ this.orbitRadius = random(maxOrbit(w, h));
+ this.radius = random(60, this.orbitRadius) / 8;
+ //星星大小
+ this.orbitX = w / 2;
+ this.orbitY = h / 2;
+ this.timePassed = random(0, maxStars);
+ this.speed = random(this.orbitRadius) / 1000000;
+ //星星移动速度
+ this.alpha = random(2, 10)/1000;
+
+ count++;
+ stars[count] = this;
+}
+
+Star.prototype.draw = function() {
+ var x = Math.sin(this.timePassed) * this.orbitRadius + this.orbitX,
+ y = Math.cos(this.timePassed) * this.orbitRadius + this.orbitY,
+ twinkle = random(10);
+
+ if (twinkle === 1 && this.alpha > 0) {
+ this.alpha -= 0.05;
+ } else if (twinkle === 2 && this.alpha < 1) {
+ this.alpha += 0.05;
+ }
+
+ ctx.globalAlpha = this.alpha;
+ ctx.drawImage(canvas2, x - this.radius / 2, y - this.radius / 2, this.radius, this.radius);
+ this.timePassed += this.speed;
+}
+
+for (var i = 0; i < maxStars; i++) {
+ new Star();
+}
+
+function animation() {
+ ctx.globalCompositeOperation = 'source-over';
+ ctx.globalAlpha = 0.5; //尾巴
+ ctx.fillStyle = 'hsla(' + hue + ', 64%, 6%, 2)';
+ ctx.fillRect(0, 0, w, h)
+
+ ctx.globalCompositeOperation = 'lighter';
+ for (var i = 1, l = stars.length; i < l; i++) {
+ stars[i].draw();
+ };
+
+ window.requestAnimationFrame(animation);
+}
+
+animation();
\ No newline at end of file
Index: ssts-web/src/main/webapp/disinfectsystem/realTimeDashboards/fonts/icomoon.woff
===================================================================
diff -u
Binary files differ
Index: ssts-web/src/main/webapp/disinfectsystem/realTimeDashboards/images/loading.gif
===================================================================
diff -u
Binary files differ
Index: ssts-web/src/main/webapp/disinfectsystem/realTimeDashboards/js/echarts.min.js
===================================================================
diff -u
--- ssts-web/src/main/webapp/disinfectsystem/realTimeDashboards/js/echarts.min.js (revision 0)
+++ ssts-web/src/main/webapp/disinfectsystem/realTimeDashboards/js/echarts.min.js (revision 38627)
@@ -0,0 +1 @@
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";function e(t,e){"createCanvas"===t&&(Gx=null),Bx[t]=e}function i(t){if(null==t||"object"!=typeof t)return t;var e=t,n=kx.call(t);if("[object Array]"===n){if(!O(t)){e=[];for(var o=0,a=t.length;o