1. 重突 bug fix

This commit is contained in:
Kai 2021-07-08 18:53:51 +08:00
parent a1beee85fe
commit 86a0f6f11a

View File

@ -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,6 +423,56 @@
}, 'json');
//#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,
@ -441,7 +491,6 @@
$(this).val('');
$(this).trigger('change');
});
//#endregion
//#region 運維作業記錄 DataTable
@ -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>
}