diff --git a/.phan/config.php b/.phan/config.php
index 5639e603..cfc5aba2 100644
--- a/.phan/config.php
+++ b/.phan/config.php
@@ -50,7 +50,7 @@ return [
'hwe/b_auction.php',
'hwe/b_battleCenter.php',
'hwe/b_betting.php',
- 'hwe/b_chiefcenter.php',
+ 'hwe/v_chiefCenter.php',
'hwe/b_currentCity.php',
'hwe/b_dipcenter.php',
'hwe/b_diplomacy.php',
diff --git a/hwe/b_chiefcenter.php b/hwe/b_chiefcenter.php
deleted file mode 100644
index 85aac2c9..00000000
--- a/hwe/b_chiefcenter.php
+++ /dev/null
@@ -1,85 +0,0 @@
-setReadOnly();
-$userID = Session::getUserID();
-$generalObj = General::createGeneralObjFromDB($session->generalID);
-?>
-
-
-
-
-
-
-
- = UniqueConst::$serverName ?>: 사령부
- = WebUtil::printJS('../d_shared/common_path.js') ?>
- = WebUtil::printCSS('../d_shared/common.css') ?>
-
- = WebUtil::printCSS('css/chiefCenter.css') ?>
-
- = WebUtil::printDist('ts', ['common', 'chiefCenter']) ?>
-
-
-
-
-
-
사 령 부
- = backButton() ?>
-
수뇌부 일정
-
-
-
= chiefTurnTable()
- ?>
-
-
-
-
= backButton()
- ?>= banner()
- ?>
-
-
-
-
\ No newline at end of file
diff --git a/hwe/func.php b/hwe/func.php
index 06203a35..696af1a8 100644
--- a/hwe/func.php
+++ b/hwe/func.php
@@ -427,29 +427,6 @@ function checkSecretPermission(array $me, $checkSecretLimit = true)
return min($secretMin, $secretMax);
}
-function addCommand($typename, $value, $valid = 1, $color = 0)
-{
- if ($valid == 1) {
- switch ($color) {
- case 0:
- echo "
- ";
- break;
- case 1:
- echo "
- ";
- break;
- case 2:
- echo "
- ";
- break;
- }
- } else {
- echo "
- ";
- }
-}
-
function commandGroup($typename, $type = 0)
{
if ($type == 0) {
@@ -495,52 +472,37 @@ function getCommandTable(General $general)
return $result;
}
-function printCommandTable(General $generalObj)
-{
+function getChiefCommandTable(General $general){
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
- $userID = Session::getUserID();
-
$gameStor->turnOnCache();
$env = $gameStor->getAll();
-?>
-
- $commandCategory,
+ 'values' => $subList
+ ];
+ }
+
+ return $result;
}
function chiefCommandTable(General $generalObj)
diff --git a/hwe/func_command.php b/hwe/func_command.php
index 22936254..d66beebc 100644
--- a/hwe/func_command.php
+++ b/hwe/func_command.php
@@ -167,6 +167,38 @@ function pullNationCommand(int $nationID, int $officerLevel, int $turnCnt=1){
], 'nation_id=%i AND officer_level=%i ORDER BY turn_idx ASC', $nationID, $officerLevel);
}
+function repeatNationCommand(int $nationID, int $officerLevel, int $turnCnt){
+ if($turnCnt <= 0){
+ return;
+ }
+ if($turnCnt >= GameConst::$maxChiefTurn){
+ return;
+ }
+
+ $db = DB::db();
+
+ $reqTurn = $turnCnt;
+ if($turnCnt * 2 > GameConst::$maxChiefTurn){
+ $reqTurn = GameConst::$maxChiefTurn - $turnCnt;
+ }
+
+ $turnList = $db->query('SELECT turn_idx, `action`, arg, brief FROM nation_turn WHERE nation_id=%i AND officer_level=%i AND turn_idx < %i', $nationID, $officerLevel, $reqTurn);
+ if(!$turnList){
+ return;
+ }
+ foreach($turnList as $turnItem){
+ $turnIdx = $turnItem['turn_idx'];
+ $turnTarget = iterator_to_array(Util::range($turnIdx+$turnCnt, GameConst::$maxChiefTurn, $turnCnt));
+
+ $db->update('nation_turn', [
+ 'action'=>$turnItem['action'],
+ 'arg'=>$turnItem['arg'],
+ 'brief'=>$turnItem['brief']
+ ], 'nation_id=%i AND officer_level=%i AND turn_idx IN %li', $nationID, $officerLevel, $turnTarget);
+ }
+}
+
+
function _setGeneralCommand(GeneralCommand $command, array $turnList):void {
if(!$turnList){
return;
diff --git a/hwe/func_legacy.php b/hwe/func_legacy.php
index cb8e750c..2f5d1827 100644
--- a/hwe/func_legacy.php
+++ b/hwe/func_legacy.php
@@ -120,7 +120,7 @@ function backButton()
function CoreBackButton()
{
- return "
";
+ return "
";
}
function closeButton()
diff --git a/hwe/j_getChiefTurn.php b/hwe/j_getChiefTurn.php
index 20363099..983f1e28 100644
--- a/hwe/j_getChiefTurn.php
+++ b/hwe/j_getChiefTurn.php
@@ -17,7 +17,7 @@ $me = $db->queryFirstRow('SELECT no,nation,officer_level,con,turntime,belong,pen
$nationLevel = $db->queryFirstField('SELECT level FROM nation WHERE nation = %i', $me['nation']);
$nationID = $me['nation'];
$con = checkLimit($me['con']);
-if($con >= 2) {
+if($con >= 2) {
Json::die([
'result'=>false,
'reason'=>"접속 제한중입니다. 1턴 이내에 너무 많은 갱신을 하셨습니다. (다음 접속 가능 시각 : {$me['turntime']})"
@@ -83,9 +83,10 @@ foreach($nationTurnList as $officer_level=>$turnBrief){
$nationTurnBrief[$officer_level] = [
'name'=>$general->getName(),
'turnTime'=>$general->getTurnTime($general::TURNTIME_FULL),
+ 'officerLevel'=>$general->getVar('officer_level'),
'officerLevelText'=>getOfficerLevelText($general->getVar('officer_level'), $nationLevel),
'npcType'=>$general->getNPCType(),
- 'turn'=>$turnBrief
+ 'turn'=>$turnBrief,
];
}
@@ -97,5 +98,6 @@ Json::die([
'date'=>$date,
'nationTurnBrief'=>$nationTurnBrief,
'isChief'=>($me['officer_level'] > 4),
+ 'officerLevel'=>$me['officer_level'],
'turnTerm'=>$turnterm
]);
\ No newline at end of file
diff --git a/hwe/sammo/API/NationCommand/GetReservedCommand.php b/hwe/sammo/API/NationCommand/GetReservedCommand.php
new file mode 100644
index 00000000..4bf4ab34
--- /dev/null
+++ b/hwe/sammo/API/NationCommand/GetReservedCommand.php
@@ -0,0 +1,122 @@
+userID;
+
+ $me = $db->queryFirstRow('SELECT no,nation,officer_level,con,turntime,belong,penalty,permission FROM general WHERE owner=%i', $userID);
+
+ $nationLevel = $db->queryFirstField('SELECT level FROM nation WHERE nation = %i', $me['nation']);
+ $nationID = $me['nation'];
+ $con = checkLimit($me['con']);
+ if ($con >= 2) {
+ return "접속 제한중입니다. 1턴 이내에 너무 많은 갱신을 하셨습니다. (다음 갱신 가능 시각 : {$me['turntime']})";
+ }
+
+ $permission = checkSecretPermission($me);
+ if ($permission < 0) {
+ return '국가에 소속되어있지 않습니다.';
+ } else if ($permission < 1) {
+ return '수뇌부가 아니거나 사관년도가 부족합니다.';
+ }
+
+ [$turnTerm, $year, $month, $lastExecute] = $gameStor->getValuesAsArray(['turnterm', 'year', 'month', 'turntime']);
+
+ $generals = [];
+ foreach ($db->query('SELECT no,name,turntime,npc,city,nation,officer_level FROM general WHERE nation = %i AND officer_level >= 5', $nationID) as $rawGeneral) {
+ $generals[$rawGeneral['officer_level']] = new General($rawGeneral, null, null, null, $year, $month, false);
+ }
+
+ $nationTurnList = [];
+ foreach ($db->queryAllLists(
+ 'SELECT officer_level, turn_idx, action, arg, brief FROM nation_turn WHERE nation_id = %i ORDER BY officer_level DESC, turn_idx ASC',
+ $me['nation']
+ ) as [$officer_level, $turn_idx, $action, $arg, $brief]) {
+ if (!key_exists($officer_level, $nationTurnList)) {
+ $nationTurnList[$officer_level] = [];
+ }
+ $nationTurnList[$officer_level][$turn_idx] = [
+ 'action' => $action,
+ 'brief' => $brief,
+ 'arg' => Json::decode($arg)
+ ];
+ }
+
+
+ $nationChiefList = [];
+ foreach ($nationTurnList as $officer_level => $turnBrief) {
+ if (!key_exists($officer_level, $generals)) {
+ $nationChiefList[$officer_level] = [
+ 'name' => null,
+ 'turnTime' => null,
+ 'officerLevelText' => getOfficerLevelText($officer_level, $nationLevel),
+ 'npcType' => null,
+ 'turn' => $turnBrief
+ ];
+ continue;
+ }
+ $general = $generals[$officer_level];
+ $nationChiefList[$officer_level] = [
+ 'name' => $general->getName(),
+ 'turnTime' => $general->getTurnTime($general::TURNTIME_FULL),
+ 'officerLevel' => $general->getVar('officer_level'),
+ 'officerLevelText' => getOfficerLevelText($general->getVar('officer_level'), $nationLevel),
+ 'npcType' => $general->getNPCType(),
+ 'turn' => $turnBrief,
+ ];
+ }
+
+ $generalObj = General::createGeneralObjFromDB($session->generalID);
+
+
+ return [
+ 'result' => true,
+ 'lastExecute' => $lastExecute,
+ 'year' => $year,
+ 'month' => $month,
+ 'turnTerm' => $turnTerm,
+ 'date' => TimeUtil::now(true),
+ 'chiefList' => $nationChiefList,
+ 'isChief'=>($me['officer_level'] > 4),
+ 'autorun_limit' => $generalObj->getAuxVar('autorun_limit'),
+ 'officerLevel' => $me['officer_level'],
+ 'commandList' => getChiefCommandTable($generalObj),
+ ];
+ }
+}
diff --git a/hwe/sammo/API/NationCommand/PushCommand.php b/hwe/sammo/API/NationCommand/PushCommand.php
new file mode 100644
index 00000000..cda4c40c
--- /dev/null
+++ b/hwe/sammo/API/NationCommand/PushCommand.php
@@ -0,0 +1,62 @@
+args);
+ $v->rule('required', [
+ 'amount',
+ ])
+ ->rule('integer', 'amount')
+ ->rule('min', 'amount', -12)
+ ->rule('max', 'amount', 12);
+
+ if (!$v->validate()) {
+ return $v->errorStr();
+ }
+ return null;
+ }
+
+ public function getRequiredSessionMode(): int
+ {
+ return static::REQ_GAME_LOGIN | static::REQ_READ_ONLY;
+ }
+
+ public function launch(Session $session, ?DateTimeInterface $modifiedSince, ?string $reqEtag)
+ {
+ $amount = $this->args['amount'];
+ if($amount == 0){
+ return '0은 불가능합니다';
+ }
+ $db = DB::db();
+ $me = $db->queryFirstRow('SELECT officer_level, nation FROM general WHERE no = %i', $session->generalID);
+ if(!$me){
+ return '올바르지 않은 장수입니다.';
+ }
+
+ if(!$me['nation']){
+ return '국가에 소속되어 있지 않습니다.';
+ }
+
+ if($me['officer_level'] < 5){
+ return '수뇌가 아닙니다.';
+ }
+
+ pushNationCommand($me['nation'], $me['officer_level'], $amount);
+
+ return [
+ 'result'=>true
+ ];
+ }
+}
diff --git a/hwe/sammo/API/NationCommand/RepeatCommand.php b/hwe/sammo/API/NationCommand/RepeatCommand.php
new file mode 100644
index 00000000..837b59dc
--- /dev/null
+++ b/hwe/sammo/API/NationCommand/RepeatCommand.php
@@ -0,0 +1,62 @@
+args);
+ $v->rule('required', [
+ 'amount',
+ ])
+ ->rule('integer', 'amount')
+ ->rule('min', 'amount', 1)
+ ->rule('max', 'amount', 12);
+
+ if (!$v->validate()) {
+ return $v->errorStr();
+ }
+ return null;
+ }
+
+ public function getRequiredSessionMode(): int
+ {
+ return static::REQ_GAME_LOGIN | static::REQ_READ_ONLY;
+ }
+
+ public function launch(Session $session, ?DateTimeInterface $modifiedSince, ?string $reqEtag)
+ {
+
+ $amount = $this->args['amount'];
+
+ $db = DB::db();
+ $me = $db->queryFirstRow('SELECT officer_level, nation FROM general WHERE no = %i', $session->generalID);
+ if(!$me){
+ return '올바르지 않은 장수입니다.';
+ }
+
+ if(!$me['nation']){
+ return '국가에 소속되어 있지 않습니다.';
+ }
+
+ if($me['officer_level'] < 5){
+ return '수뇌가 아닙니다.';
+ }
+
+ repeatNationCommand($me['nation'], $me['officer_level'], $amount);
+
+ return [
+ 'result'=>true
+ ];
+ }
+}
diff --git a/hwe/sammo/API/NationCommand/ReserveCommand.php b/hwe/sammo/API/NationCommand/ReserveCommand.php
new file mode 100644
index 00000000..42a3ccbc
--- /dev/null
+++ b/hwe/sammo/API/NationCommand/ReserveCommand.php
@@ -0,0 +1,56 @@
+args);
+ $v->rule('required', [
+ 'action',
+ 'turnList'
+ ])
+ ->rule('lengthMin', 'action', 1)
+ ->rule('integerArray', 'turnList');
+
+ if (!$v->validate()) {
+ return $v->errorStr();
+ }
+ return null;
+ }
+
+ public function getRequiredSessionMode(): int
+ {
+ return static::REQ_GAME_LOGIN | static::REQ_READ_ONLY;
+ }
+
+ public function launch(Session $session, ?DateTimeInterface $modifiedSince, ?string $reqEtag)
+ {
+ $action = $this->args['action'];
+ $turnList = $this->args['turnList'];
+ $arg = $this->args['arg']??[];
+
+ if(!$turnList){
+ return '턴이 입력되지 않았습니다';
+ }
+
+ if(!in_array($action, Util::array_flatten(GameConst::$availableChiefCommand))){
+ return '사용할 수 없는 커맨드입니다.';
+ }
+
+ if(!is_array($arg)){
+ '올바른 arg 형태가 아닙니다.';
+ }
+
+ return setNationCommand($session->generalID, $turnList, $action, $arg);
+ }
+}
diff --git a/hwe/scss/chiefCenter.scss b/hwe/scss/chiefCenter.scss
new file mode 100644
index 00000000..2ae56cc7
--- /dev/null
+++ b/hwe/scss/chiefCenter.scss
@@ -0,0 +1,156 @@
+@use "sass:math";
+
+@import "@scss/common/break_500px.scss";
+@import "@scss/common/variables.scss";
+@import "@scss/common/bootswatch_custom_variables.scss";
+@import "@scss/game_bg.scss";
+
+.turn_pad {
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+#mainTable {
+ .subRows {
+ display: grid;
+ grid-template-columns: 1fr;
+ line-height: 1.05em;
+ }
+
+ .chiefCommand .time_pad {
+ align-self: center;
+ text-align: center;
+ background-color: black;
+ line-height: 30px;
+ }
+}
+
+.commandBox {
+ position: relative;
+}
+
+@include media-1000px {
+ #container {
+ width: 1000px;
+ margin: 0 auto;
+ position: relative;
+ }
+
+ #mainTable {
+ display: grid;
+ grid-template-columns: 24px repeat(4, 1fr) 24px;
+
+ .commandPad {
+ margin-left: 0;
+ }
+
+ .subRows {
+ display: grid;
+ grid-template-columns: 1fr;
+ }
+
+ .turnIdx {
+ text-align: center;
+ }
+
+ .time_pad {
+ height: 30px;
+ }
+ }
+
+ #bottomChiefBox {
+ display: none;
+ }
+
+ .only500px {
+ display: none !important;
+ }
+}
+
+@include media-500px {
+ .only1000px {
+ display: none !important;
+ }
+
+ .targetIsNotMe {
+ display: none;
+ }
+
+ #container {
+ position: relative;
+ width: 500px;
+ height: 460px;
+ margin: auto;
+ }
+
+ #mainTable {
+ display: block;
+ height: 420px;
+ }
+
+ #mainTable.targetIsNotMe {
+ display: grid;
+ grid-template-columns: 24px 260px 24px;
+ margin-top: 10px;
+ margin-left: calc((500px - 24px - 260px - 24px) / 2);
+
+ .commandBox {
+ display: none;
+ }
+ }
+
+ .commandBox .controlPad{
+ margin-top: 10px;
+ }
+
+ #bottomChiefBox {
+ position: relative;
+ left: calc(50% - 250px);
+
+ width: 500px;
+ height: 320px;
+ overflow: hidden;
+ }
+
+ #bottomChiefList {
+ bottom: 0;
+ left: 0;
+ width: 1000px;
+ font-size: 20px;
+ transform-origin: left top;
+ transform: scale(0.5);
+
+ display: grid;
+ grid-template-columns: 24px repeat(4, 1fr) 24px;
+
+ .subRows {
+ display: grid;
+ grid-template-columns: 1fr;
+ line-height: 1.05em;
+ }
+
+ .subRows:not(:first-child) {
+ border-left: solid 1px white;
+ }
+
+ .tableCell {
+ overflow: hidden;
+ white-space: nowrap;
+ text-align: center;
+ }
+
+ .nameHeader {
+ text-align: center;
+ font-size: 28px;
+ line-height: 36px;
+ overflow: hidden;
+ white-space: nowrap;
+ }
+
+ .turnIdx {
+ font-size: 20px;
+ text-align: center;
+ }
+ }
+}
\ No newline at end of file
diff --git a/hwe/scss/common/variables.scss b/hwe/scss/common/variables.scss
index 8dcb1cb3..49dabdbb 100644
--- a/hwe/scss/common/variables.scss
+++ b/hwe/scss/common/variables.scss
@@ -3,10 +3,13 @@ $base2color: #00582c;
$base3color: #704615;
$base4color: #70153b;
+$nbase2color: #0c1a41;
+
$sammoColors: ('base1': $base1color,
'base2': $base2color,
'base3': $base3color,
'base4': $base4color,
+ 'nbase2': $nbase2color,
);
$nationColors: ("000000": #000000,
diff --git a/hwe/scss/game_bg.scss b/hwe/scss/game_bg.scss
index 6a59c811..ff1968e9 100644
--- a/hwe/scss/game_bg.scss
+++ b/hwe/scss/game_bg.scss
@@ -1,4 +1,5 @@
@import '../../d_shared/common.css';
+@import 'common/variables.scss';
html {
background: black;
@@ -49,4 +50,9 @@ body {
.a-center {
text-align: center;
+}
+
+
+.c-bg2{
+ background: $nbase2color;
}
\ No newline at end of file
diff --git a/hwe/templates/commandButton.php b/hwe/templates/commandButton.php
index e48cb074..29862003 100644
--- a/hwe/templates/commandButton.php
+++ b/hwe/templates/commandButton.php
@@ -4,7 +4,7 @@
=$btnBegin??''?> =$btnClass??""?>'>외 교 부=$btnEnd??''?>
=$btnBegin??''?> =$btnClass??""?>'>인 사 부=$btnEnd??''?>
=$btnBegin??''?> =$btnClass??""?>'>내 무 부=$btnEnd??''?>
-=$btnBegin??''?> =$btnClass??""?>'>사 령 부=$btnEnd??''?>
+=$btnBegin??''?> =$btnClass??""?>'>사 령 부=$btnEnd??''?>
=$btnBegin??''?> =$btnClass??""?>'>NPC 정책=$btnEnd??''?>
=$btnBegin??''?>'>암 행 부=$btnEnd??''?>
=$btnBegin??''?>토 너 먼 트=$btnEnd??''?>
diff --git a/hwe/ts/ChiefCenter/BottomItem.vue b/hwe/ts/ChiefCenter/BottomItem.vue
new file mode 100644
index 00000000..ea1a90e5
--- /dev/null
+++ b/hwe/ts/ChiefCenter/BottomItem.vue
@@ -0,0 +1,56 @@
+
+
+
+
+
{{ officer.officerLevelText }}
+
{{ (officer.turnTime ?? " - ").slice(-5) }}
+
+
+ {{ turn.brief }}
+
+
+
+
diff --git a/hwe/ts/ChiefCenter/TopItem.vue b/hwe/ts/ChiefCenter/TopItem.vue
new file mode 100644
index 00000000..ad345c0b
--- /dev/null
+++ b/hwe/ts/ChiefCenter/TopItem.vue
@@ -0,0 +1,83 @@
+
+
+
+
+ {{ officer.officerLevelText }} :
+
+
+ {{ officer.name }}
+
+
+
+
+ {{ turnTimes[idx] }}
+
+
+ {{ turn.brief }}
+
+
+
+
+
diff --git a/hwe/ts/PageChiefCenter.vue b/hwe/ts/PageChiefCenter.vue
new file mode 100644
index 00000000..8dc6518e
--- /dev/null
+++ b/hwe/ts/PageChiefCenter.vue
@@ -0,0 +1,471 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ officer.officerLevelText }} :
+
+
+ {{ officer.name }}
+
+
+
+
+
+
+ {{ officer.name }}
+
+
{{ officer.officerLevelText }}
+
+
+
+
+
+ 모든턴
+ 홀수턴
+ 짝수턴
+
+
+
+ {{ spanIdx }}턴 간격
+
+ {{ beginIdx }}
+
+
+
+
+ {{ turnIdx }}턴
+
+
+
+ {{ turnIdx }}턴
+
+
+
+ {{ turnIdx }}턴
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/hwe/ts/PartialReservedCommand.vue b/hwe/ts/PartialReservedCommand.vue
index 07884e22..ea11d865 100644
--- a/hwe/ts/PartialReservedCommand.vue
+++ b/hwe/ts/PartialReservedCommand.vue
@@ -497,7 +497,7 @@ export default defineComponent({
if (command.searchText) {
continue;
}
- command.searchText = convertSearch초성(command.simpleName).join('|');
+ command.searchText = convertSearch초성(command.simpleName).join("|");
}
}
@@ -542,6 +542,7 @@ export default defineComponent({
@import "@scss/common/break_500px.scss";
@import "@scss/common/variables.scss";
@import "@scss/common/bootswatch_custom_variables.scss";
+@import "@scss/game_bg.scss";
.commandPad {
background-color: $gray-900;
@@ -554,7 +555,7 @@ export default defineComponent({
//30, 70, 37.65, 160
}
-@include media-1000px{
+@include media-1000px {
.commandPad {
margin-left: 10px;
@@ -612,7 +613,7 @@ export default defineComponent({
.turn_pad {
white-space: nowrap;
- background-color: rgba($base1color, 0.5);
+ background-color: $nbase2color;
}
.turn_pad .turn_text {
diff --git a/hwe/ts/build_exports.json b/hwe/ts/build_exports.json
index 00a3bd8a..5f877e55 100644
--- a/hwe/ts/build_exports.json
+++ b/hwe/ts/build_exports.json
@@ -23,6 +23,7 @@
"ingame_vue": {
"v_inheritPoint": "v_inheritPoint.ts",
"v_board": "v_board.ts",
+ "v_chiefCenter": "v_chiefCenter.ts",
"v_NPCControl": "v_NPCControl.ts",
"v_join": "v_join.ts",
"v_main": "v_main.ts",
diff --git a/hwe/ts/components/BottomBar.vue b/hwe/ts/components/BottomBar.vue
index 9812c0dc..f897bb91 100644
--- a/hwe/ts/components/BottomBar.vue
+++ b/hwe/ts/components/BottomBar.vue
@@ -19,7 +19,7 @@ export default defineComponent({
location.href = './';
}
else if(this.type == 'chief'){
- location.href = 'b_chiefcenter.php';
+ location.href = 'v_chiefCenter.php';
}
else{
//TODO: window.close하려면 부모창이 있어야함!
diff --git a/hwe/ts/components/ChiefReservedCommand.vue b/hwe/ts/components/ChiefReservedCommand.vue
new file mode 100644
index 00000000..51b38321
--- /dev/null
+++ b/hwe/ts/components/ChiefReservedCommand.vue
@@ -0,0 +1,492 @@
+
+
+
+
+
+ {{ turnIdx + 1 }}
+
+
+ {{ turnObj.time }}
+
+
+
+
+
+
+
+
+
+
+
+
+ 검색 결과가 없습니다.
+
+
+ ▲
+ ▼
+
+
+ {{ props.option.title }}
+
+
+
+ {{ props.option.category }}
+
+
+
+ {{ props.option.simpleName }}
+
+
+
+
+ 실행
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/hwe/ts/components/TopBackBar.vue b/hwe/ts/components/TopBackBar.vue
index 16587d75..e3f1bb1b 100644
--- a/hwe/ts/components/TopBackBar.vue
+++ b/hwe/ts/components/TopBackBar.vue
@@ -1,8 +1,19 @@
+
+ {{ title }}
+
+ {{ toggleSearch ? "검색 켜짐" : "검색 꺼짐" }}
- {{ title }}
-
@@ -26,19 +35,22 @@ export default defineComponent({
if (this.type === "normal") {
location.href = "./";
} else if (this.type == "chief") {
- location.href = "b_chiefcenter.php";
+ location.href = "v_chiefCenter.php";
} else {
//TODO: window.close하려면 부모창이 있어야함!
window.close();
}
},
+ reload() {
+ this.$emit("reload");
+ },
},
data() {
return {
toggleSearch: this.searchable,
};
},
- emits: ["update:searchable"],
+ emits: ["update:searchable", "reload"],
watch: {
toggleSearch(val: boolean) {
this.$emit("update:searchable", val);
@@ -59,6 +71,11 @@ export default defineComponent({
default: undefined,
required: false,
},
+ reloadable: {
+ type: Boolean,
+ default: undefined,
+ required: false,
+ },
},
});
@@ -69,20 +86,24 @@ export default defineComponent({
max-width: 1000px;
width: 100%;
margin: auto;
+ display: grid;
+ grid-template-columns: 80px 80px 1fr 80px 80px;
position: relative;
height: 24pt;
}
-.back_btn {
- position: absolute;
- left: 0;
+.reload_btn {
height: 24pt;
+ margin-right: 2px;
}
-.btn-toggle-zoom{
- position: absolute;
+.back_btn {
+ height: 24pt;
+ margin-right: 2px;
+}
+
+.btn-toggle-zoom {
height: 24pt;
- right: 0;
}
.title {
diff --git a/hwe/ts/defs.ts b/hwe/ts/defs.ts
index 13ad2005..f7e0fc3e 100644
--- a/hwe/ts/defs.ts
+++ b/hwe/ts/defs.ts
@@ -155,8 +155,58 @@ export type ToastType = {
}
export const keyScreenMode = 'sam.screenMode';
-export type ScreenModeType = 'auto'|'500px'|'1000px';
+export type ScreenModeType = 'auto' | '500px' | '1000px';
export declare type ValuesOf = T[keyof T];
-export const NoneValue = 'None' as const;
\ No newline at end of file
+export const NoneValue = 'None' as const;
+
+export type Optional = {
+ [Property in keyof Type]+?: Type[Property];
+ };
+
+export type OptionalFull = {
+ [Property in keyof Type]: Type[Property]|undefined;
+ };
+
+export type commandItem = {
+ value: string;
+ title: string;
+ compensation: number;
+ simpleName: string;
+ possible: boolean;
+ reqArg: boolean;
+ searchText?: string;
+};
+
+
+export type ChiefResponse = {
+ result: true;
+ lastExecute: string;
+ year: number;
+ month: number;
+ turnTerm: number;
+ date: string;
+ chiefList: Record<
+ number,
+ {
+ name: string | undefined;
+ turnTime: string | undefined;
+ officerLevelText: string;
+ officerLevel: number;
+ npcType: number;
+ turn: {
+ action: string;
+ brief: string;
+ arg: Record;
+ }[];
+ }
+ >;
+ isChief: boolean;
+ autorun_limit: number;
+ officerLevel: number;
+ commandList: {
+ category: string;
+ values: commandItem[];
+ }[];
+};
diff --git a/hwe/ts/v_chiefCenter.ts b/hwe/ts/v_chiefCenter.ts
new file mode 100644
index 00000000..869b8cbd
--- /dev/null
+++ b/hwe/ts/v_chiefCenter.ts
@@ -0,0 +1,15 @@
+import { createApp } from 'vue'
+import PageChiefCenter from '@/PageChiefCenter.vue';
+import BootstrapVue3 from 'bootstrap-vue-3'
+import 'bootstrap-vue-3/dist/bootstrap-vue-3.css'
+import { setAxiosXMLHttpRequest } from '@util/setAxiosXMLHttpRequest';
+import Multiselect from 'vue-multiselect';
+
+declare const maxChiefTurn: number;
+
+
+setAxiosXMLHttpRequest();
+createApp(PageChiefCenter, {
+ maxChiefTurn,
+
+}).use(BootstrapVue3).component('v-multiselect', Multiselect).mount('#app')
\ No newline at end of file
diff --git a/hwe/ts/v_processing.ts b/hwe/ts/v_processing.ts
index 31e9513c..0624074a 100644
--- a/hwe/ts/v_processing.ts
+++ b/hwe/ts/v_processing.ts
@@ -47,7 +47,7 @@ async function submitCommand(isChiefTurn: boolean, turnList: number[], comman
if (!isChiefTurn) {
window.location.href = './';
} else {
- window.location.href = 'b_chiefcenter.php';
+ window.location.href = 'v_chiefCenter.php';
}
return data as unknown as T;
diff --git a/hwe/v_chiefCenter.php b/hwe/v_chiefCenter.php
new file mode 100644
index 00000000..8953979e
--- /dev/null
+++ b/hwe/v_chiefCenter.php
@@ -0,0 +1,35 @@
+setReadOnly();
+$userID = Session::getUserID();
+$generalObj = General::createGeneralObjFromDB($session->generalID);
+?>
+
+
+
+
+
+
+
+ = UniqueConst::$serverName ?>: 사령부
+ = WebUtil::printJS('../d_shared/common_path.js') ?>
+ = WebUtil::printCSS('../d_shared/common.css') ?>
+
+ = WebUtil::printStaticValues([
+ 'maxChiefTurn'=>GameConst::$maxChiefTurn,
+ 'generalID'=>$generalObj->getID(),
+ ])?>
+ = WebUtil::printDist('vue', 'v_chiefCenter', true) ?>
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/hwe/v_processing.php b/hwe/v_processing.php
index 2365a36e..e577fc53 100644
--- a/hwe/v_processing.php
+++ b/hwe/v_processing.php
@@ -16,7 +16,7 @@ function die_redirect()
if (!$isChiefTurn) {
header('location:index.php', true, 303);
} else {
- header('location:b_chiefcenter.php', true, 303);
+ header('location:v_chiefCenter.php', true, 303);
}
die();
}