Commit 81da7747 by 周海峰

no message

parent 794f775b
......@@ -11,7 +11,7 @@ const encryptFlag = [
{ value: '4', label: '加密失败' ,type: 'danger'},
{ value: '44', label: '解密失败' ,type: 'danger'},
// { value: '6', label: '解密完成' },
{ value: '7', label: '解密完成' ,type: 'success'}
{ value: '7', label: '解密完成' ,type: 'danger'}
// { value: '9', label: '加密替换失败' },
// { value: '10', label: '解密替换失败' },
// { value: '11', label: '解密校验失败' },
......
<script setup name="ProjectManageList">
import { onMounted, reactive, ref, toRefs } from 'vue'
import { onMounted, onBeforeUnmount, reactive, ref, toRefs, watch } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import QueryForm from './QueryForm.vue'
import { changeRoute } from '@/utils/switchRoute'
......@@ -124,11 +124,7 @@ const bulkEncryption = async () => {
// 用户取消操作
})
// ElMessage.success('批量加密成功')
setTimeout(() => {
getList()
}, 5000); // 5秒后刷新列表
}
/**
......@@ -147,15 +143,11 @@ const batchDecryption = async() => {
operate: "1"
}
loadingBatchTableParams(params)
// ElMessage.success('批量解密成功')
} catch (error) {
ElMessage.error('批量解密失败,请稍后重试')
}
})
setTimeout(() => {
getList()
}, 5000); // 5秒后刷新列表
}
// 弹窗控制
......@@ -164,7 +156,7 @@ const detailData = ref({});
const handleDetail = async (val) => {
console.log('查看详情', val);
const params = {
projectid: sessionStorage.getItem('projectId'),
projectId: sessionStorage.getItem('projectId'),
columnName: val.table_field_id,
dataSystemId: val.datasystem_id,
schema: val.tschemas,
......@@ -234,9 +226,39 @@ const getFlagName = (flag) => {
return found ? found: {}
}
let pollingInterval = null;
onMounted(() => {
getList()
})
pollingInterval = setInterval(() => {
getList();
}, 5000); // Poll every 5 seconds
});
onBeforeUnmount(() => {
if (pollingInterval) {
clearInterval(pollingInterval);
}
});
/**
* 详情弹窗轮询
*/
let detailPollingInterval = null;
watch(dialogVisible, (newVal) => {
if (newVal) {
detailPollingInterval = setInterval(() => {
if (detailData.value.params) {
handleDetail(detailData.value.row);
}
}, 5000); // Poll every 5 seconds
} else {
if (detailPollingInterval) {
clearInterval(detailPollingInterval);
detailPollingInterval = null;
}
}
});
</script>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论