7daf9d9d by xukangle

Merge branch 'develop' into dev_20241202_xukangle

2 parents ae2ab82f b4f46b1b
This diff could not be displayed because it is too large.
......@@ -76,7 +76,7 @@ export const updateRuleBizState = (params) => request({
/** 获取数据库表列表 */
export const getDatabase = (params) => request({
url: `${import.meta.env.VITE_APP_API_BASEURL}/data-source/get-source-list`,
url: `${import.meta.env.VITE_APP_DATA_SOURCE_URL}/data-source/get-source-list`,
method: 'post',
data: params
})
......@@ -138,23 +138,20 @@ export const getRuleTypeList = () => request({
// 获取规则大类的接口
export const getLargeCategoryList = () => request({
url:`${import.meta.env.VITE_APP_API_BASEURL}/data-dict/get-data-list`,
method: 'post',
data: { paramCode: "LARGE-CATEGORY" }
url: `${import.meta.env.VITE_APP_CONFIG_URL}/dict/data/get-by-dictType?dictType=${'规则大类'}`,
method: 'get',
})
// 获取规则小类的接口
export const getSmallCategoryList = () => request({
url:`${import.meta.env.VITE_APP_API_BASEURL}/data-dict/get-data-list`,
method: 'post',
data: { paramCode: "SMALL-CATEGORY" }
url: `${import.meta.env.VITE_APP_CONFIG_URL}/dict/data/get-by-dictType?dictType=${'规则小类'}`,
method: 'get',
})
// 获取规范性检验规则。
export const getCheckRulesList = () => request({
url:`${import.meta.env.VITE_APP_API_BASEURL}/data-dict/get-data-list`,
method: 'post',
data: { paramCode: "REGULAR_RULE" }
url: `${import.meta.env.VITE_APP_CONFIG_URL}/dict/data/get-by-dictType?dictType=${'正则校验'}`,
method: 'get',
})
// 根据规则guid获取规则的详情信息。
......
......@@ -23,6 +23,7 @@ export const parseAndDecodeUrl = (url:string) => {
// 返回去掉主机信息和开头斜杠后的解码部分以及最后一个斜杠后面的内容
return {
fileName: pathname,
decodedPath: pathname + search + hash,
lastPart: lastPart
};
......
......@@ -27,9 +27,8 @@ export const refreshToken = (params) => {
export const getSystemMenu = (params) => {
return request({
url: `${
import.meta.env.VITE_APP_AUTH_URL
}/product-menu-permission/tenant/get-product-menu?tenantGuid=${params.tenantGuid}&platformSystemGuid=32774fcfdf5e43e8b866660374d8bced`,
url: `${import.meta.env.VITE_APP_AUTH_URL
}/product-menu-permission/tenant/get-product-menu?tenantGuid=${params.tenantGuid}&platformSystemGuid=32774fcfdf5e43e8b866660374d8bced`,
method: "get",
});
};
......@@ -130,7 +129,7 @@ export const getServiceTenants = (params) => request({
})
/** 获取会员的附件模板 */
export const getTenantAttach = (params) => request({
export const getTenantAttach = (params) => request({
url: `${import.meta.env.VITE_APP_API_BASEURL}/attachment-template/list-attachment?tenantGuid=${params}`,
method: 'get'
})
......@@ -152,7 +151,7 @@ export const resetUserPwd = (params) => request({
/** ----------------- 消息管理 ------------------- */
/** 获取所有的消息列表 */
export const getAllMessageList = (params) => request({
export const getAllMessageList = (params) => request({
url: `${import.meta.env.VITE_API_MESSAGE}/message/data/get-message-list`,
method: 'post',
data: params
......@@ -217,3 +216,62 @@ export const exportDictionary = (params) => request({
data: params,
responseType: 'blob'
})
/**
* 数据源管理
**/
// 分页查询
export const getDataSourceList = (params) => request({
url: `${import.meta.env.VITE_APP_DATA_SOURCE_URL}/data-source/list`,
method: "post",
data: params,
});
// 获取数据源列表
export const getDataSource = (params) => request({
url: `${import.meta.env.VITE_APP_DATA_SOURCE_URL}/data-source/get-source-list`,
method: "post",
data: params,
});
// 新增
export const addDataSource = (params) => request({
url: `${import.meta.env.VITE_APP_DATA_SOURCE_URL}/data-source/save`,
method: "post",
data: params,
});
// 删除
export const deleteDataSource = (params) => request({
url: `${import.meta.env.VITE_APP_DATA_SOURCE_URL}/data-source/delete`,
method: "delete",
data: params,
});
// 修改
export const updateDataSource = (params) => request({
url: `${import.meta.env.VITE_APP_DATA_SOURCE_URL}/data-source/update`,
method: "put",
data: params,
});
// 查看数据源详情
export const getDataSourceDetail = (params) => request({
url: `${import.meta.env.VITE_APP_DATA_SOURCE_URL}/data-source/detail/${params}`,
method: "get",
});
// 连通检测
export const checkDataSourceConnect = (params) => request({
url: `${import.meta.env.VITE_APP_DATA_SOURCE_URL}/data-source/check-connect`,
method: "post",
params,
});
// 连接测试
export const checkDataSourceConnectTest = (params) => request({
url: `${import.meta.env.VITE_APP_DATA_SOURCE_URL}/data-source/check-connect-test`,
method: "post",
data: params,
});
// 获取所有参数列表
export const getAllFlowData = (params) => request({
url: `${import.meta.env.VITE_APP_CONFIG_URL}/dict/data/get-by-dictType`,
method: 'get',
params
})
......
......@@ -337,7 +337,8 @@ const handlePictureCardPreview = (file, item) => {
const onUploadFilePreview = async (file, item) => {
let f = formInline.value[item.field].find(i => i.name == file.name);
let url = f.url;
const refSignInfo: any = await getDownFileSignByUrl(parseAndDecodeUrl(url).decodedPath);
let fileName: string = parseAndDecodeUrl(url).fileName;
const refSignInfo: any = await getDownFileSignByUrl(fileName);
if (!refSignInfo?.data) {
refSignInfo?.msg && ElMessage.error(refSignInfo?.msg);
return;
......@@ -360,7 +361,7 @@ const onUploadFilePreview = async (file, item) => {
}
const downloadTemplate = async (url) => {
const refSignInfo: any = await getDownFileSignByUrl(parseAndDecodeUrl(url).decodedPath);
const refSignInfo: any = await getDownFileSignByUrl(parseAndDecodeUrl(url).fileName);
if (!refSignInfo?.data) {
refSignInfo?.msg && ElMessage.error(refSignInfo?.msg);
return;
......@@ -379,7 +380,7 @@ const downloadTemplate = async (url) => {
const onUploadFileDownload = async (file, item) => {
let url = file.url;
const refSignInfo: any = await getDownFileSignByUrl(parseAndDecodeUrl(url).decodedPath);
const refSignInfo: any = await getDownFileSignByUrl(parseAndDecodeUrl(url).fileName);
if (!refSignInfo?.data) {
refSignInfo?.msg && ElMessage.error(refSignInfo?.msg);
return;
......
......@@ -63,7 +63,7 @@ const routes: RouteRecordRaw[] = [
to.meta.title = `${to.query.name}-${to.query.status == 'Y'?'查看结果':'结果确认'}`;
to.meta.editPage = to.query.status == 'Y'? false: true;
} else {
to.meta.title = `${to.query.name}-${to.query.type == 'confirm'?'结果确认':'结果修改'}`;
to.meta.title = `${to.query.name}-${to.query.status == 'Y'?'结果修改':'结果确认'}`;
to.meta.editPage = true;
}
}
......@@ -282,6 +282,27 @@ const routes: RouteRecordRaw[] = [
},
],
},
{
path: '/data-inventory/data-source',
component: Layout,
meta: {
title: '数据源管理',
icon: 'sidebar-videos',
},
children: [
{
path: '',
name: 'dataSource',
component: () => import('@/views/data_inventory/dataSource.vue'),
meta: {
title: '数据源管理',
sidebar: false,
breadcrumb: false,
cache: true
},
},
],
},
]
export default routes
......
......@@ -48,8 +48,7 @@ const treeInfo = ref({
expandOnNodeClick: false,
data: [],
});
const toolH = ref(82)
const toolRef = ref();
const expand1 = ref(true)
const expand2 = ref(true)
......@@ -154,7 +153,24 @@ const metadataTableInfo = ref({
},
})
/**
* 传入多个promise对象,当全部结束时取消Loading
* @param promises 传入多个promise对象,当全部结束时取消Loading
*/
const promiseList = async (...promises: Promise<void>[]) => {
// loading方法全局封装成一个组件
loading.value = true;
try {
await Promise.all(promises);
} catch (e) {
loading.value = false;
} finally {
loading.value = false;
}
};
const getTaskDetail = (data) => {
loading.value = true;
getCgTaskDetail(data).then((res: any) => {
if (res.code == proxy.$passCode) {
const data = res.data || {};
......@@ -163,28 +179,31 @@ const getTaskDetail = (data) => {
item.default = data[item.field] || '';
})
selectRowData.value = data.metaGuids || [];
getPermissionList({});
getMetaTableData();
promiseList(
getPermissionList(),
getMetaTableData()
)
}
}).catch(() => {
loading.value = false;
})
}
const nodeClick = (data) => {
searchItemValue.value.classifyGuid = templateInfo.value.guid;
searchItemValue.value.detailGuid = data.guid;
getTableData();
promiseList(
getTableData()
)
}
// 获取标签数据
const getTableData = () => {
tableInfo.value.loading = true;
getCgLabelPageList(
Object.assign({}, searchItemValue.value, {
pageIndex: page.value.curr,
pageSize: page.value.limit,
})
).then((res: any) => {
tableInfo.value.loading = false;
const params = Object.assign({}, searchItemValue.value, {
pageIndex: page.value.curr,
pageSize: page.value.limit,
})
return getCgLabelPageList(params).then((res: any) => {
if (res.code == proxy.$passCode) {
tableInfo.value.data = res.data.records || [];
tableInfo.value.page.curr = res.data.pageIndex;
......@@ -193,7 +212,6 @@ const getTableData = () => {
}
})
.catch((res) => {
tableInfo.value.loading = false;
});
};
......@@ -215,7 +233,9 @@ const tablePageChange = (info) => {
page.value.limit = Number(info.limit);
tableInfo.value.page.limit = page.value.limit;
tableInfo.value.page.curr = page.value.curr;
getTableData();
promiseList(
getTableData()
)
} else {
}
......@@ -223,8 +243,7 @@ const tablePageChange = (info) => {
// 获取元数据表格
const getMetaTableData = () => {
getMetaTableCollectList({}).then((res: any) => {
metadataTableInfo.value.loading = false;
return getMetaTableCollectList({}).then((res: any) => {
if (res.code == proxy.$passCode) {
const data = res.data.records || [];
metadataTableInfo.value.data = data;
......@@ -236,16 +255,18 @@ const getMetaTableData = () => {
})
}
}
}).catch(() => {
})
}
const querySearch = (queryString: string) => {
listLoading.value = true
loading.value = true;
const results = queryString
? currpermissionList.value.filter(item => item.dataPermissionName.indexOf(queryString) > -1)
: permissionList.value;
currpermissionList.value = results
listLoading.value = false
loading.value = false;
}
const btnClick = async (btn, bType = null) => {
......@@ -332,7 +353,7 @@ const submitForm = (formEl, info) => {
const handleScroll = () => {
if (listPage.value.curr < listPage.value.totalPages) {
listPage.value.curr++
getPermissionList({})
getPermissionList()
}
}
......@@ -340,20 +361,21 @@ const handleScroll = () => {
const listClick = (row) => {
selectIndex.value = row.guid;
templateInfo.value = row;
getClassifyTree();
searchItemValue.value.classifyGuid = row.guid;
searchItemValue.value.detailGuid = '';
getTableData();
promiseList(
getClassifyTree(),
getTableData()
)
};
// 获取分类列表
const getPermissionList = (val, init = true) => {
const getPermissionList = (val = {}, init = true) => {
let params: any = val ? { ...val } : {}
params.pageIndex = listPage.value.curr;
params.pageSize = listPage.value.limit;
params.type = 'C';
listLoading.value = true
getClassifyGradList(params).then((res: any) => {
return getClassifyGradList(params).then((res: any) => {
if (res.code == proxy.$passCode) {
const data = res.data?.records || []
if (init) {
......@@ -366,18 +388,14 @@ const getPermissionList = (val, init = true) => {
tempInfo = data.filter(item => item.guid == taskDetail.value.classifyGuid)[0]
}
listClick(tempInfo);
nextTick(() => {
toolH.value = toolRef.value.offsetHeight
})
}
} else {
permissionList.value.push(...JSON.parse(JSON.stringify(data)))
querySearch(asideSearchInput.value)
}
}
listLoading.value = false
}).catch(() => {
listLoading.value = false
})
}
......@@ -386,16 +404,13 @@ const getClassifyTree = () => {
const params = {
classifyGradeGuid: templateInfo.value.guid
}
treeInfo.value.loading = true;
getClassifyTreeList(params).then((res: any) => {
treeInfo.value.loading = false;
return getClassifyTreeList(params).then((res: any) => {
if (res.code == proxy.$passCode) {
const data = res.data || [];
treeInfo.value.data = data;
treeInfoRef.value.setCurrentKey('');
}
}).catch(() => {
treeInfo.value.loading = false;
})
}
......@@ -412,15 +427,14 @@ onBeforeMount(() => {
if (route.query.type == 'edit') {
getTaskDetail({ guid: route.query.guid })
} else {
getPermissionList({});
getMetaTableData();
promiseList(
getPermissionList(),
getMetaTableData()
)
}
})
onMounted(() => {
window.addEventListener('resize', function () {
toolH.value = toolRef.value.offsetHeight
})
})
</script>
......@@ -433,14 +447,14 @@ onMounted(() => {
<el-input v-model.trim="asideSearchInput" placeholder="请输入关键字" :prefix-icon="Search" clearable
@change="querySearch" />
</div> -->
<div class="aside_list" v-loading="listLoading" v-infinite-scroll="handleScroll">
<div class="aside_list" v-infinite-scroll="handleScroll">
<div class="list_item" v-for="(item, i) in currpermissionList" :class="{ active: selectIndex == item.guid }"
@click="listClick(item);" v-preReClick>{{ item.name }}</div>
</div>
</div>
<div class="main_wrap" :class="{ full: step == 1 }">
<div class="content_main" v-show="step == 0">
<div class="template_panel" ref="toolRef">
<div class="template_panel">
<div class="title_item">
<span class="title_label">分类标准:</span>
<span class="title_text">{{ templateInfo.name || '--' }}</span>
......@@ -454,7 +468,7 @@ onMounted(() => {
<span class="title_text">{{ templateInfo.description || '--' }}</span>
</div>
</div>
<div class="panel_content" :style="{ height: 'calc(100% - ' + toolH + 'px)' }">
<div class="panel_content">
<div class="box_left">
<Tree ref="treeInfoRef" :treeInfo="treeInfo" @nodeClick="nodeClick" />
</div>
......@@ -563,6 +577,7 @@ onMounted(() => {
display: flex;
flex-wrap: wrap;
padding: 16px 16px 8px;
min-height: 82px;
.title_item {
display: flex;
......@@ -597,14 +612,15 @@ onMounted(() => {
.panel_content {
height: 100%;
display: flex;
flex: 1;
border-top: 1px solid #d9d9d9;
position: relative;
.box_left {
width: 200px;
height: 100%;
border-right: 1px solid #d9d9d9;
position: absolute;
.aside_title {
padding: 0 8px;
......@@ -622,7 +638,10 @@ onMounted(() => {
.box_right {
width: calc(100% - 200px);
height: 100%;
padding-top: 8px;
position: absolute;
right: 0;
.el-breadcrumb {
padding: 0 12px;
......
......@@ -107,7 +107,7 @@ const toPath = (type) => {
guid: currTableData.value.taskGuid,
name: currTableData.value.taskName,
status: currTableData.value.status,
type: currTableData.value.status == 'Y'? 'modify':'confirm'
type: currTableData.value.status == 'Y'? 'detail':'confirm'
},
});
}
......
......@@ -8,10 +8,14 @@ import { ElMessage, ElMessageBox } from "element-plus";
import Table from '@/components/Table/index.vue'
import TableTools from '@/components/Tools/table_tools.vue'
import {getAnalysisReportList,delAnalysisRepor,updateAnalysisRepor} from "@/api/modules/dataMetaService"
import { getImageContent } from "@/api/modules/queryService";
import Dialog from '@/components/Dialog/index.vue'
import { getDownloadUrl, download } from "@/utils/common";
import { useRouter } from 'vue-router';
import {
parseAndDecodeUrl,
getDownFileSignByUrl,
obsDownloadRequest
} from "@/api/modules/obsService";
const router = useRouter()
const page = ref({
limit: 50,
......@@ -119,37 +123,48 @@ const tableSearchItemList: any = ref([{
placeholder: '血缘关系名称',
clearable: true
}]);
const tableBtnClick = (scope, btn) => {
const tableBtnClick = async (scope, btn) => {
const type = btn.value;
let row = scope.row;
rowData.value = row
currTableData.value = row;
if (type == 'view') {
getImageContent(row.analysisReportUrl).then((res: any) => {
if (res && !res.msg) {
let name = row.analysisReportUrl;
var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1) : '';
if (fileSuffix === 'png') { //浏览器可以支持图片和pdf预览
let fileUrl = getDownloadUrl(res, name, fileSuffix);
let win = window.open(fileUrl, name);
win && (win.document.title = name);
let fileName: string = parseAndDecodeUrl(row.analysisReportUrl).fileName;
const refSignInfo: any = await getDownFileSignByUrl(fileName);
if (!refSignInfo?.data) {
refSignInfo?.msg && ElMessage.error(refSignInfo?.msg);
return;
}
obsDownloadRequest(refSignInfo?.data).then((res: any) => {
if (res && !res.msg) {
var fileSuffix = fileName ? fileName.substring(fileName.lastIndexOf('.') + 1) : '';
if (fileSuffix === 'png') { //浏览器可以支持图片和pdf预览
let fileUrl = <string>getDownloadUrl(res, name, fileSuffix);
let win = window.open(fileUrl, row.analysisReportName + fileSuffix);
win && (win.document.title = row.analysisReportName + fileSuffix);
} else {
download(res, row.analysisReportName, fileSuffix);
}
} else {
download(res, row.analysisReportName, fileSuffix);
res?.msg && ElMessage.error(res?.msg);
}
} else {
res?.msg && ElMessage.error(res?.msg);
}
});
});
} else if (type == 'export') {
getImageContent(row.analysisReportUrl).then((res: any) => {
if (res && !res.msg) {
let name = row.analysisReportUrl;
var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1) : '';
download(res, row.analysisReportName, fileSuffix);
} else {
res?.msg && ElMessage.error(res?.msg);
let fileName: string = parseAndDecodeUrl(row.analysisReportUrl).fileName;
const refSignInfo: any = await getDownFileSignByUrl(fileName);
if (!refSignInfo?.data) {
refSignInfo?.msg && ElMessage.error(refSignInfo?.msg);
return;
}
});
obsDownloadRequest(refSignInfo?.data).then((res: any) => {
if (res && !res.msg) {
// let name = row.analysisReportUrl;
var fileSuffix = fileName ? fileName.substring(fileName.lastIndexOf('.') + 1) : '';
download(res, row.analysisReportName, fileSuffix);
} else {
res?.msg && ElMessage.error(res?.msg);
}
});
} else if (type == "rename") {
dialogInfo.value.visible = true
formItems.value[0].default = row.analysisReportName
......
......@@ -22,7 +22,11 @@ import {
delLineAge,
checkTableData
} from '@/api/modules/dataMetaService';
import { getFileUrl } from "@/api/modules/queryService"
import {
parseAndDecodeUrl,
getUpFileSignByUrl,
obsUploadRequest
} from "@/api/modules/obsService";
import { useRouter, useRoute } from "vue-router";
import useDataMetaStore from "@/store/modules/dataMeta"
import { cloneDeep } from 'lodash-es'
......@@ -857,17 +861,23 @@ const pageSave = () => {
return
}
let formData = new FormData();
formData.append('file', file.value);
formData.append('fileName', `${analysisReportName}.png`);
getFileUrl(formData).then((res) => {
saveMetaReportAnalysis({
dialogInfo1.value.footer.btns[1].loading = true;
return getUpFileSignByUrl({ fileName: `${analysisReportName}.png` })
.then((res: any) => {
obsUploadRequest({
signedUrl: res.data.signedUrl,
file: file.value,
actualSignedRequestHeaders: res.data.actualSignedRequestHeaders
}).then(() => {
if (res.code == '00000') {
saveMetaReportAnalysis({
table: lastClickNode.value.tableName,
database: lastClickNode.value.databaseName,
analysisReportUrl: res.data,
analysisReportUrl: res.data?.signedUrl,
analysisReportName: analysisReportName,
databaseChName: lastClickNode.value.databaseChName
}).then((res: any) => {
dialogInfo1.value.footer.btns[1].loading = false;
if (res.code == proxy.$passCode) {
ElMessage({
type: "success",
......@@ -883,9 +893,19 @@ const pageSave = () => {
})
}
})
}).catch((res) => {
} else {
ElMessage({
type: "error",
message: res.msg,
appendTo: lineageGraph.value.containerRef
})
}
}).catch((res) => {
ElMessage.error(res.msg)
})
});
}).catch((res) => {
ElMessage.error(res.msg)
});
}
const formItems1: any = ref([
......@@ -933,7 +953,7 @@ const dialogInfo1 = ref({
footer: {
btns: [
{ type: "default", label: "取消", value: "cancel" },
{ type: "primary", label: "保存", value: "submit" },
{ type: "primary", label: "保存", value: "submit", loading: false },
],
},
});
......
......@@ -144,7 +144,7 @@ const getMetaChangeTableData = () => {
}
const activeTabName = ref('task');
const activeTabName = ref('meta');
watch(() => activeTabName.value, (val) => {
if(val==="task"){
......@@ -420,9 +420,7 @@ const metaChangeTableInfo = ref({
// { label: "状态", field: "changeTime", width: 180, },
// { label: "操作时间", field: "changeTime", width: 180, },
],
data: [{
guid: 1
}],
data: [],
page: {
type: "normal",
rows: 0,
......@@ -486,6 +484,7 @@ onBeforeMount(() => {
</div>
<div class="main_wrap">
<el-tabs v-model="activeTabName">
<!--
<el-tab-pane label="同步任务变更记录" name="task">
<div class="table_tool_wrap">
<TableTools :searchItems="tableSearchItemList" :init="false" searchId="detect-table-search"
......@@ -496,6 +495,7 @@ onBeforeMount(() => {
@tablePageChange="taskChangeTablePageChange" />
</div>
</el-tab-pane>
-->
<el-tab-pane label="元数据变更记录" name="meta">
<div class="table_tool_wrap">
<TableTools :searchItems="metaTableSearchItemList" :init="false" searchId="meta-detect-table-search"
......
......@@ -26,9 +26,13 @@ import {
saveMetaReportAnalysis,
checkTableData
} from '@/api/modules/dataMetaService';
import { getFileUrl } from "@/api/modules/queryService"
import useDataMetaStore from "@/store/modules/dataMeta"
import { TableColumnWidth } from '@/utils/enum';
import {
parseAndDecodeUrl,
getUpFileSignByUrl,
obsUploadRequest
} from "@/api/modules/obsService";
const { proxy } = getCurrentInstance() as any;
const router = useRouter();
......@@ -556,18 +560,24 @@ const pageSave = () => {
})
return
}
let formData = new FormData();
formData.append('file', file.value);
formData.append('fileName', `${analysisReportName}.png`);
console.log(formInline1.value.pageName)
getFileUrl(formData).then((res) => {
saveMetaReportAnalysis({
dialogInfo1.value.footer.btns[1].loading = true;
getUpFileSignByUrl({ fileName: `${analysisReportName}.png` })
.then((res: any) => {
obsUploadRequest({
signedUrl: res.data.signedUrl,
file: file.value,
actualSignedRequestHeaders: res.data.actualSignedRequestHeaders
}).then(() => {
if (res.code == '00000') {
saveMetaReportAnalysis({
table: sheetInfo.value.tableName,
database: sheetInfo.value.databaseName,
analysisReportUrl: res.data,
analysisReportUrl: res.data?.signedUrl,
analysisReportName: analysisReportName,
databaseChName: sheetInfo.value.databaseChName
}).then((res: any) => {
dialogInfo1.value.footer.btns[1].loading = false;
if (res.code == proxy.$passCode) {
// ElMessage.success("保存成功")
ElMessage({
......@@ -584,13 +594,19 @@ const pageSave = () => {
})
}
})
}).catch((res) => {
ElMessage({
type: "error",
message: res.msg,
appendTo: lineageGraph.value[0].containerRef
})
})
} else {
ElMessage({
type: "error",
message: res.msg,
appendTo: lineageGraph.value.containerRef
})
}
}).catch((res) => {
ElMessage.error(res.msg)
});
}).catch((res) => {
ElMessage.error(res.msg)
});
}
const formItems1: any = ref([
......@@ -638,7 +654,7 @@ const dialogInfo1 = ref({
footer: {
btns: [
{ type: "default", label: "取消", value: "cancel" },
{ type: "primary", label: "保存", value: "submit" },
{ type: "primary", label: "保存", value: "submit", loading: false },
],
},
});
......
......@@ -238,12 +238,12 @@ const rulesDetailTableBtnClick = (scope, btn) => {
label: row.ruleName
}];
smallCategoryList.value = [{
paramValue: detailInfo.value.smallCategory,
paramName: row.smallCategory
value: detailInfo.value.smallCategory,
label: row.smallCategory
}];
largeCategoryList.value = [{
paramValue: detailInfo.value.largeCategory,
paramName: row.largeCategory
value: detailInfo.value.largeCategory,
label: row.largeCategory
}];
oneRulesDetailDialogVisible.value = true;
} else {
......@@ -268,12 +268,12 @@ const rulesDetailTableBtnClick = (scope, btn) => {
label: row.ruleName
}];
smallCategoryList.value = [{
paramValue: detailInfo.value.smallCategory,
paramName: row.smallCategory
value: detailInfo.value.smallCategory,
label: row.smallCategory
}];
largeCategoryList.value = [{
paramValue: detailInfo.value.largeCategory,
paramName: row.largeCategory
value: detailInfo.value.largeCategory,
label: row.largeCategory
}];
} else {
ElMessage.error(res.msg);
......
......@@ -135,18 +135,18 @@ const rulesListByType: any = computed(() => {
return {};
}
return {
char: checkRulesList.value.filter(r => r.paramValue == 'length_rule' || r.paramValue == 'ch_rule' || r.paramValue == 'en_rule' || r.paramValue == 'num_value_rule' || r.paramValue == 'custom_regular_rule'),
varchar: checkRulesList.value.filter(r => r.paramValue == 'length_rule' || r.paramValue == 'id_card_rule' || r.paramValue == 'phone_number_rule' || r.paramValue == 'ch_rule' || r.paramValue == 'en_rule' || r.paramValue == 'num_value_rule' || r.paramValue == 'custom_regular_rule'),
int: checkRulesList.value.filter(r => r.paramValue == 'length_rule' || r.paramValue == 'num_value_rule' || r.paramValue == 'custom_regular_rule'),
date: checkRulesList.value.filter(r => r.paramValue == 'date_format_rule' || r.paramValue == 'custom_regular_rule'),
datetime: checkRulesList.value.filter(r => r.paramValue == 'date_format_rule' || r.paramValue == 'custom_regular_rule'),
timestamp: checkRulesList.value.filter(r => r.paramValue == 'custom_regular_rule' || r.paramValue == 'custom_regular_rule'),
// text: checkRulesList.value.filter(r => r.paramValue == ''),
decimal: checkRulesList.value.filter(r => r.paramValue == 'length_rule' || r.paramValue == 'precision_rule' || r.paramValue == 'num_value_rule' || r.paramValue == 'custom_regular_rule'),
// json: checkRulesList.value.filter(r => r.paramValue == ''),
tinyint: checkRulesList.value.filter(r => r.paramValue == 'length_rule' || r.paramValue == 'num_value_rule' || r.paramValue == 'custom_regular_rule'),
time: checkRulesList.value.filter(r => r.paramValue == 'custom_regular_rule'),
bit: checkRulesList.value.filter(r => r.paramValue == 'ch_rule' || r.paramValue == 'en_rule' || r.paramValue == 'custom_regular_rule'),
char: checkRulesList.value.filter(r => r.value == 'length_rule' || r.value == 'ch_rule' || r.value == 'en_rule' || r.value == 'num_value_rule' || r.value == 'custom_regular_rule'),
varchar: checkRulesList.value.filter(r => r.value == 'length_rule' || r.value == 'id_card_rule' || r.value == 'phone_number_rule' || r.value == 'ch_rule' || r.value == 'en_rule' || r.value == 'num_value_rule' || r.value == 'custom_regular_rule'),
int: checkRulesList.value.filter(r => r.value == 'length_rule' || r.value == 'num_value_rule' || r.value == 'custom_regular_rule'),
date: checkRulesList.value.filter(r => r.value == 'date_format_rule' || r.value == 'custom_regular_rule'),
datetime: checkRulesList.value.filter(r => r.value == 'date_format_rule' || r.value == 'custom_regular_rule'),
timestamp: checkRulesList.value.filter(r => r.value == 'custom_regular_rule' || r.value == 'custom_regular_rule'),
// text: checkRulesList.value.filter(r => r.value == ''),
decimal: checkRulesList.value.filter(r => r.value == 'length_rule' || r.value == 'precision_rule' || r.value == 'num_value_rule' || r.value == 'custom_regular_rule'),
// json: checkRulesList.value.filter(r => r.value == ''),
tinyint: checkRulesList.value.filter(r => r.value == 'length_rule' || r.value == 'num_value_rule' || r.value == 'custom_regular_rule'),
time: checkRulesList.value.filter(r => r.value == 'custom_regular_rule'),
bit: checkRulesList.value.filter(r => r.value == 'ch_rule' || r.value == 'en_rule' || r.value == 'custom_regular_rule'),
}
});
......@@ -238,8 +238,8 @@ const panelList: any = ref([
default: '1',
options: props.largeCategoryList,
props: {
label: 'paramName',
value: 'paramValue'
label: 'label',
value: 'value'
},
required: true,
visible: true
......@@ -249,8 +249,8 @@ const panelList: any = ref([
placeholder: '请选择',
field: 'smallCategory',
props: {
label: 'paramName',
value: 'paramValue'
label: 'label',
value: 'value'
},
default: '',
options: props.smallCategoryList.slice(6),
......@@ -1006,7 +1006,7 @@ const setPanelListValue = (item, isSelectChange = false, init = false, radioGrou
}
}
if (isSelectChange) {
val['smallCategory'] = panelList.value[2].options[0]?.paramValue;
val['smallCategory'] = panelList.value[2].options[0]?.value;
} else if (!val['smallCategory']) {
val['smallCategory'] = getDefaultSmallCategory(formItems.value[0].default);
} else if (radioGroupChange && !init) {//切换规则类型。
......@@ -2306,8 +2306,8 @@ defineExpose({
<template #default="scope">
<el-select v-if="!props.readonly || (scope.row.dataType == 'text' || scope.row.dataType == 'json')"
v-model="scope.row['checkRule']" placeholder="请选择" filterable clearable>
<el-option v-for="opt in rulesListByType[scope.row.dataType]" :key="opt['paramValue']"
:label="opt['paramName']" :value="opt['paramValue']" />
<el-option v-for="opt in rulesListByType[scope.row.dataType]" :key="opt['value']"
:label="opt['label']" :value="opt['value']" />
</el-select>
<span v-else>{{ scope.row.checkRuleName ?? '--' }}</span>
</template>
......
......@@ -16,6 +16,9 @@ import {
getSmallCategoryList,
getLargeCategoryList,
} from '@/api/modules/dataQuality';
import {
getMetaTreeData
} from '@/api/modules/dataMetaService';
import ruleForm from "../data_quality/ruleForm.vue";
import useUserStore from "@/store/modules/user";
import useDataQualityStore from "@/store/modules/dataQuality";
......@@ -60,7 +63,7 @@ const toSubjectTables: any = ref([]);
const getSubjectTableTreeData = () => {
dsFromTreeDataLoading.value = true;
getSubjectTableTree({}).then((res: any) => {
getMetaTreeData({}).then((res: any) => {
dsFromTreeDataLoading.value = false;
if (res.code == proxy.$passCode) {
dsFromTreeData.value = res.data?.map(d => {
......@@ -428,17 +431,17 @@ const save = () => {
<div class="operator_panel is-block">
<div class="panel_title">
<div class="title_text">
<span>选择主题</span>
<span class="tips_text">选择需要添加质检规则的主题表</span>
<span>选择表</span>
<span class="tips_text">选择需要添加质检规则的表,请确保数据库为脱产环境,避免数据质检影响您的生产环境,且允许在该脱产环境建脏数据的库,请知晓!</span>
</div>
</div>
<TreeTransfer mode="transfer" :title="['主题表', '已选表']" pid="parentGuid"
:from-tree-data-loading="dsFromTreeDataLoading" :lazy="true" :checkOnClickNode="true"
<TreeTransfer mode="transfer" :title="['可选表', '已选表']" pid="parentGuid"
:from-tree-data-loading="dsFromTreeDataLoading" :checkOnClickNode="true"
:from_checked_all="false" :from_data="dsFromTreeData" :to_data="dsToTreeData" node_key="guid"
:transferOpenNode="true" width="70%" :defaultProps="{
label: 'name',
value: 'guid'
}" :lazyFn="handleSubjectTableLazyFn" @left-check-change="handleSubjectCheckedChange"
}"
height="calc(100% - 64px)">
</TreeTransfer>
</div>
......
......@@ -221,7 +221,7 @@ const tableBtnClick = async (scope, btn) => {
const row = scope.row;
currTableData.value = row;
if (type == "export_file") {
const refSignInfo: any = await getDownFileSignByUrl(parseAndDecodeUrl(row.filePath).decodedPath);
const refSignInfo: any = await getDownFileSignByUrl(parseAndDecodeUrl(row.filePath).fileName);
if (!refSignInfo?.data) {
refSignInfo?.msg && ElMessage.error(refSignInfo?.msg);
return;
......@@ -236,7 +236,7 @@ const tableBtnClick = async (scope, btn) => {
//downFile(row.filePath, row.fileName)
} else if (type == 'export_abnormal_data') {
//downFile(row.errorFilePath, '')
const refSignInfo: any = await getDownFileSignByUrl(parseAndDecodeUrl(row.errorFilePath).decodedPath);
const refSignInfo: any = await getDownFileSignByUrl(parseAndDecodeUrl(row.errorFilePath).fileName);
if (!refSignInfo?.data) {
refSignInfo?.msg && ElMessage.error(refSignInfo?.msg);
return;
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!