复制-二次弹窗确认

This commit is contained in:
caozehui
2025-03-07 09:02:19 +08:00
parent d41707fcf9
commit 97100dfa63
2 changed files with 27 additions and 20 deletions

View File

@@ -45,7 +45,7 @@ export const updateDtls = (params: any) => {
}
// 根据通讯参数生成装置下发原始数据公式
export const scriptDtlsCheckDataList = (params: any) => {
return http.post(`/pqScript/scriptDtlsCheckDataList`, params)
return http.post(`/pqScript/scriptDtlsCheckDataList`, params,{loading: false})
}
// 通讯脚本回显
export const checkDataList = (params: any) => {

View File

@@ -200,7 +200,7 @@
import { type PropType, ref, nextTick } from 'vue'
import Tree from './tree.vue'
import Commun from './communication.vue'
import type { CascaderOption } from 'element-plus'
import {type CascaderOption, ElMessageBox} from 'element-plus'
import { getTreeData } from '@/api/check/test'
import { CirclePlus, Delete, Check, CopyDocument, View, EditPen } from '@element-plus/icons-vue'
import type { TestScript } from '@/api/device/interface/testScript'
@@ -355,6 +355,12 @@ const openDialog = (titleType: string, row: Partial<TestScript.ResTestScript> =
}
// 复制
const copyRow = async (row: any) => {
ElMessageBox.confirm('是否复制当前检测项目?', '提示', {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: 'warning',
draggable: true
}).then(async () => {
let checkDataList: any = []
await communRef.value[0]?.getData().forEach((item: any) => {
item.children.forEach((k: any) => {
@@ -382,6 +388,7 @@ const copyRow = async (row: any) => {
getTree()
}
})
})
}
// 查看
const view = (row: Partial<TestScript.ResTestScript> = {}) => {