mirror of
https://github.com/Spythere/genera-tor.git
synced 2026-05-03 05:28:13 +00:00
feature: order 'N' 6th row; chore: textareas sizing
This commit is contained in:
@@ -186,4 +186,10 @@ select {
|
|||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
textarea.others {
|
||||||
|
width: 100%;
|
||||||
|
min-height: 200px;
|
||||||
|
resize: vertical;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -285,6 +285,46 @@
|
|||||||
<input type="text" v-model="order.rows[4].on" holder="nazwa sygnału" />
|
<input type="text" v-model="order.rows[4].on" holder="nazwa sygnału" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr style="height: 270px">
|
||||||
|
<td>
|
||||||
|
<label for="row-enabled-6">6</label>
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" id="row-enabled-6" v-model="order.rows[5].enabled" />
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td ref="row-6">
|
||||||
|
<button
|
||||||
|
class="g-button text"
|
||||||
|
@click="order.rows[5].twoWay.enabled = !order.rows[5].twoWay.enabled"
|
||||||
|
>
|
||||||
|
>
|
||||||
|
<span v-if="!order.rows[5].twoWay.enabled">
|
||||||
|
Wygeneruj treść na wprowadzenie ruchu dwukierunkowego
|
||||||
|
</span>
|
||||||
|
<span v-else>Wpisz treść własnoręcznie</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div>Inne:</div>
|
||||||
|
|
||||||
|
<div v-if="order.rows[5].twoWay.enabled">
|
||||||
|
od
|
||||||
|
<input type="text" v-model="order.rows[5].twoWay.from" holder="stacja / post." />
|
||||||
|
do
|
||||||
|
<input type="text" v-model="order.rows[5].twoWay.to" holder="stacja / post." />
|
||||||
|
po torze nr
|
||||||
|
<input type="text" v-model="order.rows[5].twoWay.trackNo" holder="nr toru" />
|
||||||
|
wprowadzono ruch dwukierunkowy.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<textarea
|
||||||
|
v-else
|
||||||
|
class="others"
|
||||||
|
cols="30"
|
||||||
|
rows="10"
|
||||||
|
v-model="order.rows[5].content"
|
||||||
|
></textarea>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</section>
|
</section>
|
||||||
@@ -401,6 +441,17 @@ export default defineComponent({
|
|||||||
} i przejechać obok sygnału "Stój" na ${row.on || '_'} `;
|
} i przejechać obok sygnału "Stój" na ${row.on || '_'} `;
|
||||||
|
|
||||||
return message;
|
return message;
|
||||||
|
},
|
||||||
|
|
||||||
|
() => {
|
||||||
|
const row = order.rows[5];
|
||||||
|
|
||||||
|
if (row.twoWay.enabled)
|
||||||
|
return `Inne: od ${row.twoWay.from || '_'} do ${row.twoWay.to || '_'} po torze nr ${
|
||||||
|
row.twoWay.trackNo || '_'
|
||||||
|
} wprowadzono ruch dwukierunkowy.`;
|
||||||
|
|
||||||
|
return 'Inne: ' + row.content;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -453,7 +504,7 @@ export default defineComponent({
|
|||||||
generateMessage() {
|
generateMessage() {
|
||||||
let message = this.rowMethods[0]();
|
let message = this.rowMethods[0]();
|
||||||
|
|
||||||
for (let i = 0; i < 5; i++) {
|
for (let i = 0; i < this.order.rows.length; i++) {
|
||||||
if (!this.order.rows[i].enabled) continue;
|
if (!this.order.rows[i].enabled) continue;
|
||||||
|
|
||||||
message += ` <b> [ ${i + 1} ] </b> ${this.rowMethods[i + 1]()}`;
|
message += ` <b> [ ${i + 1} ] </b> ${this.rowMethods[i + 1]()}`;
|
||||||
|
|||||||
+10
-15
@@ -65,13 +65,13 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<div class="order_other">
|
|
||||||
<span><b>2.</b> Inne:</span>
|
|
||||||
<br />
|
|
||||||
<textarea v-model="order.other"></textarea>
|
|
||||||
</div>
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<div class="order_other">
|
||||||
|
<span><b>2.</b> Inne:</span>
|
||||||
|
<br />
|
||||||
|
<textarea class="others" cols="30" rows="10" v-model="order.other"></textarea>
|
||||||
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -189,10 +189,12 @@ th {
|
|||||||
input {
|
input {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.order_table {
|
||||||
textarea {
|
textarea {
|
||||||
width: 80%;
|
width: 90%;
|
||||||
height: 40px;
|
min-height: 50px;
|
||||||
resize: vertical;
|
resize: vertical;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -203,14 +205,7 @@ th {
|
|||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: 285px;
|
|
||||||
|
|
||||||
padding: 0.5em;
|
padding: 0.5em;
|
||||||
|
|
||||||
textarea {
|
|
||||||
resize: vertical;
|
|
||||||
height: 220px;
|
|
||||||
width: 95%;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -202,7 +202,7 @@
|
|||||||
<input type="text" v-model="order.rows[2].hour" holder="godzina" />
|
<input type="text" v-model="order.rows[2].hour" holder="godzina" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="height: 255px">
|
<tr style="height: 270px">
|
||||||
<td>
|
<td>
|
||||||
<label for="row-enabled-4">4</label>
|
<label for="row-enabled-4">4</label>
|
||||||
<div>
|
<div>
|
||||||
@@ -265,7 +265,13 @@
|
|||||||
<input type="text" v-model="order.rows[3].w5.maxHour" holder="godzina" />
|
<input type="text" v-model="order.rows[3].w5.maxHour" holder="godzina" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<textarea id="" cols="30" rows="10" v-model="order.rows[3].content" v-else></textarea>
|
<textarea
|
||||||
|
v-else
|
||||||
|
class="others"
|
||||||
|
cols="30"
|
||||||
|
rows="10"
|
||||||
|
v-model="order.rows[3].content"
|
||||||
|
></textarea>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -438,11 +444,3 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
textarea {
|
|
||||||
width: 95%;
|
|
||||||
height: 200px;
|
|
||||||
resize: none;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||
@@ -137,6 +137,16 @@ export const useStore = defineStore('store', {
|
|||||||
stationType: 'stację',
|
stationType: 'stację',
|
||||||
stationName: '',
|
stationName: '',
|
||||||
on: ''
|
on: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
enabled: false,
|
||||||
|
content: '',
|
||||||
|
twoWay: {
|
||||||
|
enabled: false,
|
||||||
|
from: '',
|
||||||
|
to: '',
|
||||||
|
trackNo: ''
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
} as IOrderN,
|
} as IOrderN,
|
||||||
|
|||||||
@@ -66,6 +66,16 @@ export interface IOrderN {
|
|||||||
stationType: string;
|
stationType: string;
|
||||||
stationName: string;
|
stationName: string;
|
||||||
on: string;
|
on: string;
|
||||||
|
},
|
||||||
|
{
|
||||||
|
enabled: boolean;
|
||||||
|
content: string;
|
||||||
|
twoWay: {
|
||||||
|
enabled: boolean;
|
||||||
|
from: string;
|
||||||
|
to: string;
|
||||||
|
trackNo: string;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user