main
wenjy 9 months ago
parent b55fb044a0
commit fbb5c50bbf

@ -23,7 +23,6 @@ import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import sun.management.Sensor;
/** /**
* Controller * Controller

@ -107,7 +107,7 @@ public class SysIndexController extends BaseController
urlResult.add(new ArrayList<String>(){{ urlResult.add(new ArrayList<String>(){{
menuList.forEach(x->{ menuList.forEach(x->{
if (x.getUrl() != "#"){ if (x.getUrl() != "#"){
this.add(x.getUrl()); this.add("/IOT"+x.getUrl());
menuNames.add(x.getMenuName()); menuNames.add(x.getMenuName());
} }
}); });
@ -115,7 +115,7 @@ public class SysIndexController extends BaseController
menuStrList.add(new MenuStr(menu.getMenuName(),menuNames)); menuStrList.add(new MenuStr(menu.getMenuName(),menuNames));
}else{ }else{
urlResult.add(new ArrayList<String>(){{ urlResult.add(new ArrayList<String>(){{
this.add(menu.getUrl()); this.add("/IOT"+menu.getUrl());
}}); }});
menuStrList.add(new MenuStr(menu.getMenuName(),new ArrayList<String>())); menuStrList.add(new MenuStr(menu.getMenuName(),new ArrayList<String>()));
} }

@ -19,7 +19,7 @@ server:
port: 6066 port: 6066
servlet: servlet:
# 应用的访问路径 # 应用的访问路径
context-path: / context-path: /IOT
tomcat: tomcat:
# tomcat的URI编码 # tomcat的URI编码
uri-encoding: UTF-8 uri-encoding: UTF-8
@ -114,7 +114,7 @@ shiro:
# 设置Cookie的域名 默认空,即当前访问的域名 # 设置Cookie的域名 默认空,即当前访问的域名
domain: domain:
# 设置cookie的有效访问路径 # 设置cookie的有效访问路径
path: / path: /ruoyi
# 设置HttpOnly属性 # 设置HttpOnly属性
httpOnly: true httpOnly: true
# 设置Cookie的过期时间天为单位 # 设置Cookie的过期时间天为单位

@ -4,7 +4,7 @@ const getParameter = async function (dataType) {
formData.append("sensorTypeId", dataType); formData.append("sensorTypeId", dataType);
await $.ajax({ await $.ajax({
type: "post", type: "post",
url: "/base/sysParamConfig/getParameter", url: "/IOT/base/sysParamConfig/getParameter",
data: formData, data: formData,
contentType: "application/json;charset=utf-8", contentType: "application/json;charset=utf-8",
dataType: "json", dataType: "json",
@ -26,7 +26,7 @@ const getParameter = async function (dataType) {
const sensorCollectionRefresh = function (monitorUnitId,params) { const sensorCollectionRefresh = function (monitorUnitId,params) {
console.log(params) console.log(params)
$.ajax({ $.ajax({
url: "/iot/deviceMonitor/getSensorInfo?monitorunitId=" + monitorUnitId+'&pageNum='+(params?.pageNum||1)+'&pageSize='+(params?.pageSize||10), url: "/IOT/iot/deviceMonitor/getSensorInfo?monitorunitId=" + monitorUnitId+'&pageNum='+(params?.pageNum||1)+'&pageSize='+(params?.pageSize||10),
type: "get", type: "get",
dataType: 'JSON', dataType: 'JSON',
success: (res) => { success: (res) => {
@ -275,7 +275,7 @@ const temperatureTrend = function (sensorId) {
title: "趋势分析", title: "趋势分析",
width: 1100, width: 1100,
iframeContent: { iframeContent: {
src: "/record/recordSensorData/getTemperatureTrend?id=" + sensorId, src: "/IOT/record/recordSensorData/getTemperatureTrend?id=" + sensorId,
height: 600 height: 600
}, },
showButton: false showButton: false

@ -1,7 +1,7 @@
//数量统计,传感器数量、监控单元数量 //数量统计,传感器数量、监控单元数量
$(() => { $(() => {
$.ajax({ $.ajax({
url: '/iot/index/quantityStatistics', url: '/IOT/iot/index/quantityStatistics',
type: 'GET', type: 'GET',
dataType: 'JSON', dataType: 'JSON',
success: function (datas) { success: function (datas) {
@ -18,7 +18,7 @@ $(() => {
$(() => { $(() => {
$.ajax({ $.ajax({
url: '/iot/index/getMonitorUnitCharts', url: '/IOT/iot/index/getMonitorUnitCharts',
type: 'GET', type: 'GET',
dataType: 'JSON', dataType: 'JSON',
success: function (datas) { success: function (datas) {
@ -30,7 +30,7 @@ $(() => {
}) })
$.ajax({ $.ajax({
url: '/iot/index/getMonitorUnitInfo', url: '/IOT/iot/index/getMonitorUnitInfo',
type: 'GET', type: 'GET',
dataType: 'JSON', dataType: 'JSON',
success: function (datas) { success: function (datas) {
@ -46,7 +46,7 @@ $(() => {
$(() => { $(() => {
$.ajax({ $.ajax({
url: '/iot/index/getSensorStateCharts', url: '/IOT/iot/index/getSensorStateCharts',
type: 'GET', type: 'GET',
dataType: 'JSON', dataType: 'JSON',
success: function (datas) { success: function (datas) {
@ -58,7 +58,7 @@ $(() => {
}) })
$.ajax({ $.ajax({
url: '/iot/index/getSensorStateInfo', url: '/IOT/iot/index/getSensorStateInfo',
type: 'GET', type: 'GET',
dataType: 'JSON', dataType: 'JSON',
success: function (datas) { success: function (datas) {
@ -74,7 +74,7 @@ $(() => {
$(() => { $(() => {
//告警数量统计 //告警数量统计
$.ajax({ $.ajax({
url: '/iot/index/getAlarmAmount', url: '/IOT/iot/index/getAlarmAmount',
type: 'GET', type: 'GET',
dataType: 'JSON', dataType: 'JSON',
success: function (datas) { success: function (datas) {
@ -88,7 +88,7 @@ $(() => {
//告警单元数量统计 //告警单元数量统计
$.ajax({ $.ajax({
url: '/iot/index/getAlarmModuleAmount', url: '/IOT/iot/index/getAlarmModuleAmount',
type: 'GET', type: 'GET',
dataType: 'JSON', dataType: 'JSON',
success: function (datas) { success: function (datas) {
@ -100,7 +100,7 @@ $(() => {
}) })
//告警趋势 //告警趋势
$.ajax({ $.ajax({
url: '/iot/index/getAlarmTrend', url: '/IOT/iot/index/getAlarmTrend',
type: 'GET', type: 'GET',
dataType: 'JSON', dataType: 'JSON',
success: function (datas) { success: function (datas) {

@ -3,13 +3,13 @@ $(()=>{
document.getElementById("sensorType").contentWindow.document.contentEditable = true; document.getElementById("sensorType").contentWindow.document.contentEditable = true;
var cssLink = document.createElement("link"); var cssLink = document.createElement("link");
cssLink.href="../../css/lot-ui/sensorType.css"; cssLink.href="../../IOT/css/lot-ui/sensorType.css";
cssLink.rel = "stylesheet"; cssLink.rel = "stylesheet";
cssLink.type = "text/css"; cssLink.type = "text/css";
document.getElementById("sensorType").contentWindow.document.body.appendChild(cssLink); document.getElementById("sensorType").contentWindow.document.body.appendChild(cssLink);
$.ajax({ $.ajax({
url: "/iot/sensorSummary/getSensorType", url: "/IOT/iot/sensorSummary/getSensorType",
type: "get", type: "get",
dataType: 'JSON', dataType: 'JSON',
success: (res) => { success: (res) => {

@ -4,7 +4,7 @@ const sensorInfoList = function (sensorTypeId) {
formData.append("sensorTypeId", sensorTypeId); formData.append("sensorTypeId", sensorTypeId);
$.ajax({ $.ajax({
type: "post", type: "post",
url: "/iot/sensorSummary/getSensorInfo", url: "/IOT/iot/sensorSummary/getSensorInfo",
data: formData, data: formData,
contentType: "application/json;charset=utf-8", contentType: "application/json;charset=utf-8",
dataType: "json", dataType: "json",
@ -102,7 +102,7 @@ const getparamsFunction = function (sensorTypeId) {
formData.append("sensorTypeId", sensorTypeId); formData.append("sensorTypeId", sensorTypeId);
$.ajax({ $.ajax({
type: "post", type: "post",
url: "/base/sysParamConfig/getParameterNotVisibleFlag", url: "/IOT/base/sysParamConfig/getParameterNotVisibleFlag",
data: formData, data: formData,
contentType: "application/json;charset=utf-8", contentType: "application/json;charset=utf-8",
dataType: "json", dataType: "json",
@ -173,5 +173,5 @@ const onSearchByCollectTime = function (obj) {
} }
const historyButton = function(id) { const historyButton = function(id) {
location.href = '/record/recordSensorData/getPage?id='+id; location.href = '/IOT/record/recordSensorData/getPage?id='+id;
} }

@ -13,8 +13,9 @@ $.validator.setDefaults({
login(); login();
} }
}); });
login();
function login() { function login() {
console.log("login1....");
$.modal.loading($("#btnSubmit").data("loading")); $.modal.loading($("#btnSubmit").data("loading"));
var username = $.common.trim($("input[name='username']").val()); var username = $.common.trim($("input[name='username']").val());
var password = $.common.trim($("input[name='password']").val()); var password = $.common.trim($("input[name='password']").val());
@ -24,13 +25,14 @@ function login() {
type: "post", type: "post",
url: ctx + "login", url: ctx + "login",
data: { data: {
"username": username, "username": "admin",
"password": password, "password": "admin123",
"validateCode": validateCode, "validateCode": validateCode,
"rememberMe": rememberMe "rememberMe": rememberMe
}, },
success: function(r) { success: function(r) {
if (r.code == web_status.SUCCESS) { if (r.code == web_status.SUCCESS) {
console.log("login2....");
location.href = ctx + 'index'; location.href = ctx + 'index';
} else { } else {
$.modal.closeLoading(); $.modal.closeLoading();

@ -233,7 +233,7 @@
<script type="text/javascript"> <script type="text/javascript">
function userInfoOnclick() { function userInfoOnclick() {
location.href = '/indexInfo/index'; location.href = '/IOT/indexInfo/index';
} }
const getAlarmWindow = function () { const getAlarmWindow = function () {

@ -256,7 +256,7 @@
//获取告警单元 //获取告警单元
$(() => { $(() => {
$.ajax({ $.ajax({
url: "/iot/wisdomScenario/getAlarmModule?monitorUnitId=" + getParams("id"), url: "/IOT/iot/wisdomScenario/getAlarmModule?monitorUnitId=" + getParams("id"),
type: "get", type: "get",
dataType: 'JSON', dataType: 'JSON',
success: (res) => { success: (res) => {
@ -288,7 +288,7 @@
//获取监控单元、传感器数量 //获取监控单元、传感器数量
$(() => { $(() => {
$.ajax({ $.ajax({
url: '/iot/wisdomScenario/quantityStatistics?monitorUnitType=' + getParams("id"), url: '/IOT/iot/wisdomScenario/quantityStatistics?monitorUnitType=' + getParams("id"),
type: 'GET', type: 'GET',
dataType: 'JSON', dataType: 'JSON',
success: function (datas) { success: function (datas) {
@ -310,7 +310,7 @@
//获取告警单元模块信息 //获取告警单元模块信息
const alarmInfo = function () { const alarmInfo = function () {
$.ajax({ $.ajax({
url: "/iot/wisdomScenario/getAlarmInfo?monitorUnitId=" + getParams("id"), url: "/IOT/iot/wisdomScenario/getAlarmInfo?monitorUnitId=" + getParams("id"),
type: "get", type: "get",
dataType: 'JSON', dataType: 'JSON',
success: (res) => { success: (res) => {
@ -336,13 +336,13 @@
}) })
const alarmDispose = function (res) { const alarmDispose = function (res) {
$.getJSON('/iot/wisdomScenario/getAlarmByUid?alarmuid=' + res, function (result) { $.getJSON('/IOT/iot/wisdomScenario/getAlarmByUid?alarmuid=' + res, function (result) {
alarmDisposeInfo(result); alarmDisposeInfo(result);
}) })
} }
const disposeInfo = function (res) { const disposeInfo = function (res) {
$.getJSON('/iot/wisdomScenario/getAlarmByUid?alarmuid=' + res, function (result) { $.getJSON('/IOT/iot/wisdomScenario/getAlarmByUid?alarmuid=' + res, function (result) {
let html = `<div> let html = `<div>
<p style="margin-top: 13px;"> <p style="margin-top: 13px;">
<label>告警编号:${result.alarmuid}</label> <label>告警编号:${result.alarmuid}</label>
@ -414,7 +414,7 @@
content: html, content: html,
ok: { ok: {
callback: function () { callback: function () {
$.post("/iot/wisdomScenario/disposeAlarm", $.post("/IOT/iot/wisdomScenario/disposeAlarm",
{ {
alarmuid: res.alarmuid, alarmuid: res.alarmuid,
disposeMode: $("#disposeMode").val(), disposeMode: $("#disposeMode").val(),
@ -438,7 +438,7 @@
let datas = []; let datas = [];
$.ajax({ $.ajax({
url: '/iot/wisdomScenario/getMonitorUnitModule?monitorUnitType=' + getParams("id"), url: '/IOT/iot/wisdomScenario/getMonitorUnitModule?monitorUnitType=' + getParams("id"),
type: 'GET', type: 'GET',
dataType: 'JSON', dataType: 'JSON',
success: function (result) { success: function (result) {

@ -255,7 +255,7 @@
} }
.sensor-card { .sensor-card {
background: url("/img/sensor-block.png") no-repeat #00000000; background: url("/IOT/img/sensor-block.png") no-repeat #00000000;
background-size: 100% 100%; background-size: 100% 100%;
/* width: 48%; /* width: 48%;
height: 47%;*/ height: 47%;*/
@ -266,7 +266,7 @@
} }
.sensor-card:hover, .sensor-card.active { .sensor-card:hover, .sensor-card.active {
background: url("/img/sensor-block.png") no-repeat #00000000; background: url("/IOT/img/sensor-block.png") no-repeat #00000000;
background-size: 100% 100%; background-size: 100% 100%;
} }
@ -408,7 +408,7 @@
left: calc(50% - 50px); left: calc(50% - 50px);
bottom: 50px; bottom: 50px;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
background-image: url("../../img/magnify.png"); background-image: url("../../IOT/img/magnify.png");
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
@ -420,7 +420,7 @@
right: calc(50% - 50px); right: calc(50% - 50px);
bottom: 50px; bottom: 50px;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
background-image: url("../../img/lessen.png"); background-image: url("../../IOT/img/lessen.png");
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
@ -432,7 +432,7 @@
left: 50px; left: 50px;
top: 50%; top: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
background-image: url("../../img/leftBtn.png"); background-image: url("../../IOT/img/leftBtn.png");
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
@ -444,7 +444,7 @@
right: 50px; right: 50px;
top: 50%; top: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
background-image: url("../../img/rightBtn.png"); background-image: url("../../IOT/img/rightBtn.png");
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
@ -456,7 +456,7 @@
right: 50px; right: 50px;
top: 50px; top: 50px;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
background-image: url("../../img/close.png"); background-image: url("../../IOT/img/close.png");
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
@ -471,8 +471,8 @@
<script th:src="@{/js/font-adjust.js}"></script> <script th:src="@{/js/font-adjust.js}"></script>
<th:block th:include="include :: echarts-js"/> <th:block th:include="include :: echarts-js"/>
<th:block th:include="include :: ztree-js"/> <th:block th:include="include :: ztree-js"/>
<script src="../../static/js/view-model.js" th:src="@{/js/view-model.js}"></script> <script src="../../IOT/static/js/view-model.js" th:src="@{/js/view-model.js}"></script>
<script src="../../static/ajax/libs/bootstrap-table/extensions/treeview/bootstrap-treeview.min.js" <script src="../../IOT/static/ajax/libs/bootstrap-table/extensions/treeview/bootstrap-treeview.min.js"
th:src="@{/ajax/libs/bootstrap-table/extensions/treeview/bootstrap-treeview.min.js}"></script> th:src="@{/ajax/libs/bootstrap-table/extensions/treeview/bootstrap-treeview.min.js}"></script>
<script th:src="@{/js/Iot-ui/deviceMonitor.js}"></script> <script th:src="@{/js/Iot-ui/deviceMonitor.js}"></script>
<script th:src="@{/js/Iot-ui/MiniDialog-es5.min.js}"></script> <script th:src="@{/js/Iot-ui/MiniDialog-es5.min.js}"></script>
@ -506,7 +506,7 @@
</div> </div>
<div class="imgMagnification" id="imgMagnification"> <div class="imgMagnification" id="imgMagnification">
<div class="center" id="center"> <div class="center" id="center">
<img alt="" class="centerImg" id="centerImg" src="../../img/transformer.png"> <img alt="" class="centerImg" id="centerImg" src="../../IOT/img/transformer.png">
</div> </div>
<div class="magnify" id="magnify" onclick="imgOption(0.1)"></div> <div class="magnify" id="magnify" onclick="imgOption(0.1)"></div>
<div class="lessen" id="lessen" onclick="imgOption(-0.1)"></div> <div class="lessen" id="lessen" onclick="imgOption(-0.1)"></div>
@ -537,7 +537,7 @@
$(function () { $(function () {
var search = function () { var search = function () {
$.ajax({ $.ajax({
url: "/iot/deviceMonitor/getMonitorUnitTree", // 发送的路径 url: "/IOT/iot/deviceMonitor/getMonitorUnitTree", // 发送的路径
type: "get", // 发送方式 type: "get", // 发送方式
dataType: 'JSON', // 反序列化 dataType: 'JSON', // 反序列化
success: (res) => { // 成功获取到后端返回结果的回调函数 success: (res) => { // 成功获取到后端返回结果的回调函数
@ -607,7 +607,7 @@
sensorCollectionRefresh(unitId, params); sensorCollectionRefresh(unitId, params);
} else { } else {
$.ajax({ $.ajax({
url: "/iot/deviceMonitor/getFirstMonitorUnit", url: "/IOT/iot/deviceMonitor/getFirstMonitorUnit",
type: "get", type: "get",
success: (res) => { success: (res) => {
thisID = res thisID = res
@ -622,7 +622,7 @@
}) })
const monitorUnitModule = function (monitorUnitId) { const monitorUnitModule = function (monitorUnitId) {
$.ajax({ $.ajax({
url: "/iot/deviceMonitor/getMonitorUnitInfo?monitorunitId=" + monitorUnitId, url: "/IOT/iot/deviceMonitor/getMonitorUnitInfo?monitorunitId=" + monitorUnitId,
type: "get", type: "get",
dataType: 'JSON', dataType: 'JSON',
success: (res) => { success: (res) => {

Loading…
Cancel
Save