分割重命名时默认值填入
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
parent
9da9515930
commit
8db641db16
|
|
@ -26,7 +26,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div :class="['tool-item', activeTool === 'CircularEraser' && segmentList.length > 0 ? 'tool-item-active' : '']"
|
<div :class="['tool-item', activeTool === 'CircularEraser' && segmentList.length > 0 ? 'tool-item-active' : '']"
|
||||||
:style="{ cursor: segmentList.length <= 0 || (curSegment && curSegment.lock) ? 'not-allowed' : 'pointer' }"
|
:style="{ cursor: segmentList.length <= 0 || (curSegment && curSegment.lock) ? 'not-allowed' : 'pointer' }"
|
||||||
:title="$t('trials:Segmentations:tools:Eraser')" @click.prevent="setToolActive('CircularEraser')">
|
:title="$t('trials:Segmentations:tools:Eraser')"
|
||||||
|
@click.prevent="setToolActive('CircularEraser')">
|
||||||
<svg-icon icon-class="clear" class="svg-icon" />
|
<svg-icon icon-class="clear" class="svg-icon" />
|
||||||
</div>
|
</div>
|
||||||
<!-- <div :class="['tool-item']">
|
<!-- <div :class="['tool-item']">
|
||||||
|
|
@ -870,7 +871,14 @@ export default {
|
||||||
if (passive) this.$emit('setToolsPassive')
|
if (passive) this.$emit('setToolsPassive')
|
||||||
},
|
},
|
||||||
async rename(key, item) {
|
async rename(key, item) {
|
||||||
let name = await this.customPrompt()
|
let value = null
|
||||||
|
if (key === 'segmentGroup') {
|
||||||
|
let group = this.segmentList.find(i => i.segmentationId === this.segmentationId)
|
||||||
|
value = group.name
|
||||||
|
} else {
|
||||||
|
value = item.SegmentLabel
|
||||||
|
}
|
||||||
|
let name = await this.customPrompt(value)
|
||||||
if (!name) return false
|
if (!name) return false
|
||||||
if (key === 'segmentGroup') {
|
if (key === 'segmentGroup') {
|
||||||
let group = this.segmentList.find(i => i.segmentationId === this.segmentationId)
|
let group = this.segmentList.find(i => i.segmentationId === this.segmentationId)
|
||||||
|
|
@ -881,7 +889,7 @@ export default {
|
||||||
this.addOrUpdateSegment({ name: item.SegmentLabel, color: item.color, segmentIndex: item.segmentIndex, segmentationId: item.segmentationId, segmentJson: JSON.stringify({ stats: item.stats, bidirectional: item.bidirectional }), id: item.id })
|
this.addOrUpdateSegment({ name: item.SegmentLabel, color: item.color, segmentIndex: item.segmentIndex, segmentationId: item.segmentationId, segmentJson: JSON.stringify({ stats: item.stats, bidirectional: item.bidirectional }), id: item.id })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async customPrompt() {
|
async customPrompt(name) {
|
||||||
try {
|
try {
|
||||||
const that = this
|
const that = this
|
||||||
// 请输入标记名称
|
// 请输入标记名称
|
||||||
|
|
@ -893,6 +901,7 @@ export default {
|
||||||
showCancelButton: true,
|
showCancelButton: true,
|
||||||
closeOnClickModal: false,
|
closeOnClickModal: false,
|
||||||
closeOnPressEscape: false,
|
closeOnPressEscape: false,
|
||||||
|
inputValue: name,
|
||||||
beforeClose: (action, instance, done) => {
|
beforeClose: (action, instance, done) => {
|
||||||
if (action === 'confirm') {
|
if (action === 'confirm') {
|
||||||
// const value = instance.inputValue
|
// const value = instance.inputValue
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue