This repository has been archived by the owner on Dec 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
507 lines (469 loc) · 21.6 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
<!DOCTYPE html>
<html lang="zh">
<head>
<title>戴森球计划量产量化计算器工具</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="戴森球计划,量产量化工具,量产量化计算器,自动化工具,生产工具" />
<meta name="description" content="《戴森球计划》自动化量产计算器,可以全自动计算量产某个产品的具体产能需求。" />
<script src="./Scripts/jquery.min.2.1.4.js"></script>
<script src="./Scripts/jquery.cookie.min.1.4.1.js"></script>
<!-- <script src="https://cdn.jsdelivr.net/npm/vue@2.7.14/dist/vue.js"></script> -->
<script src="./Scripts/vue.min.2.7.14.js"></script>
<script src="./Scripts/jquery.tips.js"></script>
<script src="./Scripts/lib/cocoMessage.js"></script>
<script src="./Scripts/data.js"></script>
<script src="./Scripts/lib/pako.js"></script>
<script src="./Scripts/blueprint.js"></script>
<script src="./bs5/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="./Scripts/style.css">
<link rel="stylesheet" type="text/css" href="./bs5/css/bootstrap.min.css">
<!-- <script src="https://svlik.gitee.io/dysonsphereprogramtool/Scripts/jquery.min.2.1.4.js"></script>
<script src="https://svlik.gitee.io/dysonsphereprogramtool/Scripts/jquery.min.2.1.4.js"></script>
<script src="https://svlik.gitee.io/dysonsphereprogramtool/Scripts/jquery.cookie.min.1.4.1.js"></script>
<script src="https://svlik.gitee.io/dysonsphereprogramtool/Scripts/vue.min.2.5.16.js"></script>
<script src="https://svlik.gitee.io/dysonsphereprogramtool/Scripts/jquery.tips.js"></script>
<script src="https://svlik.gitee.io/dysonsphereprogramtool/Scripts/lib/cocoMessage.js"></script>
<script src="https://svlik.gitee.io/dysonsphereprogramtool/Scripts/data.js"></script>
<script src="https://svlik.gitee.io/dysonsphereprogramtool/Scripts/lib/pako.js"></script>
<script src="https://svlik.gitee.io/dysonsphereprogramtool/Scripts/blueprint.js"></script>
<link rel="stylesheet" type="text/css" href="https://svlik.gitee.io/dysonsphereprogramtool/Scripts/style.css"> -->
</head>
<body>
<div data-include="header"></div>
<div data-include="topButton"></div>
<div class="container">
<div class="row mt-3">
<div class="col-4 mb-4">
<div class="card h-100">
<div class="card-header">需求</div>
<div class="card-body">
<a href="javascript:f_add()" style="margin-left:10px;margin-right:10px;"><img
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAZVJREFUWEftl89VwkAQh3+DBRjTgHpYrtKBdCB0gEfDRSsQK5AL8YgdiB1gB3gll1CAMRTgjm9XCZslIf7Je8khe0y+N5m3mfl2h1Dxooq/jyQB5yHothhPAJx0UhxKRj8ethfquTNZdlqkODqxko8loR9fibnmdDyeFnFJAq4fxAAOs3aEgJc3T3TVO9cPQgDHOTsXR544KuY4jLz2qeLMBHjf74g8oVnXD0rlmgRqtQO5xcWM5/eh6H3XgOqGs5x6WUWe0N1RUKwJt23DybJzQDRm4NwMrj7O4JHZhgQaEeHC5FSnfDBfm1xWPJurj4iqMmLqF+QYbiGZL9MmpCmATrExizmzC8oowsaE+K2yayWiUg+Znx5aZRfhOvKEvk/8yYQtokdbs1mGy+IAvErmgdWuO/FsrjFhyoREdE+AvnptFgMzZr5LHUZEtwTo09FYO8bMiTdn5ptNvJKLcHvXc/1gz7Hd3AmRGLMxYdmDyT9M+DWaKXPZU89KMvcsw80yuLUk9JLRTI9wlMWtJGGw4RoTfgKyI5kwSL6MMgAAAABJRU5ErkJggg==" /></a>
<br>
<br>
<select id="seldata"></select>
<button type="button" id="btnAdd3" class="btn btn-secondary btn-sm">增加需求</button>
</div>
</div>
</div>
<div class="col-4 mb-4">
<div class="card h-100">
<div class="card-header">数量和速度</div>
<div class="card-body">
<div class="mb-3">
每分钟数量:<input type="text" id="txtnumber" value="60" class="btn btn-light" />
</div>
或者: <select id="selmaince">
<option value="">选择设备数量</option>
</select>
<hr>
<div class="mb-3">
<label for="selore">采矿作业速度:</label>
<input type="text" id="selore" value="100" class="btn btn-light" style="width:70px" />%
</div>
</div>
</div>
</div>
<div class="col-4 mb-4">
<div class="card h-100">
<div class="card-header">配置</div>
<div class="card-body">
<div class="form-check">
<input type="checkbox" id="hideSource" class="form-check-input" />
<label class="form-check-label" hideSource">隐藏原料</label>
</div>
<div class="form-check">
<input type="checkbox" id="selfAcc" class="form-check-input" checked />
<label class="form-check-label" for="selfAcc">自喷涂增产剂</label>
</div>
<div class="form-check">
<input type="checkbox" id="showMaxOneBelt" class="form-check-input" />
<label class="form-check-label" for="showMaxOneBelt">1条传送带最高支持设备数量</label>
</div>
<br>
<!--<input type="checkbox" id="isMerge" checked />合并同配方多产物-->
<select id="selmodein">
<option value="制作台Mk.Ⅰ">制作台Mk.Ⅰ</option>
<option value="制作台Mk.Ⅱ">
制作台Mk.Ⅱ
</option>
<option value="制作台Mk.Ⅲ">制作台Mk.Ⅲ</option>
</select>
<select id="furnace">
<option value="电弧熔炉">电弧熔炉</option>
<option value="位面熔炉">位面熔炉</option>
</select>
<select id="chemical">
<option value="化工厂">化工厂</option>
<option value="量子化工厂">量子化工厂</option>
</select>
<select id="accType">
<option value="增产剂Mk.Ⅰ">增产剂Mk.Ⅰ</option>
<option value="增产剂Mk.Ⅱ">
增产剂Mk.Ⅱ
</option>
<option value="增产剂Mk.Ⅲ">增产剂Mk.Ⅲ</option>
</select>
<select id="accValue">
<option value="无">无增产</option>
<option value="加速">加速</option>
<option value="增产">增产</option>
</select>
</div>
</div>
</div>
<div id="UIselector" style="display:none; width: auto; height: auto;">
</div>
</div>
<div class="row mt-3">
<div style="margin-top:5px;text-align: center;">
<div class="col-12 mb-4">
<div id="settings" class="card h-100">
<div class="card-header">选项</div>
<div class="card-body">
<button id="btnReset2" class="btn btn-secondary btn-sm">
重置设备
</button>
<!--<button id="btnReset3">
重置速度
</button>-->
<button id="btnReset4" class="btn btn-secondary btn-sm">
重置配方
</button>
<button id="btnSetting" class="btn btn-secondary btn-sm">
参数设置
</button>
<span id="projectdiv" style="display:none;">
<hr>
<button id="btnLoadProject" class="btn btn-secondary btn-sm">
加载方案
</button>
<select id="selprojects"></select>
<button id="btnReset5" class="btn btn-secondary btn-sm">
重置方案
</button>
</span>
</div>
<div id="Split" style="display:none;">
</div>
<div id="MoreSetting" style="display:none;">
<p><span class="label">分馏塔每分钟产量: </span><input id="fractionatorSpeed" class="textbox"
type="number" value="18" />
</p>
<p><span class="label">运输站集装物流:</span> <input id="speed1_5" class="textbox" type="number"
value="1" />
</p>
<p><span class="label">大型采矿机:</span> <input id="speed1_6" class="textbox" type="number"
value="100" />
</p>
<p><span class="label">原油速度:</span> <input id="oilSpeed" class="textbox" type="number"
value="4" />
</p>
<p><span class="label">轨道采集-重氢:</span> <input data-name="重氢" id="speed1_2"
class="speed1 textbox" type="number" value="0.02" /> </p>
<p><span class="label">轨道采集-可燃冰:</span> <input data-name="可燃冰" id="speed1_3"
class="speed1 textbox" type="number" value="0.5" /> </p>
<p><span class="label">轨道采集-氢(巨冰):</span> <input data-name="氢" id="speed1_4"
class="speed1 textbox" type="number" value="0.5" /> </p>
<p><span class="label">轨道采集-氢(气态):</span> <input data-name="氢" id="speed1_1"
class="speed1 textbox" type="number" value="1" /> </p>
<p><span class="label">临界光子每分钟产量: </span><input id="gzSpeed" class="textbox" type="number"
value="5" />
</p>
<p><span class="label">小数点后保留: </span><input id="pointLength" class="textbox" type="number"
value="1" />
位</p>
<p>蓝图配置:</p>
<div style="margin-left: 1%">
<!-- <span class="label">紧凑布局</span><input type="checkbox" id="compactLayout"><br/>-->
<!-- <input type="checkbox" id="upgradeConveyorBelt"><label for="upgradeConveyorBelt">临界运力传送带自升级</label>-->
<div>
<input type="checkbox" id="onlyConveyorBeltMk3" class="form-check-input">
<label class="form-check-label" for="onlyConveyorBeltMk3">只使用三级传送带</label>
<br />
<!-- <label for="onlySorterMk3">只使用三级分拣器</label><input type="checkbox" id="onlySorterMk3"><br/>-->
</div>
<div>
<input type="checkbox" id="onlySorterMk3" class="form-check-input">
<label class="form-check-label" for="onlySorterMk3">只使用三级分拣器</label>
<br />
<!-- <span class="label">三级传送带运力降级</span><input type="checkbox" id="onlyConveyorBeltMk3Downgrade">(三级传送带运力锁定在1680/min,可在一定程度上解决蓝图产量低于预期的问题)<br/>-->
</div>
<div>
<input type="checkbox" id="generateTeslaTower" class="form-check-input"
checked="checked">
<label class="form-check-label" for="generateTeslaTower">自动插入电力感应塔</label>
<br />
</div>
<!-- <label for="conveyorBeltStackLayer">传送带物品堆叠层数</label><input type="number" id="conveyorBeltStackLayer" min="1" max="4" value="4" class="textbox"><br/>-->
<span class="label">电力感应塔间隔排数</span><input type="number" id="teslaTowerLineInterval"
min="1" max="2" value="1" class="textbox">(建议取值1或2)<br />
<span class="label">传送带物品堆叠层数</span><input type="number" id="conveyorBeltStackLayer"
min="1" max="4" value="4" class="textbox"><br />
<span class="label">研究站层数</span><input type="number" id="maxLabLayers" min="1" max="15"
value="15" class="textbox"><br />
<!-- <span class="label">电线杆间隔</span><input type="number" id="teslaTowerInterval" min="1" max="15" value="15" class="textbox"><br/>-->
<!-- <label for="x_y_ratio">蓝图长宽比</label><input type="number" id="x_y_ratio" min="1" step="0.1" value="2" class="textbox"><br/>-->
<span class="label">蓝图长宽比</span><input type="number" id="x_y_ratio" min="1" step="0.1"
value="2" class="textbox"><br />
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row mt-3">
<div class="col-12 mb-4">
<div id="result" class="card h-100">
<div class="card-header" style="text-align: center;">结果输出</div>
<div class="card-body">
<div class="list">
<span v-for="(x,index) in xqs">
<img v-bind:src="'data:image/png;base64,' + icons[x.item.name]"
style="width:40px;height:40px;" v-if="icons[x.item.name]" v-bind:title="x.item.name"
@contextmenu="removeItem(index);event.preventDefault();" />
<span class="name" v-else=v-else>{{x.item.name}}</span>
*
<span class="item_number" @click="onClickNumber(index)">
<span>{{x.number}}</span>
<div v-if="number_editor_index === index" class="number_editor_container">
<input ref="input" class="number_editor" type="number"
v-model.number="number_editor_number" @blur="submitEditorNumber()"
@focus="event.target.select()"
@keydown="if (event.key === 'Enter') submitEditorNumber(); else if (event.key === 'Escape') cancelEditorNumber();" />
</div>
</span>
</span>
<span v-if="xqs && xqs.length">
<button onclick="f_reset()" class="btn btn-secondary btn-sm">
重置
</button>
<button onclick="f_save()" class="btn btn-secondary btn-sm">保存方案</button>
<!-- <button-->
<!-- onclick="let configSpan = document.getElementById('blueprintConfig'); if(configSpan.style.display === 'none'){configSpan.style.display='block'}else {configSpan.style.display='none'}"-->
<!-- >蓝图配置</button>-->
<button onclick="generateBlueprint()" class="btn btn-secondary btn-sm">生成蓝图</button>
  <a href="https://b23.tv/p3x3r7F" target="_blank">蓝图演示视频</a></span>
<!-- <br/>-->
<!-- <span id="blueprintConfig" style="display: none">蓝图配置:-->
<!-- <div style="margin-left: 2%">-->
<!-- <input type="checkbox" id="compactLayout"><label for="compactLayout">紧凑布局(高纬度可能出现碰撞)</label>-->
<!--<!– <input type="checkbox" id="upgradeConveyorBelt"><label for="upgradeConveyorBelt">临界运力传送带自升级</label>–>-->
<!-- <input type="checkbox" id="onlyConveyorBeltMk3"><label for="onlyConveyorBeltMk3">只使用三级传送带</label>-->
<!-- <input type="checkbox" id="onlySorterMk3"><label for="onlySorterMk3">只使用三级分拣器</label>-->
<!-- <br/>-->
<!-- <label for="conveyorBeltStackLayer">传送带物品堆叠层数</label><input type="number" id="conveyorBeltStackLayer" min="1" max="4" value="4">-->
<!-- <label for="x_y_ratio">蓝图长宽比</label><input type="number" id="x_y_ratio" min="1" step="0.1" value="2">-->
<!-- </div>-->
<!-- </span>-->
<br /><small>(右键可取消单项需求;单击数字可编辑数量)</small>
</span>
</div>
<div class="list" v-if="ig_names && ig_names.length">
排除计算:
<span v-for="name in ig_names">
<img v-bind:src="'data:image/png;base64,' + icons[name]" style="width:40px;height:40px;"
v-if="icons[name]" v-bind:title="name"
v-bind:oncontextmenu="'f_remove_ig(\'' + name + '\'); return false'" />
<span class="name" v-else=v-else>{{name}}</span>
</span>
<button onclick="f_reset_ig()" class="btn btn-secondary btn-sm">重置</button>
<br /><small>(右键可取消单项排除)</small>
</div>
<div class="list">
<table border="0" cellspacing="0" cellpadding="0"
class="table table-bordered border-dark-subtle">
<tbody>
<tr class="header table-active">
<td style="width:100px;">操作</td>
<td style="width:100px;">
物品
<br /><span style="font-size:12px">(点击显示详情)</span>
</td>
<td style="width:100px;">
每分钟需求
<br /><span style="font-size:12px">(负数代表多余)</span>
</td>
<td style="width:100px;">设备数量</td>
<td>
配方
<br /><span style="font-size:12px">(可选)</span>
</td>
<td>
增产剂等级
<br /><span style="font-size:12px">(可选)</span>
</td>
<td>
增产剂效果
<br /><span style="font-size:12px">(可选)</span>
</td>
<td>
制作于
<br /><span style="font-size:12px">(可选)</span>
</td>
<!--<td>设备制作速度<br /><span style="font-size:12px">(可自定义)</span></td>-->
<!--<td style="width:150px;">最终速度(秒)</td>-->
</tr>
<tr v-for="item in items0" v-bind:class="item.rowClass">
<td></td>
<td class="cell-name" v-bind:data-name="item.name">
<span class="name">
<img v-bind:src="'data:image/png;base64,' + icons[item.name]"
style="width:40px;height:40px;" v-if="icons[item.name]"
v-bind:title="item.name" />
<span class="name" v-else=v-else>{{item.name}}</span>
</span>
</td>
<td><span class="number1">{{item.number1}}</span></td>
<td><span class="number2">{{item.number2}}</span></td>
<td>
<a class="pf selected" v-html="item.pfTitle"></a>
</td>
<td>
<a class="m selected"> {{item.mName}}</a>
</td>
</tr>
<tr v-for="item in items" v-bind:class="item.rowClass">
<td class="opcell">
<a href="javascript:void(0)" v-bind:data-name="item.name"
onclick="f_ig(this)">排除</a>
<a href="javascript:void(0)" v-if=" item.pf && item.pf.length > 1"
v-bind:data-name="item.name" onclick="f_split(this)">多配方</a>
<a href="javascript:void(0)" v-bind:data-name="item.name"
onclick="f_tag(this)">标注</a>
</td>
<td class="cell-name" v-bind:data-name="item.name">
<img v-bind:src="'data:image/png;base64,' + icons[item.name]"
style="width:40px;height:40px;" v-if="icons[item.name]"
v-bind:title="item.name" />
<span class="name" v-else=v-else>{{item.name}}</span>
</td>
<td><span class="number1">{{item.number1}}</span></td>
<td>
<span class="number2" v-html="item.number2full"></span>
<span v-if="item.numberOther" v-html="item.numberOther"></span>
</td>
<td>
<div class="pfs">
<a v-for="pf in item.pf" v-bind:class="pf.class" v-bind:href='pf.href'
v-html="pf.title"></a>
</div>
</td>
<td>
<div class="ms">
<a v-bind:data-modein="a.name" v-bind:data-name="a.itemName"
v-for="a in item.accType" v-bind:title="a.title"
v-bind:class="a.class" v-bind:href='a.href'>
<img :src="'data:image/png;base64,' + icons[a.name]" />
{{a.showName}}
</a>
</div>
</td>
<td>
<div class="ms">
<a v-bind:data-modein="a.name" v-bind:data-name="a.itemName"
v-for="a in item.accValue" v-bind:title="a.title"
v-bind:class="a.class" v-bind:href='a.href'>
{{a.showName}}
</a>
</div>
<span class="number1">需求:{{item.accTotal}}</span>
</td>
</td>
<td>
<div class="ms">
<a v-bind:data-modein="m.name" v-bind:data-name="m.itemName"
v-for="m in item.m" v-bind:title="m.title" v-bind:class="m.class"
v-bind:href='m.href'>
<img :src="'data:image/png;base64,' + icons[m.name]"
v-if="icons[m.name]" />
{{m.showName}}
</a>
</div>
</td>
<!--<td>
<input type="text" v-bind:class="item.speedClass" v-on:change="speedChange(item)" v-model="item.speed" />
</td>
<td>
{{item.time}}
</td>-->
</tr>
<tr class="total">
<td colspan="3" align="right">合计: </td>
<td colspan="5">
<span v-for="item in total"> {{item.name}}*{{item.value}} </span>
<br />
<span>总喷涂增产剂数量:{{totalAcc}}</span> <a
href="javascript:f_ig_acc()">排除增产剂产线</a><br />
<span>占地格子数:{{totalSpace}}</span><br />
<span>
耗能估算:{{totalEnergy}}M
</span>
</td>
</tr>
<tr class="" v-if="items2 && items2.length">
<td colspan="8" align="left">多余产物
<br />(负数代表多余、正数代表缺少,如1000则需要额外补齐,-1000则需要额外消耗)
</td>
</tr>
<tr v-for="item in items2" v-bind:class="item.rowClass">
<td></td>
<td>
<span class="name">
<img v-bind:src="'data:image/png;base64,' + icons[item.name]"
style="width:40px;height:40px;" v-if="icons[item.name]"
v-bind:title="item.name" />
<span class="name" v-else=v-else>{{item.name}}</span>
</span>
</td>
<td><span class="number1">{{item.number1}}</span></td>
<td>
<span class="number2">{{item.number2}}</span>
</td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="">
<td colspan="1" align="center">更新说明 </td>
<td colspan="7" class="tMainBody">
<!-- 更新说明开始 -->
<div data-include="updata"></div>
<!-- 更新说明结束 -->
</td>
</tr>
<tr class="" id="useHelp">
<td colspan="1" align="center">使用说明 </td>
<td colspan="7" class="tMainBody">
<!-- 使用说明开始 -->
<div data-include="explanation"></div>
<!-- 使用说明结束 -->
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div style="text-align:center;">
<p>
<!-- 底部内容开始 -->
<div data-include="footer"></div>
<!-- 底部内容结束 -->
</p>
</div>
<div data-include="corner"></div>
<script>
$(function () {
var includes = $('[data-include]');
jQuery.each(includes, function () {
var file = 'quote/' + $(this).data('include') + '.html';
$(this).load(file);
});
});
</script>
</body>
</html>