This commit is contained in:
2024-03-26 15:56:31 +08:00
parent 634e8b71ab
commit 0855ae42cd
547 changed files with 94818 additions and 60463 deletions

View File

@ -6,6 +6,10 @@
<head runat="server">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title></title>
<link rel="stylesheet" href="<%=GetFileUrlWithVersion("../css/default.css")%>" type="text/css" />
<style type="text/css">
:root { <%=StyleVariables%> }
</style>
<style>
html,
body {
@ -31,6 +35,7 @@
right: 0;
top: 0;
bottom: 0;
font-size: 14px;
}
#content {
@ -55,35 +60,30 @@
div {
cursor: default;
}
</style>
<style type="text/css">
.data-grid {
height: 100%;
font-size: 12px !important;
font-family: "Segoe UI","Segoe UI Web (West European)","Segoe UI",-apple-system,BlinkMacSystemFont,"Roboto","Helvetica Neue",sans-serif !important;
#mask_bg,
.maskbg {
z-index: 500;
}
.dialog {
z-index: 651;
}
</style>
<link rel="stylesheet" href="<%=GetFileUrlWithVersion("../css/default.css")%>" type="text/css" />
<link rel="stylesheet" href="<%=GetFileUrlWithVersion("../css/split_sub.css")%>" type="text/css" />
<link rel="stylesheet" href="<%=GetFileUrlWithVersion("../css/split_sub.css")%>" />
<link rel="stylesheet" href="<%=GetFileUrlWithVersion("../css/mapview.css")%>" />
<link rel="stylesheet" href="<%=GetFileUrlWithVersion("../css/editmultiselect.css")%>" />
<link rel="stylesheet" href="https://js.arcgis.com/3.40/esri/css/esri.css" />
<link rel="stylesheet" href="https://js.arcgis.com/3.44/esri/css/esri.css" />
<link rel="stylesheet" href="<%=GetFileUrlWithVersion("../css/jquery.datetimepicker.css")%>" />
<link rel="stylesheet" href="<%=GetFileUrlWithVersion("../css/playbar.css")%>" />
<link type="text/css" href="<%=GetFileUrlWithVersion("../js/components/css/gridview.css") %>" rel="stylesheet" />
<link type="text/css" href="<%=GetFileUrlWithVersion("../css/override.css") %>" rel="stylesheet" />
<link href="<%=GetFileUrlWithVersion("../css/panel.css")%>" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="<%=GetFileUrlWithVersion("../fic/fic/css/form.css")%>" />
<script src="<%=GetFileUrlWithVersion("../js/jquery-" + (JQueryVersion ?? "3.6.0") + ".min.js")%>" type="text/javascript"></script>
<script src="<%=GetFileUrlWithVersion("../js/utility.js")%>" type="text/javascript"></script>
<script type="text/javascript" src="<%=GetFileUrlWithVersion("../js/components/gridview.js") %>"></script>
<script src="<%=GetFileUrlWithVersion("../fic/js/utility.js")%>" type="text/javascript"></script>
<script type="text/javascript" src="<%=GetFileUrlWithVersion("../fic/fic/js/controls/form.js") %>"></script>
<script>
var GridView = window.GridView || window['g5-gridview'];
//必须放在地图js之前
var dojoConfig = {
paths: {
@ -96,7 +96,7 @@
<script src="<%=GetFileUrlWithVersion("../js/jquery.datetimepicker.full.js")%>"></script>
<script src="<%=GetFileUrlWithVersion("../js/vue.min.js")%>"></script>
<script>Vue.config.productionTip = false; Vue.config.silent = true;</script>
<script src="https://js.arcgis.com/3.40"></script>
<script src="https://js.arcgis.com/3.44"></script>
<%--<script src="<%=GetFileUrlWithVersion("js/mapinit3.19.js")%>"></script>--%>
<script src="<%=GetFileUrlWithVersion("../js/language.js")%>"></script>
<script src="<%=GetFileUrlWithVersion("../js/mapview/asset.js")%>"></script>
@ -237,13 +237,22 @@
getLocationHistory(true);
openTrips(true);
});
$('#selLocDatasource').on('click', function () {
changeLocDatasource();
});
$('#btnTheftModeReload').on('click', function () {
getLocationHistory(true);
});
$('#dialog_requestvideo').dialog(function () {
showmaskbg(false);
});
$("#btnClearTrip").click(null, function (e) {
$("#tripDiv").hide();
$("#tbTrips").empty();
});
$("#showDealerLocationsDiv").click(null, function (e) {
if ($("#showDealerLocationsDiv").attr("state") == "0") {
assetObject.showLocations();
@ -275,51 +284,7 @@
});
$("#dialog_timeperiod").change(null, function (e) {
currentdate = getCurrentDate();
var timeperiod = $("#dialog_timeperiod").val();
var disabled = false;
if (timeperiod !== "4") {
disabled = true;
var time = new Date(currentdate);
var nowtime = new Date(currentdate);
var hours = nowtime.getHours();
var minutes = nowtime.getMinutes();
if (timeperiod === "2") {
time.setDate(time.getDate() - 1);
nowtime.setDate(nowtime.getDate() - 1);
}
else if (timeperiod === "3") {
time.setDate(time.getDate() - 6);
}
else if (timeperiod === "5") {
time.setDate(time.getDate() - 1);
}
time = time.getMonth() + 1 + "/" + time.getDate() + "/" + time.getFullYear();
nowtime = nowtime.getMonth() + 1 + "/" + nowtime.getDate() + "/" + nowtime.getFullYear();
$('#dateFrom').val(time);
$('#dateTo').val(nowtime);
$('#dialog_starttimehour').val('00');
$('#dialog_starttimeminute').val('00');
$('#dialog_endtimehour').val('23');
$('#dialog_endtimeminute').val('59');
if (timeperiod === "5") {
var s_minutes = minutes + 1;
var s_hours = hours;
if (minutes == 59) {
s_hours = s_hours + 1;
s_minutes = 0;
}
$('#dialog_starttimehour').val(setTimeSelect(s_hours));
$('#dialog_starttimeminute').val(setTimeSelect(s_minutes));
$('#dialog_endtimehour').val(setTimeSelect(hours));
$('#dialog_endtimeminute').val(setTimeSelect(minutes));
}
}
locationTimeperiodChange();
});
//$("#splitIcon").click();
initTime();
@ -369,6 +334,21 @@
else
c.append($("<option></option>").val(i).text(i))
}
var c = $('#dialog_videohour');
for (var i = 0; i < 24; i++) {
if (i < 10)
c.append($("<option></option>").val("0" + i).text("0" + i))
else
c.append($("<option></option>").val(i).text(i))
}
c = $('#dialog_videominute');
for (var i = 0; i < 60; i++) {
if (i < 10)
c.append($("<option></option>").val("0" + i).text("0" + i))
else
c.append($("<option></option>").val(i).text(i))
}
}
</script>
</head>
@ -391,72 +371,134 @@
</div>
</div>
<div id="divsetting">
<table style="line-height: 25px;">
<tr>
<td style="padding-left: 5px;" data-lgid="P_MV_ASSET_COLON">Asset:</td>
<td><span id="spMachineName" data-lgid="P_MV_NOASSETSELECTED">No asset selected.</span></td>
</tr>
<tr>
<td style="padding-left: 5px;" data-lgid="P_MV_TIMEPERIOD_COLON">Time Period:</td>
<td>
<select id="dialog_timeperiod" tabindex="12" style="width: 90px; height: 22px;">
<option value="1" selected="selected" data-lgid="P_MV_TODAY">Today</option>
<option value="5" data-lgid="P_MV_LAST24HOURS">Last 24 Hours</option>
<option value="2" data-lgid="P_MV_PRIORDAY">Prior Day</option>
<option value="3" data-lgid="P_MV_LAST7DAYS">Last 7 Days</option>
<option value="4" data-lgid="P_MV_CUSTOM">Custom</option>
</select></td>
</tr>
<tr>
<td style="padding-left: 5px;" data-lgid="P_MV_FROM_COLON">From:</td>
<td>
<input type="text" id="dateFrom" maxlength="12" tabindex="27" style="width: 70px;" />
<select id="dialog_starttimehour" style="width: 48px; margin-left: 3px;" tabindex="3"></select><span style="font-weight: bold;">&nbsp;:&nbsp;</span>
<select id="dialog_starttimeminute" style="width: 48px; margin-left: 0;" tabindex="4"></select>
</td>
<div class="rightitem" id="theftDiv" style="position: relative;">
<div class="subtitle contactinfo">
<span class="sbutton iconchevrondown" target="divTheft" onclick="OnRightExpend(this)"></span>
<span data-lgid="P_MV_LOCATIONSOURCES" style="font-size: 20px; font-weight: bold;">Location Source(s)</span>
</div>
<div id="divTheft" style="width: 250px; padding-left: 20px;">
<div id="containerTheft"></div>
<div>
<select id="selLocDatasource">
<option value="0" data-lgid="P_MV_PRIMARYONLY">Primary Only</option>
<option value="1" data-lgid="P_MV_THEFTMODEMULTIPLELINES">Theft Mode (Multiple Lines)</option>
<option value="2" data-lgid="P_MV_COMBINEDSINGLELINE">Combined (Single Line)</option>
</select>
</div>
</div>
<div id="theftLoading" style="display: none;"><span class="QuickLoading c-spin"></span></div>
</div>
<div class="rightitem">
<table style="line-height: 25px; width: 100%; table-layout: fixed;">
<tr>
<td style="padding-left: 5px; width: 75px;" data-lgid="P_MV_ASSET_COLON">Asset:</td>
<td><span id="spMachineName" data-lgid="P_MV_NOASSETSELECTED" style="font-weight: bold; word-break: break-word;">No asset selected.</span></td>
</tr>
<tr>
<td style="padding-left: 5px;" data-lgid="P_MV_TIMEPERIOD_COLON">Time Period:</td>
<td>
<select id="dialog_timeperiod" tabindex="12" style="width: 90px; height: 22px;">
<option value="1" selected="selected" data-lgid="P_MV_TODAY">Today</option>
<option value="5" data-lgid="P_MV_LAST24HOURS">Last 24 Hours</option>
<option value="2" data-lgid="P_MV_PRIORDAY">Prior Day</option>
<option value="3" data-lgid="P_MV_LAST7DAYS">Last 7 Days</option>
<option value="4" data-lgid="P_MV_CUSTOM">Custom</option>
</select></td>
</tr>
<tr>
<td style="padding-left: 5px;" data-lgid="P_MV_FROM_COLON">From:</td>
<td>
<input type="text" id="dateFrom" maxlength="12" tabindex="27" style="width: 70px;" />
<select id="dialog_starttimehour" style="width: 48px; margin-left: 3px;" tabindex="3"></select><span style="font-weight: bold;">&nbsp;:&nbsp;</span>
<select id="dialog_starttimeminute" style="width: 48px; margin-left: 0;" tabindex="4"></select>
</td>
</tr>
<tr>
<td style="padding-left: 5px;" data-lgid="P_MV_TO_COLON">To:</td>
<td>
<input type="text" id="dateTo" maxlength="12" tabindex="27" style="width: 70px;" />
<select id="dialog_endtimehour" style="width: 48px; margin-left: 3px;" tabindex="5"></select><span style="font-weight: bold;">&nbsp;:&nbsp;</span>
<select id="dialog_endtimeminute" style="width: 48px; margin-left: 0;" tabindex="6"></select>
</td>
</tr>
<tr>
<td colspan="2" style="text-align: center; width: 180px;">
<div id="divPlayBar" style="background-color: #C0C0C0;"></div>
</td>
</tr>
<tr>
<td colspan="2" style="text-align: right;">
<input id="chkExclude00Loc" style="display: none" checked="checked" type="checkbox" /><span style="margin-right: 10px; display: none" data-lgid="P_MV_TO_EXCLUDE00LOCATIONS">Exclude 0,0 Locations</span>
<%--<input type="button" value="Quick Load" data-lgid="P_MV_QUICKLOAD" id="btnQuickLoadLocationHistory" />--%>
<%--<input type="button" value="Playback" data-lgid="P_MV_PLAYBACK" id="btnLoadLocationHistory" />--%>
<%--<span class="clearbtn" id="btnClearLocationHistory" style="margin-left: 5px;"></span>--%>
<%--<input type="button" value="Clear" data-lgid="P_MV_CLEAR" id="btnClearLocationHistory" />
<input type="button" value="Trip" data-lgid="P_MV_TRIP" id="btnLoadTrip" style="display: none;" />--%>
<%--<span id="btnQuickLoadLocationHistory" class="QuickLoad" style="margin-left: 6px;" title="Quick Load/Skip to End" data-title-lgid="P_MV_QUICKLOADSKIPTOEND"></span>--%>
<span id="btnHisLoading" class="QuickLoading" style="margin-left: 6px; display: none;"></span>
<span id="btnLoadTrip" class="TripReport" style="margin-left: 6px;" title="Trip Report" data-title-lgid="P_MV_TRIPREPORT"></span>
<span class="clearbtn" id="btnClearLocationHistory" style="margin-left: 6px;" title="Clear" data-title-lgid="P_MV_CLEAR"></span>
</tr>
<tr>
<td style="padding-left: 5px;" data-lgid="P_MV_TO_COLON">To:</td>
<td>
<input type="text" id="dateTo" maxlength="12" tabindex="27" style="width: 70px;" />
<select id="dialog_endtimehour" style="width: 48px; margin-left: 3px;" tabindex="5"></select><span style="font-weight: bold;">&nbsp;:&nbsp;</span>
<select id="dialog_endtimeminute" style="width: 48px; margin-left: 0;" tabindex="6"></select>
</td>
</tr>
<tr>
<td id="playBarContainer" colspan="2" style="text-align: center; width: 180px;">
<div id="divPlayBar" style="background-color: #C0C0C0;"></div>
</td>
</tr>
<tr>
<td colspan="2" style="text-align: right;">
<input id="chkExclude00Loc" style="display: none" checked="checked" type="checkbox" /><span style="margin-right: 10px; display: none" data-lgid="P_MV_TO_EXCLUDE00LOCATIONS">Exclude 0,0 Locations</span>
<span id="btnHisLoading" class="QuickLoading" style="margin-left: 6px; display: none;"></span>
<span id="btnLoadTrip" class="TripReport" style="margin-left: 6px;" title="Trip Report" data-title-lgid="P_MV_TRIPREPORT"></span>
<%--<span id="btnTheftMode" class="TheftMode" style="margin-left: 6px;" title="Theft Mode" data-title-lgid="P_MV_THEFTMODE"></span>--%>
<span id="btnTheftModeReload" class="BarPlayEnd" style="margin-left: 6px; display: none" title="Quick Load/Skip to End" data-title-lgid="P_MV_QUICKLOADSKIPTOEND"></span>
<span class="clearbtn" id="btnClearLocationHistory" style="margin-left: 6px;" title="Clear" data-title-lgid="P_MV_CLEAR"></span>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</div>
<div id="tripDiv" style="display: none;">
<div>
<span class="clearbtn" id="btnClearTrip" style="float: right; padding: 5px;"></span>
</div>
<div style="position: absolute; top: 30px; bottom: 0; right: 0; overflow: auto; width: 100%;">
<table id="tbTrips" style="line-height: 24px; border-collapse: collapse; border-spacing: 0; width: 100%;">
<table id="tbTrips" style="line-height: 24px; border-collapse: collapse; border-spacing: 0; width: 100%;table-layout:fixed;">
</table>
</div>
</div>
<div id="mask_bg" style="display: none;"><div class="loading c-spin"></div></div>
<div id="mask_bg" style="display: none;">
<div class="loading c-spin"></div>
</div>
<div class="dialog" id="dialog_requestvideo" style="display: none; width: 320px;">
<div class="dialog-title"><span class="title" data-lgid="P_MV_VIDEOREQUEST">Video Request</span><em class="dialog-close"></em></div>
<div class="dialog-content">
<table>
<tr>
<td class="label" data-lgid="P_MV_CUSTOMTIME_COLON">Custom Time:</td>
<td>
<input type="checkbox" id="dialog_videoct" tabindex="1" />
</td>
</tr>
<tr>
<td class="label" data-lgid="P_MV_DATE_COLON">Date:</td>
<td>
<input type="text" id="dialog_videodate" tabindex="1" />
</td>
</tr>
<tr>
<td class="label" data-lgid="P_MV_TIME_COLON">Time:</td>
<td>
<select id="dialog_videohour" style="width: 48px;" tabindex="2"></select><span style="font-weight: bold;">&nbsp;&nbsp;:&nbsp;&nbsp;</span>
<select id="dialog_videominute" style="width: 48px;" tabindex="3"></select>
</td>
</tr>
<tr>
<td class="label" style="width: 100px;" data-lgid="P_MV_VIDEOCLIPLENGTH_COLON">Video Clip Length:</td>
<td>
<input type="radio" id="r30sec" name="cliplen" checked="checked" tabindex="5" /><label for="r30sec" data-lgid="P_MV_30SECONDS">30 Seconds</label>
</td>
</tr>
<tr>
<td class="label"></td>
<td>
<input type="radio" id="r120sec" name="cliplen" tabindex="6" /><label for="r120sec" data-lgid="P_MV_120SECONDS">120 Seconds</label>
</td>
</tr>
</table>
<input type="hidden" id="dialog_hlogid" />
</div>
<div class="dialog-func">
<input type="button" value="Cancel" data-lgid="P_MV_CANCEL" class="dialog-close" tabindex="12" />
<input type="button" onclick="requestVideo();" value="Submit" data-lgid="P_MV_SUBMIT" tabindex="11" />
<div class="clear"></div>
</div>
</div>
</div>
</form>
</body>

View File

@ -1,13 +1,17 @@
using DocumentFormat.OpenXml.Wordprocessing;
using Foresight.Fleet.Services.Asset;
using Foresight.Fleet.Services.Customer;
using Foresight.Fleet.Services.Styles;
using IronIntel.Contractor;
using IronIntel.Contractor.iisitebase;
using IronIntel.Contractor.Machines;
using IronIntel.Contractor.MapView;
using IronIntel.Contractor.Site;
using IronIntel.Contractor.Users;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Web;
using System.Web.UI;
@ -21,6 +25,7 @@ public partial class AssetLocationHis : ContractorBasePage
private string Logo1html = "<img class=\"logo\" src=\"{0}\" style=\"width:24px;height:24px; \" />";
protected string Logo1 = "";
public string CurrentDate = "";
protected string StyleVariables = "";
protected void Page_Load(object sender, EventArgs e)
{
string tp = Request.Params["tp"];
@ -35,6 +40,7 @@ public partial class AssetLocationHis : ContractorBasePage
{
var cmp = SystemParams.GetCompanyInfo();
GetLogoHtml(cmp);
GetUIStyle();
}
}
DateTime userlocaldate = SystemParams.ConvertToUserTimeFromUtc(GetCurrentLoginSession().User, DateTime.UtcNow);
@ -108,4 +114,46 @@ public partial class AssetLocationHis : ContractorBasePage
return lic;
}
}
protected StyleInfo GetUIStyle()
{
var sessionid = IronIntelBasePage.GetLoginSessionID(Request);
var user = UserManagement.GetUserBySessionID(sessionid);
CustUIStyle style = null;
if (user != null)
{
style = SystemParams.GetUIStyle(user.IID);
string color;
if (style != null)
{
color = style.TitleBarColor;
}
else
{
color = "#f78e1e";
}
string opacity;
string fore;
string ctrlbgcolor = "lightgray";
try
{
var c = ColorTranslator.FromHtml(color);
opacity = string.Format("rgb({0} {1} {2}/60%)", c.R, c.G, c.B);
var g = .299 * c.R + .587 * c.G + .114 * c.B;
fore = g < 127.5 ? "#f0f0f0" : "#0f0f0f";
ctrlbgcolor = g < 221 ? color : "lightgray";//221为light的计算值
}
catch
{
opacity = "rgb(247 142 30/60%)";
fore = "#0f0f0f";
ctrlbgcolor = "lightgray";
}
StyleVariables = string.Format("--title-color: {0}; --title-bg-color: {1}; --title-bg-opacity-color: {2};--title-ctrlbg-color: {3}; ", fore, color, opacity, ctrlbgcolor);
}
return new StyleInfo
{
User = user,
Style = style
};
}
}

View File

@ -39,22 +39,13 @@
cursor: default;
}
</style>
<style type="text/css">
.data-grid {
height: 100%;
font-size: 12px !important;
font-family: "Segoe UI","Segoe UI Web (West European)","Segoe UI",-apple-system,BlinkMacSystemFont,"Roboto","Helvetica Neue",sans-serif !important;
}
</style>
<link rel="stylesheet" href="<%=GetFileUrlWithVersion("../css/default.css")%>" type="text/css" />
<link rel="stylesheet" href="<%=GetFileUrlWithVersion("../css/split_sub.css")%>" type="text/css" />
<link rel="stylesheet" href="<%=GetFileUrlWithVersion("../css/split_sub.css")%>" />
<link rel="stylesheet" href="<%=GetFileUrlWithVersion("../css/mapview.css")%>" />
<link rel="stylesheet" href="<%=GetFileUrlWithVersion("../css/editmultiselect.css")%>" />
<link rel="stylesheet" href="https://js.arcgis.com/3.40/esri/css/esri.css" />
<link rel="stylesheet" href="https://js.arcgis.com/3.44/esri/css/esri.css" />
<link rel="stylesheet" href="<%=GetFileUrlWithVersion("../css/jquery.datetimepicker.css")%>" />
<link rel="stylesheet" href="<%=GetFileUrlWithVersion("../css/playbar.css")%>" />
<link type="text/css" href="<%=GetFileUrlWithVersion("../js/components/css/gridview.css") %>" rel="stylesheet" />
<link type="text/css" href="<%=GetFileUrlWithVersion("../css/override.css") %>" rel="stylesheet" />
<link href="<%=GetFileUrlWithVersion("../css/panel.css")%>" rel="stylesheet" type="text/css" />
@ -62,9 +53,7 @@
<script src="<%=GetFileUrlWithVersion("../js/jquery-" + (JQueryVersion ?? "3.6.0") + ".min.js")%>" type="text/javascript"></script>
<script src="<%=GetFileUrlWithVersion("../js/cookie.js")%>"></script>
<script src="<%=GetFileUrlWithVersion("../js/utility.js")%>" type="text/javascript"></script>
<script type="text/javascript" src="<%=GetFileUrlWithVersion("../js/components/gridview.js") %>"></script>
<script>
var GridView = window.GridView || window['g5-gridview'];
//必须放在地图js之前
var dojoConfig = {
paths: {
@ -76,7 +65,7 @@
<script src="<%=GetFileUrlWithVersion("../js/jquery.datetimepicker.full.js")%>"></script>
<script src="<%=GetFileUrlWithVersion("../js/vue.min.js")%>"></script>
<script>Vue.config.productionTip = false; Vue.config.silent = true;</script>
<script src="https://js.arcgis.com/3.40"></script>
<script src="https://js.arcgis.com/3.44"></script>
<%--<script src="<%=GetFileUrlWithVersion("js/mapinit3.19.js")%>"></script>--%>
<%--<script src="<%=GetFileUrlWithVersion("../js/mapview.js")%>"></script>--%>
<%--<script src="<%=GetFileUrlWithVersion("../js/playbar.js")%>"></script>--%>

View File

@ -6,40 +6,23 @@
<head runat="server">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title></title>
<link type="text/css" href="<%=GetUrl("js/lib/ui.min.css") %>" rel="stylesheet" />
<link rel="stylesheet" href="<%=GetUrl("css/default.css")%>" type="text/css" />
<link rel="stylesheet" href="<%=GetUrl("css/split_sub.css")%>" type="text/css" />
<style type="text/css">
#search {
background-color: rgb(235, 235, 235);
border: none;
padding-top: 5px;
padding-bottom: 5px;
cursor: pointer;
}
#search:hover {
background: rgb(225, 225, 225);
}
</style>
<style type="text/css">
:root { <%=StyleVariables%> }
.data-grid {
height: 100%;
font-size: 12px !important;
font-family: "Segoe UI","Segoe UI Web (West European)","Segoe UI",-apple-system,BlinkMacSystemFont,"Roboto","Helvetica Neue",sans-serif !important;
}
</style>
<link type="text/css" href="<%=GetUrl("js/components/css/gridview.css") %>" rel="stylesheet" />
<link type="text/css" href="<%=GetUrl("css/override.css") %>" rel="stylesheet" />
<script src="<%=GetUrl("js/lib/utility.min.js")%>" type="text/javascript"></script>
<script src="<%=GetUrl("js/lib/ui.min.js")%>" type="text/javascript"></script>
<script src="<%=GetUrl("js/jquery-3.6.0.min.js")%>" type="text/javascript"></script>
<script src="<%=GetUrl("js/cookie.js")%>" type="text/javascript"></script>
<script src="<%=GetUrl("js/utility.js")%>" type="text/javascript"></script>
<script type="text/javascript" src="<%=GetUrl("js/components/gridview.js") %>"></script>
<script src="<%=GetUrl("js/language.js")%>" type="text/javascript"></script>
<script type="text/javascript">
<%-- _net.root = '<%=Page.ResolveUrl("~/")%>';--%>
var GridView = window.GridView || window['g5-gridview'];
<%-- _net.root = '<%=Page.ResolveUrl("~/")%>';--%>
var GridView = window['lib-ui'].Grid;
var canExport = <%= CanExportFile %>;
function getText(s, flag) {

View File

@ -186,7 +186,10 @@
{
key: 'model',
caption: GetTextByKey('P_MA_MODELNAME', 'Model Name'),
width: 100
width: 100,
totalCss: {
'text-align': 'right'
}
},
{ key: 'h0', caption: '12AM-1AM', width: 94, align: 'right' },
{ key: 'h1', caption: '1AM-2AM', width: 94, align: 'right' },
@ -249,11 +252,11 @@
var source = grid.source;
var total = {
name: GetTextByKey('P_MA_TOTALCOLON', 'Total:') + ' ' + source.length,
model: $('<span></span>').css('float', 'right').text(GetTextByKey('P_MA_TOTALRUNTIMECOLON', 'Total Runtime:'))[0].outerHTML
model: GetTextByKey('P_MA_TOTALRUNTIMECOLON', 'Total Runtime:')
};
for (var h = 0; h < 24; h++) {
var seconds = source.reduce(function (current, s) {
var n = s.Values['s' + h];
var n = s['s' + h];
return isNaN(n) ? current : current + n;
}, 0);
if (seconds > 0) {
@ -265,7 +268,6 @@
}
}
grid.total = total;
grid.init();
loading = false;
$('.maskbg').fadeOut(100);
@ -356,7 +358,7 @@
it['h' + h] = text;
}
source.push({ Values: it });
source.push(it);
parent.append($('<tr></tr>').append(item));
}
source = grid.source.concat(source);
@ -390,11 +392,11 @@
function OnDateChanged() {
var date = $('#date-selector').val();
if (date == "") {
showAlert(GetTextByKey("P_WO_XXXXXX", "The date is required."), alerttitle);
showAlert(GetTextByKey("P_MA_THEDATEISREQUIRED", "The date is required."), alerttitle);
return false;
}
if (!checkDate(date)) {
showAlert(GetTextByKey("P_WO_XXXXXX", "The date is incorrect."), alerttitle);
showAlert(GetTextByKey("P_MA_THEDATEISINCORRECT", "The date is incorrect."), alerttitle);
return false;
}
getAssetTimeline(pcid, date);
@ -413,11 +415,11 @@
function OnExport() {
var date = $('#date-selector').val();
if (date == "") {
showAlert(GetTextByKey("P_WO_XXXXXX", "The date is required."), alerttitle);
showAlert(GetTextByKey("P_MA_THEDATEISREQUIRED", "The date is required."), alerttitle);
return false;
}
if (!checkDate(date)) {
showAlert(GetTextByKey("P_WO_XXXXXX", "The date is incorrect."), alerttitle);
showAlert(GetTextByKey("P_MA_THEDATEISINCORRECT", "The date is incorrect."), alerttitle);
return false;
}

View File

@ -7,60 +7,11 @@
display: none;
}
.edit-content table {
border-collapse: collapse;
width: 100%;
}
.edit-content table td.label {
width: 200px;
text-align: right;
padding-right: 10px;
line-height: 24px;
height: 24px;
vertical-align: top;
}
.edit-content table td input,
.edit-content table td textarea {
border: 1px solid #a9a9a9;
width: 320px;
height: 18px;
padding: 1px;
}
.edit-content table td input[type="checkbox"] {
border: none;
}
.edit-content table td textarea {
height: 100px;
resize: none;
/*max-width: 200px;*/
}
.a {
text-decoration: none;
color: #2140fb;
}
.subtitle {
margin: 20px 40px 5px 0px;
font-size: 16px;
color: gray;
}
.subtitle span {
margin-left: 10px;
}
.subtitle hr {
background-color: #d8d8d8;
border: none;
height: 1px;
}
.machinetd {
white-space: nowrap;
text-overflow: ellipsis;
@ -357,7 +308,6 @@
<link href="<%=GetFileUrlWithVersion("../css/jquery.datetimepicker.css")%>" rel="stylesheet" />
<script src="<%=GetFileUrlWithVersion("../Maintenance/js/inputdatactr.js")%>" type="text/javascript"></script>
<script src="<%=GetFileUrlWithVersion("../js/jquery.datetimepicker.full.js")%>"></script>
<script src="<%=GetFileUrlWithVersion("../js/editableselect.js")%>"></script>
<script src="<%=GetFileUrlWithVersion("../js/vue.min.js")%>"></script>
<script src="<%=GetFileUrlWithVersion("js/adj_odometer.js")%>"></script>
<script src="<%=GetFileUrlWithVersion("js/adj_enginehours.js")%>"></script>
@ -473,7 +423,7 @@
setTimeout(function () {
timelineLoaded = true;
OnRefresh();
},100);
}, 100);
});
$('#div_timeline').show();
}
@ -688,11 +638,11 @@
GetAssetRental();
if (data.Description && data.Description !== "") {
data.Description = replaceHtmlText(data.Description);
$("#tddesc").html(data.Description);
//data.Description = replaceHtmlText(data.Description);
$("#tddesc").text(data.Description);
}
else
$("#tddesc").html("");
$("#tddesc").text("");
if ((IsSupperAdmin || isAllowed) && canAddReading() && canEditAsset) {
if (data.OnRoad) {
@ -991,7 +941,7 @@
function GetAssetExtInfo(rentaldata) {
showloading(true);
assetrequest("GetAssetExtInfo", contractorid + String.fromCharCode(170) + assetid, function (data) {
assetrequest("GetAssetExtInfo", contractorid + String.fromCharCode(170) + assetid + String.fromCharCode(170) + "", function (data) {
showloading(false);
if (typeof (data) === "string") {
return;
@ -1320,20 +1270,14 @@
if (j === "AlertLocalTime")
r[j] = { DisplayValue: r["AlertLocalTimeStr"], Value: r[j] };
}
var fr = { Values: r };
rows.push(fr);
rows.push(r);
}
grid_alertsdt.setData(rows);
}
function InitAlertsGridData() {
grid_alertsdt = new GridView('#divalerts');
grid_alertsdt.lang = {
all: GetTextByKey("P_GRID_ALL", "(All)"),
ok: GetTextByKey("P_GRID_OK", "OK"),
reset: GetTextByKey("P_GRID_RESET", "Reset")
};
grid_alertsdt = createGridView('#divalerts');
var list_columns = [
{ name: 'AlertLocalDateStr', caption: GetTextByKey("P_MV_DATE", "Date"), valueIndex: 'AlertLocalDateStr', css: { 'width': 70, 'text-align': 'left' } },
{ name: 'AlertLocalTimeStr', caption: GetTextByKey("P_MV_TIME", "Time"), valueIndex: 'AlertLocalTimeStr', css: { 'width': 75, 'text-align': 'left' } },
@ -1357,12 +1301,6 @@
grid_alertsdt.canMultiSelect = false;
grid_alertsdt.columns = columns;
grid_alertsdt.init();
grid_alertsdt.selectedrowchanged = function (rowindex) {
var rowdata = grid_alertsdt.source[rowindex];
if (rowdata) {
}
}
}
var grid_assetstatusdt;
@ -1374,20 +1312,14 @@
if (j === "EventLocalTime")
r[j] = { DisplayValue: r["EventLocalTimeStr"], Value: r[j] };
}
var fr = { Values: r };
rows.push(fr);
rows.push(r);
}
grid_assetstatusdt.setData(rows);
}
function InitAssetStatusGridData() {
grid_assetstatusdt = new GridView('#divassetstatus');
grid_assetstatusdt.lang = {
all: GetTextByKey("P_GRID_ALL", "(All)"),
ok: GetTextByKey("P_GRID_OK", "OK"),
reset: GetTextByKey("P_GRID_RESET", "Reset")
};
grid_assetstatusdt = createGridView('#divassetstatus');
var list_columns = [
{ name: 'EventLocalTime', caption: GetTextByKey("P_MV_DATE", "Date"), valueIndex: 'EventLocalTime', css: { 'width': 100, 'text-align': 'left' } },
{ name: 'AttributeName', caption: GetTextByKey("P_MV_READING", "Reading"), valueIndex: 'AttributeName', css: { 'width': 120, 'text-align': 'left' } },
@ -1410,12 +1342,6 @@
grid_assetstatusdt.canMultiSelect = false;
grid_assetstatusdt.columns = columns;
grid_assetstatusdt.init();
grid_assetstatusdt.selectedrowchanged = function (rowindex) {
var rowdata = grid_assetstatusdt.source[rowindex];
if (rowdata) {
}
}
}
@ -1428,20 +1354,14 @@
if (j === "AlertLocalTime")
r[j] = { DisplayValue: r["AlertLocalTimeStr"], Value: r[j] };
}
var fr = { Values: r };
rows.push(fr);
rows.push(r);
}
grid_utilizationdt.setData(rows);
}
function InitUtilizationGridData() {
grid_utilizationdt = new GridView('#divutilization');
grid_utilizationdt.lang = {
all: GetTextByKey("P_GRID_ALL", "(All)"),
ok: GetTextByKey("P_GRID_OK", "OK"),
reset: GetTextByKey("P_GRID_RESET", "Reset")
};
grid_utilizationdt = createGridView('#divutilization');
var list_columns = [
{ name: 'AlertLocalTime', caption: "", valueIndex: 'AlertLocalTime', css: { 'width': 70, 'text-align': 'left' } },
{ name: 'TotalHours', caption: GetTextByKey("P_MV_TOTALHOURS", "Total Hours"), TotalHours: 'Level', css: { 'width': 80, 'text-align': 'left' } },
@ -1466,12 +1386,6 @@
grid_utilizationdt.canMultiSelect = false;
grid_utilizationdt.columns = columns;
grid_utilizationdt.init();
grid_utilizationdt.selectedrowchanged = function (rowindex) {
var rowdata = grid_utilizationdt.source[rowindex];
if (rowdata) {
}
}
}
function getNowFormatDate() {
@ -1571,9 +1485,6 @@
</script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<div id="mask_bg" style="display: none;">
<div class="loading c-spin"></div>
</div>
<div>
<div class="clear"></div>
<div id="divcontent" style="overflow: auto; font-size: 13px;">
@ -1605,9 +1516,9 @@
<label>{{asset.TypeName}}</label>
<br />
<b class="assetlable" data-lgid="P_MV_MAKE_COLON">Make:</b>
<b>{{asset.MakeName}}</b>
<label>{{asset.MakeName}}</label>
<b class="assetlable" data-lgid="P_MV_MODEL_COLON">Model:</b>
<b>{{asset.ModelName}}</b>
<label>{{asset.ModelName}}</label>
<br />
<label data-lgid="P_MV_VINSN_COLON">VIN/SN:</label>
<label>{{asset.VIN}}</label>
@ -1716,6 +1627,9 @@
<div id="div_wsp" class="div-wsp">
<iframe id="ifwsp" class="iframe-wsp"></iframe>
</div>
<div id="mask_bg" style="display: none;">
<div class="loading c-spin"></div>
</div>
<div class="dialog" id="dialog_addodometer" style="display: none; width: 600px;">
<div id="addodomask" class="maskbg" style="display: none; z-index: 1;"></div>
@ -1723,7 +1637,7 @@
<div class="dialog-content adjust-content">
<table style="line-height: 25px; width: 100%;">
<tr>
<td class="label" title="Odometer at time of reading" data-titlt-lgid="P_MV_ODOMETERATTIMEOFREADING" data-lgid="P_MV_ODOMETER_COLON">Odometer:</td>
<td class="label" title="Odometer at time of reading" data-title-lgid="P_MV_ODOMETERATTIMEOFREADING" data-lgid="P_MV_ODOMETER_COLON">Odometer:</td>
<td>
<input type="text" id="dialogadd_odometer" maxlength="8" tabindex="151" /></td>
</tr>
@ -1736,17 +1650,17 @@
</select></td>
</tr>
<tr>
<td class="label" title="Time zone of asset reading" data-titlt-lgid="P_MV_TIMEZONEOFASSETREADING" data-lgid="P_MV_TIMEZON_COLON">Time Zone:</td>
<td class="label" title="Time zone of asset reading" data-title-lgid="P_MV_TIMEZONEOFASSETREADING" data-lgid="P_MV_TIMEZON_COLON">Time Zone:</td>
<td>
<select id="dialogadd_odometertimezone" tabindex="153" /></td>
</tr>
<tr>
<td class="label" title="Date of reading" data-titlt-lgid="P_MV_DATEOFREADING" data-lgid="P_MV_ODOMETERDATE_COLON">Odometer Date:</td>
<td class="label" title="Date of reading" data-title-lgid="P_MV_DATEOFREADING" data-lgid="P_MV_ODOMETERDATE_COLON">Odometer Date:</td>
<td>
<input type="text" id="dialogadd_odometerdate" maxlength="8" tabindex="154" /></td>
</tr>
<tr>
<td class="label" title="Time of reading (military)" data-titlt-lgid="P_MV_TIMEOFREADINGMILITARY" data-lgid="P_MV_ODOMETERTIME_COLON">Odometer Time:</td>
<td class="label" title="Time of reading (military)" data-title-lgid="P_MV_TIMEOFREADINGMILITARY" data-lgid="P_MV_ODOMETERTIME_COLON">Odometer Time:</td>
<td>
<select id="dialogadd_timehour" style="width: 48px;" tabindex="155"></select><span style="font-weight: bold;">&nbsp;&nbsp;:&nbsp;&nbsp;</span>
<select id="dialogadd_timeminute" style="width: 48px;" tabindex="156"></select></td>
@ -1776,17 +1690,17 @@
<input type="text" id="dialogaddgenginehours_enginehours" maxlength="8" tabindex="171" /></td>
</tr>
<tr>
<td class="label" title="Time zone of asset reading" data-titlt-lgid="P_MV_TIMEZONEOFASSETREADING" data-lgid="P_MV_TIMEZON_COLON">Time Zone:</td>
<td class="label" title="Time zone of asset reading" data-title-lgid="P_MV_TIMEZONEOFASSETREADING" data-lgid="P_MV_TIMEZON_COLON">Time Zone:</td>
<td>
<select id="dialogadd_enginehourstimezone" tabindex="172" /></td>
</tr>
<tr>
<td class="label" title="Date of reading" data-titlt-lgid="P_MV_DATEOFREADING" data-lgid="P_MV_ENGINEHOURSDATE_COLON">Engine Hours Date:</td>
<td class="label" title="Date of reading" data-title-lgid="P_MV_DATEOFREADING" data-lgid="P_MV_ENGINEHOURSDATE_COLON">Engine Hours Date:</td>
<td>
<input type="text" id="dialogaddenginehours_date" maxlength="8" tabindex="173" /></td>
</tr>
<tr>
<td class="label" title="Time of reading (military)" data-titlt-lgid="P_MV_TIMEOFREADINGMILITARY" data-lgid="P_MV_ENGINEHOURSTIME_COLON">Engine Hours Time:</td>
<td class="label" title="Time of reading (military)" data-title-lgid="P_MV_TIMEOFREADINGMILITARY" data-lgid="P_MV_ENGINEHOURSTIME_COLON">Engine Hours Time:</td>
<td>
<select id="dialogaddenginehours_timehour" style="width: 48px;" tabindex="174"></select><span style="font-weight: bold;">&nbsp;&nbsp;:&nbsp;&nbsp;</span>
<select id="dialogaddenginehours_timeminute" style="width: 48px;" tabindex="175"></select></td>
@ -1806,7 +1720,7 @@
</div>
<div class="dialog" id="dialog_pmschedulelist" style="display: none; width: 640px;">
<div id="pmschedulelistmask" class="maskbg" style="display: none; z-index: 1;"></div>
<div id="pmschedulelistmask" class="maskbg" style="display: none;"></div>
<div class="dialog-title"><span class="title" data-lgid="P_MV_EDITPLAN">Edit Plan</span><em class="dialog-close"></em></div>
<div class="dialog-content">
<div id="pmschedulelist" style="height: 300px;"></div>
@ -1818,7 +1732,7 @@
</div>
</div>
<div class="dialog" id="dialog_pm" style="display: none; min-width: 540px; max-width: 720px; z-index: 2;">
<div class="dialog" id="dialog_pm" style="display: none; min-width: 540px; max-width: 720px;">
<div class="dialog-title"><span class="title" data-lgid="P_MV_ADDASSETTOSCHEDULE">Add Asset To Schedule</span><em class="dialog-close"></em></div>
<div class="dialog-content" style="line-height: 24px; padding-left: 20px; padding-right: 20px;">
</div>

View File

@ -54,12 +54,7 @@ function showConfirmsub(msg, title, fok, fcancel) {
var pmschedules
var grid_pmschedules;
function InitPMGridData() {
grid_pmschedules = new GridView('#pmschedulelist');
grid_pmschedules.lang = {
all: GetTextByKey("P_GRID_ALL", "(All)"),
ok: GetTextByKey("P_GRID_OK", "OK"),
reset: GetTextByKey("P_GRID_RESET", "Reset")
};
grid_pmschedules = createGridView('#pmschedulelist');
var list_columns = [
{ name: 'Selected', caption: "", valueIndex: 'Selected', type: 3, css: { 'width': 45, 'text-align': 'center' } },
{ name: 'PmScheduleName', caption: GetTextByKey("P_MV_SCHEDULENAME", "Schedule Name"), valueIndex: 'PmScheduleName', css: { 'width': 200, 'text-align': 'left' } },
@ -87,7 +82,7 @@ function InitPMGridData() {
if (this.Selected) {
showSetPMDialog(this);
this.Selected = false;//弹出对话框并取消勾选因为此时机器并没有真正加入到计划在对话框OK刷新列表
grid_pmschedules.reload();
grid_pmschedules.reload(true);
}
else {
var item = this;
@ -99,7 +94,7 @@ function InitPMGridData() {
removeAssetFromPMSchedule(item);
}, function () {
item.Selected = true;
grid_pmschedules.reload();
grid_pmschedules.reload(true);
});
}
}
@ -140,8 +135,7 @@ function ShowPMSchedules() {
else
r.StartValue = r.StartDateString;
var fr = { Values: r };
rows.push(fr);
rows.push(r);
}
grid_pmschedules.setData(rows);
}