Commit c526d3a6 authored by 郭铭瑶's avatar 郭铭瑶 🤘

修改标签名称改为输入

parent 469538c9
...@@ -200,7 +200,7 @@ ...@@ -200,7 +200,7 @@
</n-drawer-content> </n-drawer-content>
</n-drawer> </n-drawer>
<n-drawer v-model:show="showEditDrawer" :width="340" placement="left"> <n-drawer v-model:show="showEditDrawer" :width="340" placement="left">
<n-drawer-content title="编辑节点" closable> <n-drawer-content title="编辑" closable>
<n-form ref="editFormRef" :model="editData" :rules="rules" size="small"> <n-form ref="editFormRef" :model="editData" :rules="rules" size="small">
<template v-if="curNode.nodeLabel === 'Subject'"> <template v-if="curNode.nodeLabel === 'Subject'">
<n-form-item path="subjectName" label="名称"> <n-form-item path="subjectName" label="名称">
...@@ -232,12 +232,10 @@ ...@@ -232,12 +232,10 @@
</template> </template>
<template v-else-if="curNode.nodeLabel === 'SubjectLabel'"> <template v-else-if="curNode.nodeLabel === 'SubjectLabel'">
<n-form-item label="标签名称" path="labelName"> <n-form-item label="标签名称" path="labelName">
<n-select <n-input
v-model:value="editData.labelName" v-model:value="editData.labelName"
placeholder="请选择" placeholder="请输入"
filterable @keydown.enter.prevent
tag
:options="tagOptions"
/> />
</n-form-item> </n-form-item>
<n-form-item label="标签分类" path="classification"> <n-form-item label="标签分类" path="classification">
...@@ -502,10 +500,11 @@ const curNode = ref(null) ...@@ -502,10 +500,11 @@ const curNode = ref(null)
function deleteNode(data) { function deleteNode(data) {
dialog.error({ dialog.error({
title: '删除节点', title: '提示',
content: `确定是否删除 '${ content:
data[data.nodeLabel.toLowerCase() + 'Name'] data.nodeLabel === 'SubjectLabel'
}' 节点?`, ? `是否删除 '${data.labelName}' 标签`
: `是否删除 '${data[data.nodeLabel.toLowerCase() + 'Name']}' 节点?`,
positiveText: '确定', positiveText: '确定',
negativeText: '取消', negativeText: '取消',
maskClosable: false, maskClosable: false,
...@@ -524,6 +523,7 @@ function deleteNode(data) { ...@@ -524,6 +523,7 @@ function deleteNode(data) {
(link) => link.source.id != data.id && link.target.id != data.id (link) => link.source.id != data.id && link.target.id != data.id
), ),
} }
fetchTags()
} }
message.success('删除成功!') message.success('删除成功!')
}) })
...@@ -537,8 +537,8 @@ function deleteLink(data) { ...@@ -537,8 +537,8 @@ function deleteLink(data) {
target.systemName || source.subjectName target.systemName || source.subjectName
}'` }'`
dialog.error({ dialog.error({
title: '删除关联', title: '提示',
content: `确定是否删除 ${name} 关联关系?`, content: `是否删除 ${name} 关联关系?`,
positiveText: '确定', positiveText: '确定',
negativeText: '取消', negativeText: '取消',
maskClosable: false, maskClosable: false,
......
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