Commit 6897f92d authored by 郭铭瑶's avatar 郭铭瑶 🤘

标签去掉节点名称

parent 6ddd03b6
...@@ -24,11 +24,13 @@ ...@@ -24,11 +24,13 @@
/> />
</div> </div>
<n-drawer v-model:show="showDrawer" :width="340" placement="left"> <n-drawer v-model:show="showDrawer" :width="340" placement="left">
<n-drawer-content <n-drawer-content closable body-style="flex:1;overflow-y:auto;">
title="新增附属节点" <template #header>
closable 新增附属节点
body-style="flex:1;overflow-y:auto;" <p style="font-size: 0.8rem; margin: 0.5rem 0 0">
> 要素:{{ curSubject.subjectName }}
</p>
</template>
<template v-for="(data, i) in formData" :key="i"> <template v-for="(data, i) in formData" :key="i">
<n-form <n-form
ref="formRef" ref="formRef"
...@@ -37,7 +39,11 @@ ...@@ -37,7 +39,11 @@
:rules="rules" :rules="rules"
size="small" size="small"
> >
<n-form-item label="节点名称" path="propertyName"> <n-form-item
v-if="getTagName(data.relationId) !== '标签'"
label="节点名称"
path="propertyName"
>
<n-input <n-input
v-model:value="data.propertyName" v-model:value="data.propertyName"
placeholder="请输入" placeholder="请输入"
...@@ -52,13 +58,6 @@ ...@@ -52,13 +58,6 @@
/> />
</n-form-item> </n-form-item>
<template v-if="getTagName(data.relationId) === '标签'"> <template v-if="getTagName(data.relationId) === '标签'">
<n-form-item label="标签分类" path="classification">
<n-select
v-model:value="data.classification"
placeholder="请选择"
:options="tagClassOptions"
/>
</n-form-item>
<n-form-item label="标签名称" path="tag"> <n-form-item label="标签名称" path="tag">
<n-select <n-select
v-model:value="data.tag" v-model:value="data.tag"
...@@ -68,6 +67,13 @@ ...@@ -68,6 +67,13 @@
:options="tagOptions" :options="tagOptions"
/> />
</n-form-item> </n-form-item>
<n-form-item label="标签分类" path="classification">
<n-select
v-model:value="data.classification"
placeholder="请选择"
:options="tagClassOptions"
/>
</n-form-item>
<n-form-item path="isPositive" :show-label="false"> <n-form-item path="isPositive" :show-label="false">
<n-checkbox v-model:checked="data.isPositive" <n-checkbox v-model:checked="data.isPositive"
>是否为积极的标签</n-checkbox >是否为积极的标签</n-checkbox
...@@ -308,6 +314,7 @@ function fetchTags() { ...@@ -308,6 +314,7 @@ function fetchTags() {
.then((res) => { .then((res) => {
const data = (res.data && res.data.content) || [] const data = (res.data && res.data.content) || []
tagOptions.value = data.map((e) => ({ tagOptions.value = data.map((e) => ({
// TODO
label: e.labelName, label: e.labelName,
value: e.id, value: e.id,
})) }))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment