Commit ebb848ed by 周海峰

加密管理

parent bf195290
import request from '@/utils/request'
import { pa } from 'element-plus/es/locales.mjs'
export function query(data) {
/**
* 查询批量原始数据
* @param {*} data
* @returns
*/
export function queryBatchOriginalList(data) {
return request({
url: '/',
url: '/core/encryptionconfig/queryBatchOriginalList',
method: 'post',
data: data
})
}
/**
* 查询所有加密数据
* @param {*} data
* @returns
*/
export function queryAllEncrypted(data) {
return request({
url: '/core/encryptionconfig/queryAllEncrypted',
method: 'post',
data: data
})
}
/**
* 删除批量表字段
* @param {*} data projectid
* @returns
*/
export function delBatchTableColumn(data) {
return request({
url: '/switchfield/delBatchTableColumn',
method: 'post',
data: data
})
}
/**
* 加载批量表参数
* @param {*} data operate
* @param {*} data projectid
* @returns
*/
export function loadingBatchTableParams(data) {
return request({
url: '/core/encryption/loadingBatchTableParams',
method: 'post',
data: data
})
}
/**
* 加载进度
* @param {*} data
* @returns
*/
export function loadingProgress(data) {
return request({
url: '/core/encryption/loadingProgress',
method: 'post',
data: data
})
}
/**
* 获取进度日志
* @param {*} data
* @returns
*/
export function getProcesslog(query) {
return request({
url: '/core/encryption/getProcesslog',
method: 'get',
params: query
})
}
\ No newline at end of file
// 状态标识对象数组
const encryptFlag = [
{ value: '0', label: '无' },
{ value: '-2', label: '解密中', type: 'warning' },
{ value: '-1', label: '加密中', type: 'warning' },
// { value: '1', label: '加密完成' },
{ value: '5', label: '加密完成', type: 'success' },
{ value: '4', label: '加密失败' ,type: 'danger'},
{ value: '44', label: '解密失败' ,type: 'danger'},
// { value: '6', label: '解密完成' },
{ value: '7', label: '解密完成' ,type: 'success'}
// { value: '9', label: '加密替换失败' },
// { value: '10', label: '解密替换失败' },
// { value: '11', label: '解密校验失败' },
// { value: '12', label: '加密校验失败' }
]
export default encryptFlag;
\ No newline at end of file
......@@ -117,6 +117,8 @@ import { queryOriginalList, queryEncryptionList, hasRedundanceColumns,
loadingColumn, checkCanReload ,removeLoadingColumn, checkTableEncOrDecColumn,
loadingTableParams, reloadingColumn
} from '@/api/classification/classification.js'
import encryptFlag from '@/constants/encryptFlag.js'
const props = defineProps({
// tableData: {
// type: Array,
......@@ -183,23 +185,6 @@ const getTableData = async () => {
tableDataCache.value = JSON.parse(JSON.stringify(tableData.value))
}
// 状态标识对象数组
const encryptFlag = [
{ value: '0', label: '无' },
{ value: '-2', label: '解密中' },
{ value: '-1', label: '加密中' },
{ value: '1', label: '加密完成' },
{ value: '5', label: '加密完成' },
{ value: '4', label: '加密失败' },
{ value: '44', label: '解密失败' },
{ value: '6', label: '解密完成' },
{ value: '7', label: '解密完成' },
{ value: '9', label: '加密替换失败' },
{ value: '10', label: '解密替换失败' },
{ value: '11', label: '解密校验失败' },
{ value: '12', label: '加密校验失败' }
]
/**
* 加密状态标识
*/
......
<script setup lang="ts" name="QueryForm">
import { computed,ref,watch } from 'vue'
import type { FormInstance } from 'element-plus'
import PageWrapperSearch from '@/components/search/PageWrapperSearch.vue'
// import { useDict } from '@/utils/dict'
// import { listDept } from '@/api/system/dept'// 部门
// const { approve_status, invoice_status} = useDict('approve_status', 'invoice_status')
const emit = defineEmits(['update:modelValue', 'query', 'reset'])
const invoice_status_filter = ref([])
const employeesList = ref([])
const props = defineProps<{
modelValue: any
}>()
<script setup>
import { computed, ref, watch } from 'vue';
import PageWrapperSearch from '@/components/search/PageWrapperSearch.vue';
import encryptFlag from '@/constants/encryptFlag.js';
const emit = defineEmits(['update:modelValue', 'query', 'reset']);
const props = defineProps({
modelValue: Object
});
const queryForm = computed({
get() {
return props.modelValue
return props.modelValue;
},
set(val: any) {
console.log('query computed', val)
emit('update:modelValue', val)
set(val) {
console.log('query computed', val);
emit('update:modelValue', val);
}
})
});
// 搜索
function onSearch() {
emit('query')
emit('query');
}
// 重置
function onReset(formRef: FormInstance) {
queryForm.value.datasource = ''
queryForm.value.schema = ''
queryForm.value.tableName = ''
queryForm.value.fieldName = ''
queryForm.value.status = ''
emit('reset', formRef)
function onReset(formRef) {
queryForm.value.datasource = '';
queryForm.value.schema = '';
queryForm.value.tableName = '';
queryForm.value.fieldName = '';
queryForm.value.status = [];
emit('reset', formRef);
}
</script>
<template>
......@@ -87,10 +75,10 @@ function onReset(formRef: FormInstance) {
<el-select
v-model="queryForm.status"
placeholder="请选择状态"
multiple
clearable
>
<el-option label="启用" value="active" />
<el-option label="禁用" value="inactive" />
<el-option v-for="value in encryptFlag" :label="value.label" :value="value.value" />
</el-select>
</el-form-item>
</page-wrapper-search>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论