Skip to content

Commit 9bf8b36

Browse files
committed
Increase dimensions of exported table
1 parent 5af2fd3 commit 9bf8b36

File tree

4 files changed

+42
-29
lines changed

4 files changed

+42
-29
lines changed

dist/index.html

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,21 @@
9494
</div>
9595
<div class = 'component'>
9696
<div class = 'col export-text'>
97-
<div v-if='(index+1) % 8 == 2 || (index+1) % 8 == 1'>No.</div>
98-
{{label.title}}
99-
<br/>
100-
<span class='.editable' v-on:click='toggle_defect(label)'>
97+
<div v-if='(index+1) % 8 == 2 || (index+1) % 8 == 1'>
98+
No.
99+
<hr/>
100+
</div>
101+
<div class='label-title'> {{label.title}} </div>
102+
<div class='editable defect-icon' v-on:click='toggle_defect(label)'>
101103
<img v-bind:src='defect_src(label)' width='32px'>
102-
</span>
104+
</div>
103105
</div>
104106

105107
<div class = 'col export-img'>
106-
<div v-if='(index+1) % 8 == 2 || (index+1) % 8 == 1'>Photo description</div>
108+
<div v-if='(index+1) % 8 == 2 || (index+1) % 8 == 1'>
109+
Photo description
110+
<hr/>
111+
</div>
107112
<img width='400px' height='300px'
108113
v-bind:src='label.image_src'
109114
/>

dist/renderer.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7258,7 +7258,6 @@ let vue = new __WEBPACK_IMPORTED_MODULE_7_vue__["a" /* default */]({
72587258
methods: {
72597259
sort_data: function(sort_by) {
72607260
this.labels = this.labels.sort( (a,b) => {
7261-
console.log('hi');
72627261
if (typeof a[sort_by] === 'number') {
72637262
return (a[sort_by] - b[sort_by]);
72647263
}
@@ -7522,10 +7521,11 @@ function upload_plan(file_list) {
75227521
"<input name='floor' type='number' placeholder='Floor'/>",
75237522
].join(''),
75247523
callback: (data) => {
7524+
console.log(data);
75257525
globals.CVS.image = img
7526-
if (data === undefined) {
7527-
globals.BUILDING = A;
7528-
globals.FLOOR = 1;
7526+
if (data === undefined || data === false) {
7527+
globals.BUILDING = 'A';
7528+
globals.FLOOR = '1';
75297529
}
75307530
else {
75317531
globals.BUILDING = data.letter;
@@ -17331,7 +17331,7 @@ exports = module.exports = __webpack_require__(11)(undefined);
1733117331

1733217332

1733317333
// module
17334-
exports.push([module.i, ".page-2 {\n text-align: center;\n}\n\n.A4-wrapper {\n margin: 0 auto;\n border: 1px solid black;\n text-align: center;\n width: 21cm;\n}\n\n.export-table {\n margin: 0 auto;\n width: 16cm;\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n}\n\n.export-table .export-title header{\n display: block;\n width: 16cm;\n text-align: left;\n font-size: 1.5rem;\n font-weight: 700;\n padding: 10px;\n}\n\n.export-table .component {\n max-width: 7.9cm;\n max-height: 6cm;\n display: flex;\n flex-wrap: wrap;\n border: 1px solid black;\n border-collapse: collapse;\n box-sizing: border-box;\n justify-content: space-around;\n}\n\n.component:nth-of-type(10n+2), .component:nth-of-type(10n+3) {\n max-height: 6.5cm;\n}\n \n\n.export-table.component .title-bar {\n width: 100%; \n}\n\n.export-table .component .col {\n min-width: 1.5cm;\n}\n\n\n.export-table .component .export-text {\n max-width: 1.5cm;\n text-align: center;\n}\n\n.component:nth-of-type(10n+2) .export-text, .component:nth-of-type(10n+3) .export-text {\n}\n\n\n.export-table .component .export-img {\n justify-content: space-between;\n max-width: 6.5cm;\n}\n\n.export-table .component .export-textarea {\n width: 100%;\n text-align: center;\n}\n\n.export-table .component textarea {\n width: 7.5cm;\n max-height: 1.5cm;\n resize: none;\n border: none;\n font-size: 12px;\n}\n\n.export-table .component textarea:hover {\n background-color: rgba(240, 240, 240, 1);\n border: 1px solid black;\n}\n\n.export-table .component .col img {\n max-width: 6.0cm;\n max-height: 4.5cm;\n}\n\n.page-break {\n height: 50px;\n width: 100%;\n break-after: always;\n}\n", ""]);
17334+
exports.push([module.i, ".page-2 {\n text-align: center;\n}\n\n.A4-wrapper {\n margin: 0 auto;\n border: 1px solid black;\n text-align: center;\n width: 21cm;\n}\n\n.export-table {\n margin: 0 auto;\n width: 20cm;\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n}\n\n.export-table .export-title header{\n display: block;\n width: 16cm;\n text-align: left;\n font-size: 1.5rem;\n font-weight: 700;\n padding: 10px;\n}\n\n.export-table .component {\n max-width: 10cm;\n max-height: 7cm;\n display: flex;\n flex-wrap: wrap;\n border: 1px solid black;\n border-collapse: collapse;\n box-sizing: border-box;\n justify-content: space-between;\n}\n\n.component:nth-of-type(10n+2), .component:nth-of-type(10n+3) {\n max-height: 7.5cm;\n}\n \n\n.export-table.component .title-bar {\n width: 100%; \n}\n\n.export-table .component .col {\n min-width: 1.5cm;\n}\n\n\n.export-table .component .export-text {\n max-width: 1.5cm;\n text-align: center;\n border-right: 1px solid black;\n border-bottom: 1px solid black;\n position: relative;\n}\n\n.export-table .component .export-text .label-title {\n position: relative;\n top: 20%;\n}\n\n.export-table .component .export-text .defect-icon {\n position: relative;\n top: 60%;\n}\n\n.export-table .component .export-img {\n justify-content: space-between;\n max-width: 8.3cm;\n width: 8.3cm;\n}\n\n.export-table .component .export-textarea {\n width: 100%;\n text-align: center;\n}\n\n.export-table .component textarea {\n width: 90%;\n max-height: 1.5cm;\n resize: none;\n border: none;\n font-size: 12px;\n font-family: sans-serif;\n}\n\n.export-table .component textarea:hover {\n background-color: rgba(240, 240, 240, 1);\n border: 1px solid black;\n}\n\n.export-table .component .col img {\n max-width: 7.5cm;\n max-height: 5.6cm;\n}\n\n.page-break {\n height: 50px;\n width: 100%;\n break-after: always;\n}\n", ""]);
1733517335

1733617336
// exports
1733717337

src/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,10 +339,11 @@ function upload_plan(file_list) {
339339
"<input name='floor' type='number' placeholder='Floor'/>",
340340
].join(''),
341341
callback: (data) => {
342+
console.log(data);
342343
globals.CVS.image = img
343-
if (data === undefined) {
344-
globals.BUILDING = A;
345-
globals.FLOOR = 1;
344+
if (data === undefined || data === false) {
345+
globals.BUILDING = 'A';
346+
globals.FLOOR = '1';
346347
}
347348
else {
348349
globals.BUILDING = data.letter;

src/styles/export-table.css

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,34 +11,34 @@
1111

1212
.export-table {
1313
margin: 0 auto;
14-
width: 16cm;
14+
width: 20cm;
1515
display: flex;
1616
flex-wrap: wrap;
1717
justify-content: center;
1818
}
1919

2020
.export-table .export-title header{
2121
display: block;
22-
width: 16cm;
22+
width: 20cm;
2323
text-align: left;
2424
font-size: 1.5rem;
2525
font-weight: 700;
2626
padding: 10px;
2727
}
2828

2929
.export-table .component {
30-
max-width: 7.9cm;
31-
max-height: 6cm;
30+
max-width: 10cm;
31+
max-height: 7cm;
3232
display: flex;
3333
flex-wrap: wrap;
3434
border: 1px solid black;
3535
border-collapse: collapse;
3636
box-sizing: border-box;
37-
justify-content: space-around;
37+
justify-content: space-between;
3838
}
3939

4040
.component:nth-of-type(10n+2), .component:nth-of-type(10n+3) {
41-
max-height: 6.5cm;
41+
max-height: 7.5cm;
4242
}
4343

4444

@@ -47,26 +47,32 @@
4747
}
4848

4949
.export-table .component .col {
50-
display: flex;
51-
flex-direction: column;
5250
min-width: 1.5cm;
5351
}
5452

5553

5654
.export-table .component .export-text {
5755
max-width: 1.5cm;
5856
text-align: center;
59-
justify-content: space-around;
57+
border-right: 1px solid black;
58+
border-bottom: 1px solid black;
59+
position: relative;
6060
}
6161

62-
.component:nth-of-type(10n+2) .export-text, .component:nth-of-type(10n+3) .export-text {
63-
justify-content: space-between;
62+
.export-table .component .export-text .label-title {
63+
position: relative;
64+
top: 20%;
6465
}
6566

67+
.export-table .component .export-text .defect-icon {
68+
position: relative;
69+
top: 60%;
70+
}
6671

6772
.export-table .component .export-img {
6873
justify-content: space-between;
69-
max-width: 6.5cm;
74+
max-width: 8.3cm;
75+
width: 8.3cm;
7076
}
7177

7278
.export-table .component .export-textarea {
@@ -75,11 +81,12 @@
7581
}
7682

7783
.export-table .component textarea {
78-
width: 7.5cm;
84+
width: 90%;
7985
max-height: 1.5cm;
8086
resize: none;
8187
border: none;
8288
font-size: 12px;
89+
font-family: sans-serif;
8390
}
8491

8592
.export-table .component textarea:hover {
@@ -88,8 +95,8 @@
8895
}
8996

9097
.export-table .component .col img {
91-
max-width: 6.0cm;
92-
max-height: 4.5cm;
98+
max-width: 7.5cm;
99+
max-height: 5.6cm;
93100
}
94101

95102
.page-break {

0 commit comments

Comments
 (0)