貨物の項目リファクタリング

This commit is contained in:
harukin-OneMix4 2023-06-27 01:02:48 +09:00
parent df7608acaf
commit 6f7f02e4fa

View File

@ -498,49 +498,42 @@ export const injectJavascriptData = (
const JRF_name = const JRF_name =
` `
let JRF = false; let JRF = false;
switch(列番データ){ const getJRF = num =>{
case "71": switch(列番データ){
行き先情報.innerText = "東京(タ)→高松(タ)"+"\\n"+行き先情報.innerText; case "71":
break; return "東京(タ)→高松(タ)"+"\\n";
case "73": case "73":
case "75": case "75":
行き先情報.innerText = "大阪(タ)→高松(タ)"+"\\n"+行き先情報.innerText; return "大阪(タ)→高松(タ)"+"\\n";
break; case "3079":
case "3079": return "高松(タ)→伊予三島"+"\\n";
行き先情報.innerText = "高松(タ)→伊予三島"+"\\n"+行き先情報.innerText; case "3071":
break; case "3077":
case "3071": return "高松(タ)→新居浜"+"\\n";
case "3077": case "3073":
行き先情報.innerText = "高松(タ)→新居浜"+"\\n"+行き先情報.innerText; return "高松(タ)→松山貨物"+"\\n";
break; case "70":
case "3073": return "高松(タ)→東京(タ)"+"\\n";
行き先情報.innerText = "高松(タ)→松山貨物"+"\\n"+行き先情報.innerText; case "74":
break; case "76":
case "70": return "高松(タ)→大阪(タ)"+"\\n";
行き先情報.innerText = "高松(タ)→東京(タ)"+"\\n"+行き先情報.innerText; case "3078":
break; return "伊予三島→高松(タ)"+"\\n";
case "74": case "3070":
case "76": return "新居浜→高松(タ)"+"\\n";
行き先情報.innerText = "高松(タ)→大阪(タ)"+"\\n"+行き先情報.innerText; case "3076":
break; return "新居浜→高松(タ)"+"\\n";
case "3078": case "3072":
行き先情報.innerText = "伊予三島→高松(タ)"+"\\n"+行き先情報.innerText; return "松山貨物→高松(タ)"+"\\n";
break; case "9070":
case "3070": return "臨時貨物"+"\\n";
行き先情報.innerText = "新居浜→高松(タ)"+"\\n"+行き先情報.innerText; default:
break; JRF = true;
case "3076": return "";
行き先情報.innerText = "新居浜→高松(タ)"+"\\n"+行き先情報.innerText; }
break;
case "3072":
行き先情報.innerText = "松山貨物→高松(タ)"+"\\n"+行き先情報.innerText;
break;
case "9070":
行き先情報.innerText = "臨時貨物"+"\\n"+行き先情報.innerText;
break;
default:
JRF = true;
} }
行き先情報.innerText = getJRF(列番データ)+行き先情報.innerText;
` + JRF_icon; ` + JRF_icon;
const TKT_name = ` const TKT_name = `