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

@@ -251,13 +251,29 @@ function getFavoriteNavInfoByID(id, text, icon) {
$(icon).addClass("iconworkorder");
}
else if (id === "nav_workorderhis") {
title = GetTextByKey("P_XXX", title);
title = GetTextByKey("P_WORKORDERHISTORY", title);
$(icon).addClass("iconhistory");
}
else if (id === "nav_maintenanceschedule") {
title = GetTextByKey("P_PM_MAINTENANCESCHEDULES", title);
$(icon).addClass("iconmaintenanceschedule");
}
else if (id === "nav_customerrecord") {
title = GetTextByKey("P_CUSTOMERRECORD", title);
}
else if (id === "nav_customersatisfactionsurveys") {
title = GetTextByKey("P_CUSTOMERSATISFACTIONSURVEYS", title);
$(icon).addClass("icontemplate");
}
else if (id === "nav_surveymanagementresult") {
title = GetTextByKey("P_WOS_SURVEYMANAGEMENTRESULT", title);
}
else if (id === "nav_wosurveytemplate") {
title = GetTextByKey("P_WOS_TEMPLATES", title);
}
else if (id === "nav_wosurveytemplatereport") {
title = GetTextByKey("P_WOS_TEMPLATES_REPORT", title);
}
else if (id === "nav_record") {
title = GetTextByKey("P_MAINTENANCERECORDLEGACY", title);
$(icon).addClass("iconrecord");
@@ -298,6 +314,14 @@ function getFavoriteNavInfoByID(id, text, icon) {
title = GetTextByKey("P_MANAGEMODELS", title);
$(icon).addClass("iconmanagmodels");
}
else if (id === "nav_assethistory") {
title = GetTextByKey("P_MA_ASSETHISTORY", title);
$(icon).addClass("iconhistory");
}
else if (id === "nav_shareasset") {
title = GetTextByKey("P_SHAREASSETS", title);
$(icon).addClass("iconshare");
}
else if (id === "nav_jobsiterequirements") {
title = GetTextByKey("P_JS_JOBSITEREQUIREMENTS", title);
}
@@ -310,6 +334,27 @@ function getFavoriteNavInfoByID(id, text, icon) {
else if (id === "nav_scheduler") {
title = GetTextByKey("P_JS_SCHEDULER", title);
}
else if (id === "100") {//Map View
title = GetTextByKey("P_MAPVIEW", title);
}
else if (id === "250") {//FilterQ
title = GetTextByKey("P_MODULE_FILTERQ", title);
}
else if (id === "500") {//FilterQ
title = "M3";
}
else if (id === "550") {//Over/Under Trucking Alerts
title = GetTextByKey("P_MODULE_OVERUNDERTRUCKINGALERTS", title);
}
else if (id === "650") {//Inspection
title = GetTextByKey("P_MODULE_INSPECTION", title);
}
else if (id === "700") {//Team Intelligence
title = GetTextByKey("P_MODULE_TEAMINTELLIGENCE", title);
}
else if (id === "600") {//OTR Config
title = GetTextByKey("P_MODULE_OTRCONFIG", title);
}
return title;
}
@@ -396,19 +441,19 @@ function onOpenSite(m) {
function setAppMoudule(mouduleid, name, type) {
if (!name) {
if (mouduleid === 100)
name = "Map View";
name = GetTextByKey("P_MAPVIEW", "Map View");
else if (mouduleid === 150)
name = "Jobsites";
name = GetTextByKey("P_MODULE_JOBSITES", "Jobsites");
else if (mouduleid === 250)
name = "FilterQ";
name = GetTextByKey("P_MODULE_FILTERQ", "FilterQ");
else if (mouduleid === 500)
name = "M3";
else if (mouduleid === 550)
name = "Over/Under Trucking Alerts";
name = GetTextByKey("P_MODULE_OVERUNDERTRUCKINGALERTS", "Over/Under Trucking Alerts");
else if (mouduleid === 650)
name = "Inspection";
name = GetTextByKey("P_MODULE_INSPECTION", "Inspection");
else if (mouduleid === 700)
name = "Team Intelligence";
name = GetTextByKey("P_MODULE_TEAMINTELLIGENCE", "Team Intelligence");
}
return setNavigate(mouduleid + '', name, type);
@@ -439,8 +484,11 @@ function showFavConfirm(msg, title, fok, fcancel) {
var grid_favoritedt;
function InitFavoriteGrid() {
grid_favoritedt = new GridView('#favoritelist');
grid_favoritedt.lang = {
var gv = GridView;
if (typeof GridView1 !== 'undefined')//兼容FIC的旧的GridView
gv = GridView1
grid_favoritedt = new gv('#favoritelist');
grid_favoritedt.langs = {
all: GetTextByKey("P_GRID_ALL", "(All)"),
ok: GetTextByKey("P_GRID_OK", "OK"),
reset: GetTextByKey("P_GRID_RESET", "Reset")
@@ -465,62 +513,52 @@ function InitFavoriteGrid() {
if (list_columns[hd].type) {
col.type = list_columns[hd].type;
}
if (col.name === "Delete") {
col.isurl = true;
col.text = "\uf00d";
col.sortable = false;
col.resizable = false;
col.type = gv.ColumnTypes.Icon;
col.text = 'times';
col.iconType = 'fa-light';
col.events = {
onclick: function () {
OnDeleteFavorite(this);
}
};
col.classFilter = function (e) {
return "icon-col";
};
col.attrs = { 'title': GetTextByKey("P_FAV_DELETE", 'Delete') };
}
else if (col.name === "Up") {
col.isurl = true;
col.text = "\uf062";
col.sortable = false;
col.resizable = false;
col.type = gv.ColumnTypes.Icon;
col.text = 'arrow-up';
col.iconType = 'fa-light';
col.events = {
onclick: function () {
onSortFavorite(true, this);
}
};
col.classFilter = function (e) {
return "icon-col";
};
col.attrs = { 'title': GetTextByKey("P_FAV_UP", 'Up') };
col.attrs = { 'title': GetTextByKey("P_FAV_UP", 'Delete') };
}
else if (col.name === "Down") {
col.isurl = true;
col.text = "\uf063";
col.sortable = false;
col.resizable = false;
col.type = gv.ColumnTypes.Icon;
col.text = 'arrow-down';
col.iconType = 'fa-light';
col.events = {
onclick: function () {
onSortFavorite(false, this);
}
};
col.classFilter = function (e) {
return "icon-col";
};
col.attrs = { 'title': GetTextByKey("P_FAV_DOWN", 'Down') };
col.attrs = { 'title': GetTextByKey("P_FAV_DOWN", 'Delete') };
}
columns.push(col);
}
grid_favoritedt.canMultiSelect = false;
grid_favoritedt.columns = columns;
grid_favoritedt.init();
grid_favoritedt.selectedrowchanged = function (rowindex) {
var rowdata = grid_favoritedt.source[rowindex];
if (rowdata) {
}
};
grid_favoritedt.rowdblclick = function (rowindex) {
var rowdata = grid_favoritedt.source[rowindex];
if (rowdata) {
}
};
}
var favgridinited = false;
@@ -535,8 +573,8 @@ function showFavoritesGridList(data) {
var rows = [];
for (var i = 0; i < data.length; i++) {
var r = data[i];
var fr = { Values: r };
rows.push(fr);
r.Name = getFavoriteNavInfoByID(r.ID, r.Name);
rows.push(r);
}
grid_favoritedt.setData(rows);
@@ -552,7 +590,7 @@ function openFavoriteDialog() {
'width': 540,
'top': (document.documentElement.clientHeight - $('#dialog_favorite').height()) / 4,
'left': (document.documentElement.clientWidth - $('#dialog_favorite').width()) / 2
}).showDialogfixed();
}).showDialogfixed(false);//false兼容Inspection中的showDialogfixed
$("#btnfavsave").focus();
if (userfavorates)
@@ -574,8 +612,9 @@ function onSortFavorite(isasc, fav) {
var index;
var currentfavs = [];
for (var i = 0; i < grid_favoritedt.source.length; i++) {
var userfav = grid_favoritedt.source[i].Values;
var tempsource = grid_favoritedt.source;
for (var i = 0; i < tempsource.length; i++) {
var userfav = tempsource[i];
if (fav.ID === userfav.ID)
index = i;
else
@@ -601,8 +640,9 @@ function onSaveFavoriteSort() {
if (!grid_favoritedt)
return;
var data = [];
for (var i = 0; i < grid_favoritedt.source.length; i++) {
data.push(grid_favoritedt.source[i].Values);
var tempsource = grid_favoritedt.source;
for (var i = 0; i < tempsource.length; i++) {
data.push(tempsource[i]);
}
saveFavorites(data, true);
@@ -614,7 +654,9 @@ function onSaveFavoriteSort() {
function onInitTitleSites() {
if (appmoudulesdata) {
var menudiv = $("#divfavmenu");
var syssetli = $("#lisyssetting");
var syssetli = $("#lisyssetting").on('click', function () {
window.location.href = $(this).data('url');
});
var liversion = $("#liVersion");
menudiv.parent().find(".dynamicmenu").remove();
@@ -726,13 +768,11 @@ function createSettingSite(m, syssetli, sub) {
}
icon = createMouduleIcon(sm, 1);
var li = $('<li class="dynamicmenu"></li>').click(function () {
var li = $('<li class="dynamicmenu flex"></li>').click(function () {
onOpenSite(sm);
});
var fav_a = $('<a style="padding-left:0;"></a>');
li.append(fav_a);
fav_a.append($('<div></div>').append(icon));
fav_a.append($('<span></span>').text(name));
li.append($('<div></div>').append(icon));
li.append($('<span></span>').text(name));
syssetli.before(li);
}
@@ -741,8 +781,11 @@ function createSettingSite(m, syssetli, sub) {
var dashboarddata;
var grid_dbdt;
function InitDBGridData() {
grid_dbdt = new GridView('#dashboardslist');
grid_dbdt.lang = {
var gv = GridView;
if (typeof GridView1 !== 'undefined')//兼容FIC的旧的GridView
gv = GridView1
grid_dbdt = new gv('#dashboardslist');
grid_dbdt.langs = {
all: GetTextByKey("P_GRID_ALL", "(All)"),
ok: GetTextByKey("P_GRID_OK", "OK"),
reset: GetTextByKey("P_GRID_RESET", "Reset")
@@ -786,13 +829,7 @@ function InitDBGridData() {
grid_dbdt.canMultiSelect = false;
grid_dbdt.columns = columns;
grid_dbdt.init();
grid_dbdt.rowdblclick = openDashboard;
grid_dbdt.selectedrowchanged = function (rowindex) {
var rowdata = grid_dbdt.source[rowindex];
if (rowdata) {
}
}
grid_dbdt.onCellDblClicked = openDashboard;
}
function showChartNotes(iid, notes) {
@@ -855,9 +892,7 @@ function showDashboards(data) {
if (j === "IsChart")
r[j] = { DisplayValue: r["IsChart"] ? "Chart" : "Dashboard", Value: r[j] };
}
var fr = { Values: r };
rows.push(fr);
rows.push(r);
}
grid_dbdt.setData(rows);
@@ -897,7 +932,7 @@ function openDashboard() {
return;
}
var dah = grid_dbdt.source[index].Values;
var dah = grid_dbdt.source[index];
if (dah.IsChart.Value) {
setRecentOpenedDashboard(dah.ID);
$('#dialog_dashboards').hideDialog();