Commit 843d5459 by 周海峰

no message

parent ad1dec32
......@@ -51,7 +51,8 @@ export function loadingBatchTableParams(data) {
return request({
url: '/core/encryption/loadingBatchTableParams',
method: 'post',
data: data
data: data,
tipShow: false
})
}
......
<script setup name="ProjectManageList">
import { onMounted, reactive, ref, toRefs } from 'vue'
import { ElMessage } from 'element-plus'
import { ElMessage, ElMessageBox } from 'element-plus'
import QueryForm from './QueryForm.vue'
import { changeRoute } from '@/utils/switchRoute'
import { useRouter } from 'vue-router'
......@@ -9,7 +9,6 @@ import encryptFlag from '@/constants/encryptFlag.js';
const router = useRouter()
const emit = defineEmits(['page'])
function onReset(formQuery) {
console.log('onReset')
formQuery.resetFields()
handleQuery()
}
......@@ -75,16 +74,28 @@ function pageProjectManage() {
* 删除多余列
*/
const deleteUnnecessaryColumns = async () => {
const params = {
projectid: sessionStorage.getItem('projectId')
}
try {
await delBatchTableColumn(params)
ElMessage.success('删除成功')
getList()
} catch (error) {
ElMessage.error('删除失败')
}
ElMessageBox.confirm('是否确认删除所有多余列?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
try {
// 确认删除
const params = {
projectid: sessionStorage.getItem('projectId')
}
try {
await delBatchTableColumn(params)
ElMessage.success('删除成功')
getList()
} catch (error) {
ElMessage.error('删除失败')
}
} catch (error) {
// 用户取消操作
}
})
}
......@@ -92,18 +103,28 @@ const deleteUnnecessaryColumns = async () => {
* 批量加密
*/
const bulkEncryption = async () => {
const params = {
projectid: sessionStorage.getItem('projectId'),
operate: "0"
}
const response = await loadingBatchTableParams(params)
if (response && response.code === 'POP_00014' && response.flag) {
ElMessage.success('批量加密成功')
getList()
} else {
ElMessage.error('批量加密失败')
}
ElMessageBox.confirm('是否确认对所有未加密字段进行加密?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(async () => {
try {
const params = {
projectid: sessionStorage.getItem('projectId'),
operate: "0"
}
loadingBatchTableParams(params)
} catch (error) {
ElMessage.error('批量加密失败,请稍后重试')
}
})
.catch(() => {
// 用户取消操作
})
// ElMessage.success('批量加密成功')
setTimeout(() => {
getList()
......@@ -114,21 +135,28 @@ const bulkEncryption = async () => {
* 批量解密
*/
const batchDecryption = async() => {
const params = {
projectid: sessionStorage.getItem('projectId'),
operate: "1"
}
const response = await loadingBatchTableParams(params)
if (response && response.code === 'POP_00014' && response.flag) {
ElMessage.success('批量解密成功')
getList()
} else {
ElMessage.error('批量解密失败')
}
ElMessageBox.confirm('是否确认对所有已加密字段进行解密?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
try {
const params = {
projectid: sessionStorage.getItem('projectId'),
operate: "1"
}
loadingBatchTableParams(params)
// ElMessage.success('批量解密成功')
} catch (error) {
ElMessage.error('批量解密失败,请稍后重试')
}
})
setTimeout(() => {
getList()
}, 5000); // 5秒后刷新列表
}
// 弹窗控制
const dialogVisible = ref(false);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论