feat: processing 검색 켬/끔 추가
This commit is contained in:
@@ -2,8 +2,16 @@
|
|||||||
<div class="bg0 back_bar">
|
<div class="bg0 back_bar">
|
||||||
<button type="button" class="btn btn-sammo-base2 back_btn" @click="back">
|
<button type="button" class="btn btn-sammo-base2 back_btn" @click="back">
|
||||||
돌아가기
|
돌아가기
|
||||||
</button>
|
</button><b-button
|
||||||
|
class="btn-toggle-zoom"
|
||||||
|
:variant="toggleSearch ? 'info' : 'secondary'"
|
||||||
|
:pressed="toggleSearch"
|
||||||
|
v-if="toggleSearch !== undefined"
|
||||||
|
@click="toggleSearch = !toggleSearch"
|
||||||
|
>{{ toggleSearch ? "검색 켜짐" : "검색 꺼짐" }}</b-button
|
||||||
|
>
|
||||||
<h2 class="title">{{ title }}</h2>
|
<h2 class="title">{{ title }}</h2>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -25,6 +33,17 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
toggleSearch: this.searchable,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
emits: ["update:searchable"],
|
||||||
|
watch: {
|
||||||
|
toggleSearch(val: boolean) {
|
||||||
|
this.$emit("update:searchable", val);
|
||||||
|
},
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
title: {
|
title: {
|
||||||
type: String,
|
type: String,
|
||||||
@@ -35,6 +54,11 @@ export default defineComponent({
|
|||||||
default: "normal",
|
default: "normal",
|
||||||
required: false,
|
required: false,
|
||||||
},
|
},
|
||||||
|
searchable: {
|
||||||
|
type: Boolean,
|
||||||
|
default: undefined,
|
||||||
|
required: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@@ -55,6 +79,12 @@ export default defineComponent({
|
|||||||
height: 24pt;
|
height: 24pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-toggle-zoom{
|
||||||
|
position: absolute;
|
||||||
|
height: 24pt;
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 24pt;
|
line-height: 24pt;
|
||||||
|
|||||||
Vendored
-15
@@ -1,15 +0,0 @@
|
|||||||
type JQueryBootstrapToast = {
|
|
||||||
container?: JQuery<HTMLElement>,
|
|
||||||
position?: 'top-right' | 'top-left' | 'top-center' | 'bottom-right' | 'bottom-left' | 'bottom-center',
|
|
||||||
title?: string,
|
|
||||||
subtitle?: string,
|
|
||||||
content?: string,
|
|
||||||
type?: 'info'|'success'|'warning'|'danger'|'error',
|
|
||||||
delay?: number,
|
|
||||||
img?: string,
|
|
||||||
pause_on_hover?: boolean,
|
|
||||||
}
|
|
||||||
|
|
||||||
interface JQueryStatic {
|
|
||||||
toast(opt: JQueryBootstrapToast): void;
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<TopBackBar :title="commandName" type="chief" />
|
<TopBackBar :title="commandName" type="chief" v-model:searchable="searchable" />
|
||||||
<div class="bg0">
|
<div class="bg0">
|
||||||
<div>
|
<div>
|
||||||
재야나 타국의 장수를 등용합니다.<br />
|
재야나 타국의 장수를 등용합니다.<br />
|
||||||
@@ -13,6 +13,7 @@
|
|||||||
:generals="generalList"
|
:generals="generalList"
|
||||||
:groupByNation="nationList"
|
:groupByNation="nationList"
|
||||||
:textHelper="textHelpGeneral"
|
:textHelper="textHelpGeneral"
|
||||||
|
:searchable="searchable"
|
||||||
v-model="selectedGeneralID"
|
v-model="selectedGeneralID"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -33,6 +34,7 @@ import TopBackBar from "@/components/TopBackBar.vue";
|
|||||||
import BottomBar from "@/components/BottomBar.vue";
|
import BottomBar from "@/components/BottomBar.vue";
|
||||||
import {
|
import {
|
||||||
convertGeneralList,
|
convertGeneralList,
|
||||||
|
getProcSearchable,
|
||||||
procGeneralItem,
|
procGeneralItem,
|
||||||
procGeneralKey,
|
procGeneralKey,
|
||||||
procGeneralRawItemList,
|
procGeneralRawItemList,
|
||||||
@@ -85,6 +87,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
searchable: getProcSearchable(),
|
||||||
selectedGeneralID,
|
selectedGeneralID,
|
||||||
generalList,
|
generalList,
|
||||||
nationList,
|
nationList,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<TopBackBar :title="commandName" type="chief" />
|
<TopBackBar :title="commandName" type="chief" v-model:searchable="searchable" />
|
||||||
<div class="bg0">
|
<div class="bg0">
|
||||||
<div v-if="commandName == '등용'">
|
<div v-if="commandName == '등용'">
|
||||||
재야나 타국의 장수를 등용합니다.<br />
|
재야나 타국의 장수를 등용합니다.<br />
|
||||||
@@ -16,6 +16,7 @@
|
|||||||
<SelectGeneral
|
<SelectGeneral
|
||||||
:generals="generalList"
|
:generals="generalList"
|
||||||
:textHelper="textHelpGeneral"
|
:textHelper="textHelpGeneral"
|
||||||
|
:searchable="searchable"
|
||||||
v-model="selectedGeneralID"
|
v-model="selectedGeneralID"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -36,6 +37,7 @@ import TopBackBar from "@/components/TopBackBar.vue";
|
|||||||
import BottomBar from "@/components/BottomBar.vue";
|
import BottomBar from "@/components/BottomBar.vue";
|
||||||
import {
|
import {
|
||||||
convertGeneralList,
|
convertGeneralList,
|
||||||
|
getProcSearchable,
|
||||||
procGeneralItem,
|
procGeneralItem,
|
||||||
procGeneralKey,
|
procGeneralKey,
|
||||||
procGeneralRawItemList,
|
procGeneralRawItemList,
|
||||||
@@ -80,6 +82,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
searchable: getProcSearchable(),
|
||||||
selectedGeneralID,
|
selectedGeneralID,
|
||||||
generalList,
|
generalList,
|
||||||
commandName,
|
commandName,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<TopBackBar :title="commandName" type="chief" />
|
<TopBackBar :title="commandName" type="chief" v-model:searchable="searchable" />
|
||||||
<div class="bg0">
|
<div class="bg0">
|
||||||
<div>
|
<div>
|
||||||
국가에 임관합니다.<br />
|
국가에 임관합니다.<br />
|
||||||
@@ -10,7 +10,11 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-6 col-md-3">
|
<div class="col-6 col-md-3">
|
||||||
국가 :
|
국가 :
|
||||||
<SelectNation :nations="nationList" v-model="selectedNationID" />
|
<SelectNation
|
||||||
|
:nations="nationList"
|
||||||
|
v-model="selectedNationID"
|
||||||
|
:searchable="searchable"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4 col-md-2 d-grid">
|
<div class="col-4 col-md-2 d-grid">
|
||||||
<b-button @click="submit">{{ commandName }}</b-button>
|
<b-button @click="submit">{{ commandName }}</b-button>
|
||||||
@@ -62,7 +66,7 @@ import { unwrap } from "@/util/unwrap";
|
|||||||
import { Args } from "@/processing/args";
|
import { Args } from "@/processing/args";
|
||||||
import TopBackBar from "@/components/TopBackBar.vue";
|
import TopBackBar from "@/components/TopBackBar.vue";
|
||||||
import BottomBar from "@/components/BottomBar.vue";
|
import BottomBar from "@/components/BottomBar.vue";
|
||||||
import { procNationItem, procNationList } from "../processingRes";
|
import { procNationItem, procNationList, getProcSearchable } from "../processingRes";
|
||||||
import { isBrightColor } from "@/util/isBrightColor";
|
import { isBrightColor } from "@/util/isBrightColor";
|
||||||
declare const commandName: string;
|
declare const commandName: string;
|
||||||
|
|
||||||
@@ -99,6 +103,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
searchable: getProcSearchable(),
|
||||||
nationList: ref(nationList),
|
nationList: ref(nationList),
|
||||||
selectedNationID,
|
selectedNationID,
|
||||||
commandName,
|
commandName,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<TopBackBar :title="commandName" type="chief" />
|
<TopBackBar :title="commandName" type="chief" v-model:searchable="searchable" />
|
||||||
<div class="bg0">
|
<div class="bg0">
|
||||||
<div>
|
<div>
|
||||||
장비를 구입하거나 매각합니다.<br />
|
장비를 구입하거나 매각합니다.<br />
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
deselectGroupLabel=""
|
deselectGroupLabel=""
|
||||||
placeholder="아이템 선택"
|
placeholder="아이템 선택"
|
||||||
:maxHeight="400"
|
:maxHeight="400"
|
||||||
:searchable="searchMode"
|
:searchable="searchable"
|
||||||
>
|
>
|
||||||
<template v-slot:option="props">
|
<template v-slot:option="props">
|
||||||
<div
|
<div
|
||||||
@@ -81,7 +81,7 @@ import { entriesWithType } from "@util/entriesWithType";
|
|||||||
import { Args } from "@/processing/args";
|
import { Args } from "@/processing/args";
|
||||||
import TopBackBar from "@/components/TopBackBar.vue";
|
import TopBackBar from "@/components/TopBackBar.vue";
|
||||||
import BottomBar from "@/components/BottomBar.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 { ItemTypeKey, ItemTypeNameMap, NoneValue, ValuesOf } from "@/defs";
|
||||||
import { convertSearch초성 } from "@/util/convertSearch초성";
|
import { convertSearch초성 } from "@/util/convertSearch초성";
|
||||||
|
|
||||||
@@ -164,7 +164,6 @@ export default defineComponent({
|
|||||||
|
|
||||||
forFind.push(forBuy);
|
forFind.push(forBuy);
|
||||||
}
|
}
|
||||||
const searchMode = ref(true);
|
|
||||||
|
|
||||||
async function submit(e: Event) {
|
async function submit(e: Event) {
|
||||||
const event = new CustomEvent<Args>("customSubmit", {
|
const event = new CustomEvent<Args>("customSubmit", {
|
||||||
@@ -178,7 +177,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
...procRes,
|
...procRes,
|
||||||
searchMode,
|
searchable: getProcSearchable(),
|
||||||
forFind,
|
forFind,
|
||||||
NoneValue,
|
NoneValue,
|
||||||
ItemTypeNameMap,
|
ItemTypeNameMap,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<TopBackBar :title="commandName" type="chief" />
|
<TopBackBar :title="commandName" type="chief" v-model:searchable="searchable" />
|
||||||
<div class="bg0">
|
<div class="bg0">
|
||||||
<div>
|
<div>
|
||||||
장수를 따라 임관합니다.<br />
|
장수를 따라 임관합니다.<br />
|
||||||
@@ -14,6 +14,7 @@
|
|||||||
:generals="generalList"
|
:generals="generalList"
|
||||||
:groupByNation="nationList"
|
:groupByNation="nationList"
|
||||||
:textHelper="textHelpGeneral"
|
:textHelper="textHelpGeneral"
|
||||||
|
:searchable="searchable"
|
||||||
v-model="selectedGeneralID"
|
v-model="selectedGeneralID"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -68,6 +69,7 @@ import TopBackBar from "@/components/TopBackBar.vue";
|
|||||||
import BottomBar from "@/components/BottomBar.vue";
|
import BottomBar from "@/components/BottomBar.vue";
|
||||||
import {
|
import {
|
||||||
convertGeneralList,
|
convertGeneralList,
|
||||||
|
getProcSearchable,
|
||||||
procGeneralItem,
|
procGeneralItem,
|
||||||
procGeneralKey,
|
procGeneralKey,
|
||||||
procGeneralRawItemList,
|
procGeneralRawItemList,
|
||||||
@@ -122,6 +124,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
searchable: getProcSearchable(),
|
||||||
nationList: ref(nationList),
|
nationList: ref(nationList),
|
||||||
selectedGeneralID,
|
selectedGeneralID,
|
||||||
generalList,
|
generalList,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<TopBackBar :title="commandName" type="chief" />
|
<TopBackBar :title="commandName" type="chief" v-model:searchable="searchable" />
|
||||||
<div class="bg0">
|
<div class="bg0">
|
||||||
<MapLegacyTemplate
|
<MapLegacyTemplate
|
||||||
:isDetailMap="false"
|
:isDetailMap="false"
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-6 col-md-3">
|
<div class="col-6 col-md-3">
|
||||||
국가 :
|
국가 :
|
||||||
<SelectNation :nations="nationList" v-model="selectedNationID" />
|
<SelectNation :nations="nationList" v-model="selectedNationID" :searchable="searchable" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6 col-md-0"></div>
|
<div class="col-6 col-md-0"></div>
|
||||||
<div class="col-8 col-md-4">
|
<div class="col-8 col-md-4">
|
||||||
@@ -79,7 +79,7 @@ import { unwrap } from "@/util/unwrap";
|
|||||||
import { Args } from "@/processing/args";
|
import { Args } from "@/processing/args";
|
||||||
import TopBackBar from "@/components/TopBackBar.vue";
|
import TopBackBar from "@/components/TopBackBar.vue";
|
||||||
import BottomBar from "@/components/BottomBar.vue";
|
import BottomBar from "@/components/BottomBar.vue";
|
||||||
import { procNationItem, procNationList } from "../processingRes";
|
import { getProcSearchable, procNationItem, procNationList } from "../processingRes";
|
||||||
declare const mapTheme: string;
|
declare const mapTheme: string;
|
||||||
declare const commandName: string;
|
declare const commandName: string;
|
||||||
|
|
||||||
@@ -137,6 +137,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
searchable: getProcSearchable(),
|
||||||
mapTheme,
|
mapTheme,
|
||||||
goldAmount,
|
goldAmount,
|
||||||
riceAmount,
|
riceAmount,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<TopBackBar :title="commandName" type="chief" />
|
<TopBackBar :title="commandName" type="chief" v-model:searchable="searchable" />
|
||||||
<div class="bg0">
|
<div class="bg0">
|
||||||
<MapLegacyTemplate
|
<MapLegacyTemplate
|
||||||
:isDetailMap="false"
|
:isDetailMap="false"
|
||||||
@@ -23,12 +23,13 @@
|
|||||||
:generals="generalList"
|
:generals="generalList"
|
||||||
:troops="troops"
|
:troops="troops"
|
||||||
:textHelper="textHelpGeneral"
|
:textHelper="textHelpGeneral"
|
||||||
|
:searchable="searchable"
|
||||||
v-model="selectedGeneralID"
|
v-model="selectedGeneralID"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6 col-md-4">
|
<div class="col-6 col-md-4">
|
||||||
도시 :
|
도시 :
|
||||||
<SelectCity :cities="citiesMap" v-model="selectedCityID" />
|
<SelectCity :cities="citiesMap" v-model="selectedCityID" :searchable="searchable" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4 col-md-2 d-grid">
|
<div class="col-4 col-md-2 d-grid">
|
||||||
<b-button variant="primary" @click="submit">{{ commandName }}</b-button>
|
<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 BottomBar from "@/components/BottomBar.vue";
|
||||||
import {
|
import {
|
||||||
convertGeneralList,
|
convertGeneralList,
|
||||||
|
getProcSearchable,
|
||||||
procGeneralItem,
|
procGeneralItem,
|
||||||
procGeneralKey,
|
procGeneralKey,
|
||||||
procGeneralRawItemList,
|
procGeneralRawItemList,
|
||||||
@@ -127,6 +129,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
searchable: getProcSearchable(),
|
||||||
mapTheme: ref(mapTheme),
|
mapTheme: ref(mapTheme),
|
||||||
citiesMap: ref(citiesMap),
|
citiesMap: ref(citiesMap),
|
||||||
selectedCityID,
|
selectedCityID,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<TopBackBar :title="commandName" type="chief" />
|
<TopBackBar :title="commandName" type="chief" v-model:searchable="searchable" />
|
||||||
<div class="bg0">
|
<div class="bg0">
|
||||||
<MapLegacyTemplate
|
<MapLegacyTemplate
|
||||||
:isDetailMap="false"
|
:isDetailMap="false"
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-4 col-md-3">
|
<div class="col-4 col-md-3">
|
||||||
국가 :
|
국가 :
|
||||||
<SelectNation :nations="nationList" v-model="selectedNationID" />
|
<SelectNation :nations="nationList" v-model="selectedNationID" :searchable="searchable" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-5 col-md-3">
|
<div class="col-5 col-md-3">
|
||||||
기간 :
|
기간 :
|
||||||
@@ -60,7 +60,7 @@ import { unwrap } from "@/util/unwrap";
|
|||||||
import { Args } from "@/processing/args";
|
import { Args } from "@/processing/args";
|
||||||
import TopBackBar from "@/components/TopBackBar.vue";
|
import TopBackBar from "@/components/TopBackBar.vue";
|
||||||
import BottomBar from "@/components/BottomBar.vue";
|
import BottomBar from "@/components/BottomBar.vue";
|
||||||
import { procNationItem, procNationList } from "../processingRes";
|
import { getProcSearchable, procNationItem, procNationList } from "../processingRes";
|
||||||
declare const mapTheme: string;
|
declare const mapTheme: string;
|
||||||
declare const commandName: string;
|
declare const commandName: string;
|
||||||
|
|
||||||
@@ -115,6 +115,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
searchable: getProcSearchable(),
|
||||||
...procRes,
|
...procRes,
|
||||||
selectedYear,
|
selectedYear,
|
||||||
selectedMonth,
|
selectedMonth,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<TopBackBar :title="commandName" type="chief" />
|
<TopBackBar :title="commandName" type="chief" v-model:searchable="searchable" />
|
||||||
<div class="bg0">
|
<div class="bg0">
|
||||||
<MapLegacyTemplate
|
<MapLegacyTemplate
|
||||||
:isDetailMap="false"
|
:isDetailMap="false"
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-6 col-md-3">
|
<div class="col-6 col-md-3">
|
||||||
국가 :
|
국가 :
|
||||||
<SelectNation :nations="nationList" v-model="selectedNationID" />
|
<SelectNation :nations="nationList" v-model="selectedNationID" :searchable="searchable" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-3 col-md-2">
|
<div class="col-3 col-md-2">
|
||||||
<label>전략 :</label>
|
<label>전략 :</label>
|
||||||
@@ -49,7 +49,7 @@ import { unwrap } from "@/util/unwrap";
|
|||||||
import { Args } from "@/processing/args";
|
import { Args } from "@/processing/args";
|
||||||
import TopBackBar from "@/components/TopBackBar.vue";
|
import TopBackBar from "@/components/TopBackBar.vue";
|
||||||
import BottomBar from "@/components/BottomBar.vue";
|
import BottomBar from "@/components/BottomBar.vue";
|
||||||
import { procNationItem, procNationList } from "../processingRes";
|
import { getProcSearchable, procNationItem, procNationList } from "../processingRes";
|
||||||
declare const mapTheme: string;
|
declare const mapTheme: string;
|
||||||
declare const commandName: string;
|
declare const commandName: string;
|
||||||
|
|
||||||
@@ -122,6 +122,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
searchable: getProcSearchable(),
|
||||||
...procRes,
|
...procRes,
|
||||||
selectedCommandID,
|
selectedCommandID,
|
||||||
commandTypesOption,
|
commandTypesOption,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<TopBackBar :title="commandName" />
|
<TopBackBar :title="commandName" v-model:searchable="searchable" />
|
||||||
<div class="bg0">
|
<div class="bg0">
|
||||||
<MapLegacyTemplate
|
<MapLegacyTemplate
|
||||||
:isDetailMap="false"
|
:isDetailMap="false"
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-4 col-md-2">
|
<div class="col-4 col-md-2">
|
||||||
도시:
|
도시:
|
||||||
<SelectCity :cities="citiesMap" v-model="selectedCityID" />
|
<SelectCity :cities="citiesMap" v-model="selectedCityID" :searchable="searchable" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4 col-md-2 d-grid">
|
<div class="col-4 col-md-2 d-grid">
|
||||||
<b-button @click="submit">{{ commandName }}</b-button>
|
<b-button @click="submit">{{ commandName }}</b-button>
|
||||||
@@ -92,6 +92,7 @@ import { Args } from "@/processing/args";
|
|||||||
import TopBackBar from "@/components/TopBackBar.vue";
|
import TopBackBar from "@/components/TopBackBar.vue";
|
||||||
import BottomBar from "@/components/BottomBar.vue";
|
import BottomBar from "@/components/BottomBar.vue";
|
||||||
import { pick as JosaPick } from "@util/JosaUtil";
|
import { pick as JosaPick } from "@util/JosaUtil";
|
||||||
|
import { getProcSearchable } from "./processingRes";
|
||||||
declare const mapTheme: string;
|
declare const mapTheme: string;
|
||||||
declare const currentCity: number;
|
declare const currentCity: number;
|
||||||
declare const commandName: string;
|
declare const commandName: string;
|
||||||
@@ -140,6 +141,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
searchable: getProcSearchable(),
|
||||||
mapTheme: ref(mapTheme),
|
mapTheme: ref(mapTheme),
|
||||||
citiesMap: ref(citiesMap),
|
citiesMap: ref(citiesMap),
|
||||||
selectedCityID,
|
selectedCityID,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<TopBackBar :title="commandName" type="chief" />
|
<TopBackBar :title="commandName" type="chief" v-model:searchable="searchable" />
|
||||||
<div class="bg0">
|
<div class="bg0">
|
||||||
<div v-if="commandName == '몰수'">
|
<div v-if="commandName == '몰수'">
|
||||||
장수의 자금이나 군량을 몰수합니다.<br />
|
장수의 자금이나 군량을 몰수합니다.<br />
|
||||||
@@ -19,6 +19,7 @@
|
|||||||
:generals="generalList"
|
:generals="generalList"
|
||||||
v-model="selectedGeneralID"
|
v-model="selectedGeneralID"
|
||||||
:textHelper="textHelpGeneral"
|
:textHelper="textHelpGeneral"
|
||||||
|
:searchable="searchable"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-2 col-md-1">
|
<div class="col-2 col-md-1">
|
||||||
@@ -55,6 +56,7 @@ import TopBackBar from "@/components/TopBackBar.vue";
|
|||||||
import BottomBar from "@/components/BottomBar.vue";
|
import BottomBar from "@/components/BottomBar.vue";
|
||||||
import {
|
import {
|
||||||
convertGeneralList,
|
convertGeneralList,
|
||||||
|
getProcSearchable,
|
||||||
procGeneralItem,
|
procGeneralItem,
|
||||||
procGeneralKey,
|
procGeneralKey,
|
||||||
procGeneralRawItemList,
|
procGeneralRawItemList,
|
||||||
@@ -122,6 +124,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
searchable: getProcSearchable(),
|
||||||
amount,
|
amount,
|
||||||
isGold,
|
isGold,
|
||||||
selectedGeneralID,
|
selectedGeneralID,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<TopBackBar :title="commandName" type="chief" />
|
<TopBackBar :title="commandName" type="chief" v-model:searchable="searchable" />
|
||||||
<div class="bg0">
|
<div class="bg0">
|
||||||
<MapLegacyTemplate
|
<MapLegacyTemplate
|
||||||
:isDetailMap="false"
|
:isDetailMap="false"
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-6 col-md-3">
|
<div class="col-6 col-md-3">
|
||||||
국가 :
|
국가 :
|
||||||
<SelectNation :nations="nationList" v-model="selectedNationID" />
|
<SelectNation :nations="nationList" v-model="selectedNationID" :searchable="searchable" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4 col-md-2 d-grid">
|
<div class="col-4 col-md-2 d-grid">
|
||||||
<b-button @click="submit">{{ commandName }}</b-button>
|
<b-button @click="submit">{{ commandName }}</b-button>
|
||||||
@@ -74,7 +74,7 @@ import { unwrap } from "@/util/unwrap";
|
|||||||
import { Args } from "@/processing/args";
|
import { Args } from "@/processing/args";
|
||||||
import TopBackBar from "@/components/TopBackBar.vue";
|
import TopBackBar from "@/components/TopBackBar.vue";
|
||||||
import BottomBar from "@/components/BottomBar.vue";
|
import BottomBar from "@/components/BottomBar.vue";
|
||||||
import { procNationItem, procNationList } from "./processingRes";
|
import { getProcSearchable, procNationItem, procNationList } from "./processingRes";
|
||||||
declare const mapTheme: string;
|
declare const mapTheme: string;
|
||||||
declare const commandName: string;
|
declare const commandName: string;
|
||||||
|
|
||||||
@@ -121,6 +121,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
searchable: getProcSearchable(),
|
||||||
startYear: procRes.startYear,
|
startYear: procRes.startYear,
|
||||||
mapTheme: ref(mapTheme),
|
mapTheme: ref(mapTheme),
|
||||||
nationList: ref(nationList),
|
nationList: ref(nationList),
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
deselectGroupLabel=""
|
deselectGroupLabel=""
|
||||||
placeholder="도시 선택"
|
placeholder="도시 선택"
|
||||||
:maxHeight="400"
|
:maxHeight="400"
|
||||||
:searchable="searchMode"
|
:searchable="searchable"
|
||||||
>
|
>
|
||||||
<template v-slot:option="props"
|
<template v-slot:option="props"
|
||||||
><span
|
><span
|
||||||
@@ -58,6 +58,11 @@ export default defineComponent({
|
|||||||
type: Map as PropType<Map<number, { name: string; info?: string }>>,
|
type: Map as PropType<Map<number, { name: string; info?: string }>>,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
searchable: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
emits: ["update:modelValue"],
|
emits: ["update:modelValue"],
|
||||||
watch: {
|
watch: {
|
||||||
@@ -89,7 +94,6 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
selectedCity,
|
selectedCity,
|
||||||
searchMode: true,
|
|
||||||
citiesForFind,
|
citiesForFind,
|
||||||
targets,
|
targets,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
deselectGroupLabel=""
|
deselectGroupLabel=""
|
||||||
placeholder="장수 선택"
|
placeholder="장수 선택"
|
||||||
:maxHeight="400"
|
:maxHeight="400"
|
||||||
:searchable="searchMode"
|
:searchable="searchable"
|
||||||
>
|
>
|
||||||
<template v-slot:option="props">
|
<template v-slot:option="props">
|
||||||
<div v-if="props.option.title" v-html="props.option.title"></div>
|
<div v-if="props.option.title" v-html="props.option.title"></div>
|
||||||
@@ -81,6 +81,11 @@ export default defineComponent({
|
|||||||
required: false,
|
required: false,
|
||||||
default: undefined,
|
default: undefined,
|
||||||
},
|
},
|
||||||
|
searchable:{
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: true,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
emits: ["update:modelValue"],
|
emits: ["update:modelValue"],
|
||||||
watch: {
|
watch: {
|
||||||
@@ -146,7 +151,6 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
selectedGeneral,
|
selectedGeneral,
|
||||||
searchMode: true,
|
|
||||||
forFind,
|
forFind,
|
||||||
targets,
|
targets,
|
||||||
isBrightColor,
|
isBrightColor,
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
deselectGroupLabel=""
|
deselectGroupLabel=""
|
||||||
placeholder="국가 선택"
|
placeholder="국가 선택"
|
||||||
:maxHeight="400"
|
:maxHeight="400"
|
||||||
:searchable="searchMode"
|
:searchable="searchable"
|
||||||
>
|
>
|
||||||
<template v-slot:option="props">
|
<template v-slot:option="props">
|
||||||
<span
|
<span
|
||||||
@@ -63,6 +63,11 @@ export default defineComponent({
|
|||||||
type: Map as PropType<Map<number, procNationItem>>,
|
type: Map as PropType<Map<number, procNationItem>>,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
searchable: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: true,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
emits: ["update:modelValue"],
|
emits: ["update:modelValue"],
|
||||||
watch: {
|
watch: {
|
||||||
@@ -95,7 +100,6 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
selectedNation,
|
selectedNation,
|
||||||
searchMode: true,
|
|
||||||
forFind,
|
forFind,
|
||||||
targets,
|
targets,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { ItemTypeKey } from "@/defs";
|
import { ItemTypeKey } from "@/defs";
|
||||||
import { combineArray } from "@/util/combineArray";
|
import { combineArray } from "@/util/combineArray";
|
||||||
|
import { Ref, ref, watch } from "vue";
|
||||||
|
|
||||||
export type procGeneralItem = {
|
export type procGeneralItem = {
|
||||||
no: number,
|
no: number,
|
||||||
@@ -95,4 +96,16 @@ export type procItemType = {
|
|||||||
export type procItemList = Record<ItemTypeKey, {
|
export type procItemList = Record<ItemTypeKey, {
|
||||||
typeName: string,
|
typeName: string,
|
||||||
values: procItemType[],
|
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;
|
||||||
|
}
|
||||||
@@ -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<string>($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<string>($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<string>($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();
|
|
||||||
}
|
|
||||||
@@ -1,12 +1,10 @@
|
|||||||
import '@scss/processing.scss';
|
import '@scss/processing.scss';
|
||||||
|
|
||||||
import { exportWindow } from '@util/exportWindow';
|
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { setAxiosXMLHttpRequest } from '@util/setAxiosXMLHttpRequest';
|
import { setAxiosXMLHttpRequest } from '@util/setAxiosXMLHttpRequest';
|
||||||
import { convertFormData } from '@util/convertFormData';
|
import { convertFormData } from '@util/convertFormData';
|
||||||
import { InvalidResponse } from '@/defs';
|
import { InvalidResponse } from '@/defs';
|
||||||
import { unwrap } from "@util/unwrap";
|
import { unwrap } from "@util/unwrap";
|
||||||
import { recruitCrewForm } from '@/recruitCrewForm';
|
|
||||||
import BootstrapVue3 from 'bootstrap-vue-3'
|
import BootstrapVue3 from 'bootstrap-vue-3'
|
||||||
import Multiselect from 'vue-multiselect';
|
import Multiselect from 'vue-multiselect';
|
||||||
import { commandMap as GeneralActions } from "@/processing/General";
|
import { commandMap as GeneralActions } from "@/processing/General";
|
||||||
@@ -98,10 +96,9 @@ if (app === undefined) {
|
|||||||
console.error(`모듈이 지정되지 않음`, entryInfo);
|
console.error(`모듈이 지정되지 않음`, entryInfo);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
const div = unwrap(document.querySelector('#container'));
|
const div = unwrap(document.querySelector('#container'));
|
||||||
div.addEventListener('customSubmit', (e: Event) => {
|
div.addEventListener('customSubmit', (e: Event) => {
|
||||||
const {detail} = e as unknown as CustomEvent<Args>;
|
const { detail } = e as unknown as CustomEvent<Args>;
|
||||||
void submitCommand(entryInfo[0] == 'Nation', turnList, entryInfo[1], detail);
|
void submitCommand(entryInfo[0] == 'Nation', turnList, entryInfo[1], detail);
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user