-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
89 lines (69 loc) · 1.99 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf8" />
<script src="assets/liquidmetal.js" type="text/javascript"></script>
<script src="assets/vue.js"></script>
<!-- Element UI -->
<script src="assets/index.js"></script>
<link rel="stylesheet" href="assets/index.css">
</head>
<body>
<div id="app">
<el-table
stripe
:data="tableData"
style="width: 100%">
<el-table-column
prop="journal"
label="Journal"
>
</el-table-column>
<el-table-column
prop="ifs"
label="IF"
width="100"
>
</el-table-column>
<!-- <el-table-column
prop = 'score'
label = 'Score'>
</el-table-column> -->
</el-table>
</div>
</body>
<script>
// function comparef(x, y) {
// return y['score'] - x['score']
// }
var tb = new Vue({
el: '#app',
data: {
tableData: [{}]
}
})
// with open("./if2023.json", 'w') as handle:
// json.dump(tab.to_json(orient='records'), handle)
var if_data = window.readjson();
utools.onPluginEnter(({ code, type, payload }) => {
utools.setExpendHeight(0);
utools.setSubInput(({
text
}) => {
if(text == '') {
utools.setExpendHeight(0);
}
else {
utools.setExpendHeight(500);
for(item of if_data) {
item['score'] = LiquidMetal.score( item['journal'], text )
}
if_data.sort((a, b) => a['score'] - b['score'])
if_data.reverse()
tb.tableData = if_data.slice(0, 9)
}
}, "Input journal name" );
});
</script>
</body>
</html>