|
@@ -109,16 +109,12 @@ function appendTag(id: PatientTagVO['id']) {
|
|
|
function remove(tag: PatientTagVO, index: number) {
|
|
function remove(tag: PatientTagVO, index: number) {
|
|
|
form.value.tags.splice(index, 1);
|
|
form.value.tags.splice(index, 1);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-const getTagColor = (tag: PatientTagVO) => {
|
|
|
|
|
- return { 1: 'pink', 2: 'blue' }[tag.category];
|
|
|
|
|
-};
|
|
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
<template>
|
|
|
<a-spin :spinning="loading">
|
|
<a-spin :spinning="loading">
|
|
|
<div class="flex flex-wrap mt--2">
|
|
<div class="flex flex-wrap mt--2">
|
|
|
- <a-tag class="mt-2" v-for="(item, index) in form.tags" :key="item.id" :color="getTagColor(item)" :closable="!submitting" @close="remove(item, index)">
|
|
|
|
|
|
|
+ <a-tag class="mt-2" v-for="(item, index) in form.tags" :key="item.id" :color="item.color" :closable="!submitting" @close="remove(item, index)">
|
|
|
{{ item.name }}
|
|
{{ item.name }}
|
|
|
</a-tag>
|
|
</a-tag>
|
|
|
</div>
|
|
</div>
|