元数据和数据质量功能迁入
Showing
32 changed files
with
2598 additions
and
52 deletions
This diff could not be displayed because it is too large.
src/api/modules/dataMetaService.ts
0 → 100644
| 1 | import request from "@/utils/request"; | ||
| 2 | |||
| 3 | /** | ||
| 4 | * 元数据-采集任务 | ||
| 5 | **/ | ||
| 6 | // 新增 | ||
| 7 | export const addMetaDataTask = (params) => request({ | ||
| 8 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-collect-task/add`, | ||
| 9 | method: 'post', | ||
| 10 | data: params | ||
| 11 | }) | ||
| 12 | // 删除 | ||
| 13 | export const deleteMetaDataTask = (params) => request({ | ||
| 14 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-collect-task/del`, | ||
| 15 | method: 'delete', | ||
| 16 | data: params | ||
| 17 | }) | ||
| 18 | // 分页查询 | ||
| 19 | export const getMetaDataTask = (params) => request({ | ||
| 20 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-collect-task/page-list`, | ||
| 21 | method: 'post', | ||
| 22 | data: params | ||
| 23 | }) | ||
| 24 | // 修改 | ||
| 25 | export const updateMetaDataTask = (params) => request({ | ||
| 26 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-collect-task/update`, | ||
| 27 | method: 'put', | ||
| 28 | data: params | ||
| 29 | }) | ||
| 30 | // 详情 | ||
| 31 | export const getMetaDataTaskDetail = (params) => request({ | ||
| 32 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-collect-task/detail/${params}`, | ||
| 33 | method: 'get' | ||
| 34 | }) | ||
| 35 | // 上线下线 | ||
| 36 | export const updateMetaDataState = (params) => request({ | ||
| 37 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-collect-task/change-state`, | ||
| 38 | method: 'get', | ||
| 39 | params | ||
| 40 | }) | ||
| 41 | // 名称唯一性验证 | ||
| 42 | export const checkMetaDataTask = (params) => request({ | ||
| 43 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-collect-task/check-exist`, | ||
| 44 | method: 'post', | ||
| 45 | data: { | ||
| 46 | collectTaskName: params, | ||
| 47 | } | ||
| 48 | }) | ||
| 49 | // 执行元数据采集任务 | ||
| 50 | export const executeMetaDataTask = (params) => request({ | ||
| 51 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-collect-task/execute/${params}`, | ||
| 52 | method: 'get' | ||
| 53 | }) | ||
| 54 | // 执行日志 | ||
| 55 | export const getMetaDataTaskLog = (params) => request({ | ||
| 56 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-collect-exec/page-list`, | ||
| 57 | method: 'post', | ||
| 58 | data: params | ||
| 59 | }) | ||
| 60 | // | ||
| 61 | export const saveMetaReportAnalysis = (params) => request({ | ||
| 62 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/lineage-analysis-report/add`, | ||
| 63 | method: 'post', | ||
| 64 | data: params | ||
| 65 | }) | ||
| 66 | /** | ||
| 67 | * 元数据-元数据查询 | ||
| 68 | **/ | ||
| 69 | // 树形数据 | ||
| 70 | export const getMetaTreeData = (params) => request({ | ||
| 71 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-table/meta-tree-list`, | ||
| 72 | method: 'post', | ||
| 73 | data: params | ||
| 74 | }) | ||
| 75 | // 数据库汇总信息 | ||
| 76 | export const getMetaDatabaseCollect = (params) => request({ | ||
| 77 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-table/meta-database-collect-list`, | ||
| 78 | method: 'post', | ||
| 79 | data: params | ||
| 80 | }) | ||
| 81 | // 库分页查询 | ||
| 82 | export const getMetaDataBase = (params) => request({ | ||
| 83 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-table/meta-table-collect-list`, | ||
| 84 | method: 'post', | ||
| 85 | data: params | ||
| 86 | }) | ||
| 87 | // 表分页查询 | ||
| 88 | export const getMetaDataSheet = (params) => request({ | ||
| 89 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-table/meta-table-detail-list`, | ||
| 90 | method: 'post', | ||
| 91 | data: params | ||
| 92 | }) | ||
| 93 | // 表字段查询 | ||
| 94 | export const getMetaSheetField = (params) => request({ | ||
| 95 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-table/meta-table-field-list`, | ||
| 96 | method: 'post', | ||
| 97 | params | ||
| 98 | }) | ||
| 99 | // 表索引查询 | ||
| 100 | export const getMetaSheetKeys = (params) => request({ | ||
| 101 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-table/meta-table-index-list`, | ||
| 102 | method: 'post', | ||
| 103 | params | ||
| 104 | }) | ||
| 105 | // 变更查询 | ||
| 106 | export const getMetaChange = (params) => request({ | ||
| 107 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-table/meta-collect-change-list`, | ||
| 108 | method: 'post', | ||
| 109 | data: params | ||
| 110 | }) | ||
| 111 | // 变更明细 | ||
| 112 | export const getMetaChangeRecord = (params) => request({ | ||
| 113 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-table/meta-change-record-list`, | ||
| 114 | method: 'post', | ||
| 115 | data: params | ||
| 116 | }) | ||
| 117 | // | ||
| 118 | export const getMetacompareList = (params) => request({ | ||
| 119 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-table/meta-change-compare-list/${params}`, | ||
| 120 | method: 'get', | ||
| 121 | //data: params | ||
| 122 | }) | ||
| 123 | |||
| 124 | // 表信息详情 | ||
| 125 | export const getMetaDetail = (params) => request({ | ||
| 126 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-table/detail/${params}`, | ||
| 127 | method: 'get', | ||
| 128 | }) | ||
| 129 | |||
| 130 | /** 根据表获取血缘数据 */ | ||
| 131 | export const getTableLineage = (params) => request({ | ||
| 132 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/lineage/lineage-query?guid=${params.guid}&lineageType=tb`, | ||
| 133 | method: 'get', | ||
| 134 | }) | ||
| 135 | |||
| 136 | /** 根据字段获取血缘数据 */ | ||
| 137 | export const getTableFieldLineage = (params) => request({ | ||
| 138 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/lineage/lineage-query?guid=${params.guid}&lineageType=co`, | ||
| 139 | method: 'get', | ||
| 140 | }) | ||
| 141 | |||
| 142 | /** 获取表的所有字段血缘数据 */ | ||
| 143 | export const getTableAllFieldLineage = (params) => request({ | ||
| 144 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/lineage/lineage-query-field?databaseName=${params.databaseName}&tableName=${params.tableName}`, | ||
| 145 | method: 'get', | ||
| 146 | }) | ||
| 147 | |||
| 148 | // 查询列表 | ||
| 149 | export const getMetaList = (params) => request({ | ||
| 150 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-table/list-meta-all`, | ||
| 151 | method: 'post', | ||
| 152 | data:params | ||
| 153 | }) | ||
| 154 | // 元数据表字段查询 | ||
| 155 | export const getMetaTableField = (params) => request({ | ||
| 156 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-table/meta-table-field-list`, | ||
| 157 | method: 'post', | ||
| 158 | params, | ||
| 159 | }) | ||
| 160 | // 保存血缘字段节点 | ||
| 161 | export const saveLineageField = (params) => request({ | ||
| 162 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/lineage/save-field`, | ||
| 163 | method: 'post', | ||
| 164 | data:params | ||
| 165 | }) | ||
| 166 | // 保存血源节点 | ||
| 167 | export const saveLineageTable = (params) => request({ | ||
| 168 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/lineage/save-table`, | ||
| 169 | method: 'post', | ||
| 170 | data:params | ||
| 171 | }) | ||
| 172 | // 删除血源节点 | ||
| 173 | export const delLineageTable = (params) => request({ | ||
| 174 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/lineage/del-vertex?vertexId=${params.vertexId}`, | ||
| 175 | method: 'delete', | ||
| 176 | //data:params | ||
| 177 | }) | ||
| 178 | /** 获取同步任务变更记录 */ | ||
| 179 | export const getTaskChangeList = (params) => request({ | ||
| 180 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/task-change-record/page-list`, | ||
| 181 | method: 'post', | ||
| 182 | data:params | ||
| 183 | }) | ||
| 184 | |||
| 185 | /** 获取元数据变更记录 */ | ||
| 186 | export const getMetaChangeList = (params) => request({ | ||
| 187 | url: ``, | ||
| 188 | method: 'post', | ||
| 189 | data:params | ||
| 190 | }) | ||
| 191 | |||
| 192 | /** 获取数据库选择列表 */ | ||
| 193 | export const getDatabase = (params) => request({ | ||
| 194 | url: `${import.meta.env.VITE_APP_API_BASEURL}/data-source/get-source-list`, | ||
| 195 | method: 'post', | ||
| 196 | data: params | ||
| 197 | }) | ||
| 198 | |||
| 199 | /** 源数据分析报告 */ | ||
| 200 | /**查询列表 */ | ||
| 201 | export const getAnalysisReportList = (params) => request({ | ||
| 202 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/lineage-analysis-report/list`, | ||
| 203 | method: 'post', | ||
| 204 | data: params | ||
| 205 | }) | ||
| 206 | |||
| 207 | /** 根据guid删除 */ | ||
| 208 | export const delAnalysisRepor = (params) => request({ | ||
| 209 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/lineage-analysis-report/del`, | ||
| 210 | method: 'delete', | ||
| 211 | data: params | ||
| 212 | }) | ||
| 213 | /** 根据guid更新 */ | ||
| 214 | export const updateAnalysisRepor = (params) => request({ | ||
| 215 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/lineage-analysis-report/update`, | ||
| 216 | method: 'put', | ||
| 217 | data: params | ||
| 218 | }) | ||
| 219 | /** 删除边 */ | ||
| 220 | export const delLineAge = (params) => request({ | ||
| 221 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/lineage/del-edge?euid=${params}`, | ||
| 222 | method: 'delete', | ||
| 223 | }) | ||
| 224 | /** 判断是否有元数据数据 */ | ||
| 225 | export const checkTableData = (params) => request({ | ||
| 226 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-table/check-table-data/${params}`, | ||
| 227 | method: 'get', | ||
| 228 | }) | ||
| 229 | /**校验任务是否有数据库信息 */ | ||
| 230 | export const checkDatabaseIsExist = (dataSourceGuid) => request({ | ||
| 231 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-collect-task/check-database-is-exist/${dataSourceGuid}`, | ||
| 232 | method: 'get', | ||
| 233 | }) | ||
| 234 | /**同步任务 变更详情展示 */ | ||
| 235 | |||
| 236 | export const syncChangeDetail = (guid) => request({ | ||
| 237 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/task-change-record/sync-change-detail/${guid}`, | ||
| 238 | method: 'get', | ||
| 239 | }) | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
src/api/modules/dataQuality.ts
0 → 100644
| 1 | import request from "@/utils/request"; | ||
| 2 | |||
| 3 | /** 获取质量模型对应的所有分组表格数据 */ | ||
| 4 | export const getQualityTreeData = (params) => request({ | ||
| 5 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-model-group/quality-model-tree` + (params ? `?guid=${params}` : ''), | ||
| 6 | method: 'get' | ||
| 7 | }) | ||
| 8 | |||
| 9 | /** 获取数据源下,对应分组的表数据 */ | ||
| 10 | export const getQualityTreeDataByDs = (params) => request({ | ||
| 11 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-model-group/quality-model-tree?guid=${params.guid}&dataSourceGuid=${params.dataSourceGuid}`, | ||
| 12 | method: 'get' | ||
| 13 | }) | ||
| 14 | |||
| 15 | /** 获取质量模型对应的所有分组表格分页数据 */ | ||
| 16 | export const getQualityGroupData = (params) => request({ | ||
| 17 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-model-group/page-list`, | ||
| 18 | method: 'post', | ||
| 19 | data: params | ||
| 20 | }) | ||
| 21 | |||
| 22 | /** 删除质量模型的指定分组。 */ | ||
| 23 | export const deleteGroup = (params) => request({ | ||
| 24 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-model-group/del`, | ||
| 25 | method: 'delete', | ||
| 26 | data: params | ||
| 27 | }) | ||
| 28 | |||
| 29 | /** 添加分组 */ | ||
| 30 | export const addQualityGroup = (params) => request({ | ||
| 31 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-model-group/add`, | ||
| 32 | method: 'post', | ||
| 33 | data: params | ||
| 34 | }) | ||
| 35 | |||
| 36 | /** 修改分组 */ | ||
| 37 | export const updateQualityGroup = (params) => request({ | ||
| 38 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-model-group/update`, | ||
| 39 | method: 'put', | ||
| 40 | data: params | ||
| 41 | }) | ||
| 42 | |||
| 43 | /** 获取质量分组对应的表格分页数据 */ | ||
| 44 | export const getQualityTable = (params) => request({ | ||
| 45 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-model/page-list`, | ||
| 46 | method: 'post', | ||
| 47 | data: params | ||
| 48 | }) | ||
| 49 | |||
| 50 | /** 删除质检表 */ | ||
| 51 | export const deleteQualityTable = (params) => request({ | ||
| 52 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-model/del`, | ||
| 53 | method: 'delete', | ||
| 54 | data: params | ||
| 55 | }) | ||
| 56 | |||
| 57 | /** 获取质量表对应的所有规则数据 */ | ||
| 58 | export const getQualityTableRule = (params) => request({ | ||
| 59 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-model/list/model-rule`, | ||
| 60 | method: 'post', | ||
| 61 | data: params | ||
| 62 | }) | ||
| 63 | |||
| 64 | /** 删除质检表规则 */ | ||
| 65 | export const deleteQualityTableRule = (params) => request({ | ||
| 66 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-model/conf/del?ruleConfGuid=${params}`, | ||
| 67 | method: 'delete', | ||
| 68 | data: params | ||
| 69 | }) | ||
| 70 | |||
| 71 | /** 更新质检表规则的禁用和启用状态 */ | ||
| 72 | export const updateRuleBizState = (params) => request({ | ||
| 73 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-model/conf/upate-bizstate?ruleConfGuid=${params.ruleConfGuid}&bizState=${params.bizState}`, | ||
| 74 | method: 'post', | ||
| 75 | }) | ||
| 76 | |||
| 77 | /** 获取数据库表列表 */ | ||
| 78 | export const getDatabase = (params) => request({ | ||
| 79 | url: `${import.meta.env.VITE_APP_API_BASEURL}/data-source/get-source-list`, | ||
| 80 | method: 'post', | ||
| 81 | data: params | ||
| 82 | }) | ||
| 83 | |||
| 84 | /** 新建质检表,获取主题域分层的主题表树结构 */ | ||
| 85 | export const getSubjectTableTree = (params) => request({ | ||
| 86 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-catalog-directory/directory-tree-list`, | ||
| 87 | method: 'post', | ||
| 88 | data: params | ||
| 89 | }) | ||
| 90 | |||
| 91 | /** 新建质检表,获取主题域分层的主题表树结构 */ | ||
| 92 | export const getSubjectTableByDomain = (params) => request({ | ||
| 93 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-catalog-subject/list-by-domain-guid?domainGuid=${params}`, | ||
| 94 | method: 'get', | ||
| 95 | data: params | ||
| 96 | }) | ||
| 97 | |||
| 98 | /** 获取主题表的字段列表 */ | ||
| 99 | export const getSubjectFields = (params) => request({ | ||
| 100 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-catalog-subject/field/list?subjectGuid=${params}`, | ||
| 101 | method: 'get', | ||
| 102 | }) | ||
| 103 | |||
| 104 | /** 表的逻辑条件和sql检验。 */ | ||
| 105 | export const validateSubjectTableRule = (params) => request({ | ||
| 106 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/sql-operate/check-sql`, | ||
| 107 | method: 'post', | ||
| 108 | data: params | ||
| 109 | }) | ||
| 110 | |||
| 111 | /** 自定义sql检验 */ | ||
| 112 | export const validateCustomSql = (params) => request({ | ||
| 113 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-model/conf/check-custom-sql`, | ||
| 114 | method: 'post', | ||
| 115 | data: params | ||
| 116 | }) | ||
| 117 | |||
| 118 | /** 批量验证过滤条件 */ | ||
| 119 | export const batchValidateSubjectTableRule = (params) => request({ | ||
| 120 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/sql-operate/batch-check-sql`, | ||
| 121 | method: 'post', | ||
| 122 | data: params | ||
| 123 | }) | ||
| 124 | |||
| 125 | /** 保存质检表 */ | ||
| 126 | export const saveQualityTable = (params) => request({ | ||
| 127 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-model/add`, | ||
| 128 | method: 'post', | ||
| 129 | data: params | ||
| 130 | }) | ||
| 131 | |||
| 132 | // 获取规则类型的接口 | ||
| 133 | export const getRuleTypeList = () => request({ | ||
| 134 | url:`${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-rule/list`, | ||
| 135 | method: 'post', | ||
| 136 | data: {} | ||
| 137 | }) | ||
| 138 | |||
| 139 | // 获取规则大类的接口 | ||
| 140 | export const getLargeCategoryList = () => request({ | ||
| 141 | url:`${import.meta.env.VITE_APP_API_BASEURL}/data-dict/get-data-list`, | ||
| 142 | method: 'post', | ||
| 143 | data: { paramCode: "LARGE-CATEGORY" } | ||
| 144 | }) | ||
| 145 | |||
| 146 | // 获取规则小类的接口 | ||
| 147 | export const getSmallCategoryList = () => request({ | ||
| 148 | url:`${import.meta.env.VITE_APP_API_BASEURL}/data-dict/get-data-list`, | ||
| 149 | method: 'post', | ||
| 150 | data: { paramCode: "SMALL-CATEGORY" } | ||
| 151 | }) | ||
| 152 | |||
| 153 | // 根据规则guid获取规则的详情信息。 | ||
| 154 | export const getRuleConfDetail = (param) => request({ | ||
| 155 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-model/conf/detail?ruleConfGuid=${param}`, | ||
| 156 | method: 'get' | ||
| 157 | }) | ||
| 158 | |||
| 159 | // 根据质检模型guid获取详情信息。 | ||
| 160 | export const getModelDetail = (param) => request({ | ||
| 161 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-model/detail/${param}`, | ||
| 162 | method: 'get' | ||
| 163 | }) | ||
| 164 | |||
| 165 | // 更新规则信息。 | ||
| 166 | export const updateModelRule = (params) => request({ | ||
| 167 | url:`${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-model/conf/update`, | ||
| 168 | method: 'post', | ||
| 169 | data: params | ||
| 170 | }) | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
src/api/modules/dataQualityAssess.ts
0 → 100644
| 1 | import request from "@/utils/request"; | ||
| 2 | |||
| 3 | /** 根据类型获取方案列表 */ | ||
| 4 | export const getPlanList = (params) => request({ | ||
| 5 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-plan/list`, | ||
| 6 | method: 'post', | ||
| 7 | data: params | ||
| 8 | }) | ||
| 9 | |||
| 10 | /** 删除方案 */ | ||
| 11 | export const deletePlan = (guids) => request({ | ||
| 12 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-plan/del`, | ||
| 13 | method: 'delete', | ||
| 14 | data: guids | ||
| 15 | }) | ||
| 16 | |||
| 17 | /** 更新指定方案的状态上线,下线。 */ | ||
| 18 | export const updateQualityPlanState = (params) => request({ | ||
| 19 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-plan/state-change?guid=${params.guid}&state=${params.state}`, | ||
| 20 | method: 'post' | ||
| 21 | }) | ||
| 22 | |||
| 23 | /** 手动执行方案 */ | ||
| 24 | export const executePlan = (params) => request({ | ||
| 25 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-plan/exec-plan?planGuid=${params}`, | ||
| 26 | method: 'post' | ||
| 27 | }) | ||
| 28 | |||
| 29 | /** 获取方案详情,用于编辑 */ | ||
| 30 | export const getAssessPlanDetail = (params) => request({ | ||
| 31 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-plan/detail/${params}`, | ||
| 32 | method: 'get' | ||
| 33 | }) | ||
| 34 | |||
| 35 | /** 获取方案详情中的过滤条件,用于编辑 */ | ||
| 36 | export const getPlanFilterDetail = (params) => request({ | ||
| 37 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-plan/query-plan-filter?planGuid=${params}`, | ||
| 38 | method: 'get' | ||
| 39 | }) | ||
| 40 | |||
| 41 | /** 获取方案查看详情列表数据。 */ | ||
| 42 | export const getAssessDetailTableData = (params) => request({ | ||
| 43 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-plan/query-exec-list`, | ||
| 44 | method: 'post', | ||
| 45 | data: params | ||
| 46 | }) | ||
| 47 | |||
| 48 | /** 根据执行guid,获取方案执行详情。 */ | ||
| 49 | export const getExecPlanDetailTableData = (params) => request({ | ||
| 50 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-plan/query-exec-detail?planGuid=${params.planGuid}&planExecGuid=${params.planExecGuid}`, | ||
| 51 | method: 'get' | ||
| 52 | }) | ||
| 53 | |||
| 54 | /** 获取方案详情中每个表的规则详细执行列表数据。 */ | ||
| 55 | export const getAssessTableRulesData = (params) => request({ | ||
| 56 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-plan/query-exec-table-detail?planExecGuid=${params.planExecGuid}&qualityModelGuid=${params.qualityModelGuid}`, | ||
| 57 | method: 'get' | ||
| 58 | }) | ||
| 59 | |||
| 60 | /** 获取脏数据查询 */ | ||
| 61 | export const getQueryDirtyData = (params) => request({ | ||
| 62 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-plan/query-dirty-data`, | ||
| 63 | method: 'post', | ||
| 64 | data: params | ||
| 65 | }) | ||
| 66 | |||
| 67 | /** 获取脏数据字段列表 */ | ||
| 68 | export const getQueryDirtyFields = (params) => request({ | ||
| 69 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-plan/query-dirty-data-column?qualityModelGuid=${params}`, | ||
| 70 | method: 'get' | ||
| 71 | }) | ||
| 72 | |||
| 73 | /** 获取数据质量模型统计 */ | ||
| 74 | export const getModelCountList = (params) => request({ | ||
| 75 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-model/list/model-count`, | ||
| 76 | method: 'post', | ||
| 77 | data: params | ||
| 78 | }) | ||
| 79 | |||
| 80 | /** 获取规则大类统计 */ | ||
| 81 | export const getModelRuleCount = (params) => request({ | ||
| 82 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-model/list/model-rule-category-count`, | ||
| 83 | method: 'post', | ||
| 84 | data: params | ||
| 85 | }) | ||
| 86 | |||
| 87 | /** 根据modelGuid获取详细的规则统计 */ | ||
| 88 | export const getModelRules = (params) => request({ | ||
| 89 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-model/list/model-rule`, | ||
| 90 | method: 'post', | ||
| 91 | data: params | ||
| 92 | }) | ||
| 93 | |||
| 94 | /** 检查质检评估方案名称是否重复 */ | ||
| 95 | export const checkPlanExist = (params) => request({ | ||
| 96 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-plan/exist?planName=${params}`, | ||
| 97 | method: 'get' | ||
| 98 | }) | ||
| 99 | |||
| 100 | /** 获取有效的数据分组,用于评估 表选择 */ | ||
| 101 | export const getValidGroup = () => request({ | ||
| 102 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-model-group/valid-group-list`, | ||
| 103 | method: 'get' | ||
| 104 | }) | ||
| 105 | |||
| 106 | /** 获取数据库列表 */ | ||
| 107 | export const getModelDbGp = (dsGuid: any = null) => request({ | ||
| 108 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-model/list/model-db-gp` + (!dsGuid ? '' : `?dataSourceGuid=${dsGuid}`), | ||
| 109 | method: 'get' | ||
| 110 | }) | ||
| 111 | |||
| 112 | /** 保存质量方案 */ | ||
| 113 | export const saveQualityPlan = (params) => request({ | ||
| 114 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-plan/add`, | ||
| 115 | method: 'post', | ||
| 116 | data: params | ||
| 117 | }) | ||
| 118 | |||
| 119 | /** 更新质量方案 */ | ||
| 120 | export const updateQualityPlan = (params) => request({ | ||
| 121 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-plan/update`, | ||
| 122 | method: 'put', | ||
| 123 | data: params | ||
| 124 | }) | ||
| 125 | |||
| 126 | /** 下载脏数据 */ | ||
| 127 | export const downloadDirtyData = (params) => request({ | ||
| 128 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-plan/down-dirty-data`, | ||
| 129 | method: 'post', | ||
| 130 | data: params, | ||
| 131 | responseType: 'blob' | ||
| 132 | }) | ||
| 133 | |||
| 134 | /** 获取对应执行方案的规则详情 */ | ||
| 135 | export const getRecordRuleConfDetail = (param) => request({ | ||
| 136 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-model-record/conf/detail?ruleConfGuid=${param.ruleConfGuid}&planExecGuid=${param.planExecGuid}`, | ||
| 137 | method: 'get' | ||
| 138 | }); | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
src/api/modules/dataQualityWord.ts
0 → 100644
| 1 | /** 用于质量分析报告模块 */ | ||
| 2 | import request from "@/utils/request"; | ||
| 3 | |||
| 4 | /** 获取质量分析报告列表数据。 */ | ||
| 5 | export const getQualityWordList = (params) => request({ | ||
| 6 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-analysis-report/page-list`, | ||
| 7 | method: 'post', | ||
| 8 | data: params | ||
| 9 | }) | ||
| 10 | |||
| 11 | /** 删除质量分析报告 */ | ||
| 12 | export const deleteQualityWord = (params) => request({ | ||
| 13 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-analysis-report/del`, | ||
| 14 | method: 'delete', | ||
| 15 | data: params | ||
| 16 | }) | ||
| 17 | |||
| 18 | /** 添加质量报告 */ | ||
| 19 | export const addQualityWord = (params) => request({ | ||
| 20 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-analysis-report/add`, | ||
| 21 | method: 'post', | ||
| 22 | data: params | ||
| 23 | }) | ||
| 24 | |||
| 25 | /** 更新质量报告 */ | ||
| 26 | export const updateQualityWord = (params) => request({ | ||
| 27 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-analysis-report/update`, | ||
| 28 | method: 'put', | ||
| 29 | data: params | ||
| 30 | }) | ||
| 31 | |||
| 32 | /** 根据质量报告获取对应的执行日志。 */ | ||
| 33 | export const getWordLogList = (params) => request({ | ||
| 34 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-analysis-report/page-exec-list`, | ||
| 35 | method: 'post', | ||
| 36 | data: params | ||
| 37 | }); | ||
| 38 | |||
| 39 | /** 获取质量分析报告的详细内容,根绝报告guid。 */ | ||
| 40 | export const getReportDetail = (params) => request({ | ||
| 41 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-analysis-report/get-report-data`, | ||
| 42 | method: 'post', | ||
| 43 | data: params | ||
| 44 | }); | ||
| 45 | |||
| 46 | /** 获取数据质量一级指标得分统计 */ | ||
| 47 | export const getLargeCategoryScore = (params) => request({ | ||
| 48 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-analysis-report/get-largeCategory-score?reportExecGuid=${params}`, | ||
| 49 | method: 'get' | ||
| 50 | }); | ||
| 51 | |||
| 52 | /** 获取方案执行明细 */ | ||
| 53 | export const getPlanDetail= (params) => request({ | ||
| 54 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-analysis-report/query-exec-table-detail?reportExecGuid=${params.reportExecGuid}&planGuid=${params.planGuid}`, | ||
| 55 | method: 'get' | ||
| 56 | }); | ||
| 57 | |||
| 58 | /** 获取方案执行表规则查看 */ | ||
| 59 | export const getTableRuleDetail= (params) => request({ | ||
| 60 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-analysis-report/query-exec-table-rule-detail?reportExecGuid=${params}`, | ||
| 61 | method: 'get' | ||
| 62 | }); | ||
| 63 | |||
| 64 | /** 手动执行报告 */ | ||
| 65 | export const executeReport = (params) => request({ | ||
| 66 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-analysis-report/exec?guid=${params}`, | ||
| 67 | method: 'get' | ||
| 68 | }) | ||
| 69 | |||
| 70 | /** html转word接口 */ | ||
| 71 | export const htmlToWord = (params) => request({ | ||
| 72 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-analysis-report/download/html-to-word`, | ||
| 73 | method: 'postJsonD', | ||
| 74 | data: params, | ||
| 75 | responseType: 'blob' | ||
| 76 | }); | ||
| 77 | |||
| 78 | /**上下线 */ | ||
| 79 | |||
| 80 | export const stateChange = (params) => request({ | ||
| 81 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-analysis-report/state-change?guid=${params.guid}&state=${params.state}`, | ||
| 82 | method: 'post', | ||
| 83 | |||
| 84 | }); | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
src/components/PageNav/index.ts
0 → 100644
| 1 | /** 通用的分页配置 */ | ||
| 2 | export const commonPageConfig = { | ||
| 3 | limit: 50, | ||
| 4 | curr: 1, | ||
| 5 | sizes: [ | ||
| 6 | { label: "10", value: 10 }, | ||
| 7 | { label: "50", value: 50 }, | ||
| 8 | { label: "100", value: 100 }, | ||
| 9 | { label: "150", value: 150 }, | ||
| 10 | { label: "200", value: 200 }, | ||
| 11 | ] | ||
| 12 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -36,6 +36,10 @@ const pageCount = computed(() => { | ... | @@ -36,6 +36,10 @@ const pageCount = computed(() => { |
| 36 | return Math.ceil(props.pageInfo.rows / props.pageInfo.limit) | 36 | return Math.ceil(props.pageInfo.rows / props.pageInfo.limit) |
| 37 | }) | 37 | }) |
| 38 | 38 | ||
| 39 | const pagerCount = computed(() => { | ||
| 40 | return props.pageInfo.pagerCount ?? 7; | ||
| 41 | }) | ||
| 42 | |||
| 39 | const pageType = computed({ | 43 | const pageType = computed({ |
| 40 | get: () => { | 44 | get: () => { |
| 41 | return props.pageInfo.type | 45 | return props.pageInfo.type |
| ... | @@ -135,7 +139,7 @@ function inputPageJump(val) { | ... | @@ -135,7 +139,7 @@ function inputPageJump(val) { |
| 135 | 条数据</span> | 139 | 条数据</span> |
| 136 | </el-pagination> | 140 | </el-pagination> |
| 137 | <el-pagination small layout="prev, slot, next" :total="pageTotal" :default-page-size="pageLimit" | 141 | <el-pagination small layout="prev, slot, next" :total="pageTotal" :default-page-size="pageLimit" |
| 138 | :page-count="pageCount" :current-page="parseInt(pageNum)" @current-change="pageCurrentChange"> | 142 | :page-count="pageCount" :pager-count="pagerCount" :current-page="parseInt(pageNum)" @current-change="pageCurrentChange"> |
| 139 | <div class="page_code"> | 143 | <div class="page_code"> |
| 140 | <el-input class="pagnination" type="number" :min="1" :max="pageCount" v-model.trim="pageNumInput" size="small" | 144 | <el-input class="pagnination" type="number" :min="1" :max="pageCount" v-model.trim="pageNumInput" size="small" |
| 141 | style="width: 40px" @input="handleInput" @change="inputPageJump" :disabled="pageCount <= 1" /> | 145 | style="width: 40px" @input="handleInput" @change="inputPageJump" :disabled="pageCount <= 1" /> |
| ... | @@ -162,7 +166,7 @@ function inputPageJump(val) { | ... | @@ -162,7 +166,7 @@ function inputPageJump(val) { |
| 162 | }}</span> | 166 | }}</span> |
| 163 | 条数据</span> | 167 | 条数据</span> |
| 164 | </el-pagination> | 168 | </el-pagination> |
| 165 | <el-pagination background small layout="prev, pager, next, slot" :total="pageTotal" :default-page-size="pageLimit" | 169 | <el-pagination background small layout="prev, pager, next, slot" :total="pageTotal" :default-page-size="pageLimit" :pager-count="pagerCount" |
| 166 | :page-count="pageCount" :current-page="pageCurr" @current-change="pageCurrentChange"> | 170 | :page-count="pageCount" :current-page="pageCurr" @current-change="pageCurrentChange"> |
| 167 | <div class="page_jumper"> | 171 | <div class="page_jumper"> |
| 168 | <el-input class="pagnination" type="number" :min="1" :max="pageCount" v-model.trim="pageNumInput" size="small" | 172 | <el-input class="pagnination" type="number" :min="1" :max="pageCount" v-model.trim="pageNumInput" size="small" |
| ... | @@ -237,4 +241,4 @@ function inputPageJump(val) { | ... | @@ -237,4 +241,4 @@ function inputPageJump(val) { |
| 237 | padding: 0 8px; | 241 | padding: 0 8px; |
| 238 | } | 242 | } |
| 239 | } | 243 | } |
| 240 | </style>@/utils/common | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 244 | </style> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
src/router/modules/dataMeta.ts
0 → 100644
| 1 | import type { RouteRecordRaw } from 'vue-router' | ||
| 2 | |||
| 3 | function Layout() { | ||
| 4 | return import('@/layouts/index.vue') | ||
| 5 | } | ||
| 6 | |||
| 7 | const routes: RouteRecordRaw[] = [ | ||
| 8 | { | ||
| 9 | path: '/data-meta/collect-task', | ||
| 10 | component: Layout, | ||
| 11 | meta: { | ||
| 12 | title: '采集任务', | ||
| 13 | icon: 'sidebar-videos', | ||
| 14 | }, | ||
| 15 | children: [ | ||
| 16 | { | ||
| 17 | path: '', | ||
| 18 | name: 'collectorTask', | ||
| 19 | component: () => import('@/views/data_meta/collectorTask.vue'), | ||
| 20 | meta: { | ||
| 21 | title: '采集任务', | ||
| 22 | sidebar: false, | ||
| 23 | breadcrumb: false, | ||
| 24 | cache: true | ||
| 25 | }, | ||
| 26 | }, | ||
| 27 | { | ||
| 28 | path: 'excution-log', | ||
| 29 | name: 'excutionLog', | ||
| 30 | component: () => import('@/views/data_meta/executionLog.vue'), | ||
| 31 | meta: { | ||
| 32 | title: '采集日志', | ||
| 33 | sidebar: false, | ||
| 34 | breadcrumb: false, | ||
| 35 | }, | ||
| 36 | beforeEnter: (to, from) => { | ||
| 37 | if (to.query.name) { | ||
| 38 | to.meta.title = `采集日志-${to.query.name}`; | ||
| 39 | } | ||
| 40 | } | ||
| 41 | }, | ||
| 42 | ], | ||
| 43 | }, | ||
| 44 | { | ||
| 45 | path: '/data-meta/metadata-query', | ||
| 46 | component: Layout, | ||
| 47 | meta: { | ||
| 48 | title: '元数据查询', | ||
| 49 | icon: 'sidebar-videos', | ||
| 50 | }, | ||
| 51 | children: [ | ||
| 52 | { | ||
| 53 | path: '', | ||
| 54 | name: 'metadataQuery', | ||
| 55 | component: () => import('@/views/data_meta/metadataQuery.vue'), | ||
| 56 | meta: { | ||
| 57 | title: '元数据查询', | ||
| 58 | sidebar: false, | ||
| 59 | breadcrumb: false, | ||
| 60 | cache: true | ||
| 61 | }, | ||
| 62 | }, | ||
| 63 | { | ||
| 64 | path: 'meta-sheet', | ||
| 65 | name: 'metaSheet', | ||
| 66 | component: () => import('@/views/data_meta/metaSheet.vue'), | ||
| 67 | meta: { | ||
| 68 | title: '元数据详情-', | ||
| 69 | sidebar: false, | ||
| 70 | breadcrumb: false, | ||
| 71 | cache: true, | ||
| 72 | reuse: true | ||
| 73 | }, | ||
| 74 | beforeEnter: (to, from) => { | ||
| 75 | if (to.query.name) { | ||
| 76 | to.meta.title = `元数据详情-${to.query.name}`; | ||
| 77 | } | ||
| 78 | } | ||
| 79 | }, | ||
| 80 | ], | ||
| 81 | }, | ||
| 82 | { | ||
| 83 | path: '/data-meta/metadata-lineage', | ||
| 84 | component: Layout, | ||
| 85 | meta: { | ||
| 86 | title: '元数据血缘', | ||
| 87 | icon: 'ep:grid', | ||
| 88 | }, | ||
| 89 | children: [ | ||
| 90 | { | ||
| 91 | path: 'analysis-view', | ||
| 92 | name: 'analysisView', | ||
| 93 | component: () => import('@/views/data_meta/analysisView.vue'), | ||
| 94 | meta: { | ||
| 95 | title: '查看血缘', | ||
| 96 | breadcrumb: false, | ||
| 97 | cache: true | ||
| 98 | }, | ||
| 99 | }, | ||
| 100 | { | ||
| 101 | path: 'change-detection', | ||
| 102 | name: 'changeDetection', | ||
| 103 | component: () => import('@/views/data_meta/changeDetection.vue'), | ||
| 104 | meta: { | ||
| 105 | title: '血缘变更检测', | ||
| 106 | breadcrumb: false, | ||
| 107 | cache: true | ||
| 108 | }, | ||
| 109 | }, | ||
| 110 | { | ||
| 111 | path: 'analysis-reports', | ||
| 112 | name: 'analysisReports', | ||
| 113 | component: () => import('@/views/data_meta/analysisReports.vue'), | ||
| 114 | meta: { | ||
| 115 | title: '血缘关系解析', | ||
| 116 | breadcrumb: false, | ||
| 117 | cache: true | ||
| 118 | }, | ||
| 119 | }, | ||
| 120 | ], | ||
| 121 | }, | ||
| 122 | ] | ||
| 123 | |||
| 124 | export default routes |
src/router/modules/dataQuality.ts
0 → 100644
| 1 | import type { RouteRecordRaw } from 'vue-router' | ||
| 2 | |||
| 3 | function Layout() { | ||
| 4 | return import('@/layouts/index.vue') | ||
| 5 | } | ||
| 6 | |||
| 7 | const routes: RouteRecordRaw[] = [ | ||
| 8 | { | ||
| 9 | path: '/data-quality/quality-rules', | ||
| 10 | component: Layout, | ||
| 11 | meta: { | ||
| 12 | title: '质量规则管理', | ||
| 13 | icon: 'sidebar-videos', | ||
| 14 | }, | ||
| 15 | children: [ | ||
| 16 | { | ||
| 17 | path: '', | ||
| 18 | name: 'qualityRules', | ||
| 19 | component: () => import('@/views/data_quality/qualityRules.vue'), | ||
| 20 | meta: { | ||
| 21 | title: '质量规则管理', | ||
| 22 | sidebar: false, | ||
| 23 | breadcrumb: false, | ||
| 24 | cache: true | ||
| 25 | }, | ||
| 26 | }, | ||
| 27 | { | ||
| 28 | path: 'rule-model', | ||
| 29 | name: 'ruleModel', | ||
| 30 | component: () => import('@/views/data_quality/ruleModel.vue'), | ||
| 31 | meta: { | ||
| 32 | title: '新建质检表', | ||
| 33 | sidebar: false, | ||
| 34 | breadcrumb: false, | ||
| 35 | cache: true, | ||
| 36 | reuse: true | ||
| 37 | }, | ||
| 38 | beforeEnter: (to, from) => { | ||
| 39 | if (to.query.groupGuid) { | ||
| 40 | to.meta.title = `新建质检表(${to.query.name})`; | ||
| 41 | to.meta.editPage = true; | ||
| 42 | } | ||
| 43 | } | ||
| 44 | }, | ||
| 45 | { | ||
| 46 | path: 'rule-template', | ||
| 47 | name: 'ruleTemplate', | ||
| 48 | component: () => import('@/views/data_quality/ruleTemplate.vue'), | ||
| 49 | meta: { | ||
| 50 | title: '新建规则', | ||
| 51 | sidebar: false, | ||
| 52 | breadcrumb: false, | ||
| 53 | cache: true, | ||
| 54 | reuse: true | ||
| 55 | }, | ||
| 56 | beforeEnter: (to, from) => { | ||
| 57 | if (to.query.modelGuid) { | ||
| 58 | to.meta.title = `新建规则(${to.query.name})`; | ||
| 59 | to.meta.editPage = true; | ||
| 60 | } | ||
| 61 | } | ||
| 62 | }, | ||
| 63 | { | ||
| 64 | path: 'rule-model-edit', | ||
| 65 | name: 'ruleModelEdit', | ||
| 66 | component: () => import('@/views/data_quality/ruleModelEdit.vue'), | ||
| 67 | meta: { | ||
| 68 | title: '编辑', | ||
| 69 | sidebar: false, | ||
| 70 | breadcrumb: false, | ||
| 71 | cache: true, | ||
| 72 | reuse: true, | ||
| 73 | editPage: true | ||
| 74 | }, | ||
| 75 | beforeEnter: (to, from) => { | ||
| 76 | if (to.query.guid) { | ||
| 77 | to.meta.title = `编辑-`; | ||
| 78 | } | ||
| 79 | } | ||
| 80 | }, | ||
| 81 | { | ||
| 82 | path: 'import-file', | ||
| 83 | name: 'importFiles', | ||
| 84 | component: () => import('@/views/importFile.vue'), | ||
| 85 | meta: { | ||
| 86 | title: '文件导入', | ||
| 87 | sidebar: false, | ||
| 88 | breadcrumb: false, | ||
| 89 | cache: true, | ||
| 90 | reuse: true | ||
| 91 | }, | ||
| 92 | } | ||
| 93 | ], | ||
| 94 | }, | ||
| 95 | { | ||
| 96 | path: '/data-quality/quality-assess', | ||
| 97 | component: Layout, | ||
| 98 | meta: { | ||
| 99 | title: '质量评估方案', | ||
| 100 | icon: 'sidebar-videos', | ||
| 101 | }, | ||
| 102 | children: [ | ||
| 103 | { | ||
| 104 | path: '', | ||
| 105 | name: 'qualityAssess', | ||
| 106 | component: () => import('@/views/data_quality/qualityAssess.vue'), | ||
| 107 | meta: { | ||
| 108 | title: '质量评估方案', | ||
| 109 | sidebar: false, | ||
| 110 | breadcrumb: false, | ||
| 111 | cache: true | ||
| 112 | }, | ||
| 113 | }, | ||
| 114 | { | ||
| 115 | path: 'assess-template', | ||
| 116 | name: 'assessTemplate', | ||
| 117 | component: () => import('@/views/data_quality/assessTemplate.vue'), | ||
| 118 | meta: { | ||
| 119 | title: '新建质量评估方案', | ||
| 120 | sidebar: false, | ||
| 121 | breadcrumb: false, | ||
| 122 | cache: true, | ||
| 123 | reuse: true, | ||
| 124 | editPage: true | ||
| 125 | }, | ||
| 126 | beforeEnter: (to, from) => { | ||
| 127 | if (to.query.detail) { | ||
| 128 | to.meta.title = `方案详情-${to.query.planName}`; | ||
| 129 | to.meta.editPage = false; | ||
| 130 | } else if (to.query.planName) { | ||
| 131 | to.meta.title = `方案编辑-${to.query.planName}`; | ||
| 132 | } | ||
| 133 | } | ||
| 134 | }, | ||
| 135 | { | ||
| 136 | path: 'assess-detail', | ||
| 137 | name: 'assessDetail', | ||
| 138 | component: () => import('@/views/data_quality/assessDetail.vue'), | ||
| 139 | meta: { | ||
| 140 | title: '查看结果', | ||
| 141 | sidebar: false, | ||
| 142 | breadcrumb: false, | ||
| 143 | cache: true, | ||
| 144 | reuse: true | ||
| 145 | }, | ||
| 146 | beforeEnter: (to, from) => { | ||
| 147 | if (to.query.name) { | ||
| 148 | to.meta.title = `查看结果-${to.query.name}`; | ||
| 149 | } | ||
| 150 | } | ||
| 151 | }, | ||
| 152 | { | ||
| 153 | path: 'assess-dirty', | ||
| 154 | name: 'assessDirty', | ||
| 155 | component: () => import('@/views/data_quality/assessDirty.vue'), | ||
| 156 | meta: { | ||
| 157 | title: '脏数据', | ||
| 158 | sidebar: false, | ||
| 159 | breadcrumb: false, | ||
| 160 | cache: true, | ||
| 161 | reuse: true | ||
| 162 | }, | ||
| 163 | beforeEnter: (to, from) => { | ||
| 164 | if (to.query.name) { | ||
| 165 | to.meta.title = `脏数据-${to.query.name}`; | ||
| 166 | } | ||
| 167 | } | ||
| 168 | }, | ||
| 169 | { | ||
| 170 | path: 'assess-log', | ||
| 171 | name: 'assessLog', | ||
| 172 | component: () => import('@/views/data_quality/assessLog.vue'), | ||
| 173 | meta: { | ||
| 174 | title: '执行日志', | ||
| 175 | sidebar: false, | ||
| 176 | breadcrumb: false, | ||
| 177 | cache: true, | ||
| 178 | reuse: true | ||
| 179 | }, | ||
| 180 | beforeEnter: (to, from) => { | ||
| 181 | if (to.query.guid) { | ||
| 182 | to.meta.title = `日志-${to.query.name}`; | ||
| 183 | } | ||
| 184 | } | ||
| 185 | }, | ||
| 186 | ], | ||
| 187 | }, | ||
| 188 | { | ||
| 189 | path: '/data-quality/quality-analysis', | ||
| 190 | component: Layout, | ||
| 191 | meta: { | ||
| 192 | title: '质量分析报告', | ||
| 193 | icon: 'ep:grid', | ||
| 194 | }, | ||
| 195 | children: [ | ||
| 196 | { | ||
| 197 | path: '', | ||
| 198 | name: 'qualityAnalysis', | ||
| 199 | component: () => import('@/views/data_quality/qualityAnalysis.vue'), | ||
| 200 | meta: { | ||
| 201 | title: '质量分析报告', | ||
| 202 | sidebar: false, | ||
| 203 | breadcrumb: false, | ||
| 204 | cache: true | ||
| 205 | }, | ||
| 206 | }, | ||
| 207 | { | ||
| 208 | path: 'analysis-log', | ||
| 209 | name: 'analysisLog', | ||
| 210 | component: () => import('@/views/data_quality/analysisLog.vue'), | ||
| 211 | meta: { | ||
| 212 | title: '执行日志', | ||
| 213 | sidebar: false, | ||
| 214 | breadcrumb: false, | ||
| 215 | cache: true, | ||
| 216 | reuse: true | ||
| 217 | }, | ||
| 218 | beforeEnter: (to, from) => { | ||
| 219 | if (to.query.name) { | ||
| 220 | to.meta.title = `日志-${to.query.name}`; | ||
| 221 | } | ||
| 222 | } | ||
| 223 | }, | ||
| 224 | { | ||
| 225 | path: 'analysis-report', | ||
| 226 | name: 'analysisReport', | ||
| 227 | component: () => import('@/views/data_quality/analysisReport.vue'), | ||
| 228 | meta: { | ||
| 229 | title: '分析报告', | ||
| 230 | sidebar: false, | ||
| 231 | breadcrumb: false, | ||
| 232 | cache: true, | ||
| 233 | reuse: true | ||
| 234 | }, | ||
| 235 | beforeEnter: (to, from) => { | ||
| 236 | if (to.query.name) { | ||
| 237 | to.meta.title = `分析报告-${to.query.name}`; | ||
| 238 | } | ||
| 239 | } | ||
| 240 | }, | ||
| 241 | ], | ||
| 242 | } | ||
| 243 | ] | ||
| 244 | |||
| 245 | export default routes |
| ... | @@ -2,6 +2,8 @@ import { setupLayouts } from 'virtual:meta-layouts' | ... | @@ -2,6 +2,8 @@ import { setupLayouts } from 'virtual:meta-layouts' |
| 2 | import generatedRoutes from 'virtual:generated-pages' | 2 | import generatedRoutes from 'virtual:generated-pages' |
| 3 | import type { RouteRecordRaw } from 'vue-router' | 3 | import type { RouteRecordRaw } from 'vue-router' |
| 4 | import DataAssess from './modules/dataAsset'; | 4 | import DataAssess from './modules/dataAsset'; |
| 5 | import DataMeta from './modules/dataMeta'; | ||
| 6 | import DataQuality from './modules/dataQuality'; | ||
| 5 | 7 | ||
| 6 | import type { Route } from '#/global' | 8 | import type { Route } from '#/global' |
| 7 | import useSettingsStore from '@/store/modules/settings' | 9 | import useSettingsStore from '@/store/modules/settings' |
| ... | @@ -105,6 +107,22 @@ const asyncRoutes: Route.recordMainRaw[] = [ | ... | @@ -105,6 +107,22 @@ const asyncRoutes: Route.recordMainRaw[] = [ |
| 105 | ...DataAssess, | 107 | ...DataAssess, |
| 106 | ], | 108 | ], |
| 107 | }, | 109 | }, |
| 110 | { | ||
| 111 | meta: { | ||
| 112 | title: '元数据', | ||
| 113 | }, | ||
| 114 | children: [ | ||
| 115 | ...DataMeta, | ||
| 116 | ], | ||
| 117 | }, | ||
| 118 | { | ||
| 119 | meta: { | ||
| 120 | title: '数据质量', | ||
| 121 | }, | ||
| 122 | children: [ | ||
| 123 | ...DataQuality, | ||
| 124 | ], | ||
| 125 | } | ||
| 108 | ] | 126 | ] |
| 109 | 127 | ||
| 110 | const constantRoutesByFilesystem = generatedRoutes.filter((item) => { | 128 | const constantRoutesByFilesystem = generatedRoutes.filter((item) => { | ... | ... |
| 1 | const useDataQualityStore = defineStore( | 1 | const useDataQualityStore = defineStore( |
| 2 | // 质检表分组guid | 2 | // 质检表分组guid |
| 3 | 'modelGroupGuid', | 3 | 'modelGroupGuid', |
| 4 | 4 | ||
| 5 | () => { | 5 | () => { |
| 6 | const modelGroupGuid = ref<string>("") | 6 | const modelGroupGuid = ref<string>("") |
| 7 | 7 | ||
| 8 | function set(guid: any) { | 8 | function set(guid: any) { |
| 9 | modelGroupGuid.value = guid; | 9 | modelGroupGuid.value = guid; |
| 10 | } | 10 | } |
| 11 | 11 | ||
| 12 | const modelGuid = ref<string>("") | 12 | const modelGuid = ref<string>("") |
| 13 | 13 | ||
| 14 | function setModelGuid(guid: any) { | 14 | function setModelGuid(guid: any) { |
| 15 | modelGuid.value = guid; | 15 | modelGuid.value = guid; |
| 16 | } | 16 | } |
| 17 | 17 | ||
| 18 | const planType = ref<number>(0); | 18 | const planType = ref<number>(0); |
| 19 | 19 | ||
| 20 | function setPlanType(type: any) { | 20 | function setPlanType(type: any) { |
| 21 | planType.value = type; | 21 | planType.value = type; |
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | const defaultPlanType = ref<number>(1); | 24 | const defaultPlanType = ref<number>(1); |
| 25 | 25 | ||
| 26 | function setDefaultPlanType(type: any) { | 26 | function setDefaultPlanType(type: any) { |
| 27 | defaultPlanType.value = type; | 27 | defaultPlanType.value = type; |
| 28 | } | 28 | } |
| 29 | 29 | ||
| 30 | const isUpdate = ref(false); | 30 | const isUpdate = ref(false); |
| 31 | function setIsUpdate(update: boolean) { | 31 | function setIsUpdate(update: boolean) { |
| 32 | isUpdate.value = update; | 32 | isUpdate.value = update; |
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | 35 | ||
| 36 | return { | 36 | return { |
| 37 | modelGroupGuid, | 37 | modelGroupGuid, |
| 38 | set, | 38 | set, |
| 39 | setModelGuid, | 39 | setModelGuid, |
| 40 | modelGuid, | 40 | modelGuid, |
| 41 | planType, | 41 | planType, |
| 42 | isUpdate, | 42 | isUpdate, |
| 43 | setIsUpdate, | 43 | setIsUpdate, |
| 44 | setPlanType, | 44 | setPlanType, |
| 45 | setDefaultPlanType, | 45 | setDefaultPlanType, |
| 46 | defaultPlanType | 46 | defaultPlanType |
| 47 | } | 47 | } |
| 48 | }, | 48 | }, |
| 49 | ) | 49 | ) |
| 50 | 50 | ||
| 51 | export default useDataQualityStore | 51 | export default useDataQualityStore |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
src/views/data_meta/analysisReports.vue
0 → 100644
| 1 | <route lang="yaml"> | ||
| 2 | name: analysisReports | ||
| 3 | </route> | ||
| 4 | |||
| 5 | <script lang="ts" setup name="analysisReports"> | ||
| 6 | import { ref } from 'vue' | ||
| 7 | import { ElMessage, ElMessageBox } from "element-plus"; | ||
| 8 | import Table from '@/components/Table/index.vue' | ||
| 9 | import TableTools from '@/components/Tools/table_tools.vue' | ||
| 10 | import {getAnalysisReportList,delAnalysisRepor,updateAnalysisRepor} from "@/api/modules/dataMetaService" | ||
| 11 | import { getImageContent } from "@/api/modules/queryService"; | ||
| 12 | import Dialog from '@/components/Dialog/index.vue' | ||
| 13 | import { getDownloadUrl, download } from "@/utils/common"; | ||
| 14 | import { useRouter } from 'vue-router'; | ||
| 15 | const router = useRouter() | ||
| 16 | const page = ref({ | ||
| 17 | limit: 50, | ||
| 18 | curr: 1, | ||
| 19 | sizes: [ | ||
| 20 | { label: "10", value: 10 }, | ||
| 21 | { label: "50", value: 50 }, | ||
| 22 | { label: "100", value: 100 }, | ||
| 23 | { label: "150", value: 150 }, | ||
| 24 | { label: "200", value: 200 }, | ||
| 25 | ], | ||
| 26 | analysisReportName: '' | ||
| 27 | }); | ||
| 28 | const { proxy } = getCurrentInstance() as any; | ||
| 29 | const tableInfo = ref({ | ||
| 30 | id: 'analysis-reports-table', | ||
| 31 | fields: [ | ||
| 32 | { label: "序号", type: "index", width: 56, align: "center" }, | ||
| 33 | { label: "血缘关系名称", field: "analysisReportName", width: 150 }, | ||
| 34 | { label: "数据源中文名称", field: "databaseChName", width: 150 }, | ||
| 35 | { label: "表名称", field: "table", width: 150 }, | ||
| 36 | { label: "创建人", field: "updateUserName", width: 140 }, | ||
| 37 | { label: "创建时间", field: "updateTime", width: 180 } | ||
| 38 | ], | ||
| 39 | data: [], | ||
| 40 | page: { | ||
| 41 | type: "normal", | ||
| 42 | rows: 0, | ||
| 43 | ...page.value, | ||
| 44 | }, | ||
| 45 | actionInfo: { | ||
| 46 | label: "操作", | ||
| 47 | type: "btn", | ||
| 48 | width: 185, | ||
| 49 | fixed: 'right', | ||
| 50 | btns: (scope) => { | ||
| 51 | let btnsArr: any = [ | ||
| 52 | { label: "查看", value: "view" }, | ||
| 53 | { label: "下载", value: "export" }, | ||
| 54 | { label: "重命名", value: "rename" }, | ||
| 55 | { label: "删除", value: "delete" }, | ||
| 56 | ] | ||
| 57 | return btnsArr; | ||
| 58 | }, | ||
| 59 | }, | ||
| 60 | loading: false | ||
| 61 | }) | ||
| 62 | |||
| 63 | const currTableData: any = ref({}); | ||
| 64 | const formItems: any = ref([ | ||
| 65 | { | ||
| 66 | label: '血缘关系名称', | ||
| 67 | type: 'input', | ||
| 68 | placeholder: '请输入', | ||
| 69 | field: 'analysisReportName', | ||
| 70 | default: '', | ||
| 71 | clearable: true, | ||
| 72 | required: true | ||
| 73 | }, | ||
| 74 | ]) | ||
| 75 | const formRules: any = ref({ | ||
| 76 | analysisReportName: [ | ||
| 77 | { | ||
| 78 | required: true, | ||
| 79 | message: "请填写血缘关系名称", | ||
| 80 | trigger: "blur", | ||
| 81 | }, | ||
| 82 | ], | ||
| 83 | }) | ||
| 84 | const formInfo = ref({ | ||
| 85 | type: 'form', | ||
| 86 | title: '', | ||
| 87 | formInfo: { | ||
| 88 | id: 'add-dict-form', | ||
| 89 | items: formItems.value, | ||
| 90 | rules: formRules.value | ||
| 91 | } | ||
| 92 | }) | ||
| 93 | const reportDialogRef = ref(); | ||
| 94 | const dialogInfo = ref({ | ||
| 95 | visible: false, | ||
| 96 | size: 500, | ||
| 97 | direction: "column", | ||
| 98 | header: { | ||
| 99 | title: "重命名", | ||
| 100 | }, | ||
| 101 | type: '', | ||
| 102 | contents: [ | ||
| 103 | formInfo.value, | ||
| 104 | ], | ||
| 105 | footer: { | ||
| 106 | btns: [ | ||
| 107 | { type: "default", label: "取消", value: "cancel" }, | ||
| 108 | { type: "primary", label: "保存", value: "submit" }, | ||
| 109 | ], | ||
| 110 | }, | ||
| 111 | }); | ||
| 112 | const rowData:any = ref({}) | ||
| 113 | const tableSearchItemList: any = ref([{ | ||
| 114 | type: 'input', | ||
| 115 | label: '', | ||
| 116 | field: 'analysisReportName', | ||
| 117 | default: '', | ||
| 118 | maxlength: 50, | ||
| 119 | placeholder: '血缘关系名称', | ||
| 120 | clearable: true | ||
| 121 | }]); | ||
| 122 | const tableBtnClick = (scope, btn) => { | ||
| 123 | const type = btn.value; | ||
| 124 | let row = scope.row; | ||
| 125 | rowData.value = row | ||
| 126 | currTableData.value = row; | ||
| 127 | if (type == 'view') { | ||
| 128 | getImageContent(row.analysisReportUrl).then((res: any) => { | ||
| 129 | if (res && !res.msg) { | ||
| 130 | let name = row.analysisReportUrl; | ||
| 131 | var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1) : ''; | ||
| 132 | if (fileSuffix === 'png') { //浏览器可以支持图片和pdf预览 | ||
| 133 | let fileUrl = getDownloadUrl(res, name, fileSuffix); | ||
| 134 | let win = window.open(fileUrl, name); | ||
| 135 | win && (win.document.title = name); | ||
| 136 | } else { | ||
| 137 | download(res, row.analysisReportName, fileSuffix); | ||
| 138 | } | ||
| 139 | } else { | ||
| 140 | res?.msg && ElMessage.error(res?.msg); | ||
| 141 | } | ||
| 142 | }); | ||
| 143 | } else if (type == 'export') { | ||
| 144 | getImageContent(row.analysisReportUrl).then((res: any) => { | ||
| 145 | if (res && !res.msg) { | ||
| 146 | let name = row.analysisReportUrl; | ||
| 147 | var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1) : ''; | ||
| 148 | download(res, row.analysisReportName, fileSuffix); | ||
| 149 | } else { | ||
| 150 | res?.msg && ElMessage.error(res?.msg); | ||
| 151 | } | ||
| 152 | }); | ||
| 153 | } else if (type == "rename") { | ||
| 154 | dialogInfo.value.visible = true | ||
| 155 | formItems.value[0].default = row.analysisReportName | ||
| 156 | } else if (type == "delete") { | ||
| 157 | open("此操作将永久删除, 是否继续?", "warning"); | ||
| 158 | } | ||
| 159 | }; | ||
| 160 | |||
| 161 | const dialogBtnClick = (btn,scope)=>{ | ||
| 162 | if(btn.value==="cancel") { | ||
| 163 | dialogInfo.value.visible = false | ||
| 164 | } else { | ||
| 165 | const analysisReportName = reportDialogRef.value.dialogFormRef[0].formInline.analysisReportName; | ||
| 166 | if(analysisReportName){ | ||
| 167 | console.log(analysisReportName) | ||
| 168 | updateAnalysisRepor({guid:rowData.value.guid,analysisReportName}).then((res:any)=>{ | ||
| 169 | if(res.code===proxy.$passCode){ | ||
| 170 | ElMessage.success("血缘关系名称修改成功!") | ||
| 171 | getTableData() | ||
| 172 | dialogInfo.value.visible = false | ||
| 173 | } else { | ||
| 174 | ElMessage.error(res.msg) | ||
| 175 | } | ||
| 176 | }).catch((res:any)=>{ | ||
| 177 | ElMessage.error(res.msg) | ||
| 178 | }) | ||
| 179 | } | ||
| 180 | } | ||
| 181 | |||
| 182 | } | ||
| 183 | |||
| 184 | const open = (msg, type) => { | ||
| 185 | ElMessageBox.confirm(msg, "提示", { | ||
| 186 | confirmButtonText: "确定", | ||
| 187 | cancelButtonText: "取消", | ||
| 188 | type: type, | ||
| 189 | }).then(() => { | ||
| 190 | let guid = currTableData.value.guid; | ||
| 191 | delAnalysisRepor([guid]).then((res:any)=>{ | ||
| 192 | if(res.code===proxy.$passCode){ | ||
| 193 | getTableData() | ||
| 194 | ElMessage.success("删除成功") | ||
| 195 | } else { | ||
| 196 | ElMessage.error(res.msg) | ||
| 197 | } | ||
| 198 | }).catch((res)=>{ | ||
| 199 | ElMessage.error(res.msg) | ||
| 200 | }) | ||
| 201 | }); | ||
| 202 | }; | ||
| 203 | |||
| 204 | const tablePageChange = (info) => { | ||
| 205 | page.value.curr = Number(info.curr); | ||
| 206 | page.value.limit = Number(info.limit); | ||
| 207 | getTableData() | ||
| 208 | }; | ||
| 209 | |||
| 210 | |||
| 211 | const getTableData = ()=>{ | ||
| 212 | tableInfo.value.loading = true | ||
| 213 | getAnalysisReportList({pageIndex:page.value.curr,pageSize:page.value.limit, analysisReportName: page.value.analysisReportName}).then((res:any)=>{ | ||
| 214 | |||
| 215 | if(res.code===proxy.$passCode){ | ||
| 216 | tableInfo.value.data = res.data.records || [] | ||
| 217 | tableInfo.value.page.rows = res.data.totalRows | ||
| 218 | tableInfo.value.page.curr = res.data.pageIndex | ||
| 219 | tableInfo.value.page.limit = res.data.pageSize | ||
| 220 | tableInfo.value.loading = false | ||
| 221 | } else { | ||
| 222 | ElMessage.error(res.msg) | ||
| 223 | tableInfo.value.loading = false | ||
| 224 | } | ||
| 225 | |||
| 226 | }) | ||
| 227 | } | ||
| 228 | const toSearch = (val: any, clear: boolean = false) => { | ||
| 229 | if (clear) { | ||
| 230 | page.value.analysisReportName = ''; | ||
| 231 | } else { | ||
| 232 | page.value.analysisReportName = val.analysisReportName; | ||
| 233 | } | ||
| 234 | page.value.curr = 1; | ||
| 235 | getTableData(); | ||
| 236 | }; | ||
| 237 | onActivated(() => { | ||
| 238 | getTableData() | ||
| 239 | }); | ||
| 240 | |||
| 241 | </script> | ||
| 242 | |||
| 243 | <template> | ||
| 244 | <div class="container_wrap"> | ||
| 245 | <div class="table_tool_wrap"> | ||
| 246 | <TableTools :searchItems="tableSearchItemList" :init="false" searchId="report-table-search" @search="toSearch" /> | ||
| 247 | </div> | ||
| 248 | <div class="table_panel_wrap full"> | ||
| 249 | <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" /> | ||
| 250 | </div> | ||
| 251 | <Dialog ref="reportDialogRef" :dialogInfo="dialogInfo" @btnClick="dialogBtnClick" /> | ||
| 252 | </div> | ||
| 253 | </template> | ||
| 254 | |||
| 255 | <style scoped lang="scss"> | ||
| 256 | :deep(.el-overlay .el-form .el-form-item) { | ||
| 257 | width: calc(100%); | ||
| 258 | } | ||
| 259 | </style> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
src/views/data_meta/analysisView.vue
0 → 100644
This diff is collapsed.
Click to expand it.
src/views/data_meta/changeDetection.vue
0 → 100644
This diff is collapsed.
Click to expand it.
src/views/data_meta/collectorTask.vue
0 → 100644
This diff is collapsed.
Click to expand it.
src/views/data_meta/executionLog.vue
0 → 100644
| 1 | <route lang="yaml"> | ||
| 2 | name: executionLog | ||
| 3 | </route> | ||
| 4 | |||
| 5 | <script lang="ts" setup name="excutionLog"> | ||
| 6 | import { ref } from "vue"; | ||
| 7 | import { ElMessage } from "element-plus"; | ||
| 8 | import Table from "@/components/Table/index.vue"; | ||
| 9 | import Drawer from '@/components/Drawer/index.vue' | ||
| 10 | |||
| 11 | import { | ||
| 12 | getMetaDataTaskLog,getMetacompareList,getMetaChangeRecord | ||
| 13 | } from "@/api/modules/dataMetaService" | ||
| 14 | import { useRouter, useRoute } from "vue-router"; | ||
| 15 | import Moment from 'moment'; | ||
| 16 | import { changeNum } from '@/utils/common' | ||
| 17 | import { TableColumnWidth } from "@/utils/enum"; | ||
| 18 | |||
| 19 | const { proxy } = getCurrentInstance() as any; | ||
| 20 | |||
| 21 | const router = useRouter(); | ||
| 22 | const route = useRoute(); | ||
| 23 | |||
| 24 | const collectTaskGuid: any = ref(route.query.guid); | ||
| 25 | const collectTaskType: any = ref(route.query.type); | ||
| 26 | const page = ref({ | ||
| 27 | limit: 50, | ||
| 28 | curr: 1, | ||
| 29 | sizes: [ | ||
| 30 | { label: "10", value: 10 }, | ||
| 31 | { label: "50", value: 50 }, | ||
| 32 | { label: "100", value: 100 }, | ||
| 33 | { label: "150", value: 150 }, | ||
| 34 | { label: "200", value: 200 }, | ||
| 35 | ], | ||
| 36 | }); | ||
| 37 | |||
| 38 | const originFields: any = ref([ | ||
| 39 | { label: "采集任务名称", field: "collectTaskName", width: 140 }, | ||
| 40 | { label: "数据源名称", field: "datasourceName", width: 160 }, | ||
| 41 | { label: "执行计划", field: "collectType", type: 'filter', width: 90 }, | ||
| 42 | { label: "执行状态", field: "execResult", width: 100, type: "tag", align: 'center' }, | ||
| 43 | { | ||
| 44 | label: "执行时间", field: "execTime", width: TableColumnWidth.DATETIME, getName: (scope) => { | ||
| 45 | let row = scope.row; | ||
| 46 | return row.execTime && Moment(row.execTime).format('YYYY-MM-DD HH:mm:ss'); | ||
| 47 | } | ||
| 48 | }, | ||
| 49 | { | ||
| 50 | label: "耗时(秒)", field: "execDuration", width: TableColumnWidth.EXECDURATION, align: "right", getName: (scope) => { | ||
| 51 | return scope.row.execDuration != null ? changeNum(scope.row.execDuration ?? 0) : '--'; | ||
| 52 | } | ||
| 53 | }, | ||
| 54 | ]); | ||
| 55 | |||
| 56 | const tableInfo = ref({ | ||
| 57 | id: "user-authority-table", | ||
| 58 | fields: [], | ||
| 59 | data: [], | ||
| 60 | page: { | ||
| 61 | type: "normal", | ||
| 62 | rows: 0, | ||
| 63 | ...page.value, | ||
| 64 | }, | ||
| 65 | actionInfo: { | ||
| 66 | label: "操作", | ||
| 67 | type: "btn", | ||
| 68 | width: 150, | ||
| 69 | fixed: 'right', | ||
| 70 | btns: (scope)=>{ | ||
| 71 | |||
| 72 | return [ | ||
| 73 | { label: "元数据变更记录", value: "log_detail",disabled:scope.row['execResult']==='N' || scope.row['execResult']==='R'}, | ||
| 74 | ] | ||
| 75 | } | ||
| 76 | }, | ||
| 77 | loading: false | ||
| 78 | }); | ||
| 79 | const metaChangePage: any = ref({ | ||
| 80 | limit: 50, | ||
| 81 | curr: 1, | ||
| 82 | sizes: [ | ||
| 83 | { label: "10", value: 10 }, | ||
| 84 | { label: "50", value: 50 }, | ||
| 85 | { label: "100", value: 100 }, | ||
| 86 | { label: "150", value: 150 }, | ||
| 87 | { label: "200", value: 200 }, | ||
| 88 | ], | ||
| 89 | metaTaskName: '', | ||
| 90 | changeState: null, | ||
| 91 | changeType: '' | ||
| 92 | }); | ||
| 93 | const formTable = ref({ | ||
| 94 | type: "table", | ||
| 95 | title: "", | ||
| 96 | col: 'no-margin', | ||
| 97 | |||
| 98 | tableInfo: { | ||
| 99 | id: "task-detail-table", | ||
| 100 | minHeight: 'unset', | ||
| 101 | fields: [ | ||
| 102 | { label: "序号", type: "index", width: 56, align: "center", fixed: "left" }, | ||
| 103 | { label: "表中文名称", field: "tableChName", width: 180, }, | ||
| 104 | { label: "表英文名称", field: "tableName", width: 180, }, | ||
| 105 | { label: "元数据名称", field: "metaName", width: 180, }, | ||
| 106 | { | ||
| 107 | label: "元数据类型", field: "metaType", width: 100, getName: (scope) => { | ||
| 108 | if (!scope.row.metaType) { | ||
| 109 | return '--'; | ||
| 110 | } | ||
| 111 | return scope.row.metaType == 'TABLE' ? '表' : (scope.row.metaType == 'INDEX' ? '索引' : (scope.row.metaType == 'PRI' ? '主键' : '字段')); | ||
| 112 | } | ||
| 113 | }, | ||
| 114 | { | ||
| 115 | label: "变更类型", field: "metaChangeType", width: 100, getName: (scope) => { | ||
| 116 | if (!scope.row.metaChangeType) { | ||
| 117 | return '--'; | ||
| 118 | } | ||
| 119 | return scope.row.metaChangeType == 'ADD' ? '新增' : (scope.row.metaChangeType == 'DELETE' ? '删除' : '修改'); | ||
| 120 | } | ||
| 121 | }, | ||
| 122 | { label: "变化", field: "metaChangeType", width: 100,type: 'popover',value:'metaCurrValue',column:[{field:"item",label:"变化信息",width:"150"},{field:"oldValue",label:"原值",width:"150"},{field:"newValue",label:"现值",width:"150"}] }, | ||
| 123 | // { label: "原值", field: "metaOldValue", width: 120 }, | ||
| 124 | { label: "元数据采集时间", field: "changeTime", width: 180, }, | ||
| 125 | // { label: "状态", field: "changeTime", width: 180, }, | ||
| 126 | // { label: "操作时间", field: "changeTime", width: 180, }, | ||
| 127 | ], | ||
| 128 | data: [], | ||
| 129 | loading: false, | ||
| 130 | page:{ | ||
| 131 | rows:0, | ||
| 132 | ...metaChangePage.value | ||
| 133 | }, | ||
| 134 | popoverData:[], | ||
| 135 | popoverloading:false, | ||
| 136 | showPage: true, | ||
| 137 | actionInfo: { | ||
| 138 | show: false | ||
| 139 | }, | ||
| 140 | }, | ||
| 141 | }) | ||
| 142 | |||
| 143 | const drawerInfo: any = ref({ | ||
| 144 | visible: false, | ||
| 145 | direction: "rtl", | ||
| 146 | modalClass: "wrap_width_auto", | ||
| 147 | size: 700, | ||
| 148 | modalClose:true, | ||
| 149 | header: { | ||
| 150 | title: "", | ||
| 151 | }, | ||
| 152 | type: '', | ||
| 153 | container: { | ||
| 154 | contents: [ | ||
| 155 | formTable.value, | ||
| 156 | ], | ||
| 157 | }, | ||
| 158 | footer: { | ||
| 159 | visible: false, | ||
| 160 | btns: [ | ||
| 161 | { type: 'default', label: '取消', value: 'cancel' }, | ||
| 162 | { type: 'primary', label: '确认 ', value: 'save' }, | ||
| 163 | ] | ||
| 164 | }, | ||
| 165 | }) | ||
| 166 | const currRow:any = ref({}) | ||
| 167 | const getFirstPageData = () => { | ||
| 168 | page.value.curr = 1 | ||
| 169 | toSearch({}) | ||
| 170 | } | ||
| 171 | |||
| 172 | const toSearch = (val: any, clear: boolean = false) => { | ||
| 173 | let params: any = Object.keys(val).length ? { ...val } : {} | ||
| 174 | params.pageIndex = page.value.curr; | ||
| 175 | params.pageSize = page.value.limit; | ||
| 176 | params.collectTaskGuid = collectTaskGuid.value | ||
| 177 | getTableData(params); | ||
| 178 | }; | ||
| 179 | |||
| 180 | const getTableData = (params) => { | ||
| 181 | tableInfo.value.loading = true | ||
| 182 | getMetaDataTaskLog(params).then((res: any) => { | ||
| 183 | if (res.code == proxy.$passCode) { | ||
| 184 | const data = res.data || {} | ||
| 185 | tableInfo.value.data = data.records || [] | ||
| 186 | tableInfo.value.page.limit = data.pageSize | ||
| 187 | tableInfo.value.page.curr = data.pageIndex | ||
| 188 | tableInfo.value.page.rows = data.totalRows | ||
| 189 | } else { | ||
| 190 | ElMessage({ | ||
| 191 | type: 'error', | ||
| 192 | message: res.msg, | ||
| 193 | }) | ||
| 194 | } | ||
| 195 | tableInfo.value.loading = false | ||
| 196 | }).catch(xhr => { | ||
| 197 | tableInfo.value.loading = false | ||
| 198 | }) | ||
| 199 | }; | ||
| 200 | |||
| 201 | const tablePageChange = (info) => { | ||
| 202 | page.value.curr = Number(info.curr); | ||
| 203 | page.value.limit = Number(info.limit); | ||
| 204 | toSearch({}) | ||
| 205 | }; | ||
| 206 | const getMetaChangeTableData = ()=>{ | ||
| 207 | formTable.value.tableInfo.loading = true | ||
| 208 | getMetaChangeRecord(Object.assign({execGuid:currRow.value.guid},{pageIndex:metaChangePage.value.curr,pageSize:metaChangePage.value.limit})).then((res: any) => { | ||
| 209 | formTable.value.tableInfo.loading = false | ||
| 210 | if (res.code == proxy.$passCode && res.data) { | ||
| 211 | let data = res.data || {} | ||
| 212 | formTable.value.tableInfo.data = data.records || [] | ||
| 213 | formTable.value.tableInfo.page.rows = data.totalRows | ||
| 214 | const contents = [formTable.value] | ||
| 215 | drawerInfo.value.container.contents = contents | ||
| 216 | drawerInfo.value.footer.visible = false | ||
| 217 | drawerInfo.value.visible = true | ||
| 218 | } else { | ||
| 219 | ElMessage({ | ||
| 220 | type: "error", | ||
| 221 | message: '未获取到对应人员信息', | ||
| 222 | }); | ||
| 223 | } | ||
| 224 | }) | ||
| 225 | } | ||
| 226 | const drawerTableClick = (scope,btn)=>{ | ||
| 227 | drawerInfo.value.container.contents[0].tableInfo.popoverloading = true | ||
| 228 | getMetacompareList(scope.row.guid).then((res:any)=>{ | ||
| 229 | drawerInfo.value.container.contents[0].tableInfo.popoverloading = false | ||
| 230 | drawerInfo.value.container.contents[0].tableInfo.popoverData = res.data | ||
| 231 | |||
| 232 | }) | ||
| 233 | } | ||
| 234 | const tableBtnClick = (scope, btn) => { | ||
| 235 | const type = btn.value; | ||
| 236 | const row = scope.row; | ||
| 237 | currRow.value = row | ||
| 238 | if (type == 'log_detail') { | ||
| 239 | drawerInfo.value.header.title = row.collectTaskName; | ||
| 240 | drawerInfo.value.type = type | ||
| 241 | formTable.value.tableInfo.data = [] | ||
| 242 | const contents = [formTable.value] | ||
| 243 | drawerInfo.value.container.contents = contents | ||
| 244 | drawerInfo.value.footer.visible = false | ||
| 245 | drawerInfo.value.visible = true | ||
| 246 | getMetaChangeTableData() | ||
| 247 | } | ||
| 248 | }; | ||
| 249 | |||
| 250 | const drawerBtnClick = (btn, info) => { | ||
| 251 | if (btn.value == 'cancel') { | ||
| 252 | drawerInfo.value.visible = false | ||
| 253 | } | ||
| 254 | } | ||
| 255 | const metaChangeTablePageChange = (info) => { | ||
| 256 | |||
| 257 | metaChangePage.value.curr = Number(info.curr); | ||
| 258 | metaChangePage.value.limit = Number(info.limit); | ||
| 259 | formTable.value.tableInfo.page.limit = metaChangePage.value.limit; | ||
| 260 | formTable.value.tableInfo.page.curr = metaChangePage.value.curr; | ||
| 261 | getMetaChangeTableData(); | ||
| 262 | }; | ||
| 263 | onBeforeMount(() => { | ||
| 264 | if (collectTaskType.value == '1') { | ||
| 265 | originFields.value.splice(2, 0, { label: "同步策略", field: "collectMode", type: 'filter', width: 90 },) | ||
| 266 | } | ||
| 267 | tableInfo.value.fields = originFields.value; | ||
| 268 | getFirstPageData(); | ||
| 269 | }); | ||
| 270 | </script> | ||
| 271 | |||
| 272 | <template> | ||
| 273 | <div class="container_wrap"> | ||
| 274 | <div class="table_panel_wrap"> | ||
| 275 | <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" /> | ||
| 276 | </div> | ||
| 277 | <Drawer :drawerInfo="drawerInfo" @drawerBtnClick="drawerBtnClick" @drawerTableBtnClick="drawerTableClick" @drawerTablePageChange="metaChangeTablePageChange" /> | ||
| 278 | </div> | ||
| 279 | </template> | ||
| 280 | |||
| 281 | <style lang="scss" scoped> | ||
| 282 | .container_wrap { | ||
| 283 | padding: 0; | ||
| 284 | |||
| 285 | .table_panel_wrap { | ||
| 286 | height: 100%; | ||
| 287 | padding: 16px 16px 0; | ||
| 288 | } | ||
| 289 | } | ||
| 290 | |||
| 291 | :deep(.el-drawer) { | ||
| 292 | |||
| 293 | .el-drawer__body { | ||
| 294 | padding: 10px 10px 0px 10px; | ||
| 295 | } | ||
| 296 | |||
| 297 | .drawer_panel { | ||
| 298 | height: 100%; | ||
| 299 | |||
| 300 | .table_panel_wrap { | ||
| 301 | height: 100%; | ||
| 302 | } | ||
| 303 | } | ||
| 304 | |||
| 305 | |||
| 306 | } | ||
| 307 | </style> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
src/views/data_meta/metaSheet.vue
0 → 100644
This diff is collapsed.
Click to expand it.
src/views/data_meta/metadataQuery.vue
0 → 100644
This diff is collapsed.
Click to expand it.
src/views/data_quality/analysisLog.vue
0 → 100644
| 1 | <route lang="yaml"> | ||
| 2 | name: analysisLog | ||
| 3 | </route> | ||
| 4 | |||
| 5 | <script lang="ts" setup name="analysisLog"> | ||
| 6 | import { ref } from "vue"; | ||
| 7 | import { useRouter, useRoute } from "vue-router"; | ||
| 8 | import Table from "@/components/Table/index.vue"; | ||
| 9 | import { getWordLogList } from "@/api/modules/dataQualityWord"; | ||
| 10 | import { ElMessage } from "element-plus"; | ||
| 11 | |||
| 12 | const { proxy } = getCurrentInstance() as any; | ||
| 13 | |||
| 14 | const router = useRouter(); | ||
| 15 | const route = useRoute(); | ||
| 16 | const guid = route.query.guid; | ||
| 17 | const wordName = route.query.name; | ||
| 18 | |||
| 19 | const page = ref({ | ||
| 20 | limit: 50, | ||
| 21 | curr: 1, | ||
| 22 | sizes: [ | ||
| 23 | { label: "10", value: 10 }, | ||
| 24 | { label: "50", value: 50 }, | ||
| 25 | { label: "100", value: 100 }, | ||
| 26 | { label: "150", value: 150 }, | ||
| 27 | { label: "200", value: 200 }, | ||
| 28 | ], | ||
| 29 | }); | ||
| 30 | const tableInfo = ref({ | ||
| 31 | id: "word-log-table", | ||
| 32 | loading: false, | ||
| 33 | fields: [ | ||
| 34 | { label: "报告名称", field: "analysisReportName", width: 230 }, | ||
| 35 | { | ||
| 36 | label: "方案类型", field: "analysisReportType", width: 100, getName: (scope) => { | ||
| 37 | let planType = scope.row.analysisReportType; | ||
| 38 | return planType == 1 ? '表' : (planType == 2 ? '数据库' : (planType == 4 ? '数据同步' : '分组')); | ||
| 39 | } | ||
| 40 | }, | ||
| 41 | { label: "报告对象", field: "qualityModelName", width: 180, }, | ||
| 42 | { label: "质量评分", field: "qualityScore", width: 100, align: "right" }, | ||
| 43 | { label: "最后执行时间", field: "execTime", width: 180, }, | ||
| 44 | { label: "执行状态", field: "execResult", type: "tag", width: 120, align: "center" }, | ||
| 45 | ], | ||
| 46 | data: [], | ||
| 47 | page: { | ||
| 48 | type: "normal", | ||
| 49 | rows: 0, | ||
| 50 | ...page.value, | ||
| 51 | }, | ||
| 52 | actionInfo: { | ||
| 53 | label: "操作", | ||
| 54 | type: "btn", | ||
| 55 | width: 100, | ||
| 56 | fixed: 'right', | ||
| 57 | btns: (scope) => { | ||
| 58 | return [{ label: "查看报告", value: "reportView", disabled: scope.row['execResult'] != 'Y' }]; | ||
| 59 | } | ||
| 60 | } | ||
| 61 | }); | ||
| 62 | |||
| 63 | const getTableData = () => { | ||
| 64 | tableInfo.value.loading = true; | ||
| 65 | getWordLogList({ pageIndex: page.value.curr, pageSize: page.value.limit, reportGuid: guid }).then((res: any) => { | ||
| 66 | tableInfo.value.loading = false; | ||
| 67 | if (res.code == proxy.$passCode) { | ||
| 68 | const data = res.data || {} | ||
| 69 | tableInfo.value.data = data.records || [] | ||
| 70 | tableInfo.value.page.limit = data.pageSize | ||
| 71 | tableInfo.value.page.curr = data.pageIndex | ||
| 72 | tableInfo.value.page.rows = data.totalRows | ||
| 73 | } else { | ||
| 74 | ElMessage.error(res.msg); | ||
| 75 | } | ||
| 76 | }) | ||
| 77 | }; | ||
| 78 | |||
| 79 | const tableBtnClick = (scope, btn) => { | ||
| 80 | const type = btn.value; | ||
| 81 | const row = scope.row; | ||
| 82 | if (type == 'reportView') { | ||
| 83 | router.push({ | ||
| 84 | name: 'analysisReport', | ||
| 85 | query: { | ||
| 86 | planGuid: row.planGuid, | ||
| 87 | reportExecGuid: row.guid, | ||
| 88 | name: wordName | ||
| 89 | } | ||
| 90 | }); | ||
| 91 | } | ||
| 92 | }; | ||
| 93 | |||
| 94 | onBeforeMount(() => { | ||
| 95 | getTableData(); | ||
| 96 | }); | ||
| 97 | |||
| 98 | </script> | ||
| 99 | |||
| 100 | <template> | ||
| 101 | <div class="container_wrap"> | ||
| 102 | <div class="table_panel_wrap"> | ||
| 103 | <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" /> | ||
| 104 | </div> | ||
| 105 | </div> | ||
| 106 | </template> | ||
| 107 | |||
| 108 | <style lang="scss" scoped> | ||
| 109 | .container_wrap { | ||
| 110 | padding: 0; | ||
| 111 | |||
| 112 | .table_panel_wrap { | ||
| 113 | height: 100%; | ||
| 114 | padding: 16px 16px 0; | ||
| 115 | } | ||
| 116 | } | ||
| 117 | </style> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
src/views/data_quality/analysisReport.vue
0 → 100644
This diff is collapsed.
Click to expand it.
src/views/data_quality/assessDetail.vue
0 → 100644
This diff is collapsed.
Click to expand it.
src/views/data_quality/assessDirty.vue
0 → 100644
| 1 | <route lang="yaml"> | ||
| 2 | name: assessDirty | ||
| 3 | </route> | ||
| 4 | |||
| 5 | <script lang="ts" setup name="assessDirty"> | ||
| 6 | import { ref } from "vue"; | ||
| 7 | import { calcColumnWidth } from "@/utils/index"; | ||
| 8 | import Moment from 'moment'; | ||
| 9 | import { | ||
| 10 | getQueryDirtyData, | ||
| 11 | getQueryDirtyFields, | ||
| 12 | downloadDirtyData | ||
| 13 | } from '@/api/modules/dataQualityAssess'; | ||
| 14 | import { download } from '@/utils/common' | ||
| 15 | import { ElMessage } from "element-plus"; | ||
| 16 | import { TableColumnWidth } from "@/utils/enum"; | ||
| 17 | |||
| 18 | const { proxy } = getCurrentInstance() as any; | ||
| 19 | const route: any = useRoute(); | ||
| 20 | const planExecGuid = route.query.planExecGuid; | ||
| 21 | const qualityModelGuid = route.query.qualityModelGuid; | ||
| 22 | const name = route.query.name; | ||
| 23 | |||
| 24 | const dirtyDataLoading = ref(false); | ||
| 25 | const dirtyData = ref([{ | ||
| 26 | guid: 1, | ||
| 27 | }, { | ||
| 28 | guid: '2', | ||
| 29 | isDirty: true | ||
| 30 | }, { | ||
| 31 | guid: 3 | ||
| 32 | }]); | ||
| 33 | |||
| 34 | const dirtyDataFields: any = ref([{ | ||
| 35 | enName: 'guid', | ||
| 36 | chName: '主键', | ||
| 37 | dataType: 'string' | ||
| 38 | }]); | ||
| 39 | |||
| 40 | /** 脏数据下载 */ | ||
| 41 | const exportData = () => { | ||
| 42 | if (!dirtyData.value.length || !dirtyDataFields.value.length) { | ||
| 43 | ElMessage.error('当没有可下载的脏数据'); | ||
| 44 | return; | ||
| 45 | } | ||
| 46 | downloadDirtyData({ | ||
| 47 | planExecGuid: planExecGuid, | ||
| 48 | qualityModelGuid: qualityModelGuid | ||
| 49 | }).then((res: any) => { | ||
| 50 | if (res && !res.msg) { | ||
| 51 | download(res, `脏数据-${name}.xlsx`, 'excel'); | ||
| 52 | } else { | ||
| 53 | res?.msg && ElMessage.error(res?.msg); | ||
| 54 | } | ||
| 55 | }) | ||
| 56 | } | ||
| 57 | |||
| 58 | const getTableData = () => { | ||
| 59 | dirtyData.value = []; | ||
| 60 | dirtyDataLoading.value = true; | ||
| 61 | let ps1 = getQueryDirtyData({ | ||
| 62 | pageSize: pageInfo.value.limit, | ||
| 63 | pageIndex: pageInfo.value.curr, | ||
| 64 | qualityModelGuid: qualityModelGuid, | ||
| 65 | planExecGuid: planExecGuid, | ||
| 66 | }).then((res: any) => { | ||
| 67 | if (res.code == proxy.$passCode) { | ||
| 68 | let data = res.data || {}; | ||
| 69 | dirtyData.value = data.records || []; | ||
| 70 | pageInfo.value.curr = data.pageIndex; | ||
| 71 | pageInfo.value.rows = data.totalRows || 0; | ||
| 72 | } else { | ||
| 73 | ElMessage.error(res.msg); | ||
| 74 | } | ||
| 75 | }); | ||
| 76 | let ps2 = getQueryDirtyFields(qualityModelGuid).then((res: any) => { | ||
| 77 | if (res.code == proxy.$passCode) { | ||
| 78 | dirtyDataFields.value = res.data.fields || []; | ||
| 79 | } else { | ||
| 80 | ElMessage.error(res.msg); | ||
| 81 | } | ||
| 82 | }) | ||
| 83 | Promise.all([ps1, ps2]).then(res => { | ||
| 84 | dirtyDataLoading.value = false; | ||
| 85 | }); | ||
| 86 | }; | ||
| 87 | |||
| 88 | onBeforeMount(() => { | ||
| 89 | getTableData(); | ||
| 90 | }); | ||
| 91 | |||
| 92 | const pageInfo = ref({ | ||
| 93 | limit: 50, | ||
| 94 | curr: 1, | ||
| 95 | sizes: [ | ||
| 96 | { label: "10", value: 10 }, | ||
| 97 | { label: "50", value: 50 }, | ||
| 98 | { label: "100", value: 100 }, | ||
| 99 | { label: "150", value: 150 }, | ||
| 100 | { label: "200", value: 200 }, | ||
| 101 | ], | ||
| 102 | type: "normal", | ||
| 103 | rows: 0, | ||
| 104 | }) | ||
| 105 | |||
| 106 | const pageChange = (info) => { | ||
| 107 | pageInfo.value.curr = Number(info.curr); | ||
| 108 | pageInfo.value.limit = Number(info.limit); | ||
| 109 | getTableData(); | ||
| 110 | } | ||
| 111 | |||
| 112 | const formatterPreviewDate = (row, info) => { | ||
| 113 | let enName = info.enName; | ||
| 114 | let v = row[enName]?.value; | ||
| 115 | if (v === "" || v === 0) { | ||
| 116 | return v; | ||
| 117 | } | ||
| 118 | if (v == null) { | ||
| 119 | return '--'; | ||
| 120 | } | ||
| 121 | if (info.dataType === 'datetime') { | ||
| 122 | return Moment(v).format('YYYY-MM-DD HH:mm:ss'); | ||
| 123 | } | ||
| 124 | if (info.dataType === 'date') { | ||
| 125 | if (isNaN(<any>(new Date(v)))) { | ||
| 126 | return Moment(parseInt(v)).format('YYYY-MM-DD'); | ||
| 127 | } else { | ||
| 128 | return Moment(v).format('YYYY-MM-DD'); | ||
| 129 | } | ||
| 130 | } | ||
| 131 | return v; | ||
| 132 | }; | ||
| 133 | |||
| 134 | const getTextAlign = (field) => { | ||
| 135 | if (field.dataType === 'decimal' || field.dataType === 'int' || field.dataType == 'bit' || field.dataType == 'tinyint') { | ||
| 136 | return 'right'; | ||
| 137 | } | ||
| 138 | return 'left' | ||
| 139 | } | ||
| 140 | |||
| 141 | /** otherWidth表示使用标题宽度时添加标题排序图标等宽度 */ | ||
| 142 | const calcTableColumnWidth = (data: any[], prop, title, otherWidth = 0) => { | ||
| 143 | let d: any[] = []; | ||
| 144 | data.forEach((dt) => d.push(dt[prop])); | ||
| 145 | return calcColumnWidth( | ||
| 146 | d, | ||
| 147 | title, | ||
| 148 | { | ||
| 149 | fontSize: 14, | ||
| 150 | fontFamily: "SimSun", | ||
| 151 | }, | ||
| 152 | { | ||
| 153 | fontSize: 14, | ||
| 154 | fontFamily: "SimSun", | ||
| 155 | }, | ||
| 156 | otherWidth | ||
| 157 | ); | ||
| 158 | }; | ||
| 159 | |||
| 160 | /** 每列字段对应的列宽计算结果。 */ | ||
| 161 | const originTableFieldColumn: any = ref({ | ||
| 162 | guid: 140 | ||
| 163 | }); | ||
| 164 | |||
| 165 | watch( | ||
| 166 | () => dirtyData.value, | ||
| 167 | (val: any[], oldVal) => { | ||
| 168 | if (!dirtyDataFields.value?.length) { | ||
| 169 | originTableFieldColumn.value = {}; | ||
| 170 | return; | ||
| 171 | } | ||
| 172 | originTableFieldColumn.value = {}; | ||
| 173 | dirtyDataFields.value.forEach((field, index) => { | ||
| 174 | originTableFieldColumn.value[field.enName] = calcTableColumnWidth( | ||
| 175 | val?.map(v => { | ||
| 176 | let json = {}; | ||
| 177 | for (const k in v) { | ||
| 178 | json[k] = v[k]?.value | ||
| 179 | } | ||
| 180 | return json; | ||
| 181 | }) || [], | ||
| 182 | field.enName, | ||
| 183 | field.chName, | ||
| 184 | 24 | ||
| 185 | ); | ||
| 186 | }); | ||
| 187 | } | ||
| 188 | ); | ||
| 189 | |||
| 190 | const handleDityCellClass = ({ row, column, rowIndex, columnIndex }) => { | ||
| 191 | let v = dirtyData.value[rowIndex][column.property]; | ||
| 192 | if (v?.checkInfo?.length) { | ||
| 193 | return 'dirty-cell-bg'; | ||
| 194 | } | ||
| 195 | } | ||
| 196 | |||
| 197 | </script> | ||
| 198 | |||
| 199 | <template> | ||
| 200 | <div class="container_wrap"> | ||
| 201 | <div class="table_tool_wrap"> | ||
| 202 | <div class="tools_btns"> | ||
| 203 | <el-button type="primary" @click="exportData" v-preReClick>脏数据下载</el-button> | ||
| 204 | </div> | ||
| 205 | </div> | ||
| 206 | <div class="table_panel_wrap"> | ||
| 207 | <el-table key="guid" v-loading="dirtyDataLoading" :data="dirtyData" border tooltip-effect="light" style=" | ||
| 208 | width: 100%; | ||
| 209 | min-width: 200px; | ||
| 210 | max-width: 100%; | ||
| 211 | height: calc(100% - 44px); | ||
| 212 | display: inline-block; | ||
| 213 | " stripe :cell-class-name="handleDityCellClass"> | ||
| 214 | <el-table-column v-for="(field, index) in dirtyDataFields" :key="field.enName" :prop="field.enName" | ||
| 215 | :label="field.chName" :width="field.dataType === 'datetime' | ||
| 216 | ? TableColumnWidth.DATETIME | ||
| 217 | : field.dataType === 'date' | ||
| 218 | ? TableColumnWidth.DATE | ||
| 219 | : originTableFieldColumn[field.enName] | ||
| 220 | " :align="getTextAlign(field)" :header-align="getTextAlign(field)" :show-overflow-tooltip="true" | ||
| 221 | > | ||
| 222 | <template #default="scope"> | ||
| 223 | <el-tooltip v-if="scope.row[field.enName].checkInfo?.length" placement="bottom-start" effect="light" | ||
| 224 | popper-class="table_tooltip" trigger="click"> | ||
| 225 | <template #content> | ||
| 226 | <div style="width: 236px; text-align: justify"> | ||
| 227 | <p class="tips_title">不符合规则</p> | ||
| 228 | <p v-for="(item) in (scope.row[field.enName].checkInfo || [])">{{ item }}</p> | ||
| 229 | </div> | ||
| 230 | </template> | ||
| 231 | <span class="dirty-cell-tooltip">{{ formatterPreviewDate(scope.row, field) }}</span> | ||
| 232 | </el-tooltip> | ||
| 233 | <span v-else>{{ formatterPreviewDate(scope.row, field) }}</span> | ||
| 234 | </template> | ||
| 235 | </el-table-column> | ||
| 236 | </el-table> | ||
| 237 | <PageNav :class="[pageInfo.type]" :pageInfo="pageInfo" @pageChange="pageChange" /> | ||
| 238 | </div> | ||
| 239 | </div> | ||
| 240 | </template> | ||
| 241 | |||
| 242 | <style lang="scss" scoped> | ||
| 243 | .table_tool_wrap { | ||
| 244 | width: 100%; | ||
| 245 | height: 44px; | ||
| 246 | padding: 8px; | ||
| 247 | |||
| 248 | .tools_btns { | ||
| 249 | padding: 0; | ||
| 250 | } | ||
| 251 | } | ||
| 252 | |||
| 253 | .table_panel_wrap { | ||
| 254 | width: 100%; | ||
| 255 | height: calc(100% - 44px); | ||
| 256 | padding: 0 8px; | ||
| 257 | } | ||
| 258 | |||
| 259 | :deep(.el-table) { | ||
| 260 | .dirty-cell-bg { | ||
| 261 | background: #FFF1D4 !important; | ||
| 262 | |||
| 263 | .cell.el-tooltip { | ||
| 264 | padding: 0px; | ||
| 265 | } | ||
| 266 | } | ||
| 267 | |||
| 268 | .dirty-cell-tooltip { | ||
| 269 | width: 100%; | ||
| 270 | min-height: 24px; | ||
| 271 | display: block; | ||
| 272 | overflow: hidden; | ||
| 273 | text-overflow: ellipsis; | ||
| 274 | padding: 0 12px; | ||
| 275 | } | ||
| 276 | } | ||
| 277 | </style> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
src/views/data_quality/assessLog.vue
0 → 100644
| 1 | <route lang="yaml"> | ||
| 2 | name: assessLog | ||
| 3 | </route> | ||
| 4 | |||
| 5 | <script lang="ts" setup name="assessLog"> | ||
| 6 | import { ref } from "vue"; | ||
| 7 | import { useRouter, useRoute } from "vue-router"; | ||
| 8 | import Table from "@/components/Table/index.vue"; | ||
| 9 | import Drawer from "@/components/Drawer/index.vue"; | ||
| 10 | import { | ||
| 11 | getAssessDetailTableData, | ||
| 12 | } from '@/api/modules/dataQualityAssess'; | ||
| 13 | import { ElMessage } from "element-plus"; | ||
| 14 | import { changeNum } from '@/utils/common'; | ||
| 15 | import {TableColumnWidth} from "@/utils/enum" | ||
| 16 | const { proxy } = getCurrentInstance() as any; | ||
| 17 | |||
| 18 | const router = useRouter(); | ||
| 19 | const route = useRoute(); | ||
| 20 | /** 方案guid */ | ||
| 21 | const planGuid = route.query.guid; | ||
| 22 | const planName = route.query.name; | ||
| 23 | const execType = route.query.type; | ||
| 24 | const page = ref({ | ||
| 25 | limit: 50, | ||
| 26 | curr: 1, | ||
| 27 | sizes: [ | ||
| 28 | { label: "10", value: 10 }, | ||
| 29 | { label: "50", value: 50 }, | ||
| 30 | { label: "100", value: 100 }, | ||
| 31 | { label: "150", value: 150 }, | ||
| 32 | { label: "200", value: 200 }, | ||
| 33 | ], | ||
| 34 | }); | ||
| 35 | const tableInfo = ref({ | ||
| 36 | id: "user-authority-table", | ||
| 37 | fields: [ | ||
| 38 | { type:"index", width: TableColumnWidth.INDEX, align:"center",label: "序号" }, | ||
| 39 | { label: "质检执行结果", field: "execResult", type: "tag", width: 120, align: "center" }, | ||
| 40 | { label: "评估时间", field: "execTime", width: 180, }, | ||
| 41 | { | ||
| 42 | label: "耗时(秒)", field: "execDuration", align: "right", width: 100, getName: (scope) => { | ||
| 43 | return scope.row.execDuration != null ? changeNum(scope.row.execDuration ?? 0) : '--'; | ||
| 44 | } | ||
| 45 | }, | ||
| 46 | { | ||
| 47 | label: "规则数", field: "ruleNum", width: 100, align: "right", getName: (scope) => { | ||
| 48 | return scope.row.ruleNum != null ? changeNum(scope.row.ruleNum ?? 0) : '--'; | ||
| 49 | } | ||
| 50 | }, | ||
| 51 | { | ||
| 52 | label: "评估总数", field: "totalNum", width: 100, align: "right", getName: (scope) => { | ||
| 53 | return scope.row.totalNum != null ? changeNum(scope.row.totalNum ?? 0) : '--'; | ||
| 54 | } | ||
| 55 | }, | ||
| 56 | { | ||
| 57 | label: "合格条数", field: "qualifiedNum", width: 100, align: "right", getName: (scope) => { | ||
| 58 | return scope.row.qualifiedNum != null ? changeNum(scope.row.qualifiedNum ?? 0) : '--'; | ||
| 59 | } | ||
| 60 | }, | ||
| 61 | { | ||
| 62 | label: "不合格条数", field: "unqualifiedNum", width: 100, align: "right", getName: (scope) => { | ||
| 63 | return scope.row.unqualifiedNum != null ? changeNum(scope.row.unqualifiedNum ?? 0) : '--'; | ||
| 64 | } | ||
| 65 | }, | ||
| 66 | { | ||
| 67 | label: "合格率", field: "qualifiedRate", width: 100, align: "right", getName: (scope) => { | ||
| 68 | return scope.row.qualifiedRate != null ? ((scope.row.qualifiedRate ?? 0).toFixed(2) + '%') : '--'; | ||
| 69 | } | ||
| 70 | }, | ||
| 71 | ], | ||
| 72 | loading: false, | ||
| 73 | data: [], | ||
| 74 | page: { | ||
| 75 | type: "normal", | ||
| 76 | rows: 0, | ||
| 77 | ...page.value, | ||
| 78 | }, | ||
| 79 | actionInfo: { | ||
| 80 | label: "操作", | ||
| 81 | type: "btn", | ||
| 82 | width: 140, | ||
| 83 | fixed: 'right', | ||
| 84 | btns: [ | ||
| 85 | { label: "查看结果", value: "resultView" }, | ||
| 86 | { label: "日志", value: "log" } | ||
| 87 | ], | ||
| 88 | } | ||
| 89 | }); | ||
| 90 | |||
| 91 | const formTable = ref({ | ||
| 92 | type: "table", | ||
| 93 | title: "", | ||
| 94 | col: 'no-margin', | ||
| 95 | tableInfo: { | ||
| 96 | id: "log-detail-table", | ||
| 97 | loading: false, | ||
| 98 | fields: [ | ||
| 99 | { label: "执行时间", field: "changeTime", width: 140, }, | ||
| 100 | { label: "日志类型", field: "metaCurrValue", width: 120 }, | ||
| 101 | { label: "日志级别", field: "collectTaskName", width: 110 }, | ||
| 102 | { label: "执行步骤", field: "updateType", width: 240 }, | ||
| 103 | ], | ||
| 104 | data: [], | ||
| 105 | showPage: false, | ||
| 106 | actionInfo: { | ||
| 107 | show: false | ||
| 108 | }, | ||
| 109 | }, | ||
| 110 | }) | ||
| 111 | |||
| 112 | const drawerInfo: any = ref({ | ||
| 113 | visible: false, | ||
| 114 | direction: "rtl", | ||
| 115 | modalClass: "wrap_width_auto", | ||
| 116 | size: 650, | ||
| 117 | header: { | ||
| 118 | title: "日志详情", | ||
| 119 | }, | ||
| 120 | type: '', | ||
| 121 | container: { | ||
| 122 | contents: [ | ||
| 123 | formTable.value, | ||
| 124 | ], | ||
| 125 | }, | ||
| 126 | footer: { | ||
| 127 | visible: false, | ||
| 128 | }, | ||
| 129 | }) | ||
| 130 | |||
| 131 | const tablePageChange = (info) => { | ||
| 132 | page.value.curr = Number(info.curr); | ||
| 133 | page.value.limit = Number(info.limit); | ||
| 134 | getTableData(); | ||
| 135 | }; | ||
| 136 | |||
| 137 | const getTableData = () => { | ||
| 138 | tableInfo.value.loading = true; | ||
| 139 | getAssessDetailTableData({ pageSize: page.value.limit, pageIndex: page.value.curr, planGuid: planGuid }).then((res: any) => { | ||
| 140 | tableInfo.value.loading = false; | ||
| 141 | if (res.code == proxy.$passCode) { | ||
| 142 | const data = res.data || {} | ||
| 143 | tableInfo.value.data = data.records || [] | ||
| 144 | tableInfo.value.page.limit = data.pageSize ?? 50; | ||
| 145 | tableInfo.value.page.curr = data.pageIndex | ||
| 146 | tableInfo.value.page.rows = data.totalRows ?? 0; | ||
| 147 | } else { | ||
| 148 | ElMessage.error(res.msg); | ||
| 149 | } | ||
| 150 | }); | ||
| 151 | }; | ||
| 152 | |||
| 153 | const tableBtnClick = (scope, btn) => { | ||
| 154 | const type = btn.value; | ||
| 155 | const row = scope.row; | ||
| 156 | if (type == 'resultView') { | ||
| 157 | if(!!execType) { | ||
| 158 | router.push({ | ||
| 159 | name: 'syncAssessDetail', | ||
| 160 | query: { | ||
| 161 | name: planName, | ||
| 162 | planGuid: row.planGuid, | ||
| 163 | planExecGuid: row.planExecGuid | ||
| 164 | } | ||
| 165 | }); | ||
| 166 | } else { | ||
| 167 | router.push({ | ||
| 168 | name: 'assessDetail', | ||
| 169 | query: { | ||
| 170 | name: planName, | ||
| 171 | planGuid: row.planGuid, | ||
| 172 | planExecGuid: row.planExecGuid | ||
| 173 | } | ||
| 174 | }); | ||
| 175 | } | ||
| 176 | |||
| 177 | } else if (type == 'log') { | ||
| 178 | const params = { | ||
| 179 | logGuid: row.guid | ||
| 180 | } | ||
| 181 | drawerInfo.value.visible = true | ||
| 182 | // formTable.value.tableInfo.loading = true; | ||
| 183 | // getLogDetail(params).then((res: any) => { | ||
| 184 | // formTable.value.tableInfo.loading = false; | ||
| 185 | // if (res.code == proxy.$passCode && res.data) { | ||
| 186 | // const data = res.data | ||
| 187 | // formTable.value.tableInfo.data = data | ||
| 188 | // drawerInfo.value.container.contents[0].listInfo.data = data | ||
| 189 | // drawerInfo.value.visible = true | ||
| 190 | // } else { | ||
| 191 | // ElMessage({ | ||
| 192 | // type: "info", | ||
| 193 | // message: res.msg, | ||
| 194 | // }); | ||
| 195 | // } | ||
| 196 | // }) | ||
| 197 | } | ||
| 198 | }; | ||
| 199 | |||
| 200 | const drawerBtnClick = (btn) => { | ||
| 201 | drawerInfo.value.visible = false; | ||
| 202 | }; | ||
| 203 | |||
| 204 | onBeforeMount(() => { | ||
| 205 | getTableData(); | ||
| 206 | }); | ||
| 207 | |||
| 208 | </script> | ||
| 209 | |||
| 210 | <template> | ||
| 211 | <div class="container_wrap"> | ||
| 212 | <div class="table_panel_wrap"> | ||
| 213 | <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" /> | ||
| 214 | </div> | ||
| 215 | |||
| 216 | <Drawer :drawerInfo="drawerInfo" @drawerBtnClick="drawerBtnClick" /> | ||
| 217 | </div> | ||
| 218 | </template> | ||
| 219 | |||
| 220 | <style lang="scss" scoped> | ||
| 221 | .container_wrap { | ||
| 222 | padding: 0; | ||
| 223 | |||
| 224 | .table_panel_wrap { | ||
| 225 | height: 100%; | ||
| 226 | padding: 16px 16px 0; | ||
| 227 | } | ||
| 228 | } | ||
| 229 | |||
| 230 | :deep(.el-drawer) { | ||
| 231 | .drawer_panel { | ||
| 232 | height: 100%; | ||
| 233 | |||
| 234 | .table_panel_wrap { | ||
| 235 | height: 100%; | ||
| 236 | } | ||
| 237 | } | ||
| 238 | } | ||
| 239 | </style> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
src/views/data_quality/assessTemplate.vue
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
src/views/data_quality/qualityAnalysis.vue
0 → 100644
This diff is collapsed.
Click to expand it.
src/views/data_quality/qualityAssess.vue
0 → 100644
This diff is collapsed.
Click to expand it.
src/views/data_quality/qualityRules.vue
0 → 100644
This diff is collapsed.
Click to expand it.
src/views/data_quality/ruleForm.vue
0 → 100644
This diff is collapsed.
Click to expand it.
src/views/data_quality/ruleModel.vue
0 → 100644
This diff is collapsed.
Click to expand it.
src/views/data_quality/ruleModelEdit.vue
0 → 100644
| 1 | <route lang="yaml"> | ||
| 2 | name: ruleModelEdit | ||
| 3 | </route> | ||
| 4 | |||
| 5 | <script lang="ts" setup name="ruleModelEdit"> | ||
| 6 | import { ref } from "vue"; | ||
| 7 | import ruleForm from "../data_quality/ruleForm.vue"; | ||
| 8 | import { useRouter, useRoute } from "vue-router"; | ||
| 9 | import { | ||
| 10 | getRuleConfDetail, | ||
| 11 | getRuleTypeList, | ||
| 12 | getSmallCategoryList, | ||
| 13 | getLargeCategoryList, | ||
| 14 | updateModelRule | ||
| 15 | } from '@/api/modules/dataQuality'; | ||
| 16 | import { ElMessage, ElMessageBox } from "element-plus"; | ||
| 17 | import useUserStore from "@/store/modules/user"; | ||
| 18 | import useDataQualityStore from "@/store/modules/dataQuality"; | ||
| 19 | |||
| 20 | const userStore = useUserStore(); | ||
| 21 | const dataQualityStore = useDataQualityStore(); | ||
| 22 | |||
| 23 | const { proxy } = getCurrentInstance() as any; | ||
| 24 | |||
| 25 | const router = useRouter(); | ||
| 26 | const route = useRoute(); | ||
| 27 | const ruleGuid = route.query.guid; | ||
| 28 | const fullPath = route.fullPath; | ||
| 29 | |||
| 30 | const fullScreenLoading = ref(false); | ||
| 31 | |||
| 32 | const detailLoading = ref(false); | ||
| 33 | |||
| 34 | const detailInfo: any = ref({}); | ||
| 35 | |||
| 36 | const toSubjectTables: any = ref([]); | ||
| 37 | |||
| 38 | const ruleType = ref(''); | ||
| 39 | |||
| 40 | const ruleFormRef = ref(); | ||
| 41 | |||
| 42 | const cancel = () => { | ||
| 43 | ElMessageBox.confirm( | ||
| 44 | "当前页面尚未保存,确定放弃修改吗?", | ||
| 45 | "提示", | ||
| 46 | { | ||
| 47 | confirmButtonText: "确定", | ||
| 48 | cancelButtonText: "取消", | ||
| 49 | type: "warning", | ||
| 50 | } | ||
| 51 | ) | ||
| 52 | .then(() => { | ||
| 53 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); | ||
| 54 | router.push({ | ||
| 55 | name: 'qualityRules', | ||
| 56 | }); | ||
| 57 | }) | ||
| 58 | .catch(() => { | ||
| 59 | ElMessage({ | ||
| 60 | type: "info", | ||
| 61 | message: "已取消", | ||
| 62 | }); | ||
| 63 | }); | ||
| 64 | } | ||
| 65 | |||
| 66 | /** 将新建规则之后转化为对应质检表的规则。 */ | ||
| 67 | const transformRulesInfo = (info: any) => { | ||
| 68 | if (info.ruleCode == "volatility_check") {//表行数波动率。 | ||
| 69 | return Object.assign({}, info, { | ||
| 70 | guid: ruleGuid, | ||
| 71 | qualityModelGuid: detailInfo.value.qualityModelGuid, | ||
| 72 | ruleCode: detailInfo.value.ruleCode, | ||
| 73 | }); | ||
| 74 | } | ||
| 75 | else if (info.ruleCode == 'null_value_check' || info.ruleCode == 'repeate_data_check') { | ||
| 76 | return Object.assign({}, info, { | ||
| 77 | guid: ruleGuid, | ||
| 78 | qualityModelGuid: detailInfo.value.qualityModelGuid, | ||
| 79 | ruleCode: detailInfo.value.ruleCode, | ||
| 80 | ruleField: info.modelFields[detailInfo.value.subjectZhName] || [] | ||
| 81 | }); | ||
| 82 | } else if (info.ruleCode === 'logic_check') { | ||
| 83 | let subjectName = detailInfo.value.subjectName; | ||
| 84 | let fields = info.ruleFields[subjectName]; | ||
| 85 | return Object.assign({}, info, { | ||
| 86 | guid: ruleGuid, | ||
| 87 | qualityModelGuid: detailInfo.value.qualityModelGuid, | ||
| 88 | ruleCode: detailInfo.value.ruleCode, | ||
| 89 | ruleField: [{ | ||
| 90 | guid: fields.guid, | ||
| 91 | enName: fields.enName, | ||
| 92 | chName: fields.chName | ||
| 93 | }], | ||
| 94 | conditionSql: info.conditionSqls?.[subjectName], | ||
| 95 | conditionSqls: '', | ||
| 96 | ruleFields: '' | ||
| 97 | }); | ||
| 98 | } else if (info.ruleCode === 'custom_sql') { | ||
| 99 | let subjectGuid = detailInfo.value.subjectGuid; | ||
| 100 | return Object.assign({}, info, { | ||
| 101 | guid: ruleGuid, | ||
| 102 | qualityModelGuid: detailInfo.value.qualityModelGuid, | ||
| 103 | ruleCode: detailInfo.value.ruleCode, | ||
| 104 | customSql: info.customSqls?.[detailInfo.value.subjectName], | ||
| 105 | ruleField: info.ruleFields?.[detailInfo.value.subjectName]?.map(f => { | ||
| 106 | return { | ||
| 107 | enName: f | ||
| 108 | } | ||
| 109 | }) || [], | ||
| 110 | fieldSelects: info.sqlFieldsList?.[detailInfo.value.subjectName] || [], | ||
| 111 | customSqls: '', | ||
| 112 | ruleFields: '' | ||
| 113 | }); | ||
| 114 | } else if (info.ruleCode == 'rows_check') { | ||
| 115 | return Object.assign({}, info, { | ||
| 116 | guid: ruleGuid, | ||
| 117 | qualityModelGuid: detailInfo.value.qualityModelGuid, | ||
| 118 | ruleCode: detailInfo.value.ruleCode, | ||
| 119 | contrastSubjectGuid: info.rows[0].contrastSubjectGuid, | ||
| 120 | differenceRange: info.rows[0].differenceRange, | ||
| 121 | rows: '' | ||
| 122 | }); | ||
| 123 | } | ||
| 124 | } | ||
| 125 | |||
| 126 | const save = () => { | ||
| 127 | ruleFormRef.value?.ruleFormRef?.ruleFormRef?.validate((valid) => { | ||
| 128 | if (valid) { | ||
| 129 | let v = ruleFormRef.value?.getFormInfo(); | ||
| 130 | let params = transformRulesInfo(v); | ||
| 131 | fullScreenLoading.value = true; | ||
| 132 | updateModelRule(params).then((res: any) => { | ||
| 133 | fullScreenLoading.value = false; | ||
| 134 | if (res.code == proxy.$passCode) { | ||
| 135 | ElMessage.success(`【${params.ruleConfName}】` + '质量规则编辑成功'); | ||
| 136 | //跳到对应的分组下 | ||
| 137 | router.push({ | ||
| 138 | name: 'qualityRules' | ||
| 139 | }); | ||
| 140 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); | ||
| 141 | dataQualityStore.setModelGuid(params.qualityModelGuid); | ||
| 142 | } else { | ||
| 143 | ElMessage.error(res.msg); | ||
| 144 | } | ||
| 145 | }) | ||
| 146 | } | ||
| 147 | }); | ||
| 148 | } | ||
| 149 | |||
| 150 | const getRuleDetailInfo = () => { | ||
| 151 | detailLoading.value = true; | ||
| 152 | getRuleConfDetail(ruleGuid).then((res: any) => { | ||
| 153 | detailLoading.value = false; | ||
| 154 | if (res.code == proxy.$passCode) { | ||
| 155 | let data = res.data || {}; | ||
| 156 | detailInfo.value = data; | ||
| 157 | ruleType.value = detailInfo.value.ruleCode; | ||
| 158 | toSubjectTables.value = [{ | ||
| 159 | guid: detailInfo.value.subjectGuid, //编辑的时候显示的是主题表 | ||
| 160 | enName: detailInfo.value.subjectName, | ||
| 161 | chName: detailInfo.value.subjectZhName, | ||
| 162 | label: `${detailInfo.value.subjectName}(${detailInfo.value.subjectZhName})` | ||
| 163 | }] | ||
| 164 | detailInfo.value.qualityModelGuids = [detailInfo.value.subjectGuid]; | ||
| 165 | if (fullPath === route.fullPath) { | ||
| 166 | document.title = `编辑-${data.ruleConfName}(${data.subjectZhName})`; | ||
| 167 | } | ||
| 168 | let tab: any = userStore.tabbar.find((tab: any) => tab.fullPath === fullPath); | ||
| 169 | if (tab) { | ||
| 170 | tab.meta.title = `编辑-${data.ruleConfName}(${data.subjectZhName})`; | ||
| 171 | } | ||
| 172 | } else { | ||
| 173 | ElMessage.error(res.msg); | ||
| 174 | } | ||
| 175 | }) | ||
| 176 | } | ||
| 177 | |||
| 178 | const ruleTypeList = ref([]); | ||
| 179 | const smallCategoryList = ref([]); | ||
| 180 | const largeCategoryList = ref([]); | ||
| 181 | |||
| 182 | onBeforeMount(() => { | ||
| 183 | getRuleDetailInfo(); | ||
| 184 | getRuleTypeList().then((res: any) => { | ||
| 185 | if (res.code == proxy.$passCode) { | ||
| 186 | ruleTypeList.value = res.data?.map((d: any) => { | ||
| 187 | d.label = d.ruleName; | ||
| 188 | d.value = d.ruleCode; | ||
| 189 | return d; | ||
| 190 | }) || []; | ||
| 191 | } else { | ||
| 192 | ElMessage.error(res.msg); | ||
| 193 | } | ||
| 194 | }) | ||
| 195 | getSmallCategoryList().then((res: any) => { | ||
| 196 | if (res.code == proxy.$passCode) { | ||
| 197 | smallCategoryList.value = res.data || []; | ||
| 198 | } else { | ||
| 199 | ElMessage.error(res.msg); | ||
| 200 | } | ||
| 201 | }) | ||
| 202 | getLargeCategoryList().then((res: any) => { | ||
| 203 | if (res.code == proxy.$passCode) { | ||
| 204 | largeCategoryList.value = res.data || []; | ||
| 205 | } else { | ||
| 206 | ElMessage.error(res.msg); | ||
| 207 | } | ||
| 208 | }) | ||
| 209 | }) | ||
| 210 | |||
| 211 | </script> | ||
| 212 | |||
| 213 | <template> | ||
| 214 | <div class="content_main" v-loading="fullScreenLoading"> | ||
| 215 | <div class="operator_panel_wrap"> | ||
| 216 | <div class="operator_panel is-block" v-loading="detailLoading"> | ||
| 217 | <div class="panel_title"> | ||
| 218 | <div class="title_text"> | ||
| 219 | <span>规则</span> | ||
| 220 | </div> | ||
| 221 | </div> | ||
| 222 | <div class="panel_content"> | ||
| 223 | <div class="form_panel"> | ||
| 224 | <ruleForm ref="ruleFormRef" :toSubjectTables="toSubjectTables" :ruleTypeValue="ruleType" :value="detailInfo" | ||
| 225 | :ruleTypeList="ruleTypeList" :largeCategoryList="largeCategoryList" | ||
| 226 | :smallCategoryList="smallCategoryList"></ruleForm> | ||
| 227 | </div> | ||
| 228 | </div> | ||
| 229 | </div> | ||
| 230 | </div> | ||
| 231 | <div class="bottom_tool_wrap"> | ||
| 232 | <el-button @click="cancel">取消</el-button> | ||
| 233 | <el-button type="primary" @click="save">保存</el-button> | ||
| 234 | </div> | ||
| 235 | </div> | ||
| 236 | </template> | ||
| 237 | |||
| 238 | <style lang="scss" scoped> | ||
| 239 | .content_main { | ||
| 240 | display: flex; | ||
| 241 | flex-direction: column; | ||
| 242 | height: 100%; | ||
| 243 | } | ||
| 244 | |||
| 245 | .operator_panel_wrap { | ||
| 246 | height: auto; | ||
| 247 | min-height: 200px; | ||
| 248 | display: flex; | ||
| 249 | justify-content: space-between; | ||
| 250 | margin: 16px; | ||
| 251 | max-height: calc(100% - 72px); | ||
| 252 | |||
| 253 | :deep(.el-button) { | ||
| 254 | &.is-text { | ||
| 255 | height: auto; | ||
| 256 | padding: 0; | ||
| 257 | } | ||
| 258 | } | ||
| 259 | |||
| 260 | .operator_panel { | ||
| 261 | width: calc(50% - 5px); | ||
| 262 | height: 100%; | ||
| 263 | border: 1px solid #d9d9d9; | ||
| 264 | overflow: hidden; | ||
| 265 | |||
| 266 | &.is-block { | ||
| 267 | width: 100%; | ||
| 268 | } | ||
| 269 | |||
| 270 | .panel_title { | ||
| 271 | height: 48px; | ||
| 272 | padding: 0 15px; | ||
| 273 | display: flex; | ||
| 274 | justify-content: space-between; | ||
| 275 | align-items: center; | ||
| 276 | color: var(--el-color-regular); | ||
| 277 | font-weight: 600; | ||
| 278 | border-bottom: 1px solid #d9d9d9; | ||
| 279 | |||
| 280 | .tips_text { | ||
| 281 | font-size: 14px; | ||
| 282 | color: #999; | ||
| 283 | font-weight: normal; | ||
| 284 | margin-left: 8px; | ||
| 285 | } | ||
| 286 | } | ||
| 287 | |||
| 288 | .panel_content { | ||
| 289 | height: calc(100% - 46px); | ||
| 290 | |||
| 291 | >div { | ||
| 292 | width: 100%; | ||
| 293 | height: 100%; | ||
| 294 | overflow: hidden; | ||
| 295 | } | ||
| 296 | |||
| 297 | .form_panel { | ||
| 298 | padding: 8px 16px 0; | ||
| 299 | overflow: hidden auto; | ||
| 300 | } | ||
| 301 | } | ||
| 302 | } | ||
| 303 | } | ||
| 304 | |||
| 305 | .bottom_tool_wrap { | ||
| 306 | height: 40px; | ||
| 307 | padding: 0 16px; | ||
| 308 | border-top: 1px solid #d9d9d9; | ||
| 309 | display: flex; | ||
| 310 | justify-content: flex-end; | ||
| 311 | align-items: center; | ||
| 312 | } | ||
| 313 | </style> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
src/views/data_quality/ruleTemplate.vue
0 → 100644
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment