fix(track): 修复新增分段按钮状态

- 在 addSegment 方法中添加了对 optStatus 的判断,只有当状态为 4
This commit is contained in:
陈昱达
2025-05-23 14:23:20 +08:00
parent d8a4ffaba1
commit 07abf4303e

View File

@@ -192,6 +192,9 @@ export default {
},
// 新增分段
addSegment() {
if (this.newForm.optStatus !== 4) {
return false
}
// this._getSplitResultPreview()
this.addSegmentDialog = true
@@ -292,12 +295,21 @@ export default {
type="primary"
@click="addSegment"
class="line-button"
:class="newForm.optStatus !== 4 ? 'is-disabled' : ''"
@command="command"
>
新增分段
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="newAdd">批量新增</el-dropdown-item>
<el-dropdown-item command="exportSeg">分段导出</el-dropdown-item>
<el-dropdown-menu slot="dropdown" :disabled="newForm.optStatus !== 4">
<el-dropdown-item
command="newAdd"
:disabled="newForm.optStatus !== 4"
>批量新增</el-dropdown-item
>
<el-dropdown-item
command="exportSeg"
:disabled="newForm.optStatus !== 4"
>分段导出</el-dropdown-item
>
</el-dropdown-menu>
</el-dropdown>
@@ -494,6 +506,11 @@ export default {
background: $--color-primary-button-gradient;
overflow: hidden;
border-radius: 8px;
&.is-disabled {
& .el-button {
cursor: no-drop;
}
}
& .el-button-group {
& .el-button {
background: unset;