feat(WIP): processing에서 vue 객체 통합, lazy loading

This commit is contained in:
2021-12-19 17:22:54 +09:00
parent c8146814df
commit 72f7811f3d
11 changed files with 61 additions and 318 deletions
-50
View File
@@ -232,54 +232,4 @@ class che_몰수 extends Command\NationCommand
]
];
}
public function getForm(): string
{
//TODO: 암행부처럼 보여야...
$db = DB::db();
$destRawGenerals = $db->query('SELECT no,name,officer_level,npc,gold,rice FROM general WHERE nation = %i ORDER BY npc,binary(name)', $this->generalObj->getNationID());
$destGeneralList = [];
foreach ($destRawGenerals as $destGeneral) {
$nameColor = \sammo\getNameColor($destGeneral['npc']);
if ($nameColor) {
$nameColor = " style='color:{$nameColor}'";
}
$name = $destGeneral['name'];
if ($destGeneral['officer_level'] >= 5) {
$name = "*{$name}*";
}
$destGeneralList[] = [
'no' => $destGeneral['no'],
'color' => $nameColor,
'name' => $name,
'gold' => $destGeneral['gold'],
'rice' => $destGeneral['rice']
];
}
ob_start();
?>
장수의 자금이나 군량을 몰수합니다.<br>
몰수한것은 국가재산으로 귀속됩니다.<br>
<select class='formInput' name="destGeneralID" id="destGeneralID" size='1' style='color:white;background-color:black;'>
<?php foreach ($destGeneralList as $destGeneral) : ?>
<option value='<?= $destGeneral['no'] ?>' <?= $destGeneral['color'] ?>><?= $destGeneral['name'] ?>(금:<?= $destGeneral['gold'] ?>, 쌀:<?= $destGeneral['rice'] ?>)</option>
<?php endforeach; ?>
</select>
<select class='formInput' name="isGold" id="isGold" size='1' style='color:white;background-color:black;'>
<option value="true">금</option>
<option value="false">쌀</option>
</select>
</select>
<select class='formInput' name="amount" id="amount" size='1' style='color:white;background-color:black;'>
<?php foreach (GameConst::$resourceActionAmountGuide as $amount) : ?>
<option value='<?= $amount ?>'><?= $amount ?></option>
<?php endforeach; ?>
</select> <input type=button id="commonSubmit" value="<?= $this->getName() ?>"><br>
<br>
<?php
return ob_get_clean();
}
}