1. 重突 bug fix
This commit is contained in:
parent
a1beee85fe
commit
86a0f6f11a
@ -102,9 +102,9 @@
|
||||
var stationId;
|
||||
var powerStationData;
|
||||
var stationOverview;
|
||||
|
||||
var recode;
|
||||
var selected_work_type = -1;
|
||||
|
||||
$(function () {
|
||||
var url = new URL(location.href);
|
||||
stationId = url.searchParams.get('stationId');
|
||||
@ -423,7 +423,57 @@
|
||||
|
||||
}, 'json');
|
||||
|
||||
//#region Date Picker
|
||||
//#region 載入單線圖
|
||||
var url_image = "/PowerStation/GetAllPowerStationSingleLine";
|
||||
var send_data = {
|
||||
powerStationId: stationId
|
||||
};
|
||||
|
||||
$.post(url_image, send_data, function (rel) {
|
||||
if (rel.code != "0000") {
|
||||
toast_error(rel.msg);
|
||||
return;
|
||||
}
|
||||
|
||||
var powerStationSingleLines = rel.data;
|
||||
|
||||
countPowerStationSingleLine = powerStationSingleLines.length;
|
||||
|
||||
powerStationSingleLineCard = $("#power-station-single-line-card > .row");
|
||||
powerStationSingleLineCard.empty();
|
||||
rel.data.forEach(function (value, index) {
|
||||
CreatePowerStationSingleLineBox(powerStationSingleLineCard, value);
|
||||
});
|
||||
|
||||
|
||||
|
||||
}, 'json');
|
||||
//#endregion
|
||||
|
||||
//#region 預先載入運維人員下拉式選單select_option
|
||||
var url_user_select_option = "/PowerStation/GetUserSelectOptionList";
|
||||
$.get(url_user_select_option, function (rel) {
|
||||
if (rel.code != "0000") {
|
||||
toast_error(rel.msg);
|
||||
return;
|
||||
}
|
||||
|
||||
$("#power_station_operation_personnel").empty();
|
||||
|
||||
$.each(rel.data, function (index, val) {
|
||||
$("#power_station_operation_personnel").append($("<option />").val(val.value).text(val.text));
|
||||
});
|
||||
|
||||
if (powerStationData) {
|
||||
$("#power_station_operation_personnel").val(powerStationData.operationPersonnelIds);
|
||||
}
|
||||
});
|
||||
|
||||
$('.js-example-basic-multiple').select2();
|
||||
//#endregion
|
||||
//#endregion
|
||||
|
||||
//#region Date Picker
|
||||
datepicker = $('#date-range-record').daterangepicker({
|
||||
autoUpdateInput: false,
|
||||
locale: { format: 'YYYY/MM/DD' },
|
||||
@ -441,7 +491,6 @@
|
||||
$(this).val('');
|
||||
$(this).trigger('change');
|
||||
});
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region 運維作業記錄 DataTable
|
||||
@ -540,7 +589,7 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
//#endregion
|
||||
|
||||
//#region 切換電站時,載入該電站運維人員
|
||||
$("#power_station_select_modal").change(function () {
|
||||
@ -866,57 +915,6 @@
|
||||
}
|
||||
//#endregion
|
||||
|
||||
//#region 載入上傳資料 - 單線圖
|
||||
var url_image = "/PowerStation/GetAllPowerStationSingleLine";
|
||||
var send_data = {
|
||||
powerStationId: stationId
|
||||
};
|
||||
|
||||
$.post(url_image, send_data, function (rel) {
|
||||
if (rel.code != "0000") {
|
||||
toast_error(rel.msg);
|
||||
return;
|
||||
}
|
||||
|
||||
var powerStationSingleLines = rel.data;
|
||||
|
||||
countPowerStationSingleLine = powerStationSingleLines.length;
|
||||
|
||||
powerStationSingleLineCard = $("#power-station-single-line-card > .row");
|
||||
powerStationSingleLineCard.empty();
|
||||
rel.data.forEach(function (value, index) {
|
||||
CreatePowerStationSingleLineBox(powerStationSingleLineCard, value);
|
||||
});
|
||||
|
||||
|
||||
|
||||
}, 'json');
|
||||
//#endregion
|
||||
|
||||
//#region 預先載入運維人員下拉式選單select_option
|
||||
var url_user_select_option = "/PowerStation/GetUserSelectOptionList";
|
||||
$.get(url_user_select_option, function (rel) {
|
||||
if (rel.code != "0000") {
|
||||
toast_error(rel.msg);
|
||||
return;
|
||||
}
|
||||
|
||||
$("#power_station_operation_personnel").empty();
|
||||
|
||||
$.each(rel.data, function (index, val) {
|
||||
$("#power_station_operation_personnel").append($("<option />").val(val.value).text(val.text));
|
||||
});
|
||||
|
||||
if (powerStationData) {
|
||||
$("#power_station_operation_personnel").val(powerStationData.operationPersonnelIds);
|
||||
}
|
||||
});
|
||||
|
||||
$('.js-example-basic-multiple').select2();
|
||||
//#endregion
|
||||
//#endregion
|
||||
})
|
||||
|
||||
//#region 設定電站基本資料
|
||||
function SetStationInfo() {
|
||||
|
||||
@ -1100,6 +1098,5 @@
|
||||
dom.find(".carousel-inner").append(carousel_item);
|
||||
}
|
||||
//#endregion
|
||||
})
|
||||
</script>
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user