Commit ebb848ed by 周海峰

加密管理

parent bf195290
import request from '@/utils/request' 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({ return request({
url: '/', url: '/core/encryptionconfig/queryBatchOriginalList',
method: 'post', method: 'post',
data: data 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, ...@@ -117,6 +117,8 @@ import { queryOriginalList, queryEncryptionList, hasRedundanceColumns,
loadingColumn, checkCanReload ,removeLoadingColumn, checkTableEncOrDecColumn, loadingColumn, checkCanReload ,removeLoadingColumn, checkTableEncOrDecColumn,
loadingTableParams, reloadingColumn loadingTableParams, reloadingColumn
} from '@/api/classification/classification.js' } from '@/api/classification/classification.js'
import encryptFlag from '@/constants/encryptFlag.js'
const props = defineProps({ const props = defineProps({
// tableData: { // tableData: {
// type: Array, // type: Array,
...@@ -183,23 +185,6 @@ const getTableData = async () => { ...@@ -183,23 +185,6 @@ const getTableData = async () => {
tableDataCache.value = JSON.parse(JSON.stringify(tableData.value)) 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"> <script setup>
import { computed,ref,watch } from 'vue' import { computed, ref, watch } from 'vue';
import type { FormInstance } from 'element-plus' import PageWrapperSearch from '@/components/search/PageWrapperSearch.vue';
import PageWrapperSearch from '@/components/search/PageWrapperSearch.vue' import encryptFlag from '@/constants/encryptFlag.js';
// import { useDict } from '@/utils/dict' const emit = defineEmits(['update:modelValue', 'query', 'reset']);
// import { listDept } from '@/api/system/dept'// 部门 const props = defineProps({
modelValue: Object
});
// 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
}>()
const queryForm = computed({ const queryForm = computed({
get() { get() {
return props.modelValue return props.modelValue;
}, },
set(val: any) { set(val) {
console.log('query computed', val) console.log('query computed', val);
emit('update:modelValue', val) emit('update:modelValue', val);
} }
}) });
// 搜索 // 搜索
function onSearch() { function onSearch() {
emit('query') emit('query');
} }
// 重置 // 重置
function onReset(formRef: FormInstance) { function onReset(formRef) {
queryForm.value.datasource = '' queryForm.value.datasource = '';
queryForm.value.schema = '' queryForm.value.schema = '';
queryForm.value.tableName = '' queryForm.value.tableName = '';
queryForm.value.fieldName = '' queryForm.value.fieldName = '';
queryForm.value.status = '' queryForm.value.status = [];
emit('reset', formRef) emit('reset', formRef);
} }
</script> </script>
<template> <template>
...@@ -87,10 +75,10 @@ function onReset(formRef: FormInstance) { ...@@ -87,10 +75,10 @@ function onReset(formRef: FormInstance) {
<el-select <el-select
v-model="queryForm.status" v-model="queryForm.status"
placeholder="请选择状态" placeholder="请选择状态"
multiple
clearable clearable
> >
<el-option label="启用" value="active" /> <el-option v-for="value in encryptFlag" :label="value.label" :value="value.value" />
<el-option label="禁用" value="inactive" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</page-wrapper-search> </page-wrapper-search>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论