10000 change entity table · supercoderhawk/emr-processor@0c8d7af · GitHub
[go: up one dir, main page]

Skip to content

Commit 0c8d7af

Browse files
change entity table
1 parent be31b08 commit 0c8d7af

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

app/src/renderer/components/Entity/Item.vue

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@
22
<tr>
33
<td>{{ id }}</td>
44
<td>{{ value }}</td>
5-
<td><v-select :value.sync="val" :options="options" options-value="val" justified close-on-select></v-select></td>
5+
<td><v-select :value.sync="type" :options="options" options-value="val" justified close-on-select></v-select></td>
66
<td>{{ start }}</td>
77
<td>{{ end }}</td>
8+
<td>
9+
<a @click="remove"><span class="glyphicon glyphicon-remove"></span></a>
10+
</td>
811
</tr>
912
</template>
1013

@@ -20,7 +23,19 @@
2023
data () {
2124
return {
2225
options: ITEM.OPTIONS,
23-
val: 1
26+
val: 3
27+
}
28+
},
29+
methods: {
30+
remove () {
31+
this.$store.dispatch('entity/removeItem', {
32+
id: this.id,
33+
value: this.value,
34+
type: this.type,
35+
start: this.start,
36+
end: this.end
37+
})
38+
this.$parent.$parent.editor.formatText(this.start, this.end - this.start + 1, 'color', 'black')
2439
}
2540
},
2641
props: ['id', 'value', 'type', 'start', 'end']

app/src/renderer/components/Entity/List.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<th>实体类型</th>
88
<th>开始位置</th>
99
<th>结束位置</th>
10+
<th>删除</th>
1011
</tr>
1112
</thead>
1213
<tbody>
@@ -37,7 +38,7 @@
3738
</script>
3839

3940
<style>
40-
th, td{
41+
.table th, .table td{
4142
vertical-align: middle !important;
4243
text-align: center;
4344
}

0 commit comments

Comments
 (0)
0