Merge branch 'develop' of http://117.78.60.236:8000/csbr-daop/fe-data-asset-management into develop
Showing
38 changed files
with
905 additions
and
257 deletions
| ... | @@ -73,8 +73,8 @@ VITE_API_MESSAGE = ms-swzl-message-notification-service | ... | @@ -73,8 +73,8 @@ VITE_API_MESSAGE = ms-swzl-message-notification-service |
| 73 | #新门户接口 | 73 | #新门户接口 |
| 74 | VITE_API_NEW_PORTAL = ms-daop-zcgl-asset-dam-service | 74 | VITE_API_NEW_PORTAL = ms-daop-zcgl-asset-dam-service |
| 75 | 75 | ||
| 76 | #企业信息接口 | 76 | #人员服务 |
| 77 | VITE_API_PERSONEL_SERVICE = ms-daop-personel-service | 77 | VITE_APP_PERSONAL_URL = 'ms-daop-personel-service' |
| 78 | 78 | ||
| 79 | # 是否在打包时生成 sourcemap | 79 | # 是否在打包时生成 sourcemap |
| 80 | VITE_BUILD_SOURCEMAP = false | 80 | VITE_BUILD_SOURCEMAP = false | ... | ... |
| ... | @@ -94,7 +94,11 @@ VITE_APP_CAMUNDA_URL = 'ms-daop-camunda-server' | ... | @@ -94,7 +94,11 @@ VITE_APP_CAMUNDA_URL = 'ms-daop-camunda-server' |
| 94 | 94 | ||
| 95 | #门户接口 | 95 | #门户接口 |
| 96 | VITE_API_PORTALURL = https://swzl-test.zgsjzc.com/portal | 96 | VITE_API_PORTALURL = https://swzl-test.zgsjzc.com/portal |
| 97 | #新门户接口 | ||
| 98 | VITE_API_NEW_PORTAL = ms-daop-zcgl-asset-dam-service | ||
| 97 | 99 | ||
| 100 | #人员服务 | ||
| 101 | VITE_APP_PERSONAL_URL = 'ms-daop-personel-service' | ||
| 98 | #数据资产接口地址 | 102 | #数据资产接口地址 |
| 99 | VITE_API_ASSET_BASEURL = ms-swzl-data-dam-service | 103 | VITE_API_ASSET_BASEURL = ms-swzl-data-dam-service |
| 100 | 104 | ... | ... |
This diff could not be displayed because it is too large.
| ... | @@ -756,7 +756,13 @@ export const updateDbDirTable = (data) => request({ | ... | @@ -756,7 +756,13 @@ export const updateDbDirTable = (data) => request({ |
| 756 | export const createTableSql = (data) => request({ | 756 | export const createTableSql = (data) => request({ |
| 757 | url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/table/create-table-sql`, | 757 | url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/table/create-table-sql`, |
| 758 | method: 'post', | 758 | method: 'post', |
| 759 | data | 759 | data, |
| 760 | responseType: 'blob', | ||
| 761 | }) | ||
| 762 | /**删除新建表 */ | ||
| 763 | export const deleteDbDirTable = (params) => request({ | ||
| 764 | url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/table/del?tableGuid=${params.tableGuid}`, | ||
| 765 | method: 'get', | ||
| 760 | }) | 766 | }) |
| 761 | 767 | ||
| 762 | /** | 768 | /** |
| ... | @@ -788,7 +794,7 @@ export const exportDbDirTable = (params) => request({ | ... | @@ -788,7 +794,7 @@ export const exportDbDirTable = (params) => request({ |
| 788 | * | 794 | * |
| 789 | */ | 795 | */ |
| 790 | export const getDbDirDetail = (params) => request({ | 796 | export const getDbDirDetail = (params) => request({ |
| 791 | url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/detail?tableGuid=${params.tableGuid}`, | 797 | url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/detail?tableGuid=${params.tableGuid}&execGuid=${params.execGuid}`, |
| 792 | method: 'get', | 798 | method: 'get', |
| 793 | }) | 799 | }) |
| 794 | 800 | ||
| ... | @@ -834,3 +840,14 @@ export const getFidldEnName = (data) => request({ | ... | @@ -834,3 +840,14 @@ export const getFidldEnName = (data) => request({ |
| 834 | method: 'post', | 840 | method: 'post', |
| 835 | data | 841 | data |
| 836 | }) | 842 | }) |
| 843 | |||
| 844 | /** | ||
| 845 | * 数据库目录-查询字段分类分级 | ||
| 846 | * @param {Object} | ||
| 847 | * @path /db-dir/field/get-classify-and-grade | ||
| 848 | */ | ||
| 849 | export const getFieldClassifyAndGrade = (data) => request({ | ||
| 850 | url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/field/get-classify-and-grade`, | ||
| 851 | method: 'post', | ||
| 852 | data | ||
| 853 | }) | ... | ... |
| ... | @@ -69,7 +69,7 @@ export const saveMetaReportAnalysis = (params) => request({ | ... | @@ -69,7 +69,7 @@ export const saveMetaReportAnalysis = (params) => request({ |
| 69 | **/ | 69 | **/ |
| 70 | // 树形数据 | 70 | // 树形数据 |
| 71 | export const getMetaTreeData = (params) => request({ | 71 | export const getMetaTreeData = (params) => request({ |
| 72 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-table/meta-tree-list`, | 72 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-table/meta-tree-list?isImportCreate=${params.isImportCreate}`, |
| 73 | method: 'post', | 73 | method: 'post', |
| 74 | data: params | 74 | data: params |
| 75 | }) | 75 | }) | ... | ... |
| ... | @@ -13,7 +13,7 @@ export const getProductList = (params) => request({ | ... | @@ -13,7 +13,7 @@ export const getProductList = (params) => request({ |
| 13 | 13 | ||
| 14 | /** 获取已添加的数据产品列表 */ | 14 | /** 获取已添加的数据产品列表 */ |
| 15 | export const getAddedProductList = (params) => request({ | 15 | export const getAddedProductList = (params) => request({ |
| 16 | url: `${import.meta.env.VITE_API_ASSET_BASEURL}/product-grounding/list-select`, | 16 | url: `${import.meta.env.VITE_API_NEW_PORTAL}/product-grounding/list-select`, |
| 17 | method: 'post', | 17 | method: 'post', |
| 18 | data: params | 18 | data: params |
| 19 | }) | 19 | }) |
| ... | @@ -27,35 +27,43 @@ export const getListingList = (params) => request({ | ... | @@ -27,35 +27,43 @@ export const getListingList = (params) => request({ |
| 27 | 27 | ||
| 28 | /** 获取数据产品上架详情 */ | 28 | /** 获取数据产品上架详情 */ |
| 29 | export const getListingDetail = (params) => request({ | 29 | export const getListingDetail = (params) => request({ |
| 30 | url: `${import.meta.env.VITE_API_ASSET_BASEURL}/product-grounding/detail`, | 30 | url: `${import.meta.env.VITE_API_NEW_PORTAL}/product-grounding/detail`, |
| 31 | method: 'get', | 31 | method: 'get', |
| 32 | params | 32 | params |
| 33 | }) | 33 | }) |
| 34 | 34 | ||
| 35 | /** 新增数据产品上架信息 */ | 35 | /** 新增数据产品上架信息 */ |
| 36 | export const listingSave = (params) => request({ | 36 | export const listingSave = (params) => request({ |
| 37 | url: `${import.meta.env.VITE_API_ASSET_BASEURL}/product-grounding/save`, | 37 | url: `${import.meta.env.VITE_API_NEW_PORTAL}/product-grounding/save`, |
| 38 | method: 'post', | ||
| 39 | data: params | ||
| 40 | }); | ||
| 41 | |||
| 42 | /**数据产品上架新增门户/product-grounding/save-gateway */ | ||
| 43 | |||
| 44 | export const listingSavePortal = (params) => request({ | ||
| 45 | url: `${import.meta.env.VITE_API_NEW_PORTAL}/product-grounding/save-gateway`, | ||
| 38 | method: 'post', | 46 | method: 'post', |
| 39 | data: params | 47 | data: params |
| 40 | }); | 48 | }); |
| 41 | 49 | ||
| 42 | /** 更新数据产品上架信息 */ | 50 | /** 更新数据产品上架信息 */ |
| 43 | export const listingUpdate = (params) => request({ | 51 | export const listingUpdate = (params) => request({ |
| 44 | url: `${import.meta.env.VITE_API_ASSET_BASEURL}/product-grounding/update`, | 52 | url: `${import.meta.env.VITE_API_NEW_PORTAL}/product-grounding/update`, |
| 45 | method: 'post', | 53 | method: 'post', |
| 46 | data: params | 54 | data: params |
| 47 | }); | 55 | }); |
| 48 | 56 | ||
| 49 | /** 删除数据产品上架信息 */ | 57 | /** 删除数据产品上架信息 */ |
| 50 | export const listingDelete = (params) => request({ | 58 | export const listingDelete = (params) => request({ |
| 51 | url: `${import.meta.env.VITE_API_ASSET_BASEURL}/product-grounding/delete`, | 59 | url: `${import.meta.env.VITE_API_NEW_PORTAL}/product-grounding/delete`, |
| 52 | method: 'delete', | 60 | method: 'delete', |
| 53 | data: params | 61 | data: params |
| 54 | }); | 62 | }); |
| 55 | 63 | ||
| 56 | /** 更新数据产品上架状态及上架平台 */ | 64 | /** 更新数据产品上架状态及上架平台 */ |
| 57 | export const listingUpdateStatus = (params) => request({ | 65 | export const listingUpdateStatus = (params) => request({ |
| 58 | url: `${import.meta.env.VITE_API_ASSET_BASEURL}/product-grounding/update-grounding-pick`, | 66 | url: `${import.meta.env.VITE_API_NEW_PORTAL}/product-grounding/update-grounding-pick`, |
| 59 | method: 'post', | 67 | method: 'post', |
| 60 | data: params | 68 | data: params |
| 61 | }); | 69 | }); |
| ... | @@ -65,75 +73,75 @@ export const listingUpdateStatus = (params) => request({ | ... | @@ -65,75 +73,75 @@ export const listingUpdateStatus = (params) => request({ |
| 65 | **/ | 73 | **/ |
| 66 | /** 获取数据需求列表。 */ | 74 | /** 获取数据需求列表。 */ |
| 67 | export const getDemandList = (params) => request({ | 75 | export const getDemandList = (params) => request({ |
| 68 | url: `${import.meta.env.VITE_API_ASSET_BASEURL}/demand-release/page-list`, | 76 | url: `${import.meta.env.VITE_API_NEW_PORTAL}/demand-release/page-list`, |
| 69 | method: 'post', | 77 | method: 'post', |
| 70 | data: params | 78 | data: params |
| 71 | }) | 79 | }) |
| 72 | 80 | ||
| 73 | /** 获取数据需求发布详情 */ | 81 | /** 获取数据需求发布详情 */ |
| 74 | export const getDemandDetail = (params) => request({ | 82 | export const getDemandDetail = (params) => request({ |
| 75 | url: `${import.meta.env.VITE_API_ASSET_BASEURL}/demand-release/detail`, | 83 | url: `${import.meta.env.VITE_API_NEW_PORTAL}/demand-release/detail`, |
| 76 | method: 'get', | 84 | method: 'get', |
| 77 | params | 85 | params |
| 78 | }) | 86 | }) |
| 79 | 87 | ||
| 80 | /** 新增数据需求发布信息 */ | 88 | /** 新增数据需求发布信息 */ |
| 81 | export const demandSave = (params) => request({ | 89 | export const demandSave = (params) => request({ |
| 82 | url: `${import.meta.env.VITE_API_ASSET_BASEURL}/demand-release/save`, | 90 | url: `${import.meta.env.VITE_API_NEW_PORTAL}/demand-release/save`, |
| 83 | method: 'post', | 91 | method: 'post', |
| 84 | data: params | 92 | data: params |
| 85 | }); | 93 | }); |
| 86 | 94 | ||
| 87 | /** 新增竞赛需求发布 */ | 95 | /** 新增竞赛需求发布 */ |
| 88 | export const competitionSave = (params) => request({ | 96 | export const competitionSave = (params) => request({ |
| 89 | url: `${import.meta.env.VITE_API_ASSET_BASEURL}/demand-release/competition-save`, | 97 | url: `${import.meta.env.VITE_API_NEW_PORTAL}/demand-release/competition-save`, |
| 90 | method: 'post', | 98 | method: 'post', |
| 91 | data: params | 99 | data: params |
| 92 | }); | 100 | }); |
| 93 | 101 | ||
| 94 | /** 新增要素市场需求发布 */ | 102 | /** 新增要素市场需求发布 */ |
| 95 | export const marketSave = (params) => request({ | 103 | export const marketSave = (params) => request({ |
| 96 | url: `${import.meta.env.VITE_API_ASSET_BASEURL}/demand-release/market-save`, | 104 | url: `${import.meta.env.VITE_API_NEW_PORTAL}/demand-release/market-save`, |
| 97 | method: 'post', | 105 | method: 'post', |
| 98 | data: params | 106 | data: params |
| 99 | }); | 107 | }); |
| 100 | 108 | ||
| 101 | /** 更新数据需求发布信息 */ | 109 | /** 更新数据需求发布信息 */ |
| 102 | export const demandUpdate = (params) => request({ | 110 | export const demandUpdate = (params) => request({ |
| 103 | url: `${import.meta.env.VITE_API_ASSET_BASEURL}/demand-release/update`, | 111 | url: `${import.meta.env.VITE_API_NEW_PORTAL}/demand-release/update`, |
| 104 | method: 'post', | 112 | method: 'post', |
| 105 | data: params | 113 | data: params |
| 106 | }); | 114 | }); |
| 107 | 115 | ||
| 108 | /** 更新竞赛发布信息 */ | 116 | /** 更新竞赛发布信息 */ |
| 109 | export const competitionUpdate = (params) => request({ | 117 | export const competitionUpdate = (params) => request({ |
| 110 | url: `${import.meta.env.VITE_API_ASSET_BASEURL}/demand-release/competition-update`, | 118 | url: `${import.meta.env.VITE_API_NEW_PORTAL}/demand-release/competition-update`, |
| 111 | method: 'post', | 119 | method: 'post', |
| 112 | data: params | 120 | data: params |
| 113 | }); | 121 | }); |
| 114 | /** 更新数据要素市场发布信息 */ | 122 | /** 更新数据要素市场发布信息 */ |
| 115 | export const marketUpdate = (params) => request({ | 123 | export const marketUpdate = (params) => request({ |
| 116 | url: `${import.meta.env.VITE_API_ASSET_BASEURL}/demand-release/market-update`, | 124 | url: `${import.meta.env.VITE_API_NEW_PORTAL}/demand-release/market-update`, |
| 117 | method: 'post', | 125 | method: 'post', |
| 118 | data: params | 126 | data: params |
| 119 | }); | 127 | }); |
| 120 | /** 删除数据需求发布信息 */ | 128 | /** 删除数据需求发布信息 */ |
| 121 | export const demandDelete = (params) => request({ | 129 | export const demandDelete = (params) => request({ |
| 122 | url: `${import.meta.env.VITE_API_ASSET_BASEURL}/demand-release/delete`, | 130 | url: `${import.meta.env.VITE_API_NEW_PORTAL}/demand-release/delete`, |
| 123 | method: 'delete', | 131 | method: 'delete', |
| 124 | data: params | 132 | data: params |
| 125 | }); | 133 | }); |
| 126 | 134 | ||
| 127 | /** 更新数据需求发布状态及上架平台 */ | 135 | /** 更新数据需求发布状态及上架平台 */ |
| 128 | export const demandUpdateStatus = (params) => request({ | 136 | export const demandUpdateStatus = (params) => request({ |
| 129 | url: `${import.meta.env.VITE_API_ASSET_BASEURL}/demand-release/update-listing-Status`, | 137 | url: `${import.meta.env.VITE_API_NEW_PORTAL}/demand-release/update-listing-Status`, |
| 130 | method: 'post', | 138 | method: 'post', |
| 131 | data: params | 139 | data: params |
| 132 | }); | 140 | }); |
| 133 | 141 | ||
| 134 | /** 验证数据需求名称唯一性 */ | 142 | /** 验证数据需求名称唯一性 */ |
| 135 | export const checkDemandName = (params) => request({ | 143 | export const checkDemandName = (params) => request({ |
| 136 | url: `${import.meta.env.VITE_API_ASSET_BASEURL}/demand-release/verify-data-name?dataName=${params}`, | 144 | url: `${import.meta.env.VITE_API_NEW_PORTAL}/demand-release/verify-data-name?dataName=${params}`, |
| 137 | method: 'get' | 145 | method: 'get' |
| 138 | }) | 146 | }) |
| 139 | 147 | ... | ... |
| ... | @@ -64,8 +64,7 @@ export const getQualityTableRule = (params) => request({ | ... | @@ -64,8 +64,7 @@ export const getQualityTableRule = (params) => request({ |
| 64 | /** 删除质检表规则 */ | 64 | /** 删除质检表规则 */ |
| 65 | export const deleteQualityTableRule = (params) => request({ | 65 | export const deleteQualityTableRule = (params) => request({ |
| 66 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-model/conf/del?ruleConfGuid=${params}`, | 66 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-model/conf/del?ruleConfGuid=${params}`, |
| 67 | method: 'delete', | 67 | method: 'delete' |
| 68 | data: params | ||
| 69 | }) | 68 | }) |
| 70 | 69 | ||
| 71 | /** 更新质检表规则的禁用和启用状态 */ | 70 | /** 更新质检表规则的禁用和启用状态 */ |
| ... | @@ -76,11 +75,18 @@ export const updateRuleBizState = (params) => request({ | ... | @@ -76,11 +75,18 @@ export const updateRuleBizState = (params) => request({ |
| 76 | 75 | ||
| 77 | /** 获取数据库表列表 */ | 76 | /** 获取数据库表列表 */ |
| 78 | export const getDatabase = (params) => request({ | 77 | export const getDatabase = (params) => request({ |
| 79 | url: `${import.meta.env.VITE_APP_API_BASEURL}/data-source/get-source-list`, | 78 | url: `${import.meta.env.VITE_APP_DATA_SOURCE_URL}/data-source/get-source-list`, |
| 80 | method: 'post', | 79 | method: 'post', |
| 81 | data: params | 80 | data: params |
| 82 | }) | 81 | }) |
| 83 | 82 | ||
| 83 | /** 获取盘点的数据库目录 */ | ||
| 84 | export const getInventoryDsDir = () => request({ | ||
| 85 | url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/tree-list`, | ||
| 86 | method: 'post', | ||
| 87 | data: {} | ||
| 88 | }) | ||
| 89 | |||
| 84 | /** 新建质检表,获取主题域分层的主题表树结构 */ | 90 | /** 新建质检表,获取主题域分层的主题表树结构 */ |
| 85 | export const getSubjectTableTree = (params) => request({ | 91 | export const getSubjectTableTree = (params) => request({ |
| 86 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-catalog-directory/directory-tree-list`, | 92 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-catalog-directory/directory-tree-list`, |
| ... | @@ -95,10 +101,10 @@ export const getSubjectTableByDomain = (params) => request({ | ... | @@ -95,10 +101,10 @@ export const getSubjectTableByDomain = (params) => request({ |
| 95 | data: params | 101 | data: params |
| 96 | }) | 102 | }) |
| 97 | 103 | ||
| 98 | /** 获取主题表的字段列表 */ | 104 | /** 获取主题表的字段列表,目前应包括盘点目录和元数据目录的表及字段 */ |
| 99 | export const getSubjectFields = (params) => request({ | 105 | export const getSubjectFields = (tableGuid, dataSource) => request({ |
| 100 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-catalog-subject/field/list?subjectGuid=${params}`, | 106 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-model/field/list-by-subject-guid?tableGuid=${tableGuid}&dataSource=${dataSource}`, |
| 101 | method: 'get', | 107 | method: 'post', |
| 102 | }) | 108 | }) |
| 103 | 109 | ||
| 104 | /** 表的逻辑条件和sql检验。 */ | 110 | /** 表的逻辑条件和sql检验。 */ |
| ... | @@ -138,23 +144,20 @@ export const getRuleTypeList = () => request({ | ... | @@ -138,23 +144,20 @@ export const getRuleTypeList = () => request({ |
| 138 | 144 | ||
| 139 | // 获取规则大类的接口 | 145 | // 获取规则大类的接口 |
| 140 | export const getLargeCategoryList = () => request({ | 146 | export const getLargeCategoryList = () => request({ |
| 141 | url:`${import.meta.env.VITE_APP_API_BASEURL}/data-dict/get-data-list`, | 147 | url: `${import.meta.env.VITE_APP_CONFIG_URL}/dict/data/get-by-dictType?dictType=${'规则大类'}`, |
| 142 | method: 'post', | 148 | method: 'get', |
| 143 | data: { paramCode: "LARGE-CATEGORY" } | ||
| 144 | }) | 149 | }) |
| 145 | 150 | ||
| 146 | // 获取规则小类的接口 | 151 | // 获取规则小类的接口 |
| 147 | export const getSmallCategoryList = () => request({ | 152 | export const getSmallCategoryList = () => request({ |
| 148 | url:`${import.meta.env.VITE_APP_API_BASEURL}/data-dict/get-data-list`, | 153 | url: `${import.meta.env.VITE_APP_CONFIG_URL}/dict/data/get-by-dictType?dictType=${'规则小类'}`, |
| 149 | method: 'post', | 154 | method: 'get', |
| 150 | data: { paramCode: "SMALL-CATEGORY" } | ||
| 151 | }) | 155 | }) |
| 152 | 156 | ||
| 153 | // 获取规范性检验规则。 | 157 | // 获取规范性检验规则。 |
| 154 | export const getCheckRulesList = () => request({ | 158 | export const getCheckRulesList = () => request({ |
| 155 | url:`${import.meta.env.VITE_APP_API_BASEURL}/data-dict/get-data-list`, | 159 | url: `${import.meta.env.VITE_APP_CONFIG_URL}/dict/data/get-by-dictType?dictType=${'正则校验'}`, |
| 156 | method: 'post', | 160 | method: 'get', |
| 157 | data: { paramCode: "REGULAR_RULE" } | ||
| 158 | }) | 161 | }) |
| 159 | 162 | ||
| 160 | // 根据规则guid获取规则的详情信息。 | 163 | // 根据规则guid获取规则的详情信息。 | ... | ... |
| ... | @@ -23,6 +23,7 @@ export const parseAndDecodeUrl = (url:string) => { | ... | @@ -23,6 +23,7 @@ export const parseAndDecodeUrl = (url:string) => { |
| 23 | 23 | ||
| 24 | // 返回去掉主机信息和开头斜杠后的解码部分以及最后一个斜杠后面的内容 | 24 | // 返回去掉主机信息和开头斜杠后的解码部分以及最后一个斜杠后面的内容 |
| 25 | return { | 25 | return { |
| 26 | fileName: pathname, | ||
| 26 | decodedPath: pathname + search + hash, | 27 | decodedPath: pathname + search + hash, |
| 27 | lastPart: lastPart | 28 | lastPart: lastPart |
| 28 | }; | 29 | }; | ... | ... |
| ... | @@ -33,6 +33,13 @@ export const getSystemMenu = (params) => { | ... | @@ -33,6 +33,13 @@ export const getSystemMenu = (params) => { |
| 33 | }); | 33 | }); |
| 34 | }; | 34 | }; |
| 35 | 35 | ||
| 36 | export const getCurrentUserInfo = (tenantGuid) => { | ||
| 37 | return request({ | ||
| 38 | url: `${import.meta.env.VITE_APP_PERSONAL_URL}/staff/data/get-current-staff?tenantGuid=${tenantGuid}`, | ||
| 39 | method: "post", | ||
| 40 | }); | ||
| 41 | }; | ||
| 42 | |||
| 36 | // 获取当前用户对应的产品和菜单 | 43 | // 获取当前用户对应的产品和菜单 |
| 37 | export const getUserInfo = () => { | 44 | export const getUserInfo = () => { |
| 38 | return request({ | 45 | return request({ | ... | ... |
| ... | @@ -99,10 +99,16 @@ const onClickOutside = (e: any) => { | ... | @@ -99,10 +99,16 @@ const onClickOutside = (e: any) => { |
| 99 | }; | 99 | }; |
| 100 | 100 | ||
| 101 | const getDrawerConRef = (refName) => { | 101 | const getDrawerConRef = (refName) => { |
| 102 | console.log(refName, '----------') | ||
| 102 | if (refName == 'drawerTableRef') { | 103 | if (refName == 'drawerTableRef') { |
| 103 | const dtf = drawerTableRef.value[0] || drawerTableRef.value | 104 | const dtf = drawerTableRef.value[0] || drawerTableRef.value |
| 104 | return dtf?.tableRef | 105 | return dtf?.tableRef |
| 105 | } | 106 | } |
| 107 | // const drawerForm = drawerFormRef.value[0] || drawerFormRef.value; | ||
| 108 | if (refName == 'drawerFormRef') { | ||
| 109 | const drawerForm = drawerFormRef.value[0] || drawerFormRef.value; | ||
| 110 | return drawerForm | ||
| 111 | } | ||
| 106 | } | 112 | } |
| 107 | 113 | ||
| 108 | defineExpose({ | 114 | defineExpose({ | ... | ... |
| ... | @@ -205,6 +205,10 @@ const inputChange = (val, row) => { | ... | @@ -205,6 +205,10 @@ const inputChange = (val, row) => { |
| 205 | 205 | ||
| 206 | /** 输入框输入触发事件 */ | 206 | /** 输入框输入触发事件 */ |
| 207 | const inputEventChange = (val, item) => { | 207 | const inputEventChange = (val, item) => { |
| 208 | if (val === '' && item.clearable) { | ||
| 209 | formInline.value[item.field] = ''; | ||
| 210 | return; | ||
| 211 | } | ||
| 208 | if (item.regexp) { | 212 | if (item.regexp) { |
| 209 | formInline.value[item.field] = val.replace(item.regexp, ''); | 213 | formInline.value[item.field] = val.replace(item.regexp, ''); |
| 210 | if (item.min != null && (formInline.value[item.field] < item.min)) { | 214 | if (item.min != null && (formInline.value[item.field] < item.min)) { |
| ... | @@ -337,7 +341,8 @@ const handlePictureCardPreview = (file, item) => { | ... | @@ -337,7 +341,8 @@ const handlePictureCardPreview = (file, item) => { |
| 337 | const onUploadFilePreview = async (file, item) => { | 341 | const onUploadFilePreview = async (file, item) => { |
| 338 | let f = formInline.value[item.field].find(i => i.name == file.name); | 342 | let f = formInline.value[item.field].find(i => i.name == file.name); |
| 339 | let url = f.url; | 343 | let url = f.url; |
| 340 | const refSignInfo: any = await getDownFileSignByUrl(parseAndDecodeUrl(url).decodedPath); | 344 | let fileName: string = parseAndDecodeUrl(url).fileName; |
| 345 | const refSignInfo: any = await getDownFileSignByUrl(fileName); | ||
| 341 | if (!refSignInfo?.data) { | 346 | if (!refSignInfo?.data) { |
| 342 | refSignInfo?.msg && ElMessage.error(refSignInfo?.msg); | 347 | refSignInfo?.msg && ElMessage.error(refSignInfo?.msg); |
| 343 | return; | 348 | return; |
| ... | @@ -360,7 +365,7 @@ const onUploadFilePreview = async (file, item) => { | ... | @@ -360,7 +365,7 @@ const onUploadFilePreview = async (file, item) => { |
| 360 | } | 365 | } |
| 361 | 366 | ||
| 362 | const downloadTemplate = async (url) => { | 367 | const downloadTemplate = async (url) => { |
| 363 | const refSignInfo: any = await getDownFileSignByUrl(parseAndDecodeUrl(url).decodedPath); | 368 | const refSignInfo: any = await getDownFileSignByUrl(parseAndDecodeUrl(url).fileName); |
| 364 | if (!refSignInfo?.data) { | 369 | if (!refSignInfo?.data) { |
| 365 | refSignInfo?.msg && ElMessage.error(refSignInfo?.msg); | 370 | refSignInfo?.msg && ElMessage.error(refSignInfo?.msg); |
| 366 | return; | 371 | return; |
| ... | @@ -379,7 +384,7 @@ const downloadTemplate = async (url) => { | ... | @@ -379,7 +384,7 @@ const downloadTemplate = async (url) => { |
| 379 | 384 | ||
| 380 | const onUploadFileDownload = async (file, item) => { | 385 | const onUploadFileDownload = async (file, item) => { |
| 381 | let url = file.url; | 386 | let url = file.url; |
| 382 | const refSignInfo: any = await getDownFileSignByUrl(parseAndDecodeUrl(url).decodedPath); | 387 | const refSignInfo: any = await getDownFileSignByUrl(parseAndDecodeUrl(url).fileName); |
| 383 | if (!refSignInfo?.data) { | 388 | if (!refSignInfo?.data) { |
| 384 | refSignInfo?.msg && ElMessage.error(refSignInfo?.msg); | 389 | refSignInfo?.msg && ElMessage.error(refSignInfo?.msg); |
| 385 | return; | 390 | return; |
| ... | @@ -1137,7 +1142,8 @@ const panelChange = (scope, row) => { | ... | @@ -1137,7 +1142,8 @@ const panelChange = (scope, row) => { |
| 1137 | :value="child.props?.value ? opts[child.props.value] : opts.value" :disabled="opts.disabled" /> | 1142 | :value="child.props?.value ? opts[child.props.value] : opts.value" :disabled="opts.disabled" /> |
| 1138 | </el-select> | 1143 | </el-select> |
| 1139 | <el-input v-else v-model.trim="formInline[child.field]" :placeholder="child.placeholder" | 1144 | <el-input v-else v-model.trim="formInline[child.field]" :placeholder="child.placeholder" |
| 1140 | :clearable="child.clearable" :maxlength="child.maxlength ?? ''" /> | 1145 | :clearable="child.clearable" :maxlength="child.maxlength ?? ''" |
| 1146 | @change="(val) => inputChange(val, child)" @input="(val) => inputEventChange(val, child)" /> | ||
| 1141 | </el-form-item> | 1147 | </el-form-item> |
| 1142 | </template> | 1148 | </template> |
| 1143 | </div> | 1149 | </div> | ... | ... |
| ... | @@ -90,6 +90,10 @@ const pageInfo = computed(() => { | ... | @@ -90,6 +90,10 @@ const pageInfo = computed(() => { |
| 90 | return props.tableInfo.page; | 90 | return props.tableInfo.page; |
| 91 | }); | 91 | }); |
| 92 | 92 | ||
| 93 | // const expandRowKeys = computed(() => { | ||
| 94 | // return Array.isArray(props.tableInfo.expandedKey) ? props.tableInfo.expandedKey : [];; | ||
| 95 | // }); | ||
| 96 | |||
| 93 | const tableRowClassName = (row, rowIndex) => { | 97 | const tableRowClassName = (row, rowIndex) => { |
| 94 | if (rowIndex === 1) { | 98 | if (rowIndex === 1) { |
| 95 | return "warning-row"; | 99 | return "warning-row"; |
| ... | @@ -236,7 +240,7 @@ onMounted(() => { | ... | @@ -236,7 +240,7 @@ onMounted(() => { |
| 236 | :show-header="props.tableInfo.showHeader ?? true" stripe :border="props.tableInfo.border | 240 | :show-header="props.tableInfo.showHeader ?? true" stripe :border="props.tableInfo.border |
| 237 | ?? true" :height="props.tableInfo.height === null ? null : (props.tableInfo.height ?? '100%')" | 241 | ?? true" :height="props.tableInfo.height === null ? null : (props.tableInfo.height ?? '100%')" |
| 238 | :max-height="maxHeight" :row-key="rowKey" :current-row-key="currentRowKey" :row-class-name="rowClassName" | 242 | :max-height="maxHeight" :row-key="rowKey" :current-row-key="currentRowKey" :row-class-name="rowClassName" |
| 239 | :expand-row-keys="props.tableInfo.expandRowKeys" v-loading="tableDataLoading" @row-click="rowClick" | 243 | :expand-row-keys="props.tableInfo.expandedKey" v-loading="tableDataLoading" @row-click="rowClick" |
| 240 | @row-dblclick="rowDblClick" @selection-change="selectionChange" @select="tableCheckboxSelectChange" | 244 | @row-dblclick="rowDblClick" @selection-change="selectionChange" @select="tableCheckboxSelectChange" |
| 241 | @select-all="tableCheckboxAllSelectChange" style="width: 100%; display: inline-block" | 245 | @select-all="tableCheckboxAllSelectChange" style="width: 100%; display: inline-block" |
| 242 | :style="{ 'min-height': props.tableInfo.minHeight ?? '200px' }" tooltip-effect="light" | 246 | :style="{ 'min-height': props.tableInfo.minHeight ?? '200px' }" tooltip-effect="light" | ... | ... |
| ... | @@ -5,9 +5,15 @@ import useSettingsStore from '@/store/modules/settings' | ... | @@ -5,9 +5,15 @@ import useSettingsStore from '@/store/modules/settings' |
| 5 | import type { Menu } from '#/global' | 5 | import type { Menu } from '#/global' |
| 6 | import { getDownloadUrl, download } from "@/utils/common"; | 6 | import { getDownloadUrl, download } from "@/utils/common"; |
| 7 | import { getImageContent } from "@/api/modules/queryService"; | 7 | import { getImageContent } from "@/api/modules/queryService"; |
| 8 | import {createSVG } from "@/utils/common" | 8 | import { createSVG } from "@/utils/common" |
| 9 | import { onBeforeMount } from "vue" | 9 | import { onBeforeMount } from "vue" |
| 10 | import { resolve } from 'path-browserify'; | 10 | import { resolve } from 'path-browserify'; |
| 11 | import { ElMessage } from "element-plus"; | ||
| 12 | import { | ||
| 13 | parseAndDecodeUrl, | ||
| 14 | getDownFileSignByUrl, | ||
| 15 | obsDownloadRequest | ||
| 16 | } from '@/api/modules/obsService'; | ||
| 11 | const props = defineProps({ | 17 | const props = defineProps({ |
| 12 | item: { | 18 | item: { |
| 13 | type: Object as () => Menu.recordRaw, | 19 | type: Object as () => Menu.recordRaw, |
| ... | @@ -19,7 +25,7 @@ const props = defineProps({ | ... | @@ -19,7 +25,7 @@ const props = defineProps({ |
| 19 | }, | 25 | }, |
| 20 | }) | 26 | }) |
| 21 | const settingsStore = useSettingsStore() | 27 | const settingsStore = useSettingsStore() |
| 22 | const item1:any = ref() | 28 | const item1: any = ref() |
| 23 | const hasChildren = computed(() => { | 29 | const hasChildren = computed(() => { |
| 24 | let flag = true | 30 | let flag = true |
| 25 | if (props.item.children) { | 31 | if (props.item.children) { |
| ... | @@ -32,70 +38,79 @@ const hasChildren = computed(() => { | ... | @@ -32,70 +38,79 @@ const hasChildren = computed(() => { |
| 32 | } | 38 | } |
| 33 | return flag | 39 | return flag |
| 34 | }) | 40 | }) |
| 35 | onBeforeMount( async ()=>{ | 41 | onBeforeMount(async () => { |
| 36 | await getSvgElement(props.item) | 42 | await getSvgElement(props.item) |
| 37 | }) | 43 | }) |
| 38 | const getSvgElement = async (item:any)=>{ | 44 | const getSvgElement = async (item: any) => { |
| 45 | console.log(item) | ||
| 39 | item1.value = item | 46 | item1.value = item |
| 40 | //// return new Promise( async (reslove,inject)=>{ | 47 | //// return new Promise( async (reslove,inject)=>{ |
| 41 | if(item1.value.meta.icon && item1.value.meta.icon.indexOf("https")>-1) { | 48 | if (item1.value.meta.icon && item1.value.meta.icon.indexOf("https") > -1) { |
| 42 | const res1:any = await getImageContent(item1.value.meta?.icon) | 49 | const refSignInfo: any = await getDownFileSignByUrl(parseAndDecodeUrl(item1.value.meta.icon).fileName); |
| 43 | let ele:any | 50 | if (!refSignInfo?.data) { |
| 44 | if (res1 && !res1.msg) { | 51 | refSignInfo?.msg && ElMessage.error(refSignInfo?.msg); |
| 45 | let name = item1.value.meta?.icon; | 52 | return; |
| 46 | var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1) : ''; | 53 | } |
| 47 | if (fileSuffix === 'svg') { //浏览器可以支持图片和pdf预览 | 54 | console.log(refSignInfo, '------') |
| 48 | let blob= getDownloadUrl(res1, name, fileSuffix,false) as Blob | 55 | const res1: any = await obsDownloadRequest(refSignInfo?.data) |
| 49 | ele = await createSVG(blob) | 56 | let ele: any |
| 50 | item1.value.meta.isEle = false | 57 | console.log(res1, '*********') |
| 51 | item1.value.meta.icon = ele | 58 | // if (res1 && !res1.msg) { |
| 52 | // reslove({}) | 59 | // ele = await createSVG(res1) |
| 53 | } | 60 | // item1.value.meta.isEle = false |
| 54 | } | 61 | // item1.value.meta.icon = ele |
| 55 | } | 62 | // // reslove({}) |
| 56 | // reslove(122) | 63 | // } |
| 64 | } | ||
| 65 | } | ||
| 66 | |||
| 67 | // reslove(122) | ||
| 57 | // }) | 68 | // }) |
| 58 | 69 | ||
| 59 | 70 | ||
| 60 | } | ||
| 61 | </script> | 71 | </script> |
| 62 | 72 | ||
| 63 | <template> | 73 | <template> |
| 64 | <div class="sidebar-item"> | 74 | <div class="sidebar-item"> |
| 65 | <router-link v-if="!hasChildren" v-slot="{ href, navigate, isActive, isExactActive }" custom :to="resolveRoutePath(basePath, item1.path)"> | 75 | <router-link v-if="!hasChildren" v-slot="{ href, navigate, isActive, isExactActive }" custom |
| 66 | <a :href="item1.meta?.link ? item1.meta.link : href" :class="[isActive && 'router-link-active', isExactActive && 'router-link-exact-active']" :target="item.meta?.link ? '_blank' : '_self'" @click="navigate" v-preReClick> | 76 | :to="resolveRoutePath(basePath, item1.path)"> |
| 77 | <a :href="item1.meta?.link ? item1.meta.link : href" | ||
| 78 | :class="[isActive && 'router-link-active', isExactActive && 'router-link-exact-active']" | ||
| 79 | :target="item.meta?.link ? '_blank' : '_self'" @click="navigate" v-preReClick> | ||
| 67 | <el-menu-item :title="item1.meta?.title ?? '[ 无标题 ]'" :index="resolveRoutePath(basePath, item1.path || '')"> | 80 | <el-menu-item :title="item1.meta?.title ?? '[ 无标题 ]'" :index="resolveRoutePath(basePath, item1.path || '')"> |
| 68 | <el-icon v-if="item1.meta?.icon" class="title-icon" > | 81 | <el-icon v-if="item1.meta?.icon" class="title-icon"> |
| 69 | <!-- <img :src="item.meta.icon" v-if="item.meta.icon.indexOf('http')>-1" alt=""> --> | 82 | <!-- <img :src="item.meta.icon" v-if="item.meta.icon.indexOf('http')>-1" alt=""> --> |
| 70 | 83 | ||
| 71 | <!-- {{ item.meta.icon }} --> | 84 | <!-- {{ item.meta.icon }} --> |
| 72 | <template v-if="item1.meta.icon.indexOf('svg')>-1"> | 85 | <template v-if="item1.meta.icon.indexOf('svg') > -1"> |
| 73 | <i v-html="item1.meta.icon" :key="item1.meta.icon" v-if="!item1.meta.isEle"></i> | 86 | <i v-html="item1.meta.icon" :key="item1.meta.icon" v-if="!item1.meta.isEle"></i> |
| 74 | </template> | 87 | </template> |
| 75 | <template v-else> | 88 | <template v-else> |
| 76 | <svg-icon :name="item1.meta.icon"/> | 89 | <svg-icon :name="item1.meta.icon" /> |
| 77 | </template> | 90 | </template> |
| 78 | </el-icon> | 91 | </el-icon> |
| 79 | <span class="title">{{ item1.meta?.title ?? '[ 无标题 ]' }}</span> | 92 | <span class="title">{{ item1.meta?.title ?? '[ 无标题 ]' }}</span> |
| 80 | </el-menu-item> | 93 | </el-menu-item> |
| 81 | </a> | 94 | </a> |
| 82 | </router-link> | 95 | </router-link> |
| 83 | <el-sub-menu v-else :title="item1.meta?.title ?? '[ 无标题 ]'" :index="settingsStore.settings.app.routeBaseOn !== 'filesystem' ? resolveRoutePath(basePath, item1.path) : JSON.stringify(item1)"> | 96 | <el-sub-menu v-else :title="item1.meta?.title ?? '[ 无标题 ]'" |
| 97 | :index="settingsStore.settings.app.routeBaseOn !== 'filesystem' ? resolveRoutePath(basePath, item1.path) : JSON.stringify(item1)"> | ||
| 84 | <template #title> | 98 | <template #title> |
| 85 | <el-icon v-if="item1.meta?.icon" class="title-icon" > | 99 | <el-icon v-if="item1.meta?.icon" class="title-icon"> |
| 86 | <!-- <img :src="item.meta.icon" v-if="item.meta.icon.indexOf('http')>-1" alt=""> | 100 | <!-- <img :src="item.meta.icon" v-if="item.meta.icon.indexOf('http')>-1" alt=""> |
| 87 | <svg-icon :name="item.meta.icon" v-else /> --> | 101 | <svg-icon :name="item.meta.icon" v-else /> --> |
| 88 | <template v-if="item1.meta.icon.indexOf('svg')>-1"> | 102 | <template v-if="item1.meta.icon.indexOf('svg') > -1"> |
| 89 | <i v-html="item1.meta.icon" :key="item1.meta.icon" v-if="!item1.meta.isEle"></i> | 103 | <i v-html="item1.meta.icon" :key="item1.meta.icon" v-if="!item1.meta.isEle"></i> |
| 90 | </template> | 104 | </template> |
| 91 | <template v-else> | 105 | <template v-else> |
| 92 | <svg-icon :name="item1.meta.icon"/> | 106 | <svg-icon :name="item1.meta.icon" /> |
| 93 | </template> | 107 | </template> |
| 94 | </el-icon> | 108 | </el-icon> |
| 95 | <span class="title">{{ item.meta?.title ?? '[ 无标题 ]' }}</span> | 109 | <span class="title">{{ item.meta?.title ?? '[ 无标题 ]' }}</span> |
| 96 | </template> | 110 | </template> |
| 97 | <template v-for="route in (item1.children as Menu.recordRaw[])"> | 111 | <template v-for="route in (item1.children as Menu.recordRaw[])"> |
| 98 | <SidebarItem v-if="route.meta?.sidebar !== false" :key="route.path" :item="route" :base-path="resolveRoutePath(basePath, item1.path)" /> | 112 | <SidebarItem v-if="route.meta?.sidebar !== false" :key="route.path" :item="route" |
| 113 | :base-path="resolveRoutePath(basePath, item1.path)" /> | ||
| 99 | </template> | 114 | </template> |
| 100 | </el-sub-menu> | 115 | </el-sub-menu> |
| 101 | </div> | 116 | </div> |
| ... | @@ -128,7 +143,7 @@ const getSvgElement = async (item:any)=>{ | ... | @@ -128,7 +143,7 @@ const getSvgElement = async (item:any)=>{ |
| 128 | color: #B2B2B2; | 143 | color: #B2B2B2; |
| 129 | } | 144 | } |
| 130 | 145 | ||
| 131 | .title-icon + .title { | 146 | .title-icon+.title { |
| 132 | margin-left: 10px; | 147 | margin-left: 10px; |
| 133 | } | 148 | } |
| 134 | 149 | ||
| ... | @@ -154,7 +169,7 @@ a { | ... | @@ -154,7 +169,7 @@ a { |
| 154 | } | 169 | } |
| 155 | 170 | ||
| 156 | .el-sub-menu__title { | 171 | .el-sub-menu__title { |
| 157 | > .badge { | 172 | >.badge { |
| 158 | &-dot { | 173 | &-dot { |
| 159 | right: 40px; | 174 | right: 40px; |
| 160 | } | 175 | } |
| ... | @@ -171,7 +186,7 @@ a { | ... | @@ -171,7 +186,7 @@ a { |
| 171 | background-color: var(--g-sub-sidebar-menu-bg) !important; | 186 | background-color: var(--g-sub-sidebar-menu-bg) !important; |
| 172 | 187 | ||
| 173 | .el-menu-item, | 188 | .el-menu-item, |
| 174 | .el-sub-menu > .el-sub-menu__title { | 189 | .el-sub-menu>.el-sub-menu__title { |
| 175 | color: var(--g-sub-sidebar-menu-color); | 190 | color: var(--g-sub-sidebar-menu-color); |
| 176 | background-color: var(--g-sub-sidebar-menu-bg) !important; | 191 | background-color: var(--g-sub-sidebar-menu-bg) !important; |
| 177 | 192 | ||
| ... | @@ -194,7 +209,7 @@ a { | ... | @@ -194,7 +209,7 @@ a { |
| 194 | } | 209 | } |
| 195 | 210 | ||
| 196 | .el-menu-item.is-active, | 211 | .el-menu-item.is-active, |
| 197 | .el-menu--collapse .el-sub-menu.is-active > .el-sub-menu__title, | 212 | .el-menu--collapse .el-sub-menu.is-active>.el-sub-menu__title, |
| 198 | .el-sub-menu .el-menu--inline .el-menu-item.is-active { | 213 | .el-sub-menu .el-menu--inline .el-menu-item.is-active { |
| 199 | color: var(--g-sub-sidebar-menu-active-color) !important; | 214 | color: var(--g-sub-sidebar-menu-active-color) !important; |
| 200 | background-color: var(--g-sub-sidebar-menu-active-bg) !important; | 215 | background-color: var(--g-sub-sidebar-menu-active-bg) !important; |
| ... | @@ -203,10 +218,12 @@ a { | ... | @@ -203,10 +218,12 @@ a { |
| 203 | .el-sub-menu__icon-arrow { | 218 | .el-sub-menu__icon-arrow { |
| 204 | color: unset; | 219 | color: unset; |
| 205 | } | 220 | } |
| 221 | |||
| 206 | .title-icon { | 222 | .title-icon { |
| 207 | color: var(--g-sub-sidebar-menu-active-color); | 223 | color: var(--g-sub-sidebar-menu-active-color); |
| 208 | } | 224 | } |
| 209 | } | 225 | } |
| 226 | |||
| 210 | svg { | 227 | svg { |
| 211 | g { | 228 | g { |
| 212 | fill: inherit !important; | 229 | fill: inherit !important; | ... | ... |
| ... | @@ -4,7 +4,7 @@ import router from '@/router' | ... | @@ -4,7 +4,7 @@ import router from '@/router' |
| 4 | import { ElMessage } from 'element-plus' | 4 | import { ElMessage } from 'element-plus' |
| 5 | import apiUser from '@/api/modules/user' | 5 | import apiUser from '@/api/modules/user' |
| 6 | import { getCurrentTime } from '@/utils/common' | 6 | import { getCurrentTime } from '@/utils/common' |
| 7 | import { getSystemMenu, getUserInfo, getTokenByCode, loginOut, refreshToken, editPasswordInterface, getCurrentUserInfo } from '@/api/modules/queryService' | 7 | import { getSystemMenu, getUserInfo, getTokenByCode, loginOut, refreshToken, editPasswordInterface, getCurrentUserInfo, getCurrentUserInfo } from '@/api/modules/queryService' |
| 8 | 8 | ||
| 9 | const useUserStore = defineStore( | 9 | const useUserStore = defineStore( |
| 10 | // 唯一ID | 10 | // 唯一ID |
| ... | @@ -52,21 +52,27 @@ const useUserStore = defineStore( | ... | @@ -52,21 +52,27 @@ const useUserStore = defineStore( |
| 52 | account.value = res.data.logonUser | 52 | account.value = res.data.logonUser |
| 53 | userId.value = res.data.userId | 53 | userId.value = res.data.userId |
| 54 | userName.value = res.data.userName | 54 | userName.value = res.data.userName |
| 55 | // userData.value = JSON.stringify(res.data.data); | ||
| 55 | currentTenantGuid.value = res.data.tenantInfoList && res.data.tenantInfoList.length ? res.data.tenantInfoList[0].guid : ''; | 56 | currentTenantGuid.value = res.data.tenantInfoList && res.data.tenantInfoList.length ? res.data.tenantInfoList[0].guid : ''; |
| 56 | localStorage.setItem('currentTenantGuid', currentTenantGuid.value); | 57 | localStorage.setItem('currentTenantGuid', currentTenantGuid.value); |
| 57 | let currentTenant = res.data.tenantInfoList?.[0]; | 58 | let currentTenant = res.data.tenantInfoList?.[0]; |
| 58 | return getCurrentUserInfo({ tenantGuid: currentTenantGuid.value }).then((result: any) => { | 59 | getCurrentUserInfo(currentTenantGuid.value).then((res: any) => { |
| 60 | console.log(res, 'getCurrentUserInfo'); | ||
| 61 | if (res.code == '00000') { | ||
| 62 | localStorage.setItem('userData', JSON.stringify(res.data)); | ||
| 63 | } else { | ||
| 64 | ElMessage.error(res.msg) | ||
| 65 | } | ||
| 66 | }) | ||
| 59 | return getSystemMenu({ tenantGuid: currentTenantGuid.value }).then((info: any) => { | 67 | return getSystemMenu({ tenantGuid: currentTenantGuid.value }).then((info: any) => { |
| 60 | if (info.code == '00000') { | 68 | if (info.code == '00000') { |
| 61 | localStorage.setItem('userName', currentTenant?.name) | 69 | localStorage.setItem('userName', currentTenant?.name) |
| 62 | localStorage.setItem('userInfoData', JSON.stringify(info.data)); | 70 | localStorage.setItem('userInfoData', JSON.stringify(info.data)); |
| 63 | userInfoData.value = info.data; | 71 | userInfoData.value = info.data; |
| 64 | localStorage.setItem('userData', JSON.stringify(result.data)); | ||
| 65 | } else { | 72 | } else { |
| 66 | ElMessage.error(info.msg) | 73 | ElMessage.error(info.msg) |
| 67 | } | 74 | } |
| 68 | }) | 75 | }) |
| 69 | }) | ||
| 70 | } else { | 76 | } else { |
| 71 | isLogin.value = false; | 77 | isLogin.value = false; |
| 72 | // ElMessage.error(res.msg);//授权码被重复使用,不抛出异常。 | 78 | // ElMessage.error(res.msg);//授权码被重复使用,不抛出异常。 | ... | ... |
| ... | @@ -7,7 +7,8 @@ import { ref } from 'vue'; | ... | @@ -7,7 +7,8 @@ import { ref } from 'vue'; |
| 7 | import { useRouter, useRoute } from "vue-router"; | 7 | import { useRouter, useRoute } from "vue-router"; |
| 8 | import useUserStore from "@/store/modules/user"; | 8 | import useUserStore from "@/store/modules/user"; |
| 9 | import { | 9 | import { |
| 10 | getAreaData | 10 | getAreaData, |
| 11 | getCurrentUserInfo | ||
| 11 | } from "@/api/modules/queryService"; | 12 | } from "@/api/modules/queryService"; |
| 12 | import { | 13 | import { |
| 13 | getParamsList, | 14 | getParamsList, |
| ... | @@ -28,6 +29,7 @@ import importTableField from "./importTableField.vue"; | ... | @@ -28,6 +29,7 @@ import importTableField from "./importTableField.vue"; |
| 28 | import { useValidator } from '@/hooks/useValidator'; | 29 | import { useValidator } from '@/hooks/useValidator'; |
| 29 | import useDataAssetStore from "@/store/modules/dataAsset"; | 30 | import useDataAssetStore from "@/store/modules/dataAsset"; |
| 30 | import { handleContentWrapView, scrollLastRowToView, changeNum } from '@/utils/common'; | 31 | import { handleContentWrapView, scrollLastRowToView, changeNum } from '@/utils/common'; |
| 32 | import { ElMessage } from 'element-plus'; | ||
| 31 | 33 | ||
| 32 | const { proxy } = getCurrentInstance() as any; | 34 | const { proxy } = getCurrentInstance() as any; |
| 33 | const { required, checkExistName } = useValidator(); | 35 | const { required, checkExistName } = useValidator(); |
| ... | @@ -491,6 +493,15 @@ const addAssetTable = () => { | ... | @@ -491,6 +493,15 @@ const addAssetTable = () => { |
| 491 | } | 493 | } |
| 492 | 494 | ||
| 493 | onBeforeMount(() => { | 495 | onBeforeMount(() => { |
| 496 | // const currentTenantGuid = localStorage.getItem('currentTenantGuid'); | ||
| 497 | // getCurrentUserInfo(currentTenantGuid).then((res: any) => { | ||
| 498 | // console.log(res, 'getCurrentUserInfo'); | ||
| 499 | // if (res.code == '00000') { | ||
| 500 | // localStorage.setItem('userData', JSON.stringify(res.data)); | ||
| 501 | // } else { | ||
| 502 | // ElMessage.error(res.msg) | ||
| 503 | // } | ||
| 504 | // }) | ||
| 494 | getParentAreaPromise.value = getAreaData({ parentId: null }).then((res: any) => { | 505 | getParentAreaPromise.value = getAreaData({ parentId: null }).then((res: any) => { |
| 495 | if (res?.code == proxy.$passCode) { | 506 | if (res?.code == proxy.$passCode) { |
| 496 | parentAreaData.value = res.data ?? []; | 507 | parentAreaData.value = res.data ?? []; |
| ... | @@ -574,9 +585,8 @@ onBeforeMount(() => { | ... | @@ -574,9 +585,8 @@ onBeforeMount(() => { |
| 574 | }).then((res: any) => { | 585 | }).then((res: any) => { |
| 575 | if (res.code == proxy.$passCode) { | 586 | if (res.code == proxy.$passCode) { |
| 576 | damTypes.value = res.data || []; | 587 | damTypes.value = res.data || []; |
| 577 | baseInfoFormItems.value[1].options = damTypes.value; | 588 | let item = baseInfoFormItems.value.find(item => item.field == 'damType'); |
| 578 | // let item = baseInfoFormItems.value.find(item => item.field == 'damType'); | 589 | item && (item.options = damTypes.value); |
| 579 | // item && (item.options = damTypes.value); | ||
| 580 | } else { | 590 | } else { |
| 581 | proxy.$ElMessage.error(res.msg); | 591 | proxy.$ElMessage.error(res.msg); |
| 582 | } | 592 | } |
| ... | @@ -585,11 +595,9 @@ onBeforeMount(() => { | ... | @@ -585,11 +595,9 @@ onBeforeMount(() => { |
| 585 | dictType: "数据资产目录主题名称", | 595 | dictType: "数据资产目录主题名称", |
| 586 | }).then((res: any) => { | 596 | }).then((res: any) => { |
| 587 | if (res.code == proxy.$passCode) { | 597 | if (res.code == proxy.$passCode) { |
| 588 | subjectDomainListData.value = res.data || []; | 598 | subjectDomainListData.value = replaceChildDictListKey(res.data) || []; |
| 589 | replaceChildDictListKey(subjectDomainListData.value); | 599 | let item = baseInfoFormItems.value.find(item => item.field == 'subjectDomain'); |
| 590 | baseInfoFormItems.value[3].options = replaceChildDictListKey(subjectDomainListData.value); | 600 | item && (item.options = subjectDomainListData.value); |
| 591 | // let item = baseInfoFormItems.value.find(item => item.field == 'subjectDomain'); | ||
| 592 | // item && (item.options = subjectDomainListData.value); | ||
| 593 | } else { | 601 | } else { |
| 594 | proxy.$ElMessage.error(res.msg); | 602 | proxy.$ElMessage.error(res.msg); |
| 595 | } | 603 | } | ... | ... |
| ... | @@ -25,7 +25,13 @@ const assetStore = useDataAssetStore(); | ... | @@ -25,7 +25,13 @@ const assetStore = useDataAssetStore(); |
| 25 | const router = useRouter(); | 25 | const router = useRouter(); |
| 26 | const { proxy } = getCurrentInstance() as any; | 26 | const { proxy } = getCurrentInstance() as any; |
| 27 | const damTypes: any = ref([]); | 27 | const damTypes: any = ref([]); |
| 28 | const dataSources: any = ref([]); | ||
| 28 | const subjectDomainListData: any = ref([]) | 29 | const subjectDomainListData: any = ref([]) |
| 30 | // 登记状态 Y 已登记 N 未登记 | ||
| 31 | const isRegisterOptions = ref<any>([ | ||
| 32 | { label: "已登记", value: "Y" }, | ||
| 33 | { label: "未登记", value: "N" }, | ||
| 34 | ]) | ||
| 29 | const searchItemList = ref([ | 35 | const searchItemList = ref([ |
| 30 | { | 36 | { |
| 31 | type: "input", | 37 | type: "input", |
| ... | @@ -72,23 +78,37 @@ const searchItemList = ref([ | ... | @@ -72,23 +78,37 @@ const searchItemList = ref([ |
| 72 | showCheckbox: true | 78 | showCheckbox: true |
| 73 | }, | 79 | }, |
| 74 | { | 80 | { |
| 75 | type: "input", | 81 | type: "select", |
| 76 | label: "", | 82 | label: "", |
| 77 | field: "damName", | 83 | field: "dataSources", |
| 78 | default: "", | 84 | default: "", |
| 79 | placeholder: "来源", | 85 | placeholder: "数据来源", |
| 80 | clearable: true, | 86 | clearable: true, |
| 87 | filterable: true, | ||
| 88 | options: dataSources.value, | ||
| 89 | props: { | ||
| 90 | value: 'value', | ||
| 91 | label: 'label' | ||
| 92 | } | ||
| 81 | }, | 93 | }, |
| 82 | { | 94 | { |
| 83 | type: "input", | 95 | type: "select", |
| 84 | label: "", | 96 | label: "", |
| 85 | field: "damName", | 97 | field: "isRegister", |
| 86 | default: "", | 98 | default: "", |
| 87 | placeholder: "登记状态", | 99 | placeholder: "登记状态", |
| 88 | clearable: true, | 100 | clearable: true, |
| 101 | filterable: true, | ||
| 102 | options: isRegisterOptions.value, | ||
| 103 | props: { | ||
| 104 | value: 'value', | ||
| 105 | label: 'label' | ||
| 106 | } | ||
| 89 | }, | 107 | }, |
| 90 | ]); | 108 | ]); |
| 91 | 109 | ||
| 110 | |||
| 111 | |||
| 92 | const pageInfo = ref({ | 112 | const pageInfo = ref({ |
| 93 | ...commonPageConfig, | 113 | ...commonPageConfig, |
| 94 | rows: 0, | 114 | rows: 0, |
| ... | @@ -216,14 +236,25 @@ onActivated(() => { | ... | @@ -216,14 +236,25 @@ onActivated(() => { |
| 216 | }); | 236 | }); |
| 217 | 237 | ||
| 218 | onBeforeMount(() => { | 238 | onBeforeMount(() => { |
| 219 | getParamsList({ | 239 | getDamTypesList({ |
| 240 | dictType: "数据来源", | ||
| 241 | }).then((res: any) => { | ||
| 242 | if (res.code == proxy.$passCode) { | ||
| 243 | dataSources.value = res.data || []; | ||
| 244 | let item = searchItemList.value.find(item => item.field == 'dataSources'); | ||
| 245 | item && (item.options = dataSources.value); | ||
| 246 | } else { | ||
| 247 | proxy.$ElMessage.error(res.msg); | ||
| 248 | } | ||
| 249 | }) | ||
| 250 | |||
| 251 | getDamTypesList({ | ||
| 220 | dictType: "资产类型", | 252 | dictType: "资产类型", |
| 221 | }).then((res: any) => { | 253 | }).then((res: any) => { |
| 222 | if (res.code == proxy.$passCode) { | 254 | if (res.code == proxy.$passCode) { |
| 223 | damTypes.value = res.data || []; | 255 | damTypes.value = res.data || []; |
| 224 | searchItemList.value[1].options = damTypes.value; | 256 | let item = searchItemList.value.find(item => item.field == 'damType'); |
| 225 | // let item = searchItemList.value.find(item => item.field == 'damType'); | 257 | item && (item.options = damTypes.value); |
| 226 | // item && (item.options = damTypes.value); | ||
| 227 | } else { | 258 | } else { |
| 228 | proxy.$ElMessage.error(res.msg); | 259 | proxy.$ElMessage.error(res.msg); |
| 229 | } | 260 | } |
| ... | @@ -232,11 +263,9 @@ onBeforeMount(() => { | ... | @@ -232,11 +263,9 @@ onBeforeMount(() => { |
| 232 | dictType: "数据资产目录主题名称", | 263 | dictType: "数据资产目录主题名称", |
| 233 | }).then((res: any) => { | 264 | }).then((res: any) => { |
| 234 | if (res.code == proxy.$passCode) { | 265 | if (res.code == proxy.$passCode) { |
| 235 | subjectDomainListData.value = res.data || []; | 266 | subjectDomainListData.value = replaceChildDictListKey(res.data) || []; |
| 236 | replaceChildDictListKey(subjectDomainListData.value); | 267 | let item = searchItemList.value.find(item => item.field == 'subjectDomain'); |
| 237 | searchItemList.value[2].options = replaceChildDictListKey(subjectDomainListData.value); | 268 | item && (item.options = subjectDomainListData.value); |
| 238 | // let item = searchItemList.value.find(item => item.field == 'subjectDomain'); | ||
| 239 | // item && (item.options = subjectDomainListData.value); | ||
| 240 | } else { | 269 | } else { |
| 241 | proxy.$ElMessage.error(res.msg); | 270 | proxy.$ElMessage.error(res.msg); |
| 242 | } | 271 | } |
| ... | @@ -286,6 +315,8 @@ const handleCreate = () => { | ... | @@ -286,6 +315,8 @@ const handleCreate = () => { |
| 286 | <div class="type-btn"> | 315 | <div class="type-btn"> |
| 287 | <div class="type">{{ item.subjectDomainName || item.subjectDomain }}</div> | 316 | <div class="type">{{ item.subjectDomainName || item.subjectDomain }}</div> |
| 288 | <div class="type">{{ item.damTypeName || '--' }}</div> | 317 | <div class="type">{{ item.damTypeName || '--' }}</div> |
| 318 | <div class="type">{{ item.isRegister == 'Y' ? '已登记' : '未登记' }}</div> | ||
| 319 | <div class="type">{{ item.foundMode == '1' ? '自建' : '加工交付' }}</div> | ||
| 289 | </div> | 320 | </div> |
| 290 | <div class="desc">{{ item.propertyDescription }}</div> | 321 | <div class="desc">{{ item.propertyDescription }}</div> |
| 291 | <el-popover v-model="cardBtnVisible" placement="bottom" width="96" trigger="click" | 322 | <el-popover v-model="cardBtnVisible" placement="bottom" width="96" trigger="click" | ... | ... |
| ... | @@ -62,7 +62,7 @@ const parentAreaData: any = ref([]); | ... | @@ -62,7 +62,7 @@ const parentAreaData: any = ref([]); |
| 62 | const getArea1 = (node, resolve) => { | 62 | const getArea1 = (node, resolve) => { |
| 63 | const { level } = node | 63 | const { level } = node |
| 64 | let params = { | 64 | let params = { |
| 65 | parentId: node.value | 65 | parentGuid: node.value |
| 66 | } | 66 | } |
| 67 | if (!node.value) { | 67 | if (!node.value) { |
| 68 | if (getParentAreaPromise.value) { | 68 | if (getParentAreaPromise.value) { |
| ... | @@ -111,7 +111,7 @@ const getArea1 = (node, resolve) => { | ... | @@ -111,7 +111,7 @@ const getArea1 = (node, resolve) => { |
| 111 | const getArea = (node, resolve) => { | 111 | const getArea = (node, resolve) => { |
| 112 | const { level } = node | 112 | const { level } = node |
| 113 | let params = { | 113 | let params = { |
| 114 | parentId: node.value | 114 | parentGuid: node.value |
| 115 | } | 115 | } |
| 116 | if (!node.value) { | 116 | if (!node.value) { |
| 117 | if (getParentAreaPromise.value) { | 117 | if (getParentAreaPromise.value) { |
| ... | @@ -375,6 +375,18 @@ const getRegisterCatalogListData = () => { | ... | @@ -375,6 +375,18 @@ const getRegisterCatalogListData = () => { |
| 375 | dataScaleItem.disabled = false; | 375 | dataScaleItem.disabled = false; |
| 376 | } | 376 | } |
| 377 | } | 377 | } |
| 378 | if (draftDetailInfo.value.damGuid) { | ||
| 379 | let da = registerCatalogList.value.find(r => r.guid == draftDetailInfo.value.damGuid); | ||
| 380 | if (da && da.dataCount != null) { | ||
| 381 | dataScaleItem.disabled = true; | ||
| 382 | if (draftDetailInfo.value.dataScale == null) { | ||
| 383 | draftDetailInfo.value.dataScale = da.dataCount; | ||
| 384 | setBaseFormItemsValue(draftDetailInfo.value); | ||
| 385 | } | ||
| 386 | } else { | ||
| 387 | dataScaleItem.disabled = false; | ||
| 388 | } | ||
| 389 | } | ||
| 378 | } else { | 390 | } else { |
| 379 | ElMessage.error(res.msg); | 391 | ElMessage.error(res.msg); |
| 380 | } | 392 | } |
| ... | @@ -596,7 +608,7 @@ onBeforeMount(() => { | ... | @@ -596,7 +608,7 @@ onBeforeMount(() => { |
| 596 | }) | 608 | }) |
| 597 | getParamsList({ dictType: '数据资产目录主题名称' }).then((res: any) => { | 609 | getParamsList({ dictType: '数据资产目录主题名称' }).then((res: any) => { |
| 598 | if (res.code == proxy.$passCode) { | 610 | if (res.code == proxy.$passCode) { |
| 599 | subjectDomainListData.value = res.data || []; | 611 | subjectDomainListData.value = replaceChildDictListKey(res.data) || []; |
| 600 | let item = baseFormItems.value.find(item => item.field == 'subjectDomain'); | 612 | let item = baseFormItems.value.find(item => item.field == 'subjectDomain'); |
| 601 | item && (item.options = subjectDomainListData.value); | 613 | item && (item.options = subjectDomainListData.value); |
| 602 | } else { | 614 | } else { |
| ... | @@ -731,6 +743,14 @@ const baseFormItems: any = ref([ | ... | @@ -731,6 +743,14 @@ const baseFormItems: any = ref([ |
| 731 | clearable: true, | 743 | clearable: true, |
| 732 | required: true, | 744 | required: true, |
| 733 | }, { | 745 | }, { |
| 746 | label: "数据时间范围", | ||
| 747 | type: "date-picker", | ||
| 748 | field: "dateRange", | ||
| 749 | default: null, | ||
| 750 | placeholder: "开始时间~结束时间", | ||
| 751 | clearable: true, | ||
| 752 | required: true, | ||
| 753 | }, { | ||
| 734 | label: '病例总数(例)', | 754 | label: '病例总数(例)', |
| 735 | type: 'input', | 755 | type: 'input', |
| 736 | placeholder: '请输入', | 756 | placeholder: '请输入', |
| ... | @@ -740,6 +760,7 @@ const baseFormItems: any = ref([ | ... | @@ -740,6 +760,7 @@ const baseFormItems: any = ref([ |
| 740 | default: '', | 760 | default: '', |
| 741 | required: false | 761 | required: false |
| 742 | }, { | 762 | }, { |
| 763 | }, { | ||
| 743 | label: '数据覆盖地域', | 764 | label: '数据覆盖地域', |
| 744 | type: 'checkbox-select', | 765 | type: 'checkbox-select', |
| 745 | placeholder: '全国', | 766 | placeholder: '全国', |
| ... | @@ -783,6 +804,7 @@ const baseFormItems: any = ref([ | ... | @@ -783,6 +804,7 @@ const baseFormItems: any = ref([ |
| 783 | field: 'exchangeGuid', | 804 | field: 'exchangeGuid', |
| 784 | default: '', | 805 | default: '', |
| 785 | // col: 'mr8', | 806 | // col: 'mr8', |
| 807 | // col: 'mr8', | ||
| 786 | options: currTenantChanged.value, | 808 | options: currTenantChanged.value, |
| 787 | props: { | 809 | props: { |
| 788 | // value: 'serviceTenantGuid', | 810 | // value: 'serviceTenantGuid', | ... | ... |
| ... | @@ -80,7 +80,7 @@ const drawerRef = ref<any>(''); | ... | @@ -80,7 +80,7 @@ const drawerRef = ref<any>(''); |
| 80 | const heightlightRow = ref<any>(''); | 80 | const heightlightRow = ref<any>(''); |
| 81 | const scopeRow = ref<any>(null); | 81 | const scopeRow = ref<any>(null); |
| 82 | const tableInfo = ref({ | 82 | const tableInfo = ref({ |
| 83 | id: "data-class-standard-table", | 83 | id: "data-class-table", |
| 84 | multiple: false, | 84 | multiple: false, |
| 85 | fields: [ | 85 | fields: [ |
| 86 | { label: "序号", type: "index", width: 56, align: "center" }, | 86 | { label: "序号", type: "index", width: 56, align: "center" }, |
| ... | @@ -110,7 +110,7 @@ const tableInfo = ref({ | ... | @@ -110,7 +110,7 @@ const tableInfo = ref({ |
| 110 | data: [], | 110 | data: [], |
| 111 | rowKey: 'guid', | 111 | rowKey: 'guid', |
| 112 | currentRowKey: '', | 112 | currentRowKey: '', |
| 113 | expandedKeys: [] as any, | 113 | expandedKey: [], |
| 114 | showPage: false, | 114 | showPage: false, |
| 115 | actionInfo: { | 115 | actionInfo: { |
| 116 | label: "操作", | 116 | label: "操作", |
| ... | @@ -119,6 +119,7 @@ const tableInfo = ref({ | ... | @@ -119,6 +119,7 @@ const tableInfo = ref({ |
| 119 | btns: [ | 119 | btns: [ |
| 120 | { | 120 | { |
| 121 | label: "编辑", value: "edit", click: (scope) => { | 121 | label: "编辑", value: "edit", click: (scope) => { |
| 122 | console.log(scope); | ||
| 122 | tableInfo.value.currentRowKey = scope.row.guid; | 123 | tableInfo.value.currentRowKey = scope.row.guid; |
| 123 | heightlightRow.value = scope.row.guid; | 124 | heightlightRow.value = scope.row.guid; |
| 124 | scopeRow.value = scope.row; | 125 | scopeRow.value = scope.row; |
| ... | @@ -823,11 +824,40 @@ const handleTableRowClick = (row, id) => { | ... | @@ -823,11 +824,40 @@ const handleTableRowClick = (row, id) => { |
| 823 | tableInfo.value.currentRowKey = row.guid; | 824 | tableInfo.value.currentRowKey = row.guid; |
| 824 | } | 825 | } |
| 825 | 826 | ||
| 827 | const findParentsGuids = (treeList, targetGuid) => { | ||
| 828 | let result = null; | ||
| 829 | |||
| 830 | const recursiveSearch = (nodes) => { | ||
| 831 | for (let node of nodes) { | ||
| 832 | if (node.guid === targetGuid) { | ||
| 833 | result = node.parentGuids; | ||
| 834 | return; | ||
| 835 | } | ||
| 836 | if (node.children) { | ||
| 837 | recursiveSearch(node.children); | ||
| 838 | } | ||
| 839 | } | ||
| 840 | }; | ||
| 841 | |||
| 842 | recursiveSearch(treeList); | ||
| 843 | return result; | ||
| 844 | }; | ||
| 845 | |||
| 846 | |||
| 826 | const drawerSelectChange = (val, row, info) => { | 847 | const drawerSelectChange = (val, row, info) => { |
| 827 | const tree = tableRef.value.tableRef; | 848 | if (row.field === 'gradeGuid') { |
| 828 | console.log(val, row, info, tree); | 849 | return; |
| 829 | tableInfo.value.expandedKeys.push(val); | 850 | } |
| 830 | console.log(tableInfo.value.expandedKeys); | 851 | tableInfo.value.expandedKey = []; |
| 852 | const parentGuids: any = findParentsGuids(treeListData.value, val); | ||
| 853 | if (parentGuids) { | ||
| 854 | tableInfo.value.expandedKey.push(val); | ||
| 855 | parentGuids.forEach((guid) => { | ||
| 856 | tableInfo.value.expandedKey.push(guid); | ||
| 857 | }); | ||
| 858 | } else { | ||
| 859 | console.log('No matching item found.'); | ||
| 860 | } | ||
| 831 | } | 861 | } |
| 832 | 862 | ||
| 833 | </script> | 863 | </script> | ... | ... |
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
| ... | @@ -145,7 +145,7 @@ const orginItems = [ | ... | @@ -145,7 +145,7 @@ const orginItems = [ |
| 145 | { | 145 | { |
| 146 | label: '字典中文名', | 146 | label: '字典中文名', |
| 147 | type: 'input', | 147 | type: 'input', |
| 148 | maxlength: 50, | 148 | maxlength: 20, |
| 149 | placeholder: '请输入', | 149 | placeholder: '请输入', |
| 150 | field: 'chName', | 150 | field: 'chName', |
| 151 | clearable: true, | 151 | clearable: true, |
| ... | @@ -154,7 +154,7 @@ const orginItems = [ | ... | @@ -154,7 +154,7 @@ const orginItems = [ |
| 154 | }, { | 154 | }, { |
| 155 | label: '字典英文名', | 155 | label: '字典英文名', |
| 156 | type: 'input', | 156 | type: 'input', |
| 157 | maxlength: 50, | 157 | maxlength: 20, |
| 158 | placeholder: '请输入', | 158 | placeholder: '请输入', |
| 159 | field: 'enName', | 159 | field: 'enName', |
| 160 | clearable: true, | 160 | clearable: true, | ... | ... |
| ... | @@ -7,7 +7,7 @@ import Moment from 'moment'; | ... | @@ -7,7 +7,7 @@ import Moment from 'moment'; |
| 7 | import { | 7 | import { |
| 8 | getDsTableByDs, | 8 | getDsTableByDs, |
| 9 | getDsData, | 9 | getDsData, |
| 10 | getDsTableStructure, | 10 | getDsTableStructures, |
| 11 | } from "@/api/modules/dataInventory"; | 11 | } from "@/api/modules/dataInventory"; |
| 12 | 12 | ||
| 13 | 13 | ||
| ... | @@ -199,14 +199,14 @@ const getTableStructure = () => { | ... | @@ -199,14 +199,14 @@ const getTableStructure = () => { |
| 199 | console.log('tableName'); | 199 | console.log('tableName'); |
| 200 | currDsTableStructureLoading.value = true; | 200 | currDsTableStructureLoading.value = true; |
| 201 | currDsTableStructure.value = []; | 201 | currDsTableStructure.value = []; |
| 202 | getDsTableStructure({ | 202 | getDsTableStructures([{ |
| 203 | // tableName: tableName, | 203 | // tableName: tableName, |
| 204 | // dataSourceGuid: databaseInfo.value.guid, | 204 | // dataSourceGuid: databaseInfo.value.guid, |
| 205 | // database: databaseInfo.value.databaseNameEn, | 205 | // database: databaseInfo.value.databaseNameEn, |
| 206 | // databaseType: databaseInfo.value.databaseType, | 206 | // databaseType: databaseInfo.value.databaseType, |
| 207 | tableGuid: currDatasourceSelect.value.tableGuid, | 207 | tableGuid: currDatasourceSelect.value.tableGuid, |
| 208 | execGuid: props.execGuid | 208 | execGuid: props.execGuid |
| 209 | }).then((res: any) => { | 209 | }]).then((res: any) => { |
| 210 | currDsTableStructureLoading.value = false; | 210 | currDsTableStructureLoading.value = false; |
| 211 | if (res.code == proxy.$passCode) { | 211 | if (res.code == proxy.$passCode) { |
| 212 | currDsTableStructure.value = res.data || []; | 212 | currDsTableStructure.value = res.data || []; |
| ... | @@ -438,6 +438,21 @@ const getTextAlign = (field) => { | ... | @@ -438,6 +438,21 @@ const getTextAlign = (field) => { |
| 438 | <el-table-column prop="fieldName" label="字段英文名" width="150px" align="left" header-align="left" | 438 | <el-table-column prop="fieldName" label="字段英文名" width="150px" align="left" header-align="left" |
| 439 | show-overflow-tooltip> | 439 | show-overflow-tooltip> |
| 440 | </el-table-column> | 440 | </el-table-column> |
| 441 | <!-- 分类 --> | ||
| 442 | <el-table-column prop="classifyDetailNameRoutes" label="分类" width="150px" align="left" header-align="left" | ||
| 443 | show-overflow-tooltip> | ||
| 444 | <template #default="scope"> | ||
| 445 | {{ scope.row['classifyDetailNameRoutes'] ? scope.row['classifyDetailNameRoutes'].join('/') : '--' }} | ||
| 446 | </template> | ||
| 447 | </el-table-column> | ||
| 448 | <el-table-column prop="gradeDetailName" label="分级" width="80px" align="left" header-align="left" | ||
| 449 | show-overflow-tooltip> | ||
| 450 | <template #default="scope"> | ||
| 451 | <span>{{ scope.row['gradeDetailName'] ?? '--' }}</span> | ||
| 452 | </template> | ||
| 453 | </el-table-column> | ||
| 454 | |||
| 455 | |||
| 441 | <el-table-column prop="fieldChName" label="字段名" width="150px" align="left" header-align="left" | 456 | <el-table-column prop="fieldChName" label="字段名" width="150px" align="left" header-align="left" |
| 442 | show-overflow-tooltip> | 457 | show-overflow-tooltip> |
| 443 | <template #default="scope"> | 458 | <template #default="scope"> |
| ... | @@ -472,9 +487,9 @@ const getTextAlign = (field) => { | ... | @@ -472,9 +487,9 @@ const getTextAlign = (field) => { |
| 472 | <span>{{ scope.row['isPrimary'] ?? '--' }}</span> | 487 | <span>{{ scope.row['isPrimary'] ?? '--' }}</span> |
| 473 | </template> | 488 | </template> |
| 474 | </el-table-column> | 489 | </el-table-column> |
| 475 | <el-table-column prop="isNotNull" label="是否必填" width="100px" align="left" header-align="left" | 490 | <el-table-column prop="notNull" label="是否必填" width="100px" align="left" header-align="left" |
| 476 | show-overflow-tooltip> | 491 | show-overflow-tooltip> |
| 477 | <template #default="scope">{{ scope.row['isNotNull'] === 'Y' ? 'N' : 'Y' }}</template> | 492 | <template #default="scope">{{ scope.row['notNull'] ?? '--' }}</template> |
| 478 | </el-table-column> | 493 | </el-table-column> |
| 479 | <el-table-column prop="isFk" label="是否外键" width="100px" align="left" header-align="left" | 494 | <el-table-column prop="isFk" label="是否外键" width="100px" align="left" header-align="left" |
| 480 | show-overflow-tooltip> | 495 | show-overflow-tooltip> | ... | ... |
This diff is collapsed.
Click to expand it.
| ... | @@ -33,7 +33,7 @@ import { | ... | @@ -33,7 +33,7 @@ import { |
| 33 | getSubjectTableDetail, | 33 | getSubjectTableDetail, |
| 34 | checkSubjectTableData | 34 | checkSubjectTableData |
| 35 | } from "@/api/modules/dataCatalogService"; | 35 | } from "@/api/modules/dataCatalogService"; |
| 36 | import { getDictionaryAll, getFidldEnName, getGradeList, getNewDataTypeList, getTaskExeTreeList, saveDbDirTable } from "@/api/modules/dataInventory"; | 36 | import { getDictionaryAll, getFidldEnName, getGradeList, getNewDataTypeList, getTaskExeTreeList, saveDbDirTable, getFieldClassifyAndGrade } from "@/api/modules/dataInventory"; |
| 37 | import { useDefault } from "@/hooks/useDefault"; | 37 | import { useDefault } from "@/hooks/useDefault"; |
| 38 | import uploadExcelFile from "./components/uploadExcelFile.vue"; | 38 | import uploadExcelFile from "./components/uploadExcelFile.vue"; |
| 39 | import { add } from "lodash-es"; | 39 | import { add } from "lodash-es"; |
| ... | @@ -115,7 +115,7 @@ const uploadFileRef = ref(); | ... | @@ -115,7 +115,7 @@ const uploadFileRef = ref(); |
| 115 | 115 | ||
| 116 | const getSubjectField = () => { | 116 | const getSubjectField = () => { |
| 117 | tableFieldsLoading.value = true; | 117 | tableFieldsLoading.value = true; |
| 118 | getFidldEnName(fileTableFields.value.map(f => f.chName)).then((res: any) => { | 118 | getFidldEnName(fileTableFields.value.map(f => f.chName)).then(async (res: any) => { |
| 119 | tableFieldsLoading.value = false; | 119 | tableFieldsLoading.value = false; |
| 120 | if (res.code == proxy.$passCode) { | 120 | if (res.code == proxy.$passCode) { |
| 121 | tableCreateInfo.value.tableFields = res.data?.map((field, i) => { | 121 | tableCreateInfo.value.tableFields = res.data?.map((field, i) => { |
| ... | @@ -125,6 +125,55 @@ const getSubjectField = () => { | ... | @@ -125,6 +125,55 @@ const getSubjectField = () => { |
| 125 | !field.notNull && (field.notNull = 'N'); | 125 | !field.notNull && (field.notNull = 'N'); |
| 126 | return field; | 126 | return field; |
| 127 | }) || []; | 127 | }) || []; |
| 128 | console.log(tableCreateInfo.value.tableFields, '7897987'); | ||
| 129 | // 遍历 tableCreateInfo.value.tableFields,找到item.fieldName,组合成入参 | ||
| 130 | let tempFileNames: any = [] | ||
| 131 | tableCreateInfo.value.tableFields.forEach((item: any) => { | ||
| 132 | tempFileNames.push(item.fieldName); | ||
| 133 | }); | ||
| 134 | const classify: any = await getFieldClassifyAndGrade({ | ||
| 135 | fieldName: tempFileNames, | ||
| 136 | execGuid: execGuid.value, | ||
| 137 | type: 'C' | ||
| 138 | }) | ||
| 139 | const grade: any = await getFieldClassifyAndGrade({ | ||
| 140 | fieldName: tempFileNames, | ||
| 141 | execGuid: execGuid.value, | ||
| 142 | type: 'G' | ||
| 143 | }) | ||
| 144 | // 通过分类数据和分级数据赋值给 tableFields 的每一项 | ||
| 145 | tableCreateInfo.value.tableFields.forEach((item: any) => { | ||
| 146 | // 在分类数据中查找对应 fieldName 的项 | ||
| 147 | const classifyItem = classify.find((classify: any) => classify.fieldName === item.fieldName); | ||
| 148 | |||
| 149 | // 在分级数据中查找对应 fieldName 的项 | ||
| 150 | const gradeItem = grade.find((grade: any) => grade.fieldName === item.fieldName); | ||
| 151 | |||
| 152 | // 如果找到对应的分类数据,赋值给 tableFields 的相应项 | ||
| 153 | if (classifyItem) { | ||
| 154 | item.classifyDetailGuid = classifyItem.classifyDetailGuid || null; | ||
| 155 | item.classifyDetailName = classifyItem.classifyDetailName || null; | ||
| 156 | item.classifyDetailGuidRoutes = classifyItem.classifyDetailGuidRoutes || null; | ||
| 157 | item.classifyDetailNameRoutes = classifyItem.classifyDetailNameRoutes || null; | ||
| 158 | } | ||
| 159 | |||
| 160 | // 如果找到对应的分级数据,赋值给 tableFields 的相应项 | ||
| 161 | if (gradeItem) { | ||
| 162 | item.gradeDetailGuid = gradeItem.gradeDetailGuid || null; | ||
| 163 | item.gradeDetailName = gradeItem.gradeDetailName || null; | ||
| 164 | } | ||
| 165 | }); | ||
| 166 | |||
| 167 | } else { | ||
| 168 | ElMessage.error(res.msg); | ||
| 169 | } | ||
| 170 | }); | ||
| 171 | } | ||
| 172 | |||
| 173 | const getGradeClassifyInfo = (params) => { | ||
| 174 | getFieldClassifyAndGrade(params).then((res: any) => { | ||
| 175 | if (res.code === proxy.$passCode) { | ||
| 176 | |||
| 128 | } else { | 177 | } else { |
| 129 | ElMessage.error(res.msg); | 178 | ElMessage.error(res.msg); |
| 130 | } | 179 | } |
| ... | @@ -1459,7 +1508,7 @@ const saveTable = async () => { | ... | @@ -1459,7 +1508,7 @@ const saveTable = async () => { |
| 1459 | gradeDetailName: item.gradeDetailName, | 1508 | gradeDetailName: item.gradeDetailName, |
| 1460 | guid: item.guid, | 1509 | guid: item.guid, |
| 1461 | isFk: item.isFk, | 1510 | isFk: item.isFk, |
| 1462 | notNull: item.isNotNull, | 1511 | notNull: item.notNull, |
| 1463 | isPrimary: item.isPrimary, | 1512 | isPrimary: item.isPrimary, |
| 1464 | sortValue: item.sortValue, | 1513 | sortValue: item.sortValue, |
| 1465 | tableChName: addInfo.chName, | 1514 | tableChName: addInfo.chName, |
| ... | @@ -1487,7 +1536,8 @@ const saveTable = async () => { | ... | @@ -1487,7 +1536,8 @@ const saveTable = async () => { |
| 1487 | if (res.code === proxy.$passCode) { | 1536 | if (res.code === proxy.$passCode) { |
| 1488 | proxy.$ElMessage.success('保存成功!'); | 1537 | proxy.$ElMessage.success('保存成功!'); |
| 1489 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); | 1538 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); |
| 1490 | router.push({ name: 'classifyGradeCatalogue', query: { reload: 'true' } }); | 1539 | localStorage.setItem('shouldReloadData', 'true'); |
| 1540 | router.push({ name: 'classifyGradeCatalogue' }); | ||
| 1491 | } else { | 1541 | } else { |
| 1492 | proxy.$ElMessage.error(res.msg); | 1542 | proxy.$ElMessage.error(res.msg); |
| 1493 | } | 1543 | } |
| ... | @@ -1583,7 +1633,7 @@ const saveDraftTable = async () => { | ... | @@ -1583,7 +1633,7 @@ const saveDraftTable = async () => { |
| 1583 | gradeDetailName: item.gradeDetailName, | 1633 | gradeDetailName: item.gradeDetailName, |
| 1584 | guid: item.guid, | 1634 | guid: item.guid, |
| 1585 | isFk: item.isFk, | 1635 | isFk: item.isFk, |
| 1586 | isNotNull: item.isNotNull, | 1636 | isNotNull: item.notNull, |
| 1587 | isPrimary: item.isPrimary, | 1637 | isPrimary: item.isPrimary, |
| 1588 | sortValue: item.sortValue, | 1638 | sortValue: item.sortValue, |
| 1589 | tableChName: addInfo.chName, | 1639 | tableChName: addInfo.chName, |
| ... | @@ -1610,7 +1660,8 @@ const saveDraftTable = async () => { | ... | @@ -1610,7 +1660,8 @@ const saveDraftTable = async () => { |
| 1610 | if (res.code === proxy.$passCode) { | 1660 | if (res.code === proxy.$passCode) { |
| 1611 | proxy.$ElMessage.success('保存草稿成功!'); | 1661 | proxy.$ElMessage.success('保存草稿成功!'); |
| 1612 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); | 1662 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); |
| 1613 | router.push({ name: 'classifyGradeCatalogue', query: { reload: 'true' } }); | 1663 | localStorage.setItem('shouldReloadData', 'true'); |
| 1664 | router.push({ name: 'classifyGradeCatalogue' }); | ||
| 1614 | } else { | 1665 | } else { |
| 1615 | proxy.$ElMessage.error(res.msg); | 1666 | proxy.$ElMessage.error(res.msg); |
| 1616 | } | 1667 | } | ... | ... |
| ... | @@ -8,10 +8,14 @@ import { ElMessage, ElMessageBox } from "element-plus"; | ... | @@ -8,10 +8,14 @@ import { ElMessage, ElMessageBox } from "element-plus"; |
| 8 | import Table from '@/components/Table/index.vue' | 8 | import Table from '@/components/Table/index.vue' |
| 9 | import TableTools from '@/components/Tools/table_tools.vue' | 9 | import TableTools from '@/components/Tools/table_tools.vue' |
| 10 | import {getAnalysisReportList,delAnalysisRepor,updateAnalysisRepor} from "@/api/modules/dataMetaService" | 10 | import {getAnalysisReportList,delAnalysisRepor,updateAnalysisRepor} from "@/api/modules/dataMetaService" |
| 11 | import { getImageContent } from "@/api/modules/queryService"; | ||
| 12 | import Dialog from '@/components/Dialog/index.vue' | 11 | import Dialog from '@/components/Dialog/index.vue' |
| 13 | import { getDownloadUrl, download } from "@/utils/common"; | 12 | import { getDownloadUrl, download } from "@/utils/common"; |
| 14 | import { useRouter } from 'vue-router'; | 13 | import { useRouter } from 'vue-router'; |
| 14 | import { | ||
| 15 | parseAndDecodeUrl, | ||
| 16 | getDownFileSignByUrl, | ||
| 17 | obsDownloadRequest | ||
| 18 | } from "@/api/modules/obsService"; | ||
| 15 | const router = useRouter() | 19 | const router = useRouter() |
| 16 | const page = ref({ | 20 | const page = ref({ |
| 17 | limit: 50, | 21 | limit: 50, |
| ... | @@ -119,20 +123,25 @@ const tableSearchItemList: any = ref([{ | ... | @@ -119,20 +123,25 @@ const tableSearchItemList: any = ref([{ |
| 119 | placeholder: '血缘关系名称', | 123 | placeholder: '血缘关系名称', |
| 120 | clearable: true | 124 | clearable: true |
| 121 | }]); | 125 | }]); |
| 122 | const tableBtnClick = (scope, btn) => { | 126 | const tableBtnClick = async (scope, btn) => { |
| 123 | const type = btn.value; | 127 | const type = btn.value; |
| 124 | let row = scope.row; | 128 | let row = scope.row; |
| 125 | rowData.value = row | 129 | rowData.value = row |
| 126 | currTableData.value = row; | 130 | currTableData.value = row; |
| 127 | if (type == 'view') { | 131 | if (type == 'view') { |
| 128 | getImageContent(row.analysisReportUrl).then((res: any) => { | 132 | let fileName: string = parseAndDecodeUrl(row.analysisReportUrl).fileName; |
| 133 | const refSignInfo: any = await getDownFileSignByUrl(fileName); | ||
| 134 | if (!refSignInfo?.data) { | ||
| 135 | refSignInfo?.msg && ElMessage.error(refSignInfo?.msg); | ||
| 136 | return; | ||
| 137 | } | ||
| 138 | obsDownloadRequest(refSignInfo?.data).then((res: any) => { | ||
| 129 | if (res && !res.msg) { | 139 | if (res && !res.msg) { |
| 130 | let name = row.analysisReportUrl; | 140 | var fileSuffix = fileName ? fileName.substring(fileName.lastIndexOf('.') + 1) : ''; |
| 131 | var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1) : ''; | ||
| 132 | if (fileSuffix === 'png') { //浏览器可以支持图片和pdf预览 | 141 | if (fileSuffix === 'png') { //浏览器可以支持图片和pdf预览 |
| 133 | let fileUrl = getDownloadUrl(res, name, fileSuffix); | 142 | let fileUrl = <string>getDownloadUrl(res, name, fileSuffix); |
| 134 | let win = window.open(fileUrl, name); | 143 | let win = window.open(fileUrl, row.analysisReportName + fileSuffix); |
| 135 | win && (win.document.title = name); | 144 | win && (win.document.title = row.analysisReportName + fileSuffix); |
| 136 | } else { | 145 | } else { |
| 137 | download(res, row.analysisReportName, fileSuffix); | 146 | download(res, row.analysisReportName, fileSuffix); |
| 138 | } | 147 | } |
| ... | @@ -141,10 +150,16 @@ const tableBtnClick = (scope, btn) => { | ... | @@ -141,10 +150,16 @@ const tableBtnClick = (scope, btn) => { |
| 141 | } | 150 | } |
| 142 | }); | 151 | }); |
| 143 | } else if (type == 'export') { | 152 | } else if (type == 'export') { |
| 144 | getImageContent(row.analysisReportUrl).then((res: any) => { | 153 | let fileName: string = parseAndDecodeUrl(row.analysisReportUrl).fileName; |
| 154 | const refSignInfo: any = await getDownFileSignByUrl(fileName); | ||
| 155 | if (!refSignInfo?.data) { | ||
| 156 | refSignInfo?.msg && ElMessage.error(refSignInfo?.msg); | ||
| 157 | return; | ||
| 158 | } | ||
| 159 | obsDownloadRequest(refSignInfo?.data).then((res: any) => { | ||
| 145 | if (res && !res.msg) { | 160 | if (res && !res.msg) { |
| 146 | let name = row.analysisReportUrl; | 161 | // let name = row.analysisReportUrl; |
| 147 | var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1) : ''; | 162 | var fileSuffix = fileName ? fileName.substring(fileName.lastIndexOf('.') + 1) : ''; |
| 148 | download(res, row.analysisReportName, fileSuffix); | 163 | download(res, row.analysisReportName, fileSuffix); |
| 149 | } else { | 164 | } else { |
| 150 | res?.msg && ElMessage.error(res?.msg); | 165 | res?.msg && ElMessage.error(res?.msg); | ... | ... |
| ... | @@ -22,7 +22,11 @@ import { | ... | @@ -22,7 +22,11 @@ import { |
| 22 | delLineAge, | 22 | delLineAge, |
| 23 | checkTableData | 23 | checkTableData |
| 24 | } from '@/api/modules/dataMetaService'; | 24 | } from '@/api/modules/dataMetaService'; |
| 25 | import { getFileUrl } from "@/api/modules/queryService" | 25 | import { |
| 26 | parseAndDecodeUrl, | ||
| 27 | getUpFileSignByUrl, | ||
| 28 | obsUploadRequest | ||
| 29 | } from "@/api/modules/obsService"; | ||
| 26 | import { useRouter, useRoute } from "vue-router"; | 30 | import { useRouter, useRoute } from "vue-router"; |
| 27 | import useDataMetaStore from "@/store/modules/dataMeta" | 31 | import useDataMetaStore from "@/store/modules/dataMeta" |
| 28 | import { cloneDeep } from 'lodash-es' | 32 | import { cloneDeep } from 'lodash-es' |
| ... | @@ -857,17 +861,23 @@ const pageSave = () => { | ... | @@ -857,17 +861,23 @@ const pageSave = () => { |
| 857 | return | 861 | return |
| 858 | } | 862 | } |
| 859 | 863 | ||
| 860 | let formData = new FormData(); | 864 | dialogInfo1.value.footer.btns[1].loading = true; |
| 861 | formData.append('file', file.value); | 865 | return getUpFileSignByUrl({ fileName: `${analysisReportName}.png` }) |
| 862 | formData.append('fileName', `${analysisReportName}.png`); | 866 | .then((res: any) => { |
| 863 | getFileUrl(formData).then((res) => { | 867 | obsUploadRequest({ |
| 868 | signedUrl: res.data.signedUrl, | ||
| 869 | file: file.value, | ||
| 870 | actualSignedRequestHeaders: res.data.actualSignedRequestHeaders | ||
| 871 | }).then(() => { | ||
| 872 | if (res.code == '00000') { | ||
| 864 | saveMetaReportAnalysis({ | 873 | saveMetaReportAnalysis({ |
| 865 | table: lastClickNode.value.tableName, | 874 | table: lastClickNode.value.tableName, |
| 866 | database: lastClickNode.value.databaseName, | 875 | database: lastClickNode.value.databaseName, |
| 867 | analysisReportUrl: res.data, | 876 | analysisReportUrl: res.data?.signedUrl, |
| 868 | analysisReportName: analysisReportName, | 877 | analysisReportName: analysisReportName, |
| 869 | databaseChName: lastClickNode.value.databaseChName | 878 | databaseChName: lastClickNode.value.databaseChName |
| 870 | }).then((res: any) => { | 879 | }).then((res: any) => { |
| 880 | dialogInfo1.value.footer.btns[1].loading = false; | ||
| 871 | if (res.code == proxy.$passCode) { | 881 | if (res.code == proxy.$passCode) { |
| 872 | ElMessage({ | 882 | ElMessage({ |
| 873 | type: "success", | 883 | type: "success", |
| ... | @@ -883,9 +893,19 @@ const pageSave = () => { | ... | @@ -883,9 +893,19 @@ const pageSave = () => { |
| 883 | }) | 893 | }) |
| 884 | } | 894 | } |
| 885 | }) | 895 | }) |
| 896 | } else { | ||
| 897 | ElMessage({ | ||
| 898 | type: "error", | ||
| 899 | message: res.msg, | ||
| 900 | appendTo: lineageGraph.value.containerRef | ||
| 901 | }) | ||
| 902 | } | ||
| 886 | }).catch((res) => { | 903 | }).catch((res) => { |
| 887 | ElMessage.error(res.msg) | 904 | ElMessage.error(res.msg) |
| 888 | }) | 905 | }); |
| 906 | }).catch((res) => { | ||
| 907 | ElMessage.error(res.msg) | ||
| 908 | }); | ||
| 889 | } | 909 | } |
| 890 | 910 | ||
| 891 | const formItems1: any = ref([ | 911 | const formItems1: any = ref([ |
| ... | @@ -933,7 +953,7 @@ const dialogInfo1 = ref({ | ... | @@ -933,7 +953,7 @@ const dialogInfo1 = ref({ |
| 933 | footer: { | 953 | footer: { |
| 934 | btns: [ | 954 | btns: [ |
| 935 | { type: "default", label: "取消", value: "cancel" }, | 955 | { type: "default", label: "取消", value: "cancel" }, |
| 936 | { type: "primary", label: "保存", value: "submit" }, | 956 | { type: "primary", label: "保存", value: "submit", loading: false }, |
| 937 | ], | 957 | ], |
| 938 | }, | 958 | }, |
| 939 | }); | 959 | }); | ... | ... |
| ... | @@ -144,7 +144,7 @@ const getMetaChangeTableData = () => { | ... | @@ -144,7 +144,7 @@ const getMetaChangeTableData = () => { |
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | 146 | ||
| 147 | const activeTabName = ref('task'); | 147 | const activeTabName = ref('meta'); |
| 148 | 148 | ||
| 149 | watch(() => activeTabName.value, (val) => { | 149 | watch(() => activeTabName.value, (val) => { |
| 150 | if(val==="task"){ | 150 | if(val==="task"){ |
| ... | @@ -420,9 +420,7 @@ const metaChangeTableInfo = ref({ | ... | @@ -420,9 +420,7 @@ const metaChangeTableInfo = ref({ |
| 420 | // { label: "状态", field: "changeTime", width: 180, }, | 420 | // { label: "状态", field: "changeTime", width: 180, }, |
| 421 | // { label: "操作时间", field: "changeTime", width: 180, }, | 421 | // { label: "操作时间", field: "changeTime", width: 180, }, |
| 422 | ], | 422 | ], |
| 423 | data: [{ | 423 | data: [], |
| 424 | guid: 1 | ||
| 425 | }], | ||
| 426 | page: { | 424 | page: { |
| 427 | type: "normal", | 425 | type: "normal", |
| 428 | rows: 0, | 426 | rows: 0, |
| ... | @@ -486,6 +484,7 @@ onBeforeMount(() => { | ... | @@ -486,6 +484,7 @@ onBeforeMount(() => { |
| 486 | </div> | 484 | </div> |
| 487 | <div class="main_wrap"> | 485 | <div class="main_wrap"> |
| 488 | <el-tabs v-model="activeTabName"> | 486 | <el-tabs v-model="activeTabName"> |
| 487 | <!-- | ||
| 489 | <el-tab-pane label="同步任务变更记录" name="task"> | 488 | <el-tab-pane label="同步任务变更记录" name="task"> |
| 490 | <div class="table_tool_wrap"> | 489 | <div class="table_tool_wrap"> |
| 491 | <TableTools :searchItems="tableSearchItemList" :init="false" searchId="detect-table-search" | 490 | <TableTools :searchItems="tableSearchItemList" :init="false" searchId="detect-table-search" |
| ... | @@ -496,6 +495,7 @@ onBeforeMount(() => { | ... | @@ -496,6 +495,7 @@ onBeforeMount(() => { |
| 496 | @tablePageChange="taskChangeTablePageChange" /> | 495 | @tablePageChange="taskChangeTablePageChange" /> |
| 497 | </div> | 496 | </div> |
| 498 | </el-tab-pane> | 497 | </el-tab-pane> |
| 498 | --> | ||
| 499 | <el-tab-pane label="元数据变更记录" name="meta"> | 499 | <el-tab-pane label="元数据变更记录" name="meta"> |
| 500 | <div class="table_tool_wrap"> | 500 | <div class="table_tool_wrap"> |
| 501 | <TableTools :searchItems="metaTableSearchItemList" :init="false" searchId="meta-detect-table-search" | 501 | <TableTools :searchItems="metaTableSearchItemList" :init="false" searchId="meta-detect-table-search" | ... | ... |
| ... | @@ -26,9 +26,13 @@ import { | ... | @@ -26,9 +26,13 @@ import { |
| 26 | saveMetaReportAnalysis, | 26 | saveMetaReportAnalysis, |
| 27 | checkTableData | 27 | checkTableData |
| 28 | } from '@/api/modules/dataMetaService'; | 28 | } from '@/api/modules/dataMetaService'; |
| 29 | import { getFileUrl } from "@/api/modules/queryService" | ||
| 30 | import useDataMetaStore from "@/store/modules/dataMeta" | 29 | import useDataMetaStore from "@/store/modules/dataMeta" |
| 31 | import { TableColumnWidth } from '@/utils/enum'; | 30 | import { TableColumnWidth } from '@/utils/enum'; |
| 31 | import { | ||
| 32 | parseAndDecodeUrl, | ||
| 33 | getUpFileSignByUrl, | ||
| 34 | obsUploadRequest | ||
| 35 | } from "@/api/modules/obsService"; | ||
| 32 | 36 | ||
| 33 | const { proxy } = getCurrentInstance() as any; | 37 | const { proxy } = getCurrentInstance() as any; |
| 34 | const router = useRouter(); | 38 | const router = useRouter(); |
| ... | @@ -556,18 +560,24 @@ const pageSave = () => { | ... | @@ -556,18 +560,24 @@ const pageSave = () => { |
| 556 | }) | 560 | }) |
| 557 | return | 561 | return |
| 558 | } | 562 | } |
| 559 | let formData = new FormData(); | ||
| 560 | formData.append('file', file.value); | ||
| 561 | formData.append('fileName', `${analysisReportName}.png`); | ||
| 562 | console.log(formInline1.value.pageName) | 563 | console.log(formInline1.value.pageName) |
| 563 | getFileUrl(formData).then((res) => { | 564 | dialogInfo1.value.footer.btns[1].loading = true; |
| 565 | getUpFileSignByUrl({ fileName: `${analysisReportName}.png` }) | ||
| 566 | .then((res: any) => { | ||
| 567 | obsUploadRequest({ | ||
| 568 | signedUrl: res.data.signedUrl, | ||
| 569 | file: file.value, | ||
| 570 | actualSignedRequestHeaders: res.data.actualSignedRequestHeaders | ||
| 571 | }).then(() => { | ||
| 572 | if (res.code == '00000') { | ||
| 564 | saveMetaReportAnalysis({ | 573 | saveMetaReportAnalysis({ |
| 565 | table: sheetInfo.value.tableName, | 574 | table: sheetInfo.value.tableName, |
| 566 | database: sheetInfo.value.databaseName, | 575 | database: sheetInfo.value.databaseName, |
| 567 | analysisReportUrl: res.data, | 576 | analysisReportUrl: res.data?.signedUrl, |
| 568 | analysisReportName: analysisReportName, | 577 | analysisReportName: analysisReportName, |
| 569 | databaseChName: sheetInfo.value.databaseChName | 578 | databaseChName: sheetInfo.value.databaseChName |
| 570 | }).then((res: any) => { | 579 | }).then((res: any) => { |
| 580 | dialogInfo1.value.footer.btns[1].loading = false; | ||
| 571 | if (res.code == proxy.$passCode) { | 581 | if (res.code == proxy.$passCode) { |
| 572 | // ElMessage.success("保存成功") | 582 | // ElMessage.success("保存成功") |
| 573 | ElMessage({ | 583 | ElMessage({ |
| ... | @@ -584,13 +594,19 @@ const pageSave = () => { | ... | @@ -584,13 +594,19 @@ const pageSave = () => { |
| 584 | }) | 594 | }) |
| 585 | } | 595 | } |
| 586 | }) | 596 | }) |
| 587 | }).catch((res) => { | 597 | } else { |
| 588 | ElMessage({ | 598 | ElMessage({ |
| 589 | type: "error", | 599 | type: "error", |
| 590 | message: res.msg, | 600 | message: res.msg, |
| 591 | appendTo: lineageGraph.value[0].containerRef | 601 | appendTo: lineageGraph.value.containerRef |
| 592 | }) | ||
| 593 | }) | 602 | }) |
| 603 | } | ||
| 604 | }).catch((res) => { | ||
| 605 | ElMessage.error(res.msg) | ||
| 606 | }); | ||
| 607 | }).catch((res) => { | ||
| 608 | ElMessage.error(res.msg) | ||
| 609 | }); | ||
| 594 | } | 610 | } |
| 595 | 611 | ||
| 596 | const formItems1: any = ref([ | 612 | const formItems1: any = ref([ |
| ... | @@ -638,7 +654,7 @@ const dialogInfo1 = ref({ | ... | @@ -638,7 +654,7 @@ const dialogInfo1 = ref({ |
| 638 | footer: { | 654 | footer: { |
| 639 | btns: [ | 655 | btns: [ |
| 640 | { type: "default", label: "取消", value: "cancel" }, | 656 | { type: "default", label: "取消", value: "cancel" }, |
| 641 | { type: "primary", label: "保存", value: "submit" }, | 657 | { type: "primary", label: "保存", value: "submit", loading: false }, |
| 642 | ], | 658 | ], |
| 643 | }, | 659 | }, |
| 644 | }); | 660 | }); | ... | ... |
| ... | @@ -16,6 +16,9 @@ import TableTools from "@/components/Tools/table_tools.vue"; | ... | @@ -16,6 +16,9 @@ import TableTools from "@/components/Tools/table_tools.vue"; |
| 16 | import Table from "@/components/Table/index.vue"; | 16 | import Table from "@/components/Table/index.vue"; |
| 17 | import Dialog from "@/components/Dialog/index.vue"; | 17 | import Dialog from "@/components/Dialog/index.vue"; |
| 18 | import { getParamsList } from "@/api/modules/dataAsset"; | 18 | import { getParamsList } from "@/api/modules/dataAsset"; |
| 19 | import { | ||
| 20 | changeNum, | ||
| 21 | } from "@/utils/common"; | ||
| 19 | 22 | ||
| 20 | const { proxy } = getCurrentInstance() as any; | 23 | const { proxy } = getCurrentInstance() as any; |
| 21 | const router = useRouter(); | 24 | const router = useRouter(); |
| ... | @@ -212,7 +215,8 @@ const toPatn = (type) => { | ... | @@ -212,7 +215,8 @@ const toPatn = (type) => { |
| 212 | router.push({ | 215 | router.push({ |
| 213 | name: "productListingDetail", | 216 | name: "productListingDetail", |
| 214 | query: { | 217 | query: { |
| 215 | type | 218 | type, |
| 219 | groundingPick: '门户数据专区' | ||
| 216 | }, | 220 | }, |
| 217 | }); | 221 | }); |
| 218 | } else { | 222 | } else { |
| ... | @@ -226,6 +230,17 @@ const toPatn = (type) => { | ... | @@ -226,6 +230,17 @@ const toPatn = (type) => { |
| 226 | }); | 230 | }); |
| 227 | } | 231 | } |
| 228 | } | 232 | } |
| 233 | const toPatn1 = (type, type1) => { | ||
| 234 | if (type == 'add') { | ||
| 235 | router.push({ | ||
| 236 | name: "productListingDetail", | ||
| 237 | query: { | ||
| 238 | type, | ||
| 239 | type1 | ||
| 240 | }, | ||
| 241 | }); | ||
| 242 | } | ||
| 243 | } | ||
| 229 | 244 | ||
| 230 | const tablePageChange = (info) => { | 245 | const tablePageChange = (info) => { |
| 231 | page.value.curr = Number(info.curr); | 246 | page.value.curr = Number(info.curr); |
| ... | @@ -298,6 +313,16 @@ onBeforeMount(() => { | ... | @@ -298,6 +313,16 @@ onBeforeMount(() => { |
| 298 | }) | 313 | }) |
| 299 | }) | 314 | }) |
| 300 | 315 | ||
| 316 | const defaultItemLogo = new URL('@/assets/images/home-finance-product.png', import.meta.url).href | ||
| 317 | const demandListData: any = ref([ | ||
| 318 | { companyName: '北数所', listedNum: 16, processNum: 1235 }, | ||
| 319 | { companyName: '深数所', listedNum: 16, processNum: 1235 }, | ||
| 320 | { companyName: '苏数所', listedNum: 16, processNum: 1235 }, | ||
| 321 | ]); | ||
| 322 | const btnClick = (btn) => { | ||
| 323 | } | ||
| 324 | |||
| 325 | |||
| 301 | </script> | 326 | </script> |
| 302 | 327 | ||
| 303 | <template> | 328 | <template> |
| ... | @@ -306,6 +331,32 @@ onBeforeMount(() => { | ... | @@ -306,6 +331,32 @@ onBeforeMount(() => { |
| 306 | <TableTools :searchItems="searchItemList" :searchId="'data-source-search'" @search="toSearch" /> | 331 | <TableTools :searchItems="searchItemList" :searchId="'data-source-search'" @search="toSearch" /> |
| 307 | <div class="tools_btns"> | 332 | <div class="tools_btns"> |
| 308 | <el-button type="primary" @click="toPatn('add')" v-preReClick>新建</el-button> | 333 | <el-button type="primary" @click="toPatn('add')" v-preReClick>新建</el-button> |
| 334 | <el-button type="primary" @click="toPatn1('add', 'add1')" v-preReClick>新建</el-button> | ||
| 335 | </div> | ||
| 336 | </div> | ||
| 337 | <div class="list-content"> | ||
| 338 | <div class="card-content" v-for="item in demandListData" :key="item.guid"> | ||
| 339 | <div class="header"> | ||
| 340 | <img class="left-img" :src="(item.picUrl && typeof item.picUrl == 'string') ? item.picUrl : defaultItemLogo" | ||
| 341 | alt="" /> | ||
| 342 | <div class="right-main"> | ||
| 343 | <div class="title">{{ item.companyName ?? '--' }}</div> | ||
| 344 | <div class="count-group"> | ||
| 345 | <div class="count-item"> | ||
| 346 | <div class="item-label">已上架产品数</div> | ||
| 347 | <div class="item-num">{{ changeNum(item.listedNum) }}</div> | ||
| 348 | </div> | ||
| 349 | <div class="count-item"> | ||
| 350 | <div class="item-label">审批中产品数</div> | ||
| 351 | <div class="item-num">{{ changeNum(item.processNum) }}</div> | ||
| 352 | </div> | ||
| 353 | </div> | ||
| 354 | </div> | ||
| 355 | </div> | ||
| 356 | <div class="operator-btn"> | ||
| 357 | <div class="left-btn borderRight" @click="btnClick(item)">更新模板</div> | ||
| 358 | <div class="left-btn" @click="btnClick(item)">资产登记</div> | ||
| 359 | </div> | ||
| 309 | </div> | 360 | </div> |
| 310 | </div> | 361 | </div> |
| 311 | <div class="table_panel_wrap"> | 362 | <div class="table_panel_wrap"> |
| ... | @@ -328,7 +379,87 @@ onBeforeMount(() => { | ... | @@ -328,7 +379,87 @@ onBeforeMount(() => { |
| 328 | 379 | ||
| 329 | .table_panel_wrap { | 380 | .table_panel_wrap { |
| 330 | width: 100%; | 381 | width: 100%; |
| 331 | height: calc(100% - 84px); | 382 | height: calc(100% - 270px); |
| 332 | padding: 0px 8px 0; | 383 | padding: 0px 8px 0; |
| 333 | } | 384 | } |
| 385 | |||
| 386 | .list-content { | ||
| 387 | display: flex; | ||
| 388 | justify-content: space-between; | ||
| 389 | flex-wrap: wrap; | ||
| 390 | margin-bottom: 8px; | ||
| 391 | padding: 0 8px; | ||
| 392 | |||
| 393 | .card-content { | ||
| 394 | width: calc(33.33% - 10px); | ||
| 395 | padding: 16px; | ||
| 396 | box-shadow: 0 0 0 1px #d9d9d9; | ||
| 397 | |||
| 398 | .header { | ||
| 399 | display: flex; | ||
| 400 | margin-bottom: 16px; | ||
| 401 | |||
| 402 | img { | ||
| 403 | width: 80px; | ||
| 404 | margin-right: 16px; | ||
| 405 | } | ||
| 406 | |||
| 407 | .title { | ||
| 408 | font-size: 16px; | ||
| 409 | color: #212121; | ||
| 410 | font-weight: 600; | ||
| 411 | margin-bottom: 8px; | ||
| 412 | } | ||
| 413 | |||
| 414 | .right-main { | ||
| 415 | width: calc(100% - 96px); | ||
| 416 | display: flex; | ||
| 417 | flex-direction: column; | ||
| 418 | justify-content: space-between; | ||
| 419 | |||
| 420 | .count-group { | ||
| 421 | display: flex; | ||
| 422 | justify-content: space-between; | ||
| 423 | |||
| 424 | .item-num { | ||
| 425 | font-size: 20px; | ||
| 426 | font-weight: 600; | ||
| 427 | color: #212121; | ||
| 428 | margin-top: 8px; | ||
| 429 | } | ||
| 430 | } | ||
| 431 | } | ||
| 432 | } | ||
| 433 | |||
| 434 | .operator-btn { | ||
| 435 | display: flex; | ||
| 436 | justify-content: space-between; | ||
| 437 | align-items: center; | ||
| 438 | box-shadow: 0 0 0 1px #d9d9d9; | ||
| 439 | position: relative; | ||
| 440 | |||
| 441 | &::after { | ||
| 442 | content: ''; | ||
| 443 | width: 0; | ||
| 444 | height: 100%; | ||
| 445 | border-left: 1px solid #d9d9d9; | ||
| 446 | position: absolute; | ||
| 447 | left: 50%; | ||
| 448 | transform: translateX(-50%); | ||
| 449 | } | ||
| 450 | |||
| 451 | >.left-btn { | ||
| 452 | width: 50%; | ||
| 453 | height: 40px; | ||
| 454 | line-height: 40px; | ||
| 455 | text-align: center; | ||
| 456 | cursor: pointer; | ||
| 457 | |||
| 458 | &:hover { | ||
| 459 | color: #4fa1a4; | ||
| 460 | } | ||
| 461 | } | ||
| 462 | } | ||
| 463 | } | ||
| 464 | } | ||
| 334 | </style> | 465 | </style> | ... | ... |
| ... | @@ -15,7 +15,7 @@ import { changeNum } from '@/utils/common'; | ... | @@ -15,7 +15,7 @@ import { changeNum } from '@/utils/common'; |
| 15 | import { onUploadFilePreview, onUploadFileDownload } from '@/api/modules/common'; | 15 | import { onUploadFilePreview, onUploadFileDownload } from '@/api/modules/common'; |
| 16 | import { getAreaData, getServiceTenants } from "@/api/modules/queryService"; | 16 | import { getAreaData, getServiceTenants } from "@/api/modules/queryService"; |
| 17 | import { getApproveList, getTenantApprove, registerApproveAllow, registerApproveBackup, getParamsList, getServiceDetail } from "@/api/modules/dataAsset"; | 17 | import { getApproveList, getTenantApprove, registerApproveAllow, registerApproveBackup, getParamsList, getServiceDetail } from "@/api/modules/dataAsset"; |
| 18 | import { getProductList, getAddedProductList, getListingDetail, listingSave, listingUpdate, getParamsDataList } from "@/api/modules/dataProduct"; | 18 | import { getProductList, getAddedProductList, getListingDetail, listingSave, listingUpdate, listingSavePortal, getParamsDataList } from "@/api/modules/dataProduct"; |
| 19 | import { getMatchDetail } from "@/api/modules/dataFinance"; | 19 | import { getMatchDetail } from "@/api/modules/dataFinance"; |
| 20 | import { useValidator } from '@/hooks/useValidator'; | 20 | import { useValidator } from '@/hooks/useValidator'; |
| 21 | 21 | ||
| ... | @@ -153,20 +153,31 @@ const formInfo = ref({ | ... | @@ -153,20 +153,31 @@ const formInfo = ref({ |
| 153 | clearable: true, | 153 | clearable: true, |
| 154 | required: true, | 154 | required: true, |
| 155 | }, { | 155 | }, { |
| 156 | label: "产品类型", | 156 | label: "资产类型", |
| 157 | type: "select", | 157 | type: "select", |
| 158 | placeholder: "请选择", | 158 | placeholder: "请选择", |
| 159 | field: "damType", | 159 | field: "damType", |
| 160 | default: '', | 160 | default: '', |
| 161 | options: damTypes.value, | 161 | options: damTypes.value, |
| 162 | props: { | 162 | props: { |
| 163 | value: 'paramValue', | 163 | value: 'value', |
| 164 | label: 'paramName' | 164 | label: 'label' |
| 165 | }, | 165 | }, |
| 166 | disabled: true, | 166 | disabled: true, |
| 167 | required: true, | 167 | required: true, |
| 168 | }, | 168 | }, |
| 169 | { | 169 | { |
| 170 | label: '证书编号', | ||
| 171 | type: 'input', | ||
| 172 | maxlength: 50, | ||
| 173 | placeholder: '请输入', | ||
| 174 | field: 'damCode', | ||
| 175 | default: '', | ||
| 176 | disabled: true, | ||
| 177 | required: true, | ||
| 178 | visible: true | ||
| 179 | }, | ||
| 180 | { | ||
| 170 | label: "数据时间范围", | 181 | label: "数据时间范围", |
| 171 | type: "date-picker", | 182 | type: "date-picker", |
| 172 | field: "dateRange", | 183 | field: "dateRange", |
| ... | @@ -194,16 +205,7 @@ const formInfo = ref({ | ... | @@ -194,16 +205,7 @@ const formInfo = ref({ |
| 194 | // default: '', | 205 | // default: '', |
| 195 | // required: true | 206 | // required: true |
| 196 | // }, | 207 | // }, |
| 197 | // { | 208 | |
| 198 | // label: '证书编号', | ||
| 199 | // type: 'input', | ||
| 200 | // maxlength: 50, | ||
| 201 | // placeholder: '请输入', | ||
| 202 | // field: 'damCode', | ||
| 203 | // default: '', | ||
| 204 | // disabled: true, | ||
| 205 | // required: true, | ||
| 206 | // }, | ||
| 207 | { | 209 | { |
| 208 | label: '数据规模(条)', | 210 | label: '数据规模(条)', |
| 209 | type: 'input', | 211 | type: 'input', |
| ... | @@ -212,7 +214,7 @@ const formInfo = ref({ | ... | @@ -212,7 +214,7 @@ const formInfo = ref({ |
| 212 | maxlength: 19, | 214 | maxlength: 19, |
| 213 | regexp: /\D/g, | 215 | regexp: /\D/g, |
| 214 | default: '', | 216 | default: '', |
| 215 | disabled: true, | 217 | disabled: false, |
| 216 | required: true | 218 | required: true |
| 217 | }, { | 219 | }, { |
| 218 | label: '病例总数(例)', | 220 | label: '病例总数(例)', |
| ... | @@ -220,7 +222,7 @@ const formInfo = ref({ | ... | @@ -220,7 +222,7 @@ const formInfo = ref({ |
| 220 | placeholder: '请输入', | 222 | placeholder: '请输入', |
| 221 | field: 'caseNumber', | 223 | field: 'caseNumber', |
| 222 | default: '', | 224 | default: '', |
| 223 | disabled: true, | 225 | disabled: false, |
| 224 | required: false | 226 | required: false |
| 225 | }, { | 227 | }, { |
| 226 | label: '数据覆盖地域', | 228 | label: '数据覆盖地域', |
| ... | @@ -298,6 +300,7 @@ const formInfo = ref({ | ... | @@ -298,6 +300,7 @@ const formInfo = ref({ |
| 298 | field: 'productPrice', | 300 | field: 'productPrice', |
| 299 | default: '', | 301 | default: '', |
| 300 | disabled: false, | 302 | disabled: false, |
| 303 | inputType: 'moneyNumber', | ||
| 301 | required: true | 304 | required: true |
| 302 | }, | 305 | }, |
| 303 | { | 306 | { |
| ... | @@ -360,25 +363,26 @@ const formInfo = ref({ | ... | @@ -360,25 +363,26 @@ const formInfo = ref({ |
| 360 | // clearable: false, | 363 | // clearable: false, |
| 361 | // required: true, | 364 | // required: true, |
| 362 | // }, | 365 | // }, |
| 363 | // { | 366 | { |
| 364 | // label: "上架交易所", | 367 | label: "上架交易所", |
| 365 | // type: "select", | 368 | type: "select", |
| 366 | // placeholder: "请选择", | 369 | placeholder: "请选择", |
| 367 | // field: "exchangeGuids", | 370 | field: "exchangeGuids", |
| 368 | // default: [], | 371 | default: [], |
| 369 | // options: exchangeList.value, | 372 | options: exchangeList.value, |
| 370 | // props: { | 373 | props: { |
| 371 | // value: "guid", | 374 | value: "guid", |
| 372 | // label: "tenantName", | 375 | label: "tenantName", |
| 373 | // }, | 376 | }, |
| 374 | // filterable: true, | 377 | filterable: true, |
| 375 | // clearable: true, | 378 | clearable: true, |
| 376 | // multiple: true, | 379 | multiple: true, |
| 377 | // tagsTooltip: true, | 380 | tagsTooltip: true, |
| 378 | // collapse: true, | 381 | collapse: true, |
| 379 | // disabled: false, | 382 | disabled: false, |
| 380 | // required: true, | 383 | required: true, |
| 381 | // }, | 384 | visible: true |
| 385 | }, | ||
| 382 | { | 386 | { |
| 383 | label: '产品描述', | 387 | label: '产品描述', |
| 384 | type: 'textarea-rich', | 388 | type: 'textarea-rich', |
| ... | @@ -411,9 +415,125 @@ const formInfo = ref({ | ... | @@ -411,9 +415,125 @@ const formInfo = ref({ |
| 411 | field: 'productImg', | 415 | field: 'productImg', |
| 412 | default: [], | 416 | default: [], |
| 413 | limit: 1, | 417 | limit: 1, |
| 418 | block: false, | ||
| 419 | required: false, | ||
| 420 | }, | ||
| 421 | { | ||
| 422 | label: '登记证', | ||
| 423 | tip: '支持扩展名:.jpg .png .jpeg', | ||
| 424 | accept: '.jpg, .png, .jpeg ', | ||
| 425 | type: 'upload-file', | ||
| 426 | placeholder: '请选择', | ||
| 427 | field: 'registerImg', | ||
| 428 | default: [], | ||
| 429 | limit: 1, | ||
| 430 | block: false, | ||
| 431 | required: false, | ||
| 432 | visible: true | ||
| 433 | }, | ||
| 434 | { | ||
| 435 | label: '质量评估报告', | ||
| 436 | tip: '支持扩展名:.png .pdf', | ||
| 437 | accept: '.png, .pdf', | ||
| 438 | type: 'upload-file', | ||
| 439 | placeholder: '请选择', | ||
| 440 | field: 'qualityReport', | ||
| 441 | default: [], | ||
| 442 | limit: 1, | ||
| 443 | block: false, | ||
| 444 | required: false, | ||
| 445 | visible: true | ||
| 446 | }, | ||
| 447 | { | ||
| 448 | label: "质量评估机构", | ||
| 449 | type: "select", | ||
| 450 | placeholder: "请选择", | ||
| 451 | field: "qualityOrg", | ||
| 452 | default: '', | ||
| 453 | options: [], | ||
| 454 | props: { | ||
| 455 | value: 'value', | ||
| 456 | label: 'label' | ||
| 457 | }, | ||
| 458 | filterable: true, | ||
| 459 | clearable: true, | ||
| 460 | disabled: false, | ||
| 461 | required: true, | ||
| 462 | visible: true | ||
| 463 | }, | ||
| 464 | { | ||
| 465 | label: '价值评估报告', | ||
| 466 | tip: '支持扩展名:.png .pdf', | ||
| 467 | accept: '.png, .pdf', | ||
| 468 | type: 'upload-file', | ||
| 469 | placeholder: '请选择', | ||
| 470 | field: 'valueReport', | ||
| 471 | default: [], | ||
| 472 | limit: 1, | ||
| 473 | block: false, | ||
| 474 | required: false, | ||
| 475 | visible: true | ||
| 476 | }, | ||
| 477 | { | ||
| 478 | label: "价值评估机构", | ||
| 479 | type: "select", | ||
| 480 | placeholder: "请选择", | ||
| 481 | field: "valueOrg", | ||
| 482 | default: '', | ||
| 483 | options: [], | ||
| 484 | props: { | ||
| 485 | value: 'value', | ||
| 486 | label: 'label' | ||
| 487 | }, | ||
| 488 | filterable: true, | ||
| 489 | clearable: true, | ||
| 490 | disabled: false, | ||
| 491 | required: true, | ||
| 492 | visible: true | ||
| 493 | }, | ||
| 494 | { | ||
| 495 | label: '承诺函', | ||
| 496 | tip: '支持扩展名:.png .pdf', | ||
| 497 | accept: '.png, .pdf', | ||
| 498 | type: 'upload-file', | ||
| 499 | placeholder: '请选择', | ||
| 500 | field: 'commitment', | ||
| 501 | templateUrl: 'http://www.baidu.com', | ||
| 502 | default: [], | ||
| 503 | limit: 1, | ||
| 414 | block: true, | 504 | block: true, |
| 415 | required: false, | 505 | required: false, |
| 416 | }, { | 506 | visible: true |
| 507 | }, | ||
| 508 | { | ||
| 509 | label: '授权文件', | ||
| 510 | tip: '支持扩展名:.png .pdf', | ||
| 511 | accept: '.png, .pdf', | ||
| 512 | type: 'upload-file', | ||
| 513 | placeholder: '请选择', | ||
| 514 | field: 'authorization', | ||
| 515 | templateUrl: 'http://www.baidu.com', | ||
| 516 | default: [], | ||
| 517 | limit: 1, | ||
| 518 | block: true, | ||
| 519 | required: false, | ||
| 520 | visible: true | ||
| 521 | }, | ||
| 522 | { | ||
| 523 | label: '商品详细介绍(签章版)', | ||
| 524 | tip: '支持扩展名:.png .pdf', | ||
| 525 | accept: '.png, .pdf', | ||
| 526 | type: 'upload-file', | ||
| 527 | placeholder: '请选择', | ||
| 528 | field: 'productDetail', | ||
| 529 | templateUrl: 'http://www.baidu.com', | ||
| 530 | default: [], | ||
| 531 | limit: 1, | ||
| 532 | block: true, | ||
| 533 | required: false, | ||
| 534 | visible: true | ||
| 535 | }, | ||
| 536 | { | ||
| 417 | label: "", | 537 | label: "", |
| 418 | type: "input", | 538 | type: "input", |
| 419 | placeholder: "请输入", | 539 | placeholder: "请输入", |
| ... | @@ -669,11 +789,17 @@ const submitForm = (btn, formEl, tosub = false) => { | ... | @@ -669,11 +789,17 @@ const submitForm = (btn, formEl, tosub = false) => { |
| 669 | // if (params.content) { | 789 | // if (params.content) { |
| 670 | // params.productDesc = truncateHTML(params.content, 400); | 790 | // params.productDesc = truncateHTML(params.content, 400); |
| 671 | // } | 791 | // } |
| 672 | params.dataScale = formInfo.value.items.at(4).defaultValue; | 792 | console.log(params, formInfo.value.items.at(4).defaultValue, formInfo.value, '-----------------'); |
| 673 | params.caseNumber = formInfo.value.items.at(5).defaultValue; | 793 | params.dataScale = formInfo.value.items.at(4).defaultValue || formInfo.value.items.at(4).default; |
| 794 | params.caseNumber = formInfo.value.items.at(5).defaultValue || formInfo.value.items.at(4).default; | ||
| 795 | params.timeAreaStart = params.dateRange ? params.dateRange[0] : ''; | ||
| 796 | params.timeAreaEnd = params.dateRange ? params.dateRange[1] : ''; | ||
| 797 | params.groundingPick = [route.query.groundingPick]; | ||
| 798 | // 删除dateRange字段 | ||
| 799 | delete params.dateRange; | ||
| 674 | flowDetailLoading.value = true; | 800 | flowDetailLoading.value = true; |
| 675 | if (detailType == 'add') { | 801 | if (detailType == 'add') { |
| 676 | listingSave(params).then((res: any) => { | 802 | listingSavePortal(params).then((res: any) => { |
| 677 | if (res.code == proxy.$passCode) { | 803 | if (res.code == proxy.$passCode) { |
| 678 | ElMessage({ | 804 | ElMessage({ |
| 679 | type: "success", | 805 | type: "success", |
| ... | @@ -996,6 +1122,14 @@ onActivated(() => { | ... | @@ -996,6 +1122,14 @@ onActivated(() => { |
| 996 | }; | 1122 | }; |
| 997 | }) | 1123 | }) |
| 998 | onBeforeMount(() => { | 1124 | onBeforeMount(() => { |
| 1125 | if (route.query.type == 'add' && !route.query.type1) { | ||
| 1126 | formInfo.value.items.forEach(item => { | ||
| 1127 | if (item.field == 'damCode' || item.field == 'exchangeGuids' || item.field == 'registerImg' || item.field == 'qualityReport' || item.field == 'qualityOrg' || item.field == 'valueReport' || item.field == 'valueOrg' || item.field == 'commitment' || item.field == 'authorization' || item.field == 'productDetail') { | ||
| 1128 | item.visible = false; | ||
| 1129 | } | ||
| 1130 | }) | ||
| 1131 | } | ||
| 1132 | |||
| 999 | getParentAreaPromise.value = getAreaData({ parentId: null }).then((res: any) => { | 1133 | getParentAreaPromise.value = getAreaData({ parentId: null }).then((res: any) => { |
| 1000 | if (res?.code == proxy.$passCode) { | 1134 | if (res?.code == proxy.$passCode) { |
| 1001 | parentAreaData.value = res.data ?? []; | 1135 | parentAreaData.value = res.data ?? []; |
| ... | @@ -1009,7 +1143,7 @@ onBeforeMount(() => { | ... | @@ -1009,7 +1143,7 @@ onBeforeMount(() => { |
| 1009 | } | 1143 | } |
| 1010 | } | 1144 | } |
| 1011 | getApproveData(); | 1145 | getApproveData(); |
| 1012 | getParamsDataList({ dictType: '字段类型' }).then((res: any) => { | 1146 | getParamsDataList({ dictType: '资产类型' }).then((res: any) => { |
| 1013 | if (res.code == proxy.$passCode) { | 1147 | if (res.code == proxy.$passCode) { |
| 1014 | damTypes.value = res.data || []; | 1148 | damTypes.value = res.data || []; |
| 1015 | let item = formInfo.value.items.find(item => item.field == 'damType'); | 1149 | let item = formInfo.value.items.find(item => item.field == 'damType'); |
| ... | @@ -1021,9 +1155,8 @@ onBeforeMount(() => { | ... | @@ -1021,9 +1155,8 @@ onBeforeMount(() => { |
| 1021 | getParamsDataList({ dictType: '交付方式' }).then((res: any) => { | 1155 | getParamsDataList({ dictType: '交付方式' }).then((res: any) => { |
| 1022 | if (res.code == proxy.$passCode) { | 1156 | if (res.code == proxy.$passCode) { |
| 1023 | deliveryWayList.value = res.data || []; | 1157 | deliveryWayList.value = res.data || []; |
| 1024 | // let item = formInfo.value.items.find(item => item.field == 'deliveryWay'); | 1158 | let item = formInfo.value.items.find(item => item.field == 'deliveryWay'); |
| 1025 | // item && (item.options = deliveryWayList.value); | 1159 | item && (item.options = deliveryWayList.value); |
| 1026 | formInfo.value.items[6].options = res.data || []; | ||
| 1027 | } else { | 1160 | } else { |
| 1028 | proxy.$ElMessage.error(res.msg); | 1161 | proxy.$ElMessage.error(res.msg); |
| 1029 | } | 1162 | } |
| ... | @@ -1031,10 +1164,8 @@ onBeforeMount(() => { | ... | @@ -1031,10 +1164,8 @@ onBeforeMount(() => { |
| 1031 | getParamsDataList({ dictType: '定价方式' }).then((res: any) => { | 1164 | getParamsDataList({ dictType: '定价方式' }).then((res: any) => { |
| 1032 | if (res.code == proxy.$passCode) { | 1165 | if (res.code == proxy.$passCode) { |
| 1033 | pricingMethodList.value = res.data || []; | 1166 | pricingMethodList.value = res.data || []; |
| 1034 | formInfo.value.items[7].options = res.data || []; | 1167 | let item = formInfo.value.items.find(item => item.field == 'pricingWay'); |
| 1035 | // let item = formInfo.value.items.find(item => item.field == 'deliveryWay'); | 1168 | item && (item.options = pricingMethodList.value); |
| 1036 | // item && (item.options = deliveryWayList.value); | ||
| 1037 | // formInfo.value.items[7].options = res.data || []; | ||
| 1038 | } else { | 1169 | } else { |
| 1039 | proxy.$ElMessage.error(res.msg); | 1170 | proxy.$ElMessage.error(res.msg); |
| 1040 | } | 1171 | } |
| ... | @@ -1042,10 +1173,8 @@ onBeforeMount(() => { | ... | @@ -1042,10 +1173,8 @@ onBeforeMount(() => { |
| 1042 | getParamsDataList({ dictType: '价格单位' }).then((res: any) => { | 1173 | getParamsDataList({ dictType: '价格单位' }).then((res: any) => { |
| 1043 | if (res.code == proxy.$passCode) { | 1174 | if (res.code == proxy.$passCode) { |
| 1044 | priceUnitList.value = res.data || []; | 1175 | priceUnitList.value = res.data || []; |
| 1045 | formInfo.value.items[9].options = res.data || []; | 1176 | let item = formInfo.value.items.find(item => item.field == 'priceUnit'); |
| 1046 | // let item = formInfo.value.items.find(item => item.field == 'deliveryWay'); | 1177 | item && (item.options = priceUnitList.value); |
| 1047 | // item && (item.options = deliveryWayList.value); | ||
| 1048 | // formInfo.value.items[7].options = res.data || []; | ||
| 1049 | } else { | 1178 | } else { |
| 1050 | proxy.$ElMessage.error(res.msg); | 1179 | proxy.$ElMessage.error(res.msg); |
| 1051 | } | 1180 | } | ... | ... |
| ... | @@ -238,12 +238,12 @@ const rulesDetailTableBtnClick = (scope, btn) => { | ... | @@ -238,12 +238,12 @@ const rulesDetailTableBtnClick = (scope, btn) => { |
| 238 | label: row.ruleName | 238 | label: row.ruleName |
| 239 | }]; | 239 | }]; |
| 240 | smallCategoryList.value = [{ | 240 | smallCategoryList.value = [{ |
| 241 | paramValue: detailInfo.value.smallCategory, | 241 | value: detailInfo.value.smallCategory, |
| 242 | paramName: row.smallCategory | 242 | label: row.smallCategory |
| 243 | }]; | 243 | }]; |
| 244 | largeCategoryList.value = [{ | 244 | largeCategoryList.value = [{ |
| 245 | paramValue: detailInfo.value.largeCategory, | 245 | value: detailInfo.value.largeCategory, |
| 246 | paramName: row.largeCategory | 246 | label: row.largeCategory |
| 247 | }]; | 247 | }]; |
| 248 | oneRulesDetailDialogVisible.value = true; | 248 | oneRulesDetailDialogVisible.value = true; |
| 249 | } else { | 249 | } else { |
| ... | @@ -268,12 +268,12 @@ const rulesDetailTableBtnClick = (scope, btn) => { | ... | @@ -268,12 +268,12 @@ const rulesDetailTableBtnClick = (scope, btn) => { |
| 268 | label: row.ruleName | 268 | label: row.ruleName |
| 269 | }]; | 269 | }]; |
| 270 | smallCategoryList.value = [{ | 270 | smallCategoryList.value = [{ |
| 271 | paramValue: detailInfo.value.smallCategory, | 271 | value: detailInfo.value.smallCategory, |
| 272 | paramName: row.smallCategory | 272 | label: row.smallCategory |
| 273 | }]; | 273 | }]; |
| 274 | largeCategoryList.value = [{ | 274 | largeCategoryList.value = [{ |
| 275 | paramValue: detailInfo.value.largeCategory, | 275 | value: detailInfo.value.largeCategory, |
| 276 | paramName: row.largeCategory | 276 | label: row.largeCategory |
| 277 | }]; | 277 | }]; |
| 278 | } else { | 278 | } else { |
| 279 | ElMessage.error(res.msg); | 279 | ElMessage.error(res.msg); | ... | ... |
| ... | @@ -328,6 +328,20 @@ onBeforeMount(() => { | ... | @@ -328,6 +328,20 @@ onBeforeMount(() => { |
| 328 | }); | 328 | }); |
| 329 | 329 | ||
| 330 | onActivated(() => { | 330 | onActivated(() => { |
| 331 | let tab: any = userStore.tabbar.find((tab: any) => tab.fullPath === fullPath); | ||
| 332 | if (tab) { | ||
| 333 | if (route.query.detail) { | ||
| 334 | tab.meta.title = `新建规则(${route.query.planName})`; | ||
| 335 | if (fullPath === route.fullPath) { | ||
| 336 | document.title = tab.meta.title; | ||
| 337 | } | ||
| 338 | } else if (route.query.planName) { | ||
| 339 | tab.meta.title = `方案编辑-${route.query.planName}`; | ||
| 340 | if (fullPath === route.fullPath) { | ||
| 341 | document.title = tab.meta.title; | ||
| 342 | } | ||
| 343 | } | ||
| 344 | } | ||
| 331 | if (modelGuid.value || groupGuid.value) { | 345 | if (modelGuid.value || groupGuid.value) { |
| 332 | return; | 346 | return; |
| 333 | } | 347 | } | ... | ... |
| ... | @@ -255,10 +255,12 @@ const groupTableInfo = ref({ | ... | @@ -255,10 +255,12 @@ const groupTableInfo = ref({ |
| 255 | label: "操作", | 255 | label: "操作", |
| 256 | type: "btn", | 256 | type: "btn", |
| 257 | width: 92, | 257 | width: 92, |
| 258 | btns: [ | 258 | btns: (scope) => { |
| 259 | { label: "编辑", value: "edit" }, | 259 | return [ |
| 260 | { label: "删除", value: "delete" }, | 260 | { label: "编辑", value: "edit", disabled: scope.row.dataSource != '5' }, |
| 261 | ], | 261 | { label: "删除", value: "delete", disabled: scope.row.dataSource != '5' }, |
| 262 | ] | ||
| 263 | }, | ||
| 262 | } | 264 | } |
| 263 | }); | 265 | }); |
| 264 | 266 | ||
| ... | @@ -402,7 +404,8 @@ const tableBtnClick = (scope, btn) => { | ... | @@ -402,7 +404,8 @@ const tableBtnClick = (scope, btn) => { |
| 402 | name: 'ruleTemplate', | 404 | name: 'ruleTemplate', |
| 403 | query: { | 405 | query: { |
| 404 | modelGuid: row.guid, | 406 | modelGuid: row.guid, |
| 405 | name: row.name | 407 | name: row.name, |
| 408 | dataSource: row.dataSource | ||
| 406 | } | 409 | } |
| 407 | }); | 410 | }); |
| 408 | } else if (type == "delete") { | 411 | } else if (type == "delete") { |
| ... | @@ -429,9 +432,12 @@ const open = (msg, type, isBatch = false) => { | ... | @@ -429,9 +432,12 @@ const open = (msg, type, isBatch = false) => { |
| 429 | if (res.code == proxy.$passCode) { | 432 | if (res.code == proxy.$passCode) { |
| 430 | page.value.curr = 1; | 433 | page.value.curr = 1; |
| 431 | getTableData(); | 434 | getTableData(); |
| 435 | getQualityGroupTreeData(); | ||
| 436 | nextTick(() => { | ||
| 432 | let node = qualityModelTreeRef.value.treeRef.store.nodesMap[currTableData.value.modelGroupGuid]; | 437 | let node = qualityModelTreeRef.value.treeRef.store.nodesMap[currTableData.value.modelGroupGuid]; |
| 433 | node.loaded = false; | 438 | node.loaded = false; |
| 434 | node.expand(); | 439 | node.expand(); |
| 440 | }) | ||
| 435 | ElMessage.success('删除成功'); | 441 | ElMessage.success('删除成功'); |
| 436 | } else { | 442 | } else { |
| 437 | ElMessage.error(res.msg); | 443 | ElMessage.error(res.msg); |
| ... | @@ -489,6 +495,7 @@ const groupTableBtnClick = (scope, btn) => { | ... | @@ -489,6 +495,7 @@ const groupTableBtnClick = (scope, btn) => { |
| 489 | type: "success", | 495 | type: "success", |
| 490 | message: "删除分组成功", | 496 | message: "删除分组成功", |
| 491 | }); | 497 | }); |
| 498 | getQualityGroupTreeData(); | ||
| 492 | } else { | 499 | } else { |
| 493 | ElMessage({ | 500 | ElMessage({ |
| 494 | type: "error", | 501 | type: "error", |
| ... | @@ -594,7 +601,7 @@ const ruleTableBtnClick = (scope, btn) => { | ... | @@ -594,7 +601,7 @@ const ruleTableBtnClick = (scope, btn) => { |
| 594 | } | 601 | } |
| 595 | }); | 602 | }); |
| 596 | } else if (type == "delete") { | 603 | } else if (type == "delete") { |
| 597 | ruleOpen("此操作将永久删除该质检表, 是否继续?", "warning"); | 604 | ruleOpen("此操作将永久删除该质检规则, 是否继续?", "warning"); |
| 598 | } | 605 | } |
| 599 | }; | 606 | }; |
| 600 | 607 | ||
| ... | @@ -611,7 +618,7 @@ const ruleOpen = (msg, type, isBatch = false) => { | ... | @@ -611,7 +618,7 @@ const ruleOpen = (msg, type, isBatch = false) => { |
| 611 | let node = qualityModelTreeRef.value.treeRef.store.nodesMap[lastSelectNode.value.data.guid]; | 618 | let node = qualityModelTreeRef.value.treeRef.store.nodesMap[lastSelectNode.value.data.guid]; |
| 612 | node.loaded = false; | 619 | node.loaded = false; |
| 613 | node.expand(); | 620 | node.expand(); |
| 614 | ElMessage.success('删除质检表成功'); | 621 | ElMessage.success('删除质检规则成功'); |
| 615 | } else { | 622 | } else { |
| 616 | ElMessage.error(res.msg); | 623 | ElMessage.error(res.msg); |
| 617 | } | 624 | } |
| ... | @@ -639,7 +646,8 @@ const clickCreateTable = () => { | ... | @@ -639,7 +646,8 @@ const clickCreateTable = () => { |
| 639 | name: 'ruleModel', | 646 | name: 'ruleModel', |
| 640 | query: { | 647 | query: { |
| 641 | groupGuid: page.value.modelGroupGuid, | 648 | groupGuid: page.value.modelGroupGuid, |
| 642 | name: lastSelectNode.value.data.name | 649 | name: lastSelectNode.value.data.name, |
| 650 | dataSource: lastSelectNode.value.data.dataSource | ||
| 643 | } | 651 | } |
| 644 | }); | 652 | }); |
| 645 | } | 653 | } |
| ... | @@ -650,7 +658,8 @@ const clickCreateRule = () => { | ... | @@ -650,7 +658,8 @@ const clickCreateRule = () => { |
| 650 | name: 'ruleTemplate', | 658 | name: 'ruleTemplate', |
| 651 | query: { | 659 | query: { |
| 652 | modelGuid: lastSelectNode.value.data.guid, | 660 | modelGuid: lastSelectNode.value.data.guid, |
| 653 | name: lastSelectNode.value.data.name | 661 | name: lastSelectNode.value.data.name, |
| 662 | dataSource: lastSelectNode.value.parent.data.dataSource | ||
| 654 | } | 663 | } |
| 655 | }); | 664 | }); |
| 656 | } | 665 | } |
| ... | @@ -744,6 +753,7 @@ let editSubmitPromise: any = ref(null); | ... | @@ -744,6 +753,7 @@ let editSubmitPromise: any = ref(null); |
| 744 | /** 新建分组对话框确定。 */ | 753 | /** 新建分组对话框确定。 */ |
| 745 | const dialogBtnClick = (btn, info) => { | 754 | const dialogBtnClick = (btn, info) => { |
| 746 | if (btn.value == 'submit') { | 755 | if (btn.value == 'submit') { |
| 756 | info.dataSource = '5'; | ||
| 747 | if (dialogInfo.value.type == 'add') { | 757 | if (dialogInfo.value.type == 'add') { |
| 748 | if (submitPromise.value) { | 758 | if (submitPromise.value) { |
| 749 | return; | 759 | return; |
| ... | @@ -753,6 +763,7 @@ const dialogBtnClick = (btn, info) => { | ... | @@ -753,6 +763,7 @@ const dialogBtnClick = (btn, info) => { |
| 753 | if (res.code == proxy.$passCode) { | 763 | if (res.code == proxy.$passCode) { |
| 754 | groupPage.value.curr = 1; | 764 | groupPage.value.curr = 1; |
| 755 | getGroupTableData(); | 765 | getGroupTableData(); |
| 766 | getQualityGroupTreeData(); | ||
| 756 | ElMessage({ | 767 | ElMessage({ |
| 757 | type: 'success', | 768 | type: 'success', |
| 758 | message: '新建分组成功' | 769 | message: '新建分组成功' |
| ... | @@ -779,6 +790,7 @@ const dialogBtnClick = (btn, info) => { | ... | @@ -779,6 +790,7 @@ const dialogBtnClick = (btn, info) => { |
| 779 | type: 'success', | 790 | type: 'success', |
| 780 | message: '编辑分组成功' | 791 | message: '编辑分组成功' |
| 781 | }) | 792 | }) |
| 793 | getQualityGroupTreeData(); | ||
| 782 | dialogInfo.value.visible = false; | 794 | dialogInfo.value.visible = false; |
| 783 | } else { | 795 | } else { |
| 784 | ElMessage({ | 796 | ElMessage({ |
| ... | @@ -862,8 +874,9 @@ onActivated(async () => { | ... | @@ -862,8 +874,9 @@ onActivated(async () => { |
| 862 | if (lastSelectNode.value && lastSelectNode.value.data.guid == dataQualityStore.modelGroupGuid) { | 874 | if (lastSelectNode.value && lastSelectNode.value.data.guid == dataQualityStore.modelGroupGuid) { |
| 863 | getTableData(); | 875 | getTableData(); |
| 864 | } | 876 | } |
| 865 | let node = qualityModelTreeRef.value.treeRef.store.nodesMap[dataQualityStore.modelGroupGuid]; | 877 | // let node = qualityModelTreeRef.value.treeRef.store.nodesMap[dataQualityStore.modelGroupGuid]; |
| 866 | node?.expand(); | 878 | // node?.expand(); |
| 879 | getQualityGroupTreeData(); | ||
| 867 | dataQualityStore.set(null); | 880 | dataQualityStore.set(null); |
| 868 | }); | 881 | }); |
| 869 | } else { | 882 | } else { |
| ... | @@ -871,8 +884,11 @@ onActivated(async () => { | ... | @@ -871,8 +884,11 @@ onActivated(async () => { |
| 871 | if (lastSelectNode.value && lastSelectNode.value.data.guid == dataQualityStore.modelGroupGuid) { | 884 | if (lastSelectNode.value && lastSelectNode.value.data.guid == dataQualityStore.modelGroupGuid) { |
| 872 | getTableData(); | 885 | getTableData(); |
| 873 | } | 886 | } |
| 887 | getQualityGroupTreeData(); | ||
| 888 | nextTick(() => { | ||
| 874 | let node = qualityModelTreeRef.value.treeRef.store.nodesMap[dataQualityStore.modelGroupGuid]; | 889 | let node = qualityModelTreeRef.value.treeRef.store.nodesMap[dataQualityStore.modelGroupGuid]; |
| 875 | node.expand(); | 890 | node.expand(); |
| 891 | }) | ||
| 876 | dataQualityStore.set(null); | 892 | dataQualityStore.set(null); |
| 877 | } | 893 | } |
| 878 | } | 894 | } |
| ... | @@ -908,7 +924,7 @@ onBeforeMount(() => { | ... | @@ -908,7 +924,7 @@ onBeforeMount(() => { |
| 908 | d.label = d.ruleName; | 924 | d.label = d.ruleName; |
| 909 | d.value = d.ruleCode; | 925 | d.value = d.ruleCode; |
| 910 | return d; | 926 | return d; |
| 911 | }) || []; | 927 | })?.filter(d => d.ruleCode != 'rows_check' && d.ruleCode != 'volatility_check') || []; |
| 912 | searchItemList.value[2].options = ruleTypeList.value; | 928 | searchItemList.value[2].options = ruleTypeList.value; |
| 913 | } else { | 929 | } else { |
| 914 | ElMessage.error(res.msg); | 930 | ElMessage.error(res.msg); | ... | ... |
This diff is collapsed.
Click to expand it.
| ... | @@ -9,13 +9,16 @@ import { ElMessage, ElMessageBox } from "element-plus"; | ... | @@ -9,13 +9,16 @@ import { ElMessage, ElMessageBox } from "element-plus"; |
| 9 | import StepBar from "@/components/StepBar/index.vue"; | 9 | import StepBar from "@/components/StepBar/index.vue"; |
| 10 | import TreeTransfer from "@/components/TreeTransfer/index.vue"; | 10 | import TreeTransfer from "@/components/TreeTransfer/index.vue"; |
| 11 | import { | 11 | import { |
| 12 | getSubjectTableTree, | 12 | getInventoryDsDir, |
| 13 | getSubjectTableByDomain, | 13 | getSubjectTableByDomain, |
| 14 | saveQualityTable, | 14 | saveQualityTable, |
| 15 | getRuleTypeList, | 15 | getRuleTypeList, |
| 16 | getSmallCategoryList, | 16 | getSmallCategoryList, |
| 17 | getLargeCategoryList, | 17 | getLargeCategoryList, |
| 18 | } from '@/api/modules/dataQuality'; | 18 | } from '@/api/modules/dataQuality'; |
| 19 | import { | ||
| 20 | getMetaTreeData | ||
| 21 | } from '@/api/modules/dataMetaService'; | ||
| 19 | import ruleForm from "../data_quality/ruleForm.vue"; | 22 | import ruleForm from "../data_quality/ruleForm.vue"; |
| 20 | import useUserStore from "@/store/modules/user"; | 23 | import useUserStore from "@/store/modules/user"; |
| 21 | import useDataQualityStore from "@/store/modules/dataQuality"; | 24 | import useDataQualityStore from "@/store/modules/dataQuality"; |
| ... | @@ -60,15 +63,46 @@ const toSubjectTables: any = ref([]); | ... | @@ -60,15 +63,46 @@ const toSubjectTables: any = ref([]); |
| 60 | 63 | ||
| 61 | const getSubjectTableTreeData = () => { | 64 | const getSubjectTableTreeData = () => { |
| 62 | dsFromTreeDataLoading.value = true; | 65 | dsFromTreeDataLoading.value = true; |
| 63 | getSubjectTableTree({}).then((res: any) => { | 66 | if (route.query.dataSource == '4') { |
| 67 | getInventoryDsDir().then((res: any) => { | ||
| 64 | dsFromTreeDataLoading.value = false; | 68 | dsFromTreeDataLoading.value = false; |
| 65 | if (res.code == proxy.$passCode) { | 69 | if (res.code == proxy.$passCode) { |
| 66 | dsFromTreeData.value = res.data?.map(d => { | 70 | dsFromTreeData.value = res.data?.map(d => { |
| 67 | d.parentGuid = 0; | 71 | d.parentGuid = 0; |
| 72 | d.guid = d.databaseGuid; | ||
| 73 | d.name = d.databaseChName; | ||
| 74 | d.label = d.databaseChName + `(${d.database})`; | ||
| 75 | d.children = d.children?.map(child => { | ||
| 76 | child.parentGuid = d.guid; | ||
| 77 | child.label = child.tableChName + `(${child.tableName})`; | ||
| 78 | child.guid = child.tableGuid; | ||
| 79 | child.dataServerName = d.database; | ||
| 80 | child.dataSourceGuid = d.databaseGuid; | ||
| 81 | child.parentGuid = d.databaseGuid; | ||
| 82 | return child; | ||
| 83 | }) | ||
| 84 | return d; | ||
| 85 | }) || []; | ||
| 86 | } | ||
| 87 | }) | ||
| 88 | } else { | ||
| 89 | getMetaTreeData({ isImportCreate: 'N' }).then((res: any) => { | ||
| 90 | dsFromTreeDataLoading.value = false; | ||
| 91 | if (res.code == proxy.$passCode) { | ||
| 92 | dsFromTreeData.value = res.data?.children?.map(d => { | ||
| 93 | d.parentGuid = 0; | ||
| 94 | d.label = d.name; | ||
| 95 | d.children = d.children?.map(child => { | ||
| 96 | child.label = child.name + `(${child.tableName})`; | ||
| 97 | child.dataServerName = d.name; | ||
| 98 | child.dataSourceGuid = d.guid; | ||
| 99 | return child; | ||
| 100 | }) | ||
| 68 | return d; | 101 | return d; |
| 69 | }) || []; | 102 | }) || []; |
| 70 | } | 103 | } |
| 71 | }) | 104 | }) |
| 105 | } | ||
| 72 | } | 106 | } |
| 73 | 107 | ||
| 74 | const getSubjectTableByDomainData = (guid) => { | 108 | const getSubjectTableByDomainData = (guid) => { |
| ... | @@ -124,7 +158,7 @@ onBeforeMount(() => { | ... | @@ -124,7 +158,7 @@ onBeforeMount(() => { |
| 124 | d.label = d.ruleName; | 158 | d.label = d.ruleName; |
| 125 | d.value = d.ruleCode; | 159 | d.value = d.ruleCode; |
| 126 | return d; | 160 | return d; |
| 127 | }) || []; | 161 | })?.filter(d => d.ruleCode != 'rows_check' && d.ruleCode != 'volatility_check') || []; |
| 128 | } else { | 162 | } else { |
| 129 | ElMessage.error(res.msg); | 163 | ElMessage.error(res.msg); |
| 130 | } | 164 | } |
| ... | @@ -155,12 +189,14 @@ const changeStep = (val, skip = false) => { | ... | @@ -155,12 +189,14 @@ const changeStep = (val, skip = false) => { |
| 155 | } | 189 | } |
| 156 | toSubjectTables.value = []; | 190 | toSubjectTables.value = []; |
| 157 | dsToTreeData.value.forEach(d => { | 191 | dsToTreeData.value.forEach(d => { |
| 158 | d.children.forEach(c => { | 192 | d.children.forEach(child => { |
| 159 | c.children.forEach(child => { | 193 | child.guid = child.tableGuid || child.guid; |
| 160 | child.label = `${child.enName}(${child.chName})`; | 194 | child.enName = child.tableName; |
| 195 | child.chName = child.tableChName || child.name; | ||
| 196 | child.dataSourceGuid = child.parentGuid; | ||
| 197 | child.databaseName = child.databaseName, | ||
| 161 | toSubjectTables.value.push(child); | 198 | toSubjectTables.value.push(child); |
| 162 | }) | 199 | }) |
| 163 | }) | ||
| 164 | }); | 200 | }); |
| 165 | step.value = val - 1; | 201 | step.value = val - 1; |
| 166 | stepsInfo.value.step = val - 1 | 202 | stepsInfo.value.step = val - 1 |
| ... | @@ -208,6 +244,7 @@ const transformRulesInfo = (info: any) => { | ... | @@ -208,6 +244,7 @@ const transformRulesInfo = (info: any) => { |
| 208 | subjectGuid: tableInfo.guid, | 244 | subjectGuid: tableInfo.guid, |
| 209 | dataSourceGuid: tableInfo.dataSourceGuid, | 245 | dataSourceGuid: tableInfo.dataSourceGuid, |
| 210 | databaseName: tableInfo.dataServerName, | 246 | databaseName: tableInfo.dataServerName, |
| 247 | dataSource: route.query.dataSource ? parseInt(<string>route.query.dataSource) : null, | ||
| 211 | modelRuleConfList: [Object.assign({}, info, { | 248 | modelRuleConfList: [Object.assign({}, info, { |
| 212 | qualityModelGuid: modelGuid | 249 | qualityModelGuid: modelGuid |
| 213 | })] | 250 | })] |
| ... | @@ -226,6 +263,7 @@ const transformRulesInfo = (info: any) => { | ... | @@ -226,6 +263,7 @@ const transformRulesInfo = (info: any) => { |
| 226 | subjectGuid: tableInfo.guid, | 263 | subjectGuid: tableInfo.guid, |
| 227 | dataSourceGuid: tableInfo.dataSourceGuid, | 264 | dataSourceGuid: tableInfo.dataSourceGuid, |
| 228 | databaseName: tableInfo.dataServerName, | 265 | databaseName: tableInfo.dataServerName, |
| 266 | dataSource: route.query.dataSource ? parseInt(<string>route.query.dataSource) : null, | ||
| 229 | modelRuleConfList: [Object.assign({}, info, { | 267 | modelRuleConfList: [Object.assign({}, info, { |
| 230 | ruleField: fields?.map(f => { | 268 | ruleField: fields?.map(f => { |
| 231 | return { | 269 | return { |
| ... | @@ -249,6 +287,7 @@ const transformRulesInfo = (info: any) => { | ... | @@ -249,6 +287,7 @@ const transformRulesInfo = (info: any) => { |
| 249 | subjectGuid: tableInfo.guid, | 287 | subjectGuid: tableInfo.guid, |
| 250 | dataSourceGuid: tableInfo.dataSourceGuid, | 288 | dataSourceGuid: tableInfo.dataSourceGuid, |
| 251 | databaseName: tableInfo.dataServerName, | 289 | databaseName: tableInfo.dataServerName, |
| 290 | dataSource: route.query.dataSource ? parseInt(<string>route.query.dataSource) : null, | ||
| 252 | modelRuleConfList: [Object.assign({}, info, { | 291 | modelRuleConfList: [Object.assign({}, info, { |
| 253 | ruleField: [{ | 292 | ruleField: [{ |
| 254 | guid: fields.guid, | 293 | guid: fields.guid, |
| ... | @@ -273,6 +312,7 @@ const transformRulesInfo = (info: any) => { | ... | @@ -273,6 +312,7 @@ const transformRulesInfo = (info: any) => { |
| 273 | subjectGuid: tableInfo.guid, | 312 | subjectGuid: tableInfo.guid, |
| 274 | dataSourceGuid: tableInfo.dataSourceGuid, | 313 | dataSourceGuid: tableInfo.dataSourceGuid, |
| 275 | databaseName: tableInfo.dataServerName, | 314 | databaseName: tableInfo.dataServerName, |
| 315 | dataSource: route.query.dataSource ? parseInt(<string>route.query.dataSource) : null, | ||
| 276 | modelRuleConfList: [Object.assign({}, info, { | 316 | modelRuleConfList: [Object.assign({}, info, { |
| 277 | ruleField: fields?.map(f => { | 317 | ruleField: fields?.map(f => { |
| 278 | return { | 318 | return { |
| ... | @@ -297,6 +337,7 @@ const transformRulesInfo = (info: any) => { | ... | @@ -297,6 +337,7 @@ const transformRulesInfo = (info: any) => { |
| 297 | subjectGuid: tableInfo.guid, | 337 | subjectGuid: tableInfo.guid, |
| 298 | dataSourceGuid: tableInfo.dataSourceGuid, | 338 | dataSourceGuid: tableInfo.dataSourceGuid, |
| 299 | databaseName: tableInfo.dataServerName, | 339 | databaseName: tableInfo.dataServerName, |
| 340 | dataSource: route.query.dataSource ? parseInt(<string>route.query.dataSource) : null, | ||
| 300 | modelRuleConfList: [Object.assign({}, info, { | 341 | modelRuleConfList: [Object.assign({}, info, { |
| 301 | differenceRange: row.differenceRange, | 342 | differenceRange: row.differenceRange, |
| 302 | rows: [], | 343 | rows: [], |
| ... | @@ -316,6 +357,7 @@ const transformRulesInfo = (info: any) => { | ... | @@ -316,6 +357,7 @@ const transformRulesInfo = (info: any) => { |
| 316 | subjectGuid: tableInfo.guid, | 357 | subjectGuid: tableInfo.guid, |
| 317 | dataSourceGuid: tableInfo.dataSourceGuid, | 358 | dataSourceGuid: tableInfo.dataSourceGuid, |
| 318 | databaseName: tableInfo.dataServerName, | 359 | databaseName: tableInfo.dataServerName, |
| 360 | dataSource: route.query.dataSource ? parseInt(<string>route.query.dataSource) : null, | ||
| 319 | modelRuleConfList: [Object.assign({}, info, { | 361 | modelRuleConfList: [Object.assign({}, info, { |
| 320 | ruleField: fields.map(f => { | 362 | ruleField: fields.map(f => { |
| 321 | return { | 363 | return { |
| ... | @@ -344,6 +386,7 @@ const transformRulesInfo = (info: any) => { | ... | @@ -344,6 +386,7 @@ const transformRulesInfo = (info: any) => { |
| 344 | subjectGuid: tableInfo.guid, | 386 | subjectGuid: tableInfo.guid, |
| 345 | dataSourceGuid: tableInfo.dataSourceGuid, | 387 | dataSourceGuid: tableInfo.dataSourceGuid, |
| 346 | databaseName: tableInfo.dataServerName, | 388 | databaseName: tableInfo.dataServerName, |
| 389 | dataSource: route.query.dataSource ? parseInt(<string>route.query.dataSource) : null, | ||
| 347 | modelRuleConfList: [Object.assign({}, info, { | 390 | modelRuleConfList: [Object.assign({}, info, { |
| 348 | ruleField: fields.map(f => { | 391 | ruleField: fields.map(f => { |
| 349 | return { | 392 | return { |
| ... | @@ -379,11 +422,19 @@ const transformRulesInfo = (info: any) => { | ... | @@ -379,11 +422,19 @@ const transformRulesInfo = (info: any) => { |
| 379 | subjectGuid: tableInfo.guid, | 422 | subjectGuid: tableInfo.guid, |
| 380 | dataSourceGuid: tableInfo.dataSourceGuid, | 423 | dataSourceGuid: tableInfo.dataSourceGuid, |
| 381 | databaseName: tableInfo.dataServerName, | 424 | databaseName: tableInfo.dataServerName, |
| 425 | dataSource: route.query.dataSource ? parseInt(<string>route.query.dataSource) : null, | ||
| 382 | modelRuleConfList: [Object.assign({}, info, { | 426 | modelRuleConfList: [Object.assign({}, info, { |
| 427 | ruleField: info.ruleFields.map(row => { | ||
| 428 | return { | ||
| 429 | // guid: row.mainTable, | ||
| 383 | enName: row.mainTableField, | 430 | enName: row.mainTableField, |
| 431 | //chName: row.chName, | ||
| 384 | compareTableGuid: row.compareTableGuid, | 432 | compareTableGuid: row.compareTableGuid, |
| 385 | compareTableName: row.compareTableName, | 433 | compareTableName: row.compareTableName, |
| 386 | compareEnName: row.compareEnName | 434 | compareEnName: row.compareEnName |
| 435 | } | ||
| 436 | }), | ||
| 437 | ruleFields: '' | ||
| 387 | })] | 438 | })] |
| 388 | })); | 439 | })); |
| 389 | } | 440 | } |
| ... | @@ -428,18 +479,18 @@ const save = () => { | ... | @@ -428,18 +479,18 @@ const save = () => { |
| 428 | <div class="operator_panel is-block"> | 479 | <div class="operator_panel is-block"> |
| 429 | <div class="panel_title"> | 480 | <div class="panel_title"> |
| 430 | <div class="title_text"> | 481 | <div class="title_text"> |
| 431 | <span>选择主题表</span> | 482 | <span>选择表</span> |
| 432 | <span class="tips_text">选择需要添加质检规则的主题表</span> | 483 | <span class="tips_text">{{ route.query.dataSource == '5' ? |
| 484 | '选择需要添加质检规则的表,请确保数据库为脱产环境,避免数据质检影响您的生产环境,且允许在该脱产环境建脏数据的库,请知晓!' : '选择需要添加质检规则的表' }}</span> | ||
| 433 | </div> | 485 | </div> |
| 434 | </div> | 486 | </div> |
| 435 | <TreeTransfer mode="transfer" :title="['主题表', '已选表']" pid="parentGuid" | 487 | <TreeTransfer mode="transfer" :title="[route.query.dataSource == '5' ? '可选元数据目录表' : '可选盘点数据库目录表', '已选表']" |
| 436 | :from-tree-data-loading="dsFromTreeDataLoading" :lazy="true" :checkOnClickNode="true" | 488 | pid="parentGuid" :from-tree-data-loading="dsFromTreeDataLoading" :checkOnClickNode="true" |
| 437 | :from_checked_all="false" :from_data="dsFromTreeData" :to_data="dsToTreeData" node_key="guid" | 489 | :from_checked_all="false" :from_data="dsFromTreeData" :to_data="dsToTreeData" node_key="guid" |
| 438 | :transferOpenNode="true" width="70%" :defaultProps="{ | 490 | :transferOpenNode="true" width="70%" :defaultProps="{ |
| 439 | label: 'name', | 491 | label: 'label', |
| 440 | value: 'guid' | 492 | value: 'guid' |
| 441 | }" :lazyFn="handleSubjectTableLazyFn" @left-check-change="handleSubjectCheckedChange" | 493 | }" height="calc(100% - 64px)"> |
| 442 | height="calc(100% - 64px)"> | ||
| 443 | </TreeTransfer> | 494 | </TreeTransfer> |
| 444 | </div> | 495 | </div> |
| 445 | </div> | 496 | </div> |
| ... | @@ -454,7 +505,8 @@ const save = () => { | ... | @@ -454,7 +505,8 @@ const save = () => { |
| 454 | <div class="panel_content"> | 505 | <div class="panel_content"> |
| 455 | <div class="form_panel"> | 506 | <div class="form_panel"> |
| 456 | <ruleForm ref="ruleFormRef" :toSubjectTables="toSubjectTables" :ruleTypeList="ruleTypeList" | 507 | <ruleForm ref="ruleFormRef" :toSubjectTables="toSubjectTables" :ruleTypeList="ruleTypeList" |
| 457 | :largeCategoryList="largeCategoryList" :smallCategoryList="smallCategoryList"></ruleForm> | 508 | :data-source="route.query.dataSource as string" :largeCategoryList="largeCategoryList" |
| 509 | :smallCategoryList="smallCategoryList"></ruleForm> | ||
| 458 | </div> | 510 | </div> |
| 459 | </div> | 511 | </div> |
| 460 | </div> | 512 | </div> | ... | ... |
| ... | @@ -241,7 +241,7 @@ onBeforeMount(() => { | ... | @@ -241,7 +241,7 @@ onBeforeMount(() => { |
| 241 | d.label = d.ruleName; | 241 | d.label = d.ruleName; |
| 242 | d.value = d.ruleCode; | 242 | d.value = d.ruleCode; |
| 243 | return d; | 243 | return d; |
| 244 | }) || []; | 244 | })?.filter(d => d.ruleCode != 'rows_check' && d.ruleCode != 'volatility_check') || []; |
| 245 | } else { | 245 | } else { |
| 246 | ElMessage.error(res.msg); | 246 | ElMessage.error(res.msg); |
| 247 | } | 247 | } |
| ... | @@ -262,6 +262,16 @@ onBeforeMount(() => { | ... | @@ -262,6 +262,16 @@ onBeforeMount(() => { |
| 262 | }) | 262 | }) |
| 263 | }) | 263 | }) |
| 264 | 264 | ||
| 265 | onActivated(() => { | ||
| 266 | let tab: any = userStore.tabbar.find((tab: any) => tab.fullPath === fullPath); | ||
| 267 | if (tab && detailInfo.value?.ruleConfName) { | ||
| 268 | tab.meta.title = `编辑-${detailInfo.value.ruleConfName}(${detailInfo.value.subjectZhName})` | ||
| 269 | if (fullPath === route.fullPath) { | ||
| 270 | document.title = tab.meta.title; | ||
| 271 | } | ||
| 272 | } | ||
| 273 | }); | ||
| 274 | |||
| 265 | </script> | 275 | </script> |
| 266 | 276 | ||
| 267 | <template> | 277 | <template> | ... | ... |
| ... | @@ -204,15 +204,14 @@ const save = () => { | ... | @@ -204,15 +204,14 @@ const save = () => { |
| 204 | subjectGuid: modelDetailInfo.value.subjectGuid, | 204 | subjectGuid: modelDetailInfo.value.subjectGuid, |
| 205 | subjectName: modelDetailInfo.value.subjectName, | 205 | subjectName: modelDetailInfo.value.subjectName, |
| 206 | dataSourceGuid: modelDetailInfo.value.dataSourceGuid, | 206 | dataSourceGuid: modelDetailInfo.value.dataSourceGuid, |
| 207 | modelRuleConfList: submitInfos | 207 | modelRuleConfList: submitInfos, |
| 208 | dataSource: route.query.dataSource ? parseInt(<string>route.query.dataSource) : null, | ||
| 208 | }]).then((res: any) => { | 209 | }]).then((res: any) => { |
| 209 | fullScreenLoading.value = false; | 210 | fullScreenLoading.value = false; |
| 210 | if (res.code == proxy.$passCode) { | 211 | if (res.code == proxy.$passCode) { |
| 211 | ElMessage.success('新建规则保存成功'); | 212 | ElMessage.success('新建规则保存成功'); |
| 212 | router.push({ | ||
| 213 | name: 'qualityRules' | ||
| 214 | }); | ||
| 215 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); | 213 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); |
| 214 | router.go(-1); | ||
| 216 | dataQualityStore.setModelGuid(modelGuid); | 215 | dataQualityStore.setModelGuid(modelGuid); |
| 217 | } else { | 216 | } else { |
| 218 | ElMessage.error(res.msg); | 217 | ElMessage.error(res.msg); |
| ... | @@ -249,7 +248,7 @@ onBeforeMount(() => { | ... | @@ -249,7 +248,7 @@ onBeforeMount(() => { |
| 249 | d.label = d.ruleName; | 248 | d.label = d.ruleName; |
| 250 | d.value = d.ruleCode; | 249 | d.value = d.ruleCode; |
| 251 | return d; | 250 | return d; |
| 252 | }) || []; | 251 | })?.filter(d => d.ruleCode != 'rows_check' && d.ruleCode != 'volatility_check') || []; //先隐藏掉表行数检查和表行数波动率 |
| 253 | } else { | 252 | } else { |
| 254 | ElMessage.error(res.msg); | 253 | ElMessage.error(res.msg); |
| 255 | } | 254 | } |
| ... | @@ -270,6 +269,16 @@ onBeforeMount(() => { | ... | @@ -270,6 +269,16 @@ onBeforeMount(() => { |
| 270 | }) | 269 | }) |
| 271 | }) | 270 | }) |
| 272 | 271 | ||
| 272 | onActivated(() => { | ||
| 273 | let tab: any = userStore.tabbar.find((tab: any) => tab.fullPath === fullPath); | ||
| 274 | if (tab && route.query.name) { | ||
| 275 | tab.meta.title = `新建规则(${route.query.name})`; | ||
| 276 | if (fullPath === route.fullPath) { | ||
| 277 | document.title = tab.meta.title; | ||
| 278 | } | ||
| 279 | } | ||
| 280 | }); | ||
| 281 | |||
| 273 | const cancel = () => { | 282 | const cancel = () => { |
| 274 | ElMessageBox.confirm( | 283 | ElMessageBox.confirm( |
| 275 | "当前页面尚未保存,确定放弃修改吗?", | 284 | "当前页面尚未保存,确定放弃修改吗?", |
| ... | @@ -317,7 +326,7 @@ const cancel = () => { | ... | @@ -317,7 +326,7 @@ const cancel = () => { |
| 317 | </div> | 326 | </div> |
| 318 | <div class="panel_content" v-show="item.open"> | 327 | <div class="panel_content" v-show="item.open"> |
| 319 | <div class="form_panel"> | 328 | <div class="form_panel"> |
| 320 | <ruleForm ref="ruleFormRef" :toSubjectTables="toSubjectTables" :ruleTypeList="ruleTypeList" | 329 | <ruleForm ref="ruleFormRef" :toSubjectTables="toSubjectTables" :ruleTypeList="ruleTypeList" :dataSource="route.query.dataSource as string" |
| 321 | :largeCategoryList="largeCategoryList" :smallCategoryList="smallCategoryList" :isSingle="true"> | 330 | :largeCategoryList="largeCategoryList" :smallCategoryList="smallCategoryList" :isSingle="true"> |
| 322 | </ruleForm> | 331 | </ruleForm> |
| 323 | </div> | 332 | </div> | ... | ... |
| ... | @@ -221,7 +221,7 @@ const tableBtnClick = async (scope, btn) => { | ... | @@ -221,7 +221,7 @@ const tableBtnClick = async (scope, btn) => { |
| 221 | const row = scope.row; | 221 | const row = scope.row; |
| 222 | currTableData.value = row; | 222 | currTableData.value = row; |
| 223 | if (type == "export_file") { | 223 | if (type == "export_file") { |
| 224 | const refSignInfo: any = await getDownFileSignByUrl(parseAndDecodeUrl(row.filePath).decodedPath); | 224 | const refSignInfo: any = await getDownFileSignByUrl(parseAndDecodeUrl(row.filePath).fileName); |
| 225 | if (!refSignInfo?.data) { | 225 | if (!refSignInfo?.data) { |
| 226 | refSignInfo?.msg && ElMessage.error(refSignInfo?.msg); | 226 | refSignInfo?.msg && ElMessage.error(refSignInfo?.msg); |
| 227 | return; | 227 | return; |
| ... | @@ -236,7 +236,7 @@ const tableBtnClick = async (scope, btn) => { | ... | @@ -236,7 +236,7 @@ const tableBtnClick = async (scope, btn) => { |
| 236 | //downFile(row.filePath, row.fileName) | 236 | //downFile(row.filePath, row.fileName) |
| 237 | } else if (type == 'export_abnormal_data') { | 237 | } else if (type == 'export_abnormal_data') { |
| 238 | //downFile(row.errorFilePath, '') | 238 | //downFile(row.errorFilePath, '') |
| 239 | const refSignInfo: any = await getDownFileSignByUrl(parseAndDecodeUrl(row.errorFilePath).decodedPath); | 239 | const refSignInfo: any = await getDownFileSignByUrl(parseAndDecodeUrl(row.errorFilePath).fileName); |
| 240 | if (!refSignInfo?.data) { | 240 | if (!refSignInfo?.data) { |
| 241 | refSignInfo?.msg && ElMessage.error(refSignInfo?.msg); | 241 | refSignInfo?.msg && ElMessage.error(refSignInfo?.msg); |
| 242 | return; | 242 | return; | ... | ... |
-
Please register or sign in to post a comment