fix: 配置-参数配置里面的删除按钮,建议点击后增加二次确认避免误触
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { reactive, ref, onMounted, watch, toRaw, nextTick } from 'vue';
|
import { reactive, ref, onMounted, watch, toRaw, nextTick } from 'vue';
|
||||||
import { PageContainer } from 'antdv-pro-layout';
|
import { PageContainer } from 'antdv-pro-layout';
|
||||||
import { message } from 'ant-design-vue/lib';
|
import { Modal, message } from 'ant-design-vue/lib';
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
|
import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
@@ -403,6 +403,14 @@ function arrayEditOk(from: Record<string, any>) {
|
|||||||
/**多列表删除单行 */
|
/**多列表删除单行 */
|
||||||
function arrayDelete(rowIndex: Record<string, any>) {
|
function arrayDelete(rowIndex: Record<string, any>) {
|
||||||
const index = rowIndex.value;
|
const index = rowIndex.value;
|
||||||
|
const title = `${treeState.selectNode.topDisplay} Index-${index}`;
|
||||||
|
|
||||||
|
Modal.confirm({
|
||||||
|
title: t('common.tipTitle'),
|
||||||
|
content: t('views.configManage.configParamForm.delItemTip', {
|
||||||
|
num: title,
|
||||||
|
}),
|
||||||
|
onOk() {
|
||||||
delParamConfigInfo({
|
delParamConfigInfo({
|
||||||
neType: neTypeSelect.value[0],
|
neType: neTypeSelect.value[0],
|
||||||
neId: neTypeSelect.value[1],
|
neId: neTypeSelect.value[1],
|
||||||
@@ -412,7 +420,7 @@ function arrayDelete(rowIndex: Record<string, any>) {
|
|||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
message.success({
|
message.success({
|
||||||
content: t('views.configManage.configParamForm.delItemOk', {
|
content: t('views.configManage.configParamForm.delItemOk', {
|
||||||
num: `${treeState.selectNode.topDisplay} Index-${index}`,
|
num: title,
|
||||||
}),
|
}),
|
||||||
duration: 2,
|
duration: 2,
|
||||||
});
|
});
|
||||||
@@ -425,6 +433,8 @@ function arrayDelete(rowIndex: Record<string, any>) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**多列表新增单行 */
|
/**多列表新增单行 */
|
||||||
@@ -721,6 +731,14 @@ function arrayChildEditOk(from: Record<string, any>) {
|
|||||||
function arrayChildDelete(rowIndex: Record<string, any>) {
|
function arrayChildDelete(rowIndex: Record<string, any>) {
|
||||||
const index = rowIndex.value;
|
const index = rowIndex.value;
|
||||||
const loc = `${arrayChildState.loc}/${index}`;
|
const loc = `${arrayChildState.loc}/${index}`;
|
||||||
|
const title = `${arrayChildState.title} Index-${index}`;
|
||||||
|
|
||||||
|
Modal.confirm({
|
||||||
|
title: t('common.tipTitle'),
|
||||||
|
content: t('views.configManage.configParamForm.delItemTip', {
|
||||||
|
num: title,
|
||||||
|
}),
|
||||||
|
onOk() {
|
||||||
delParamConfigInfo({
|
delParamConfigInfo({
|
||||||
neType: neTypeSelect.value[0],
|
neType: neTypeSelect.value[0],
|
||||||
neId: neTypeSelect.value[1],
|
neId: neTypeSelect.value[1],
|
||||||
@@ -730,7 +748,7 @@ function arrayChildDelete(rowIndex: Record<string, any>) {
|
|||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
message.success({
|
message.success({
|
||||||
content: t('views.configManage.configParamForm.delItemOk', {
|
content: t('views.configManage.configParamForm.delItemOk', {
|
||||||
num: `${arrayChildState.title} Index-${index}`,
|
num: title,
|
||||||
}),
|
}),
|
||||||
duration: 2,
|
duration: 2,
|
||||||
});
|
});
|
||||||
@@ -743,6 +761,8 @@ function arrayChildDelete(rowIndex: Record<string, any>) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**多列表嵌套行新增单行 */
|
/**多列表嵌套行新增单行 */
|
||||||
|
|||||||
Reference in New Issue
Block a user