Skip to content

Commit

Permalink
feat: 删除连线时增加二次确认弹窗 --story=120088112
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 24063
  • Loading branch information
luofann committed Nov 18, 2024
1 parent cb6ae54 commit 4f875af
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 42 deletions.
83 changes: 42 additions & 41 deletions frontend/pc/src/views/processManagement/apiConfigure/apiTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,47 +25,48 @@
<div class="bk-api-button mb20">
<p class="bk-api-title">{{ $t(`m.systemConfig["API列表"]`) }}</p>
<div class="bk-api-button">
<bk-dropdown-menu class="mr10 access-btn" @show="dropdownShow" @hide="dropdownHide" ref="apiDropdown" :disabled="disableImport">
<div
slot="dropdown-trigger"
class="dropdown-trigger-btn"
style="padding-left: 12px;">
<span style="font-size: 14px;">{{ $t(`m.systemConfig['API接入']`)}}</span>
<i :class="['bk-icon icon-angle-down',{ 'icon-flip': isDropdownShow }]"></i>
</div>
<ul class="bk-dropdown-list" slot="dropdown-content">
<li>
<a href="javascript:;"
v-cursor="{ active: !hasPermission(targetPerms, curPerms) }"
:class="{ 'text-permission-disable': !hasPermission(targetPerms, curPerms) }"
:title="$t(`m.systemConfig['接入API']`)"
data-test-id="api_a_apiTableAccessApi"
@click="openShade('JOIN')">
{{ $t(`m.systemConfig['接入API']`) }}
</a>
</li>
<li>
<a href="javascript:;"
data-test-id="api_a_apiTableCreateApi"
v-cursor="{ active: !hasPermission(targetPerms, curPerms) }"
:class="{ 'text-permission-disable': !hasPermission(targetPerms, curPerms) }"
:title="$t(`m.systemConfig['新增API']`)"
@click="openShade('ADD')">
{{$t(`m.systemConfig['新增API']`)}}
</a>
</li>
</ul>
</bk-dropdown-menu>
<bk-button
data-test-id="api_button_apiTableuploadApi"
:theme="'default'"
:disabled="disableImport"
v-cursor="{ active: !hasPermission(targetPerms, curPerms) }"
:class="['mr10 bk-btn-file', { 'btn-permission-disable': !hasPermission(targetPerms, curPerms) }]"
:title="$t(`m.systemConfig['点击上传']`)">
<input :disabled="disableImport" :type="!hasPermission(targetPerms, curPerms) ? 'button' : 'file'" :value="fileVal" class="bk-input-file" @change="handleFile" @click="hasImportPermission">
{{$t(`m.systemConfig['导入']`)}}
</bk-button>
<template v-if="!disableImport">
<bk-dropdown-menu class="mr10 access-btn" @show="dropdownShow" @hide="dropdownHide" ref="apiDropdown">
<div
slot="dropdown-trigger"
class="dropdown-trigger-btn"
style="padding-left: 12px;">
<span style="font-size: 14px;">{{ $t(`m.systemConfig['API接入']`)}}</span>
<i :class="['bk-icon icon-angle-down',{ 'icon-flip': isDropdownShow }]"></i>
</div>
<ul class="bk-dropdown-list" slot="dropdown-content">
<li>
<a href="javascript:;"
v-cursor="{ active: !hasPermission(targetPerms, curPerms) }"
:class="{ 'text-permission-disable': !hasPermission(targetPerms, curPerms) }"
:title="$t(`m.systemConfig['接入API']`)"
data-test-id="api_a_apiTableAccessApi"
@click="openShade('JOIN')">
{{ $t(`m.systemConfig['接入API']`) }}
</a>
</li>
<li>
<a href="javascript:;"
data-test-id="api_a_apiTableCreateApi"
v-cursor="{ active: !hasPermission(targetPerms, curPerms) }"
:class="{ 'text-permission-disable': !hasPermission(targetPerms, curPerms) }"
:title="$t(`m.systemConfig['新增API']`)"
@click="openShade('ADD')">
{{$t(`m.systemConfig['新增API']`)}}
</a>
</li>
</ul>
</bk-dropdown-menu>
<bk-button
data-test-id="api_button_apiTableuploadApi"
:theme="'default'"
v-cursor="{ active: !hasPermission(targetPerms, curPerms) }"
:class="['mr10 bk-btn-file', { 'btn-permission-disable': !hasPermission(targetPerms, curPerms) }]"
:title="$t(`m.systemConfig['点击上传']`)">
<input :type="!hasPermission(targetPerms, curPerms) ? 'button' : 'file'" :value="fileVal" class="bk-input-file" @change="handleFile" @click="hasImportPermission">
{{$t(`m.systemConfig['导入']`)}}
</bk-button>
</template>
<bk-button :theme="'default'"
v-cursor="{ active: !hasPermission(targetPerms, curPerms) }"
data-test-id="api_button_apiTableBatchDeleteApi"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,14 @@
this.$emit('closeLine');
},
deleteLine() {
this.$emit('deleteLine');
const _this = this;
this.$bkInfo({
type: 'warning',
title: this.$t('m[\'此操作不可撤销,确定要删除吗?\']'),
confirmFn() {
_this.$emit('deleteLine');
},
});
},
// 存为模板
submitTemplate() {
Expand Down

0 comments on commit 4f875af

Please sign in to comment.