|
|
|
@ -3,6 +3,7 @@
|
|
|
|
|
<html> |
|
|
|
|
|
|
|
|
|
<head> |
|
|
|
|
<meta charset="UTF-8"> |
|
|
|
|
<title>Расстановка по столам</title> |
|
|
|
|
|
|
|
|
|
<!-- |
|
|
|
@ -18,7 +19,7 @@
|
|
|
|
|
|
|
|
|
|
<body onload="brython()"> |
|
|
|
|
|
|
|
|
|
<details> |
|
|
|
|
<details open> |
|
|
|
|
<summary>Начальные данные</summary> |
|
|
|
|
<div> |
|
|
|
|
<label>Входные данные:<br/></label> |
|
|
|
@ -40,20 +41,30 @@
|
|
|
|
|
<button id="load_data">Загрузить</button> |
|
|
|
|
</div> |
|
|
|
|
</details> |
|
|
|
|
<details open> |
|
|
|
|
<details> |
|
|
|
|
<summary>Расстановка</summary> |
|
|
|
|
<div> |
|
|
|
|
<p> |
|
|
|
|
<label>Количество столов:</label> |
|
|
|
|
<input id = "table_count" type="number" value="10" step="1" /> |
|
|
|
|
</p> |
|
|
|
|
<p> |
|
|
|
|
<label>Количество мест за столом:</label> |
|
|
|
|
<input id = "table_size_count" type="number" value="5" step="1" /> |
|
|
|
|
<p id="result_table" class="text-center"></p> |
|
|
|
|
</p> |
|
|
|
|
<textarea id="result_table_txt" cols="40" rows="5"></textarea> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<button id="table_distrib">Расставить по столам</button> |
|
|
|
|
</div> |
|
|
|
|
</details> |
|
|
|
|
<details> |
|
|
|
|
<summary>Таблица</summary> |
|
|
|
|
<div> |
|
|
|
|
<p id="result_table" class="text-center"></p> |
|
|
|
|
</div> |
|
|
|
|
</details> |
|
|
|
|
<details> |
|
|
|
|
<summary>Конечные данные</summary> |
|
|
|
|
<label>Входные данные:<br/></label> |
|
|
|
|
<textarea id="output_data" cols="40" rows="5"></textarea> |
|
|
|
@ -125,12 +136,12 @@ def show_meet_table_data():
|
|
|
|
|
html += "<tr>" |
|
|
|
|
html += "<td></td>" |
|
|
|
|
for p in persons: |
|
|
|
|
html += "<th>" + str(p.beig_id) + "</th>" |
|
|
|
|
html += "<th" + " title="+ p.name + ">" + str(p.beig_id) + "</th>" |
|
|
|
|
html += "</tr>" |
|
|
|
|
# Остальные строки |
|
|
|
|
for p in persons: |
|
|
|
|
html += "<tr>" |
|
|
|
|
html += "<th>" + str(p.beig_id) + "</th>" |
|
|
|
|
html += "<th" + " title="+ p.name + ">" + str(p.beig_id) + "</th>" |
|
|
|
|
for ip in persons: |
|
|
|
|
if p.beig_id in ip.meet_set: |
|
|
|
|
html += "<td bgcolor='red'></td>" |
|
|
|
@ -167,6 +178,12 @@ def print_result_table():
|
|
|
|
|
html += "</table>" |
|
|
|
|
document["result_table"].innerHTML = html |
|
|
|
|
|
|
|
|
|
result_txt = "" |
|
|
|
|
for t in tables: |
|
|
|
|
result_txt += str(t.id) + ";" + str(t.person_set) + "\n" |
|
|
|
|
|
|
|
|
|
document["result_table_txt"].value = result_txt |
|
|
|
|
|
|
|
|
|
def get_person_by_id(id): |
|
|
|
|
global persons |
|
|
|
|
for p in persons: |
|
|
|
|