feat: processing 검색 켬/끔 추가
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<TopBackBar :title="commandName" type="chief" />
|
||||
<TopBackBar :title="commandName" type="chief" v-model:searchable="searchable" />
|
||||
<div class="bg0">
|
||||
<div>
|
||||
재야나 타국의 장수를 등용합니다.<br />
|
||||
@@ -13,6 +13,7 @@
|
||||
:generals="generalList"
|
||||
:groupByNation="nationList"
|
||||
:textHelper="textHelpGeneral"
|
||||
:searchable="searchable"
|
||||
v-model="selectedGeneralID"
|
||||
/>
|
||||
</div>
|
||||
@@ -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,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<TopBackBar :title="commandName" type="chief" />
|
||||
<TopBackBar :title="commandName" type="chief" v-model:searchable="searchable" />
|
||||
<div class="bg0">
|
||||
<div v-if="commandName == '등용'">
|
||||
재야나 타국의 장수를 등용합니다.<br />
|
||||
@@ -16,6 +16,7 @@
|
||||
<SelectGeneral
|
||||
:generals="generalList"
|
||||
:textHelper="textHelpGeneral"
|
||||
:searchable="searchable"
|
||||
v-model="selectedGeneralID"
|
||||
/>
|
||||
</div>
|
||||
@@ -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,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<TopBackBar :title="commandName" type="chief" />
|
||||
<TopBackBar :title="commandName" type="chief" v-model:searchable="searchable" />
|
||||
<div class="bg0">
|
||||
<div>
|
||||
국가에 임관합니다.<br />
|
||||
@@ -10,7 +10,11 @@
|
||||
<div class="row">
|
||||
<div class="col-6 col-md-3">
|
||||
국가 :
|
||||
<SelectNation :nations="nationList" v-model="selectedNationID" />
|
||||
<SelectNation
|
||||
:nations="nationList"
|
||||
v-model="selectedNationID"
|
||||
:searchable="searchable"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-4 col-md-2 d-grid">
|
||||
<b-button @click="submit">{{ commandName }}</b-button>
|
||||
@@ -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,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<TopBackBar :title="commandName" type="chief" />
|
||||
<TopBackBar :title="commandName" type="chief" v-model:searchable="searchable" />
|
||||
<div class="bg0">
|
||||
<div>
|
||||
장비를 구입하거나 매각합니다.<br />
|
||||
@@ -29,7 +29,7 @@
|
||||
deselectGroupLabel=""
|
||||
placeholder="아이템 선택"
|
||||
:maxHeight="400"
|
||||
:searchable="searchMode"
|
||||
:searchable="searchable"
|
||||
>
|
||||
<template v-slot:option="props">
|
||||
<div
|
||||
@@ -81,7 +81,7 @@ import { entriesWithType } from "@util/entriesWithType";
|
||||
import { Args } from "@/processing/args";
|
||||
import TopBackBar from "@/components/TopBackBar.vue";
|
||||
import BottomBar from "@/components/BottomBar.vue";
|
||||
import { procItemList, procItemType } from "../processingRes";
|
||||
import { getProcSearchable, procItemList, procItemType } from "../processingRes";
|
||||
import { ItemTypeKey, ItemTypeNameMap, NoneValue, ValuesOf } from "@/defs";
|
||||
import { convertSearch초성 } from "@/util/convertSearch초성";
|
||||
|
||||
@@ -164,7 +164,6 @@ export default defineComponent({
|
||||
|
||||
forFind.push(forBuy);
|
||||
}
|
||||
const searchMode = ref(true);
|
||||
|
||||
async function submit(e: Event) {
|
||||
const event = new CustomEvent<Args>("customSubmit", {
|
||||
@@ -178,7 +177,7 @@ export default defineComponent({
|
||||
|
||||
return {
|
||||
...procRes,
|
||||
searchMode,
|
||||
searchable: getProcSearchable(),
|
||||
forFind,
|
||||
NoneValue,
|
||||
ItemTypeNameMap,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<TopBackBar :title="commandName" type="chief" />
|
||||
<TopBackBar :title="commandName" type="chief" v-model:searchable="searchable" />
|
||||
<div class="bg0">
|
||||
<div>
|
||||
장수를 따라 임관합니다.<br />
|
||||
@@ -14,6 +14,7 @@
|
||||
:generals="generalList"
|
||||
:groupByNation="nationList"
|
||||
:textHelper="textHelpGeneral"
|
||||
:searchable="searchable"
|
||||
v-model="selectedGeneralID"
|
||||
/>
|
||||
</div>
|
||||
@@ -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,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<TopBackBar :title="commandName" type="chief" />
|
||||
<TopBackBar :title="commandName" type="chief" v-model:searchable="searchable" />
|
||||
<div class="bg0">
|
||||
<MapLegacyTemplate
|
||||
:isDetailMap="false"
|
||||
@@ -37,7 +37,7 @@
|
||||
<div class="row">
|
||||
<div class="col-6 col-md-3">
|
||||
국가 :
|
||||
<SelectNation :nations="nationList" v-model="selectedNationID" />
|
||||
<SelectNation :nations="nationList" v-model="selectedNationID" :searchable="searchable" />
|
||||
</div>
|
||||
<div class="col-6 col-md-0"></div>
|
||||
<div class="col-8 col-md-4">
|
||||
@@ -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,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<TopBackBar :title="commandName" type="chief" />
|
||||
<TopBackBar :title="commandName" type="chief" v-model:searchable="searchable" />
|
||||
<div class="bg0">
|
||||
<MapLegacyTemplate
|
||||
:isDetailMap="false"
|
||||
@@ -23,12 +23,13 @@
|
||||
:generals="generalList"
|
||||
:troops="troops"
|
||||
:textHelper="textHelpGeneral"
|
||||
:searchable="searchable"
|
||||
v-model="selectedGeneralID"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-6 col-md-4">
|
||||
도시 :
|
||||
<SelectCity :cities="citiesMap" v-model="selectedCityID" />
|
||||
<SelectCity :cities="citiesMap" v-model="selectedCityID" :searchable="searchable" />
|
||||
</div>
|
||||
<div class="col-4 col-md-2 d-grid">
|
||||
<b-button variant="primary" @click="submit">{{ commandName }}</b-button>
|
||||
@@ -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,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<TopBackBar :title="commandName" type="chief" />
|
||||
<TopBackBar :title="commandName" type="chief" v-model:searchable="searchable" />
|
||||
<div class="bg0">
|
||||
<MapLegacyTemplate
|
||||
:isDetailMap="false"
|
||||
@@ -20,7 +20,7 @@
|
||||
<div class="row">
|
||||
<div class="col-4 col-md-3">
|
||||
국가 :
|
||||
<SelectNation :nations="nationList" v-model="selectedNationID" />
|
||||
<SelectNation :nations="nationList" v-model="selectedNationID" :searchable="searchable" />
|
||||
</div>
|
||||
<div class="col-5 col-md-3">
|
||||
기간 :
|
||||
@@ -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,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<TopBackBar :title="commandName" type="chief" />
|
||||
<TopBackBar :title="commandName" type="chief" v-model:searchable="searchable" />
|
||||
<div class="bg0">
|
||||
<MapLegacyTemplate
|
||||
:isDetailMap="false"
|
||||
@@ -22,7 +22,7 @@
|
||||
<div class="row">
|
||||
<div class="col-6 col-md-3">
|
||||
국가 :
|
||||
<SelectNation :nations="nationList" v-model="selectedNationID" />
|
||||
<SelectNation :nations="nationList" v-model="selectedNationID" :searchable="searchable" />
|
||||
</div>
|
||||
<div class="col-3 col-md-2">
|
||||
<label>전략 :</label>
|
||||
@@ -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,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<TopBackBar :title="commandName" />
|
||||
<TopBackBar :title="commandName" v-model:searchable="searchable" />
|
||||
<div class="bg0">
|
||||
<MapLegacyTemplate
|
||||
:isDetailMap="false"
|
||||
@@ -65,7 +65,7 @@
|
||||
<div class="row">
|
||||
<div class="col-4 col-md-2">
|
||||
도시:
|
||||
<SelectCity :cities="citiesMap" v-model="selectedCityID" />
|
||||
<SelectCity :cities="citiesMap" v-model="selectedCityID" :searchable="searchable" />
|
||||
</div>
|
||||
<div class="col-4 col-md-2 d-grid">
|
||||
<b-button @click="submit">{{ commandName }}</b-button>
|
||||
@@ -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,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<TopBackBar :title="commandName" type="chief" />
|
||||
<TopBackBar :title="commandName" type="chief" v-model:searchable="searchable" />
|
||||
<div class="bg0">
|
||||
<div v-if="commandName == '몰수'">
|
||||
장수의 자금이나 군량을 몰수합니다.<br />
|
||||
@@ -19,6 +19,7 @@
|
||||
:generals="generalList"
|
||||
v-model="selectedGeneralID"
|
||||
:textHelper="textHelpGeneral"
|
||||
:searchable="searchable"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-2 col-md-1">
|
||||
@@ -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,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<TopBackBar :title="commandName" type="chief" />
|
||||
<TopBackBar :title="commandName" type="chief" v-model:searchable="searchable" />
|
||||
<div class="bg0">
|
||||
<MapLegacyTemplate
|
||||
:isDetailMap="false"
|
||||
@@ -54,7 +54,7 @@
|
||||
<div class="row">
|
||||
<div class="col-6 col-md-3">
|
||||
국가 :
|
||||
<SelectNation :nations="nationList" v-model="selectedNationID" />
|
||||
<SelectNation :nations="nationList" v-model="selectedNationID" :searchable="searchable" />
|
||||
</div>
|
||||
<div class="col-4 col-md-2 d-grid">
|
||||
<b-button @click="submit">{{ commandName }}</b-button>
|
||||
@@ -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),
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
deselectGroupLabel=""
|
||||
placeholder="도시 선택"
|
||||
:maxHeight="400"
|
||||
:searchable="searchMode"
|
||||
:searchable="searchable"
|
||||
>
|
||||
<template v-slot:option="props"
|
||||
><span
|
||||
@@ -58,6 +58,11 @@ export default defineComponent({
|
||||
type: Map as PropType<Map<number, { name: string; info?: string }>>,
|
||||
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,
|
||||
};
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
deselectGroupLabel=""
|
||||
placeholder="장수 선택"
|
||||
:maxHeight="400"
|
||||
:searchable="searchMode"
|
||||
:searchable="searchable"
|
||||
>
|
||||
<template v-slot:option="props">
|
||||
<div v-if="props.option.title" v-html="props.option.title"></div>
|
||||
@@ -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,
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
deselectGroupLabel=""
|
||||
placeholder="국가 선택"
|
||||
:maxHeight="400"
|
||||
:searchable="searchMode"
|
||||
:searchable="searchable"
|
||||
>
|
||||
<template v-slot:option="props">
|
||||
<span
|
||||
@@ -63,6 +63,11 @@ export default defineComponent({
|
||||
type: Map as PropType<Map<number, procNationItem>>,
|
||||
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,
|
||||
};
|
||||
|
||||
@@ -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<ItemTypeKey, {
|
||||
typeName: string,
|
||||
values: procItemType[],
|
||||
}>
|
||||
}>
|
||||
|
||||
|
||||
//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<boolean>{
|
||||
return searchable;
|
||||
}
|
||||
Reference in New Issue
Block a user