feat(WIP): processing 물자원조

- nations, nationList를 nationList로 통합
This commit is contained in:
2021-12-22 01:01:06 +09:00
parent 77b78d05ac
commit cde55ab574
9 changed files with 280 additions and 94 deletions
+5 -5
View File
@@ -10,7 +10,7 @@
<div class="row">
<div class="col-6 col-md-3">
국가 :
<NationSelect :nations="nations" v-model="selectedNationID" />
<NationSelect :nations="nationList" v-model="selectedNationID" />
</div>
<div class="col-4 col-md-2 d-grid">
<b-button @click="submit">{{ commandName }}</b-button>
@@ -22,7 +22,7 @@
<div>임관권유문</div>
</div>
<div
v-for="[, nation] in nations"
v-for="[, nation] in nationList"
:key="nation.id"
class="nation-row s-border-b"
@click="selectedNationID = nation.id"
@@ -68,9 +68,9 @@ export default defineComponent({
BottomBar,
},
setup() {
const nations = new Map<number, procNationItem>();
const nationList = new Map<number, procNationItem>();
for (const nationItem of procRes.nationList) {
nations.set(nationItem.id, nationItem);
nationList.set(nationItem.id, nationItem);
}
const selectedNationID = ref(procRes.nationList[0].id);
@@ -89,7 +89,7 @@ export default defineComponent({
}
return {
nations: ref(nations),
nationList: ref(nationList),
selectedNationID,
commandName,
isBrightColor,
@@ -97,9 +97,9 @@ export default defineComponent({
return name;
}
const nations = new Map<number, procNationItem>();
const nationList = new Map<number, procNationItem>();
for (const nationItem of procRes.nationList) {
nations.set(nationItem.id, nationItem);
nationList.set(nationItem.id, nationItem);
}
async function submit(e: Event) {
@@ -111,16 +111,10 @@ export default defineComponent({
unwrap(e.target).dispatchEvent(event);
}
const nationList = new Map<number, procNationItem>();
for (const nationItem of procRes.nationList) {
nationList.set(nationItem.id, nationItem);
}
return {
nations: ref(nations),
nationList: ref(nationList),
selectedGeneralID,
generalList,
nationList,
commandName,
isBrightColor,
textHelpGeneral,