재야나 타국의 장수를 등용합니다.
@@ -13,6 +13,7 @@
:generals="generalList"
:groupByNation="nationList"
:textHelper="textHelpGeneral"
+ :searchable="searchable"
v-model="selectedGeneralID"
/>
@@ -33,6 +34,7 @@ import TopBackBar from "@/components/TopBackBar.vue";
import BottomBar from "@/components/BottomBar.vue";
import {
convertGeneralList,
+ getProcSearchable,
procGeneralItem,
procGeneralKey,
procGeneralRawItemList,
@@ -85,6 +87,7 @@ export default defineComponent({
}
return {
+ searchable: getProcSearchable(),
selectedGeneralID,
generalList,
nationList,
diff --git a/hwe/ts/processing/General/che_선양.vue b/hwe/ts/processing/General/che_선양.vue
index 2cdd5d4b..c1e0658b 100644
--- a/hwe/ts/processing/General/che_선양.vue
+++ b/hwe/ts/processing/General/che_선양.vue
@@ -1,5 +1,5 @@
-
+
재야나 타국의 장수를 등용합니다.
@@ -16,6 +16,7 @@
@@ -36,6 +37,7 @@ import TopBackBar from "@/components/TopBackBar.vue";
import BottomBar from "@/components/BottomBar.vue";
import {
convertGeneralList,
+ getProcSearchable,
procGeneralItem,
procGeneralKey,
procGeneralRawItemList,
@@ -80,6 +82,7 @@ export default defineComponent({
}
return {
+ searchable: getProcSearchable(),
selectedGeneralID,
generalList,
commandName,
diff --git a/hwe/ts/processing/General/che_임관.vue b/hwe/ts/processing/General/che_임관.vue
index 08d33911..2bba9f7b 100644
--- a/hwe/ts/processing/General/che_임관.vue
+++ b/hwe/ts/processing/General/che_임관.vue
@@ -1,5 +1,5 @@
-
+
국가에 임관합니다.
@@ -10,7 +10,11 @@
국가 :
-
+
{{ commandName }}
@@ -62,7 +66,7 @@ import { unwrap } from "@/util/unwrap";
import { Args } from "@/processing/args";
import TopBackBar from "@/components/TopBackBar.vue";
import BottomBar from "@/components/BottomBar.vue";
-import { procNationItem, procNationList } from "../processingRes";
+import { procNationItem, procNationList, getProcSearchable } from "../processingRes";
import { isBrightColor } from "@/util/isBrightColor";
declare const commandName: string;
@@ -99,6 +103,7 @@ export default defineComponent({
}
return {
+ searchable: getProcSearchable(),
nationList: ref(nationList),
selectedNationID,
commandName,
diff --git a/hwe/ts/processing/General/che_장비매매.vue b/hwe/ts/processing/General/che_장비매매.vue
index 0a374d15..d46a0f24 100644
--- a/hwe/ts/processing/General/che_장비매매.vue
+++ b/hwe/ts/processing/General/che_장비매매.vue
@@ -1,5 +1,5 @@
-
+
장비를 구입하거나 매각합니다.
@@ -29,7 +29,7 @@
deselectGroupLabel=""
placeholder="아이템 선택"
:maxHeight="400"
- :searchable="searchMode"
+ :searchable="searchable"
>
("customSubmit", {
@@ -178,7 +177,7 @@ export default defineComponent({
return {
...procRes,
- searchMode,
+ searchable: getProcSearchable(),
forFind,
NoneValue,
ItemTypeNameMap,
diff --git a/hwe/ts/processing/General/che_장수대상임관.vue b/hwe/ts/processing/General/che_장수대상임관.vue
index c19096d6..9285fd0a 100644
--- a/hwe/ts/processing/General/che_장수대상임관.vue
+++ b/hwe/ts/processing/General/che_장수대상임관.vue
@@ -1,5 +1,5 @@
-
+
장수를 따라 임관합니다.
@@ -14,6 +14,7 @@
:generals="generalList"
:groupByNation="nationList"
:textHelper="textHelpGeneral"
+ :searchable="searchable"
v-model="selectedGeneralID"
/>
@@ -68,6 +69,7 @@ import TopBackBar from "@/components/TopBackBar.vue";
import BottomBar from "@/components/BottomBar.vue";
import {
convertGeneralList,
+ getProcSearchable,
procGeneralItem,
procGeneralKey,
procGeneralRawItemList,
@@ -122,6 +124,7 @@ export default defineComponent({
}
return {
+ searchable: getProcSearchable(),
nationList: ref(nationList),
selectedGeneralID,
generalList,
diff --git a/hwe/ts/processing/Nation/che_물자원조.vue b/hwe/ts/processing/Nation/che_물자원조.vue
index caee85ff..207970f7 100644
--- a/hwe/ts/processing/Nation/che_물자원조.vue
+++ b/hwe/ts/processing/Nation/che_물자원조.vue
@@ -1,5 +1,5 @@
-
+
국가 :
-
+
@@ -79,7 +79,7 @@ import { unwrap } from "@/util/unwrap";
import { Args } from "@/processing/args";
import TopBackBar from "@/components/TopBackBar.vue";
import BottomBar from "@/components/BottomBar.vue";
-import { procNationItem, procNationList } from "../processingRes";
+import { getProcSearchable, procNationItem, procNationList } from "../processingRes";
declare const mapTheme: string;
declare const commandName: string;
@@ -137,6 +137,7 @@ export default defineComponent({
}
return {
+ searchable: getProcSearchable(),
mapTheme,
goldAmount,
riceAmount,
diff --git a/hwe/ts/processing/Nation/che_발령.vue b/hwe/ts/processing/Nation/che_발령.vue
index 6fb344ce..e2b81a4e 100644
--- a/hwe/ts/processing/Nation/che_발령.vue
+++ b/hwe/ts/processing/Nation/che_발령.vue
@@ -1,5 +1,5 @@
-
+
도시 :
-
+
{{ commandName }}
@@ -51,6 +52,7 @@ import TopBackBar from "@/components/TopBackBar.vue";
import BottomBar from "@/components/BottomBar.vue";
import {
convertGeneralList,
+ getProcSearchable,
procGeneralItem,
procGeneralKey,
procGeneralRawItemList,
@@ -127,6 +129,7 @@ export default defineComponent({
}
return {
+ searchable: getProcSearchable(),
mapTheme: ref(mapTheme),
citiesMap: ref(citiesMap),
selectedCityID,
diff --git a/hwe/ts/processing/Nation/che_불가침제의.vue b/hwe/ts/processing/Nation/che_불가침제의.vue
index 82cf7c6c..39a9614b 100644
--- a/hwe/ts/processing/Nation/che_불가침제의.vue
+++ b/hwe/ts/processing/Nation/che_불가침제의.vue
@@ -1,5 +1,5 @@
-
+
국가 :
-
+
기간 :
@@ -60,7 +60,7 @@ import { unwrap } from "@/util/unwrap";
import { Args } from "@/processing/args";
import TopBackBar from "@/components/TopBackBar.vue";
import BottomBar from "@/components/BottomBar.vue";
-import { procNationItem, procNationList } from "../processingRes";
+import { getProcSearchable, procNationItem, procNationList } from "../processingRes";
declare const mapTheme: string;
declare const commandName: string;
@@ -115,6 +115,7 @@ export default defineComponent({
}
return {
+ searchable: getProcSearchable(),
...procRes,
selectedYear,
selectedMonth,
diff --git a/hwe/ts/processing/Nation/che_피장파장.vue b/hwe/ts/processing/Nation/che_피장파장.vue
index 1deae778..348a5b52 100644
--- a/hwe/ts/processing/Nation/che_피장파장.vue
+++ b/hwe/ts/processing/Nation/che_피장파장.vue
@@ -1,5 +1,5 @@
-
+
국가 :
-
+
@@ -49,7 +49,7 @@ import { unwrap } from "@/util/unwrap";
import { Args } from "@/processing/args";
import TopBackBar from "@/components/TopBackBar.vue";
import BottomBar from "@/components/BottomBar.vue";
-import { procNationItem, procNationList } from "../processingRes";
+import { getProcSearchable, procNationItem, procNationList } from "../processingRes";
declare const mapTheme: string;
declare const commandName: string;
@@ -122,6 +122,7 @@ export default defineComponent({
}
return {
+ searchable: getProcSearchable(),
...procRes,
selectedCommandID,
commandTypesOption,
diff --git a/hwe/ts/processing/ProcessCity.vue b/hwe/ts/processing/ProcessCity.vue
index 55813b71..fa1f4acc 100644
--- a/hwe/ts/processing/ProcessCity.vue
+++ b/hwe/ts/processing/ProcessCity.vue
@@ -1,5 +1,5 @@
-
+
도시:
-
+
{{ commandName }}
@@ -92,6 +92,7 @@ import { Args } from "@/processing/args";
import TopBackBar from "@/components/TopBackBar.vue";
import BottomBar from "@/components/BottomBar.vue";
import { pick as JosaPick } from "@util/JosaUtil";
+import { getProcSearchable } from "./processingRes";
declare const mapTheme: string;
declare const currentCity: number;
declare const commandName: string;
@@ -140,6 +141,7 @@ export default defineComponent({
}
return {
+ searchable: getProcSearchable(),
mapTheme: ref(mapTheme),
citiesMap: ref(citiesMap),
selectedCityID,
diff --git a/hwe/ts/processing/ProcessGeneralAmount.vue b/hwe/ts/processing/ProcessGeneralAmount.vue
index 8f299150..bc34a90e 100644
--- a/hwe/ts/processing/ProcessGeneralAmount.vue
+++ b/hwe/ts/processing/ProcessGeneralAmount.vue
@@ -1,5 +1,5 @@
-
+
장수의 자금이나 군량을 몰수합니다.
@@ -19,6 +19,7 @@
:generals="generalList"
v-model="selectedGeneralID"
:textHelper="textHelpGeneral"
+ :searchable="searchable"
/>
@@ -55,6 +56,7 @@ import TopBackBar from "@/components/TopBackBar.vue";
import BottomBar from "@/components/BottomBar.vue";
import {
convertGeneralList,
+ getProcSearchable,
procGeneralItem,
procGeneralKey,
procGeneralRawItemList,
@@ -122,6 +124,7 @@ export default defineComponent({
}
return {
+ searchable: getProcSearchable(),
amount,
isGold,
selectedGeneralID,
diff --git a/hwe/ts/processing/ProcessNation.vue b/hwe/ts/processing/ProcessNation.vue
index fcd9b2e8..9c31cc52 100644
--- a/hwe/ts/processing/ProcessNation.vue
+++ b/hwe/ts/processing/ProcessNation.vue
@@ -1,5 +1,5 @@
-
+
국가 :
-
+
{{ commandName }}
@@ -74,7 +74,7 @@ import { unwrap } from "@/util/unwrap";
import { Args } from "@/processing/args";
import TopBackBar from "@/components/TopBackBar.vue";
import BottomBar from "@/components/BottomBar.vue";
-import { procNationItem, procNationList } from "./processingRes";
+import { getProcSearchable, procNationItem, procNationList } from "./processingRes";
declare const mapTheme: string;
declare const commandName: string;
@@ -121,6 +121,7 @@ export default defineComponent({
}
return {
+ searchable: getProcSearchable(),
startYear: procRes.startYear,
mapTheme: ref(mapTheme),
nationList: ref(nationList),
diff --git a/hwe/ts/processing/SelectCity.vue b/hwe/ts/processing/SelectCity.vue
index 707c4bcf..161562cf 100644
--- a/hwe/ts/processing/SelectCity.vue
+++ b/hwe/ts/processing/SelectCity.vue
@@ -14,7 +14,7 @@
deselectGroupLabel=""
placeholder="도시 선택"
:maxHeight="400"
- :searchable="searchMode"
+ :searchable="searchable"
>
>,
required: true,
},
+ searchable: {
+ type: Boolean,
+ required: false,
+ default: true,
+ },
},
emits: ["update:modelValue"],
watch: {
@@ -89,7 +94,6 @@ export default defineComponent({
}
return {
selectedCity,
- searchMode: true,
citiesForFind,
targets,
};
diff --git a/hwe/ts/processing/SelectGeneral.vue b/hwe/ts/processing/SelectGeneral.vue
index 053d568e..c4db1d0e 100644
--- a/hwe/ts/processing/SelectGeneral.vue
+++ b/hwe/ts/processing/SelectGeneral.vue
@@ -17,7 +17,7 @@
deselectGroupLabel=""
placeholder="장수 선택"
:maxHeight="400"
- :searchable="searchMode"
+ :searchable="searchable"
>
@@ -81,6 +81,11 @@ export default defineComponent({
required: false,
default: undefined,
},
+ searchable:{
+ type: Boolean,
+ required: false,
+ default: true,
+ }
},
emits: ["update:modelValue"],
watch: {
@@ -146,7 +151,6 @@ export default defineComponent({
}
return {
selectedGeneral,
- searchMode: true,
forFind,
targets,
isBrightColor,
diff --git a/hwe/ts/processing/SelectNation.vue b/hwe/ts/processing/SelectNation.vue
index 871eb446..a2fe6392 100644
--- a/hwe/ts/processing/SelectNation.vue
+++ b/hwe/ts/processing/SelectNation.vue
@@ -14,7 +14,7 @@
deselectGroupLabel=""
placeholder="국가 선택"
:maxHeight="400"
- :searchable="searchMode"
+ :searchable="searchable"
>
>,
required: true,
},
+ searchable: {
+ type: Boolean,
+ required: false,
+ default: true,
+ }
},
emits: ["update:modelValue"],
watch: {
@@ -95,7 +100,6 @@ export default defineComponent({
}
return {
selectedNation,
- searchMode: true,
forFind,
targets,
};
diff --git a/hwe/ts/processing/processingRes.ts b/hwe/ts/processing/processingRes.ts
index eb3dee99..ef0da0bb 100644
--- a/hwe/ts/processing/processingRes.ts
+++ b/hwe/ts/processing/processingRes.ts
@@ -1,5 +1,6 @@
import { ItemTypeKey } from "@/defs";
import { combineArray } from "@/util/combineArray";
+import { Ref, ref, watch } from "vue";
export type procGeneralItem = {
no: number,
@@ -95,4 +96,16 @@ export type procItemType = {
export type procItemList = Record
\ No newline at end of file
+}>
+
+
+//XXX: vuex 쓰기 전까지...
+export const searchableProcessingMode = 'sam.processing.searchable';
+const searchable = ref((localStorage.getItem(searchableProcessingMode) ?? "0") != "0");
+watch(searchable, (val) => {
+ localStorage.setItem(searchableProcessingMode, val ? "1" : "0");
+});
+
+export function getProcSearchable():Ref{
+ return searchable;
+}
\ No newline at end of file
diff --git a/hwe/ts/recruitCrewForm.ts b/hwe/ts/recruitCrewForm.ts
deleted file mode 100644
index b89a693d..00000000
--- a/hwe/ts/recruitCrewForm.ts
+++ /dev/null
@@ -1,103 +0,0 @@
-import { unwrap_any } from '@util/unwrap_any';
-
-
-declare const leadership: number;
-declare const fullLeadership: number;
-declare const currentCrewType: number;
-declare const currentCrew: number;
-//declare const currentGold: number;
-declare const is모병 = false;
-function calc(id: number) {
- const $obj = $(`#crewType${id}`);
- const crew = parseInt(unwrap_any($obj.find('.form_double').val()));
- const baseCost = $obj.data('cost');
- const $cost = $obj.find('.form_cost');
-
- let cost = crew * baseCost;
- if (is모병) {
- cost *= 2;
- }
- $cost.val(Math.round(cost));
-}
-
-export function recruitCrewForm(): void {
- const $formAmount = $('#amount');
- const $formCrewtype = $('#crewType');
- $('.form_double').on('keyup change', function (e) {
- const $this = $(this);
- const $parent = $this.parents('.input_form');
- const crewtype = parseInt($parent.data('crewtype'));
- calc(crewtype);
- $formCrewtype.val(crewtype);
- $formAmount.val(parseFloat(unwrap_any($this.val())) * 100);
-
- if (e.which === 13) {
- void window.submitAction();
- }
- return false;
- });
-
- $('.btn_half').on('click', function () {
- const $this = $(this);
- const $parent = $this.closest('.input_form');
- const crewtype = parseInt($parent.data('crewtype'));
- const $input = $parent.find('.form_double:eq(0)');
-
- const fillValue = Math.round(leadership / 2);
- $formCrewtype.val(crewtype);
- $input.val(fillValue).change();
- return false;
- });
-
- $('.btn_fill').on('click', function () {
- const $this = $(this);
- const $parent = $this.closest('.input_form');
- const crewtype = parseInt($parent.data('crewtype'));
- const $input = $parent.find('.form_double:eq(0)');
-
- let fillValue = Math.ceil((leadership * 100 - currentCrew) / 100);
- if (crewtype != currentCrewType) {
- fillValue = leadership;
- }
- $formCrewtype.val(crewtype);
- $input.val(fillValue).change();
- return false;
- });
-
- $('.btn_full').on('click', function () {
- const $this = $(this);
- const $parent = $this.closest('.input_form');
- const crewtype = parseInt($parent.data('crewtype'));
- const $input = $parent.find('.form_double:eq(0)');
-
- const fillValue = fullLeadership + 15;
- $formCrewtype.val(crewtype);
- $input.val(fillValue).change();
- return false;
- });
-
- $('.submit_btn').on('click', function () {
- const $this = $(this);
- const $parent = $this.closest('tr').find('.input_form');
- const crewtype = parseInt($parent.data('crewtype'));
- const $input = $parent.find('.form_double');
-
- $formCrewtype.val(crewtype);
- $formAmount.val(parseFloat(unwrap_any($input.val())) * 100);
-
- void window.submitAction();
- });
-
- $('.btn_fill').click();
-
- $('#show_unavailable_troops').change(function () {
- const show = $('#show_unavailable_troops').is(":checked");
- if (show) {
- $('.show_default_false').show();
- }
- else {
- $('.show_default_false').hide();
- }
- });
- $('.show_default_false').hide();
-}
\ No newline at end of file
diff --git a/hwe/ts/v_processing.ts b/hwe/ts/v_processing.ts
index a6907ca3..31e9513c 100644
--- a/hwe/ts/v_processing.ts
+++ b/hwe/ts/v_processing.ts
@@ -1,12 +1,10 @@
import '@scss/processing.scss';
-import { exportWindow } from '@util/exportWindow';
import axios from 'axios';
import { setAxiosXMLHttpRequest } from '@util/setAxiosXMLHttpRequest';
import { convertFormData } from '@util/convertFormData';
import { InvalidResponse } from '@/defs';
import { unwrap } from "@util/unwrap";
-import { recruitCrewForm } from '@/recruitCrewForm';
import BootstrapVue3 from 'bootstrap-vue-3'
import Multiselect from 'vue-multiselect';
import { commandMap as GeneralActions } from "@/processing/General";
@@ -98,10 +96,9 @@ if (app === undefined) {
console.error(`모듈이 지정되지 않음`, entryInfo);
}
else {
-
const div = unwrap(document.querySelector('#container'));
div.addEventListener('customSubmit', (e: Event) => {
- const {detail} = e as unknown as CustomEvent;
+ const { detail } = e as unknown as CustomEvent;
void submitCommand(entryInfo[0] == 'Nation', turnList, entryInfo[1], detail);
}, true);