api服务接口联调
Showing
10 changed files
with
267 additions
and
365 deletions
| ... | @@ -98,7 +98,7 @@ VITE_APP_CIRCULATION = https://daop-lt-test.zgsjzc.com/ | ... | @@ -98,7 +98,7 @@ VITE_APP_CIRCULATION = https://daop-lt-test.zgsjzc.com/ |
| 98 | VITE_APP_DATA_DELIVERY = https://daop-jgjf-test.zgsjzc.com/ | 98 | VITE_APP_DATA_DELIVERY = https://daop-jgjf-test.zgsjzc.com/ |
| 99 | 99 | ||
| 100 | #数据服务接口地址 | 100 | #数据服务接口地址 |
| 101 | VITE_APP_SERVICE_BASEURL = ms-daop-jgjf-data-open-service | 101 | VITE_APP_SERVICE_BASEURL = ms-daop-trust-api-service |
| 102 | 102 | ||
| 103 | # 本地访问地址 | 103 | # 本地访问地址 |
| 104 | # VITE_API_CIRCULATION_URL = http://localhost:9000/circulation | 104 | # VITE_API_CIRCULATION_URL = http://localhost:9000/circulation | ... | ... |
| ... | @@ -84,7 +84,7 @@ VITE_API_MESSAGE = ms-daop-message-service | ... | @@ -84,7 +84,7 @@ VITE_API_MESSAGE = ms-daop-message-service |
| 84 | VITE_APP_PERSONAL_URL = ms-daop-personel-service | 84 | VITE_APP_PERSONAL_URL = ms-daop-personel-service |
| 85 | 85 | ||
| 86 | #数据服务接口地址 | 86 | #数据服务接口地址 |
| 87 | VITE_APP_SERVICE_BASEURL = ms-daop-jgjf-data-open-service | 87 | VITE_APP_SERVICE_BASEURL = ms-daop-trust-api-service |
| 88 | 88 | ||
| 89 | #流通平台接口地址 | 89 | #流通平台接口地址 |
| 90 | VITE_APP_CIRCULATION = https://sz-lt.zgsjzc.com/ | 90 | VITE_APP_CIRCULATION = https://sz-lt.zgsjzc.com/ | ... | ... |
| ... | @@ -266,8 +266,8 @@ export const getSceneValidApiLabel = (isApiValid = false) => request({ | ... | @@ -266,8 +266,8 @@ export const getSceneValidApiLabel = (isApiValid = false) => request({ |
| 266 | }) | 266 | }) |
| 267 | 267 | ||
| 268 | /** 根据标签获取有效的api列表 */ | 268 | /** 根据标签获取有效的api列表 */ |
| 269 | export const getValidApi = (sceneGuid) => request({ | 269 | export const getValidApi = () => request({ |
| 270 | url: `${import.meta.env.VITE_APP_SERVICE_BASEURL}/api-base-info/list-valid?sceneGuid=${sceneGuid}`, | 270 | url: `${import.meta.env.VITE_APP_SERVICE_BASEURL}/api-base-info/activate-list`, |
| 271 | method: 'get' | 271 | method: 'get' |
| 272 | }) | 272 | }) |
| 273 | 273 | ... | ... |
| ... | @@ -77,11 +77,16 @@ const routes: RouteRecordRaw[] = [ | ... | @@ -77,11 +77,16 @@ const routes: RouteRecordRaw[] = [ |
| 77 | name: 'apiDetail', | 77 | name: 'apiDetail', |
| 78 | component: () => import('@/views/data_service/detail_serviceApi.vue'), | 78 | component: () => import('@/views/data_service/detail_serviceApi.vue'), |
| 79 | meta: { | 79 | meta: { |
| 80 | title: '流程详情', | 80 | title: '详情-', |
| 81 | sidebar: false, | 81 | sidebar: false, |
| 82 | breadcrumb: false, | 82 | breadcrumb: false, |
| 83 | cache: true, | 83 | cache: true, |
| 84 | reuse: true | 84 | reuse: true |
| 85 | }, | ||
| 86 | beforeEnter: (to, from) => { | ||
| 87 | if (to.query.guid) { | ||
| 88 | to.meta.title = `详情-${to.query.apiName}`; | ||
| 89 | } | ||
| 85 | } | 90 | } |
| 86 | }, | 91 | }, |
| 87 | { | 92 | { | ... | ... |
| ... | @@ -24,6 +24,10 @@ import { | ... | @@ -24,6 +24,10 @@ import { |
| 24 | getTenantList, | 24 | getTenantList, |
| 25 | getRegisterCatalogProductList | 25 | getRegisterCatalogProductList |
| 26 | } from "@/api/modules/dataAsset"; | 26 | } from "@/api/modules/dataAsset"; |
| 27 | import { | ||
| 28 | getValidApi, | ||
| 29 | apiTypes | ||
| 30 | } from "@/api/modules/dataService"; | ||
| 27 | import { ContentWrap } from '@/components/ContentWrap'; | 31 | import { ContentWrap } from '@/components/ContentWrap'; |
| 28 | import importTableField from "./importTableField.vue"; | 32 | import importTableField from "./importTableField.vue"; |
| 29 | import { useValidator } from '@/hooks/useValidator'; | 33 | import { useValidator } from '@/hooks/useValidator'; |
| ... | @@ -668,9 +672,11 @@ const productTableInfo = ref({ | ... | @@ -668,9 +672,11 @@ const productTableInfo = ref({ |
| 668 | fields: [ | 672 | fields: [ |
| 669 | { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" }, | 673 | { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" }, |
| 670 | { label: "服务名称", field: "apiGuid", width: 180, required: true, columClass: 'edit-colum', type: 'edit' }, | 674 | { label: "服务名称", field: "apiGuid", width: 180, required: true, columClass: 'edit-colum', type: 'edit' }, |
| 671 | { label: "API类型", field: "apiType", width: 100 }, | 675 | { label: "API类型", field: "apiType", width: 100, getName: (scope) => { |
| 672 | { label: "API地址", field: "requestUrl", width: 240 }, | 676 | return scope.row.apiType && apiTypes.find(a => a.value == scope.row.apiType)?.label; |
| 673 | { label: "描述", field: "apiDescription", width: 240 }, | 677 | } }, |
| 678 | { label: "API地址", field: "requestUrl", minWidth: 240 }, | ||
| 679 | { label: "描述", field: "apiDescription", width: 300 }, | ||
| 674 | ], | 680 | ], |
| 675 | editInfo: { | 681 | editInfo: { |
| 676 | apiGuid: { | 682 | apiGuid: { |
| ... | @@ -850,6 +856,11 @@ onBeforeMount(() => { | ... | @@ -850,6 +856,11 @@ onBeforeMount(() => { |
| 850 | baseInfoFormRef.value.ruleFormRef.clearValidate(['sceneDescription', 'subjectDomain', 'coverageAreas', 'isPublicData', 'dataSources', 'propertyDescription', 'sceneLimit']); | 856 | baseInfoFormRef.value.ruleFormRef.clearValidate(['sceneDescription', 'subjectDomain', 'coverageAreas', 'isPublicData', 'dataSources', 'propertyDescription', 'sceneLimit']); |
| 851 | }, 0); | 857 | }, 0); |
| 852 | assetDataTableInfo.value.data = detailInfo.value.damCatalogTableInfo; | 858 | assetDataTableInfo.value.data = detailInfo.value.damCatalogTableInfo; |
| 859 | productData.value = detailInfo.value.associationApiInfo?.map(d => { | ||
| 860 | d.apiGuid = d.guid; | ||
| 861 | return d; | ||
| 862 | }) || []; | ||
| 863 | productTableInfo.value.data = productData.value; | ||
| 853 | } else { | 864 | } else { |
| 854 | proxy.$ElMessage.error(res.msg); | 865 | proxy.$ElMessage.error(res.msg); |
| 855 | fullscreenLoading.value = false; | 866 | fullscreenLoading.value = false; |
| ... | @@ -960,6 +971,15 @@ onBeforeMount(() => { | ... | @@ -960,6 +971,15 @@ onBeforeMount(() => { |
| 960 | proxy.$ElMessage.error(res.msg); | 971 | proxy.$ElMessage.error(res.msg); |
| 961 | } | 972 | } |
| 962 | }) | 973 | }) |
| 974 | |||
| 975 | getValidApi().then((res: any) => { | ||
| 976 | if (res.code == proxy.$passCode) { | ||
| 977 | apiList.value = res.data || []; | ||
| 978 | productTableInfo.value.editInfo.apiGuid.options = apiList.value; | ||
| 979 | } else { | ||
| 980 | proxy.$ElMessage.error(res.msg); | ||
| 981 | } | ||
| 982 | }) | ||
| 963 | }); | 983 | }); |
| 964 | 984 | ||
| 965 | const cancel = () => { | 985 | const cancel = () => { | ... | ... |
| ... | @@ -19,6 +19,9 @@ import { | ... | @@ -19,6 +19,9 @@ import { |
| 19 | getCertificateDetail, | 19 | getCertificateDetail, |
| 20 | getRegisterCatalogDetailGuids | 20 | getRegisterCatalogDetailGuids |
| 21 | } from "@/api/modules/dataAsset"; | 21 | } from "@/api/modules/dataAsset"; |
| 22 | import { | ||
| 23 | apiTypes | ||
| 24 | } from "@/api/modules/dataService"; | ||
| 22 | import { changeNum } from '@/utils/common' | 25 | import { changeNum } from '@/utils/common' |
| 23 | import { ElMessage, ElMessageBox } from "element-plus"; | 26 | import { ElMessage, ElMessageBox } from "element-plus"; |
| 24 | import { passFlowData, rejectFlowData, revokeFlowData, isMyFirstNode } from "@/api/modules/workFlowService"; | 27 | import { passFlowData, rejectFlowData, revokeFlowData, isMyFirstNode } from "@/api/modules/workFlowService"; |
| ... | @@ -193,7 +196,7 @@ const getDetailInfo = () => { | ... | @@ -193,7 +196,7 @@ const getDetailInfo = () => { |
| 193 | detailInfo.value = data; | 196 | detailInfo.value = data; |
| 194 | publicDataProductsMainRSVO.value = detailInfo.value.publicDataProductsMainRSVO || {}; | 197 | publicDataProductsMainRSVO.value = detailInfo.value.publicDataProductsMainRSVO || {}; |
| 195 | //TODO. 返回服务包信息 | 198 | //TODO. 返回服务包信息 |
| 196 | productTableInfo.value.data = detailInfo.value.associationApiVO || []; | 199 | productTableInfo.value.data = detailInfo.value.associationApiInfo || []; |
| 197 | // detailInfo.value.damTypeName = damTypes.find(d => d.value == detailInfo.value.damType)?.label; | 200 | // detailInfo.value.damTypeName = damTypes.find(d => d.value == detailInfo.value.damType)?.label; |
| 198 | detailInfo.value.dataSourcesName = dataSourcesList.find(d => d.value == detailInfo.value.dataSources)?.label; | 201 | detailInfo.value.dataSourcesName = dataSourcesList.find(d => d.value == detailInfo.value.dataSources)?.label; |
| 199 | if (!isJSZQ.value) { | 202 | if (!isJSZQ.value) { |
| ... | @@ -328,8 +331,10 @@ const productTableInfo = ref({ | ... | @@ -328,8 +331,10 @@ const productTableInfo = ref({ |
| 328 | height: '214px', | 331 | height: '214px', |
| 329 | fields: [ | 332 | fields: [ |
| 330 | { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" }, | 333 | { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" }, |
| 331 | { label: "服务名称", field: "apiGuid", width: 180 }, | 334 | { label: "服务名称", field: "apiName", width: 180 }, |
| 332 | { label: "API类型", field: "apiType", width: 100 }, | 335 | { label: "API类型", field: "apiType", width: 100, getName: (scope) => { |
| 336 | return scope.row.apiType && apiTypes.find(a => a.value == scope.row.apiType)?.label; | ||
| 337 | } }, | ||
| 333 | { label: "API地址", field: "requestUrl", width: 240 }, | 338 | { label: "API地址", field: "requestUrl", width: 240 }, |
| 334 | { label: "描述", field: "apiDescription", width: 240 }, | 339 | { label: "描述", field: "apiDescription", width: 240 }, |
| 335 | ], | 340 | ], | ... | ... |
| ... | @@ -14,9 +14,9 @@ import { | ... | @@ -14,9 +14,9 @@ import { |
| 14 | // getDataTypeList, | 14 | // getDataTypeList, |
| 15 | // getPositionList, | 15 | // getPositionList, |
| 16 | // getOperationList, | 16 | // getOperationList, |
| 17 | getSubjectTableTree, | 17 | // getSubjectTableTree, |
| 18 | getSubjectTableByDomain, | 18 | // getSubjectTableByDomain, |
| 19 | getSubjectTableDetail, | 19 | // getSubjectTableDetail, |
| 20 | checkExistAPIName, | 20 | checkExistAPIName, |
| 21 | checkExistRequestPath, | 21 | checkExistRequestPath, |
| 22 | addApi, | 22 | addApi, |
| ... | @@ -144,23 +144,14 @@ const nextStep = (val) => { | ... | @@ -144,23 +144,14 @@ const nextStep = (val) => { |
| 144 | if (apiType.value == '1') { | 144 | if (apiType.value == '1') { |
| 145 | if (apiGuid.value && !targetDsFields.value.length) { | 145 | if (apiGuid.value && !targetDsFields.value.length) { |
| 146 | getTargetDatabaseList().then(() => { | 146 | getTargetDatabaseList().then(() => { |
| 147 | if (detailInfo.value.dataSourceType == 1) { | ||
| 148 | getSchemaTableData(detailInfo.value.dataSourceGuid).then(() => { | 147 | getSchemaTableData(detailInfo.value.dataSourceGuid).then(() => { |
| 149 | getBingFieldList(1, detailInfo.value.dataSourceGuid, detailInfo.value.tableName, false); | 148 | getBingFieldList(detailInfo.value.dataSourceGuid, detailInfo.value.tableName, false); |
| 150 | }); | 149 | }); |
| 151 | } else { | ||
| 152 | currDsInfo.value.subjectDomainGuid = detailInfo.value.subjectDomainGuid; | ||
| 153 | currDsInfo.value.subjectDomainName = detailInfo.value.subjectDomainName; | ||
| 154 | currDsInfo.value.directoryGuid = detailInfo.value.directoryGuid; | ||
| 155 | getSubjectDomainData(detailInfo.value.subjectDomainGuid).then(() => { | ||
| 156 | getBingFieldList(2, detailInfo.value.dataSourceGuid, detailInfo.value.tableGuid, false); | ||
| 157 | }); | ||
| 158 | } | ||
| 159 | }); | 150 | }); |
| 160 | } else { | 151 | } else { |
| 161 | getTargetDatabaseList(); | 152 | getTargetDatabaseList(); |
| 162 | } | 153 | } |
| 163 | getMatchTableList(); | 154 | // getMatchTableList(); |
| 164 | } else if (apiType.value == '2') { | 155 | } else if (apiType.value == '2') { |
| 165 | getTargetDatabaseList(); | 156 | getTargetDatabaseList(); |
| 166 | } | 157 | } |
| ... | @@ -613,27 +604,28 @@ const baseFormItems = ref([{ | ... | @@ -613,27 +604,28 @@ const baseFormItems = ref([{ |
| 613 | filterable: true, | 604 | filterable: true, |
| 614 | // disabled: true, | 605 | // disabled: true, |
| 615 | required: true | 606 | required: true |
| 616 | }, { | ||
| 617 | label: '安全认证', | ||
| 618 | type: 'select', | ||
| 619 | options: [{ | ||
| 620 | value: 'T', | ||
| 621 | label: 'TOKEN认证' | ||
| 622 | }, | ||
| 623 | // { | ||
| 624 | // value: 'N', | ||
| 625 | // label: '无认证' | ||
| 626 | // } | ||
| 627 | ], | ||
| 628 | placeholder: '请选择', | ||
| 629 | field: 'authenticationType', | ||
| 630 | default: 'T', | ||
| 631 | clearable: true, | ||
| 632 | filterable: true, | ||
| 633 | disabled: true, | ||
| 634 | required: true | ||
| 635 | }, | 607 | }, |
| 636 | // { | 608 | // { |
| 609 | // label: '安全认证', | ||
| 610 | // type: 'select', | ||
| 611 | // options: [{ | ||
| 612 | // value: 'T', | ||
| 613 | // label: 'TOKEN认证' | ||
| 614 | // }, | ||
| 615 | // // { | ||
| 616 | // // value: 'N', | ||
| 617 | // // label: '无认证' | ||
| 618 | // // } | ||
| 619 | // ], | ||
| 620 | // placeholder: '请选择', | ||
| 621 | // field: 'authenticationType', | ||
| 622 | // default: 'T', | ||
| 623 | // clearable: true, | ||
| 624 | // filterable: true, | ||
| 625 | // disabled: true, | ||
| 626 | // required: true | ||
| 627 | // }, | ||
| 628 | // { | ||
| 637 | // label: "IP白名单", | 629 | // label: "IP白名单", |
| 638 | // type: "select", | 630 | // type: "select", |
| 639 | // placeholder: "请选择", | 631 | // placeholder: "请选择", |
| ... | @@ -958,17 +950,17 @@ const getTargetDatabaseList = () => { | ... | @@ -958,17 +950,17 @@ const getTargetDatabaseList = () => { |
| 958 | } | 950 | } |
| 959 | 951 | ||
| 960 | /** 获取 数据目录主题域列表 */ | 952 | /** 获取 数据目录主题域列表 */ |
| 961 | const matchtableList: any = ref([]); | 953 | // const matchtableList: any = ref([]); |
| 962 | const getMatchTableList = () => { | 954 | // const getMatchTableList = () => { |
| 963 | getSubjectTableTree({}).then((res: any) => { | 955 | // getSubjectTableTree({}).then((res: any) => { |
| 964 | if (res.code === proxy.$passCode) { | 956 | // if (res.code === proxy.$passCode) { |
| 965 | matchtableList.value = res.data || [] | 957 | // matchtableList.value = res.data || [] |
| 966 | tableFormItems.value[2].options = matchtableList.value; | 958 | // tableFormItems.value[2].options = matchtableList.value; |
| 967 | } else { | 959 | // } else { |
| 968 | proxy.$ElMessage.error(res.msg); | 960 | // proxy.$ElMessage.error(res.msg); |
| 969 | } | 961 | // } |
| 970 | }) | 962 | // }) |
| 971 | } | 963 | // } |
| 972 | 964 | ||
| 973 | /** 数据源选择表单组件 */ | 965 | /** 数据源选择表单组件 */ |
| 974 | const tableInfoFormRef = ref(); | 966 | const tableInfoFormRef = ref(); |
| ... | @@ -981,9 +973,11 @@ const tableFormItems = ref([{ | ... | @@ -981,9 +973,11 @@ const tableFormItems = ref([{ |
| 981 | field: "dataSourceType", | 973 | field: "dataSourceType", |
| 982 | options: [ | 974 | options: [ |
| 983 | { label: "数据源", value: 1 }, | 975 | { label: "数据源", value: 1 }, |
| 984 | { label: "数据目录", value: 2 } | 976 | // { label: "数据目录", value: 2 } |
| 985 | ], | 977 | ], |
| 986 | default: 1, | 978 | default: 1, |
| 979 | disabled: true, | ||
| 980 | visible: false, | ||
| 987 | required: true, | 981 | required: true, |
| 988 | }, { | 982 | }, { |
| 989 | label: "数据源", | 983 | label: "数据源", |
| ... | @@ -1006,7 +1000,8 @@ const tableFormItems = ref([{ | ... | @@ -1006,7 +1000,8 @@ const tableFormItems = ref([{ |
| 1006 | type: "tree-select", | 1000 | type: "tree-select", |
| 1007 | placeholder: "请选择", | 1001 | placeholder: "请选择", |
| 1008 | field: "subjectDomainGuid", | 1002 | field: "subjectDomainGuid", |
| 1009 | options: matchtableList.value, | 1003 | options: [], |
| 1004 | //options: matchtableList.value, | ||
| 1010 | lazy: false, | 1005 | lazy: false, |
| 1011 | expandKeys: [], | 1006 | expandKeys: [], |
| 1012 | props: { | 1007 | props: { |
| ... | @@ -1035,7 +1030,8 @@ const tableFormItems = ref([{ | ... | @@ -1035,7 +1030,8 @@ const tableFormItems = ref([{ |
| 1035 | filterable: true, | 1030 | filterable: true, |
| 1036 | clearable: true, | 1031 | clearable: true, |
| 1037 | required: true, | 1032 | required: true, |
| 1038 | }, { | 1033 | }, |
| 1034 | { | ||
| 1039 | label: "数据表", | 1035 | label: "数据表", |
| 1040 | type: "select", | 1036 | type: "select", |
| 1041 | placeholder: "请选择", | 1037 | placeholder: "请选择", |
| ... | @@ -1050,14 +1046,15 @@ const tableFormItems = ref([{ | ... | @@ -1050,14 +1046,15 @@ const tableFormItems = ref([{ |
| 1050 | clearable: true, | 1046 | clearable: true, |
| 1051 | visible: false, | 1047 | visible: false, |
| 1052 | required: true, | 1048 | required: true, |
| 1053 | }]); | 1049 | } |
| 1050 | ]); | ||
| 1054 | 1051 | ||
| 1055 | /** 数据源选择表单配置规则。 */ | 1052 | /** 数据源选择表单配置规则。 */ |
| 1056 | const tableFormRules = ref({ | 1053 | const tableFormRules = ref({ |
| 1057 | dataSourceGuid: [required("请选择数据源")], | 1054 | dataSourceGuid: [required("请选择数据源")], |
| 1058 | subjectDomainGuid: [required("请选择数据源")], | 1055 | // subjectDomainGuid: [required("请选择数据源")], |
| 1059 | tableName: [required("请选择数据表")], | 1056 | tableName: [required("请选择数据表")], |
| 1060 | tableGuid: [required("请选择数据表")], | 1057 | // tableGuid: [required("请选择数据表")], |
| 1061 | }); | 1058 | }); |
| 1062 | 1059 | ||
| 1063 | /** 单表API当前选择的数据源信息 */ | 1060 | /** 单表API当前选择的数据源信息 */ |
| ... | @@ -1093,11 +1090,13 @@ const handleTableFormSelectChange = (val, row, formInfo) => { | ... | @@ -1093,11 +1090,13 @@ const handleTableFormSelectChange = (val, row, formInfo) => { |
| 1093 | } | 1090 | } |
| 1094 | handleTableFormSelectChange('', { field: 'tableName' }, formInfo); | 1091 | handleTableFormSelectChange('', { field: 'tableName' }, formInfo); |
| 1095 | sqlIsChecked.value = false; | 1092 | sqlIsChecked.value = false; |
| 1096 | } else if (row.field == 'subjectDomainGuid') { | 1093 | } |
| 1097 | tableFormItems.value[4].default = '';//清空数据表。重新显示下拉框表数据。 | 1094 | // else if (row.field == 'subjectDomainGuid') { |
| 1098 | tableFormItems.value[2].default = val; | 1095 | // tableFormItems.value[4].default = '';//清空数据表。重新显示下拉框表数据。 |
| 1099 | getSubjectDomainData(val); | 1096 | // tableFormItems.value[2].default = val; |
| 1100 | } else if (row.field == 'tableName' || row.field == 'tableGuid') { | 1097 | // getSubjectDomainData(val); |
| 1098 | // } | ||
| 1099 | else if (row.field == 'tableName' || row.field == 'tableGuid') { | ||
| 1101 | if (!val) { | 1100 | if (!val) { |
| 1102 | targetDsFields.value = []; | 1101 | targetDsFields.value = []; |
| 1103 | requestParamsTableInfo.value.editInfo.boundField.options = targetDsFields.value; | 1102 | requestParamsTableInfo.value.editInfo.boundField.options = targetDsFields.value; |
| ... | @@ -1119,7 +1118,7 @@ const handleTableFormSelectChange = (val, row, formInfo) => { | ... | @@ -1119,7 +1118,7 @@ const handleTableFormSelectChange = (val, row, formInfo) => { |
| 1119 | } | 1118 | } |
| 1120 | }) | 1119 | }) |
| 1121 | } else { | 1120 | } else { |
| 1122 | getBingFieldList(formInfo.dataSourceType, formInfo.dataSourceGuid, formInfo[row.field]); | 1121 | getBingFieldList(formInfo.dataSourceGuid, formInfo[row.field]); |
| 1123 | } | 1122 | } |
| 1124 | } | 1123 | } |
| 1125 | } | 1124 | } |
| ... | @@ -1162,26 +1161,24 @@ const getSchemaTableData = (dsGuid) => { | ... | @@ -1162,26 +1161,24 @@ const getSchemaTableData = (dsGuid) => { |
| 1162 | } | 1161 | } |
| 1163 | 1162 | ||
| 1164 | /** 获取数据目录列表 */ | 1163 | /** 获取数据目录列表 */ |
| 1165 | const getSubjectDomainData = (val) => { | 1164 | // const getSubjectDomainData = (val) => { |
| 1166 | return getSubjectTableByDomain(val).then((res: any) => { | 1165 | // return getSubjectTableByDomain(val).then((res: any) => { |
| 1167 | if (res.code == proxy.$passCode) { | 1166 | // if (res.code == proxy.$passCode) { |
| 1168 | dsTableList.value = res.data?.map(r => { | 1167 | // dsTableList.value = res.data?.map(r => { |
| 1169 | r.label = r.chName ? (r.chName + `(${r.enName})`) : r.enName; | 1168 | // r.label = r.chName ? (r.chName + `(${r.enName})`) : r.enName; |
| 1170 | r.value = r.guid; | 1169 | // r.value = r.guid; |
| 1171 | return r; | 1170 | // return r; |
| 1172 | }) || []; | 1171 | // }) || []; |
| 1173 | tableFormItems.value[4].options = dsTableList.value | 1172 | // tableFormItems.value[4].options = dsTableList.value |
| 1174 | } else { | 1173 | // } else { |
| 1175 | proxy.$ElMessage.error(res.msg); | 1174 | // proxy.$ElMessage.error(res.msg); |
| 1176 | } | 1175 | // } |
| 1177 | }) | 1176 | // }) |
| 1178 | } | 1177 | // } |
| 1179 | 1178 | ||
| 1180 | /** 获取绑定字段列表 */ | 1179 | /** 获取绑定字段列表 */ |
| 1181 | const getBingFieldList = (dataSourceType, dataSourceGuid, tableName, isSelectChange = true) => { | 1180 | const getBingFieldList = (dataSourceGuid, tableName, isSelectChange = true) => { |
| 1182 | /** 表选择变化,对应的绑定字段列表会变化,那么请求参数,返回参数,排序参数,需要判断,不在当前字段列表中就清除。 */ | 1181 | /** 表选择变化,对应的绑定字段列表会变化,那么请求参数,返回参数,排序参数,需要判断,不在当前字段列表中就清除。 */ |
| 1183 | if (dataSourceType == 1) {//数据源的表 | ||
| 1184 | // 此处跟数据同步那里不同,因为用户可以不使用数据目录模块。 | ||
| 1185 | tableColumnList({ | 1182 | tableColumnList({ |
| 1186 | dataSourceGuid: dataSourceGuid, | 1183 | dataSourceGuid: dataSourceGuid, |
| 1187 | database: currDsInfo.value.databaseNameEn, | 1184 | database: currDsInfo.value.databaseNameEn, |
| ... | @@ -1219,22 +1216,6 @@ const getBingFieldList = (dataSourceType, dataSourceGuid, tableName, isSelectCha | ... | @@ -1219,22 +1216,6 @@ const getBingFieldList = (dataSourceType, dataSourceGuid, tableName, isSelectCha |
| 1219 | proxy.$ElMessage.error(res.msg); | 1216 | proxy.$ElMessage.error(res.msg); |
| 1220 | } | 1217 | } |
| 1221 | }) | 1218 | }) |
| 1222 | } else { //数据目录的表 | ||
| 1223 | getSubjectTableDetail(tableName).then((res: any) => { | ||
| 1224 | if (res.code == proxy.$passCode) { | ||
| 1225 | targetDsFields.value = res.data.subjectFieldVOS?.map(r => { | ||
| 1226 | r.value = r.enName, | ||
| 1227 | r.label = r.enName + (r.chName ? `(${r.chName})` : ''); | ||
| 1228 | return r | ||
| 1229 | }) || []; | ||
| 1230 | requestParamsTableInfo.value.editInfo.boundField.options = targetDsFields.value; | ||
| 1231 | responseParamsTableInfo.value.editInfo.boundField.options = targetDsFields.value; | ||
| 1232 | sortParamsTableInfo.value.editInfo.boundField.options = targetDsFields.value; | ||
| 1233 | } else { | ||
| 1234 | proxy.$ElMessage.error(res.msg); | ||
| 1235 | } | ||
| 1236 | }) | ||
| 1237 | } | ||
| 1238 | } | 1219 | } |
| 1239 | 1220 | ||
| 1240 | const requestParamsTableInfoRef = ref(); | 1221 | const requestParamsTableInfoRef = ref(); |
| ... | @@ -1513,11 +1494,7 @@ const addresponseParams = () => { | ... | @@ -1513,11 +1494,7 @@ const addresponseParams = () => { |
| 1513 | const handleresponseParamselectChange = (val, scope, item) => { | 1494 | const handleresponseParamselectChange = (val, scope, item) => { |
| 1514 | if (item.field == 'boundField') { | 1495 | if (item.field == 'boundField') { |
| 1515 | scope.row.paramName = val; | 1496 | scope.row.paramName = val; |
| 1516 | if (tableInfoFormRef.value.formInline.dataSourceType == 1) { | ||
| 1517 | scope.row.dataType = targetDsFields.value.find(t => t.columnName == val)?.dataType; | 1497 | scope.row.dataType = targetDsFields.value.find(t => t.columnName == val)?.dataType; |
| 1518 | } else { | ||
| 1519 | scope.row.dataType = targetDsFields.value.find(t => t.enName == val)?.dataType; | ||
| 1520 | } | ||
| 1521 | } | 1498 | } |
| 1522 | } | 1499 | } |
| 1523 | 1500 | ||
| ... | @@ -2361,10 +2338,10 @@ onBeforeMount(() => { | ... | @@ -2361,10 +2338,10 @@ onBeforeMount(() => { |
| 2361 | }); | 2338 | }); |
| 2362 | if (apiType.value == '1') { | 2339 | if (apiType.value == '1') { |
| 2363 | getParamOperatorList(); | 2340 | getParamOperatorList(); |
| 2364 | tableFormItems.value[1].visible = data.dataSourceType == 1; | 2341 | tableFormItems.value[1].visible = true; |
| 2365 | tableFormItems.value[3].visible = data.dataSourceType == 1; | 2342 | tableFormItems.value[3].visible = true; |
| 2366 | tableFormItems.value[2].visible = data.dataSourceType == 2; | 2343 | tableFormItems.value[2].visible = false; |
| 2367 | tableFormItems.value[4].visible = data.dataSourceType == 2; | 2344 | tableFormItems.value[4].visible = false; |
| 2368 | } else if (apiType.value == '3') { | 2345 | } else if (apiType.value == '3') { |
| 2369 | backApiFormItems.value.forEach(item => { | 2346 | backApiFormItems.value.forEach(item => { |
| 2370 | item.default = data[item.field]; | 2347 | item.default = data[item.field]; |
| ... | @@ -2381,17 +2358,17 @@ onBeforeMount(() => { | ... | @@ -2381,17 +2358,17 @@ onBeforeMount(() => { |
| 2381 | sql: sqlFormItems.value[0].default, | 2358 | sql: sqlFormItems.value[0].default, |
| 2382 | params: inputParamsData.value.map(i => i.paramName) | 2359 | params: inputParamsData.value.map(i => i.paramName) |
| 2383 | }; | 2360 | }; |
| 2384 | let { approveVO } = data; | 2361 | // let { approveVO } = data; |
| 2385 | bizApproveVO.value = data.approveVO; | 2362 | // bizApproveVO.value = data.approveVO; |
| 2386 | if (approveVO && (approveVO.approveState == 'N' || approveVO.approveState == 'C' || approveVO.approveState == 'R')) { | 2363 | // if (approveVO && (approveVO.approveState == 'N' || approveVO.approveState == 'C' || approveVO.approveState == 'R')) { |
| 2387 | getCamundaDeploymentId('10023').then((res: any) => { | 2364 | // getCamundaDeploymentId('10023').then((res: any) => { |
| 2388 | if (res.code == proxy.$passCode) { | 2365 | // if (res.code == proxy.$passCode) { |
| 2389 | deploymentId.value = res.data; | 2366 | // deploymentId.value = res.data; |
| 2390 | } else { | 2367 | // } else { |
| 2391 | proxy.$ElMessage.error(res.msg); | 2368 | // proxy.$ElMessage.error(res.msg); |
| 2392 | } | 2369 | // } |
| 2393 | }) | 2370 | // }) |
| 2394 | } | 2371 | // } |
| 2395 | } else { | 2372 | } else { |
| 2396 | apiType.value = '1'; | 2373 | apiType.value = '1'; |
| 2397 | proxy.$ElMessage.error(res.msg); | 2374 | proxy.$ElMessage.error(res.msg); |
| ... | @@ -2399,17 +2376,17 @@ onBeforeMount(() => { | ... | @@ -2399,17 +2376,17 @@ onBeforeMount(() => { |
| 2399 | }); | 2376 | }); |
| 2400 | } else { | 2377 | } else { |
| 2401 | // baseFormItems.value[4].default = sceneName.value | 2378 | // baseFormItems.value[4].default = sceneName.value |
| 2402 | getCamundaDeploymentId('10023').then((res: any) => { | 2379 | // getCamundaDeploymentId('10023').then((res: any) => { |
| 2403 | if (res.code == proxy.$passCode) { | 2380 | // if (res.code == proxy.$passCode) { |
| 2404 | deploymentId.value = res.data; | 2381 | // deploymentId.value = res.data; |
| 2405 | } else { | 2382 | // } else { |
| 2406 | proxy.$ElMessage.error(res.msg); | 2383 | // proxy.$ElMessage.error(res.msg); |
| 2407 | } | 2384 | // } |
| 2408 | }) | 2385 | // }) |
| 2409 | if (apiType.value == '1') { | 2386 | if (apiType.value == '1') { |
| 2410 | getParamOperatorList(); | 2387 | getParamOperatorList(); |
| 2411 | } | 2388 | } |
| 2412 | let item = baseFormItems.value.find(b => b.field == 'authenticationType'); | 2389 | //let item = baseFormItems.value.find(b => b.field == 'authenticationType'); |
| 2413 | // item && (item.disabled = apiType.value == '3'); | 2390 | // item && (item.disabled = apiType.value == '3'); |
| 2414 | } | 2391 | } |
| 2415 | }) | 2392 | }) |
| ... | @@ -2470,16 +2447,16 @@ const startTestApi = () => { | ... | @@ -2470,16 +2447,16 @@ const startTestApi = () => { |
| 2470 | } | 2447 | } |
| 2471 | dataIndex++; | 2448 | dataIndex++; |
| 2472 | } | 2449 | } |
| 2473 | let params = { ...baseInfoFormRef.value?.formInline, ...tableInfoFormRef.value?.formInline, dataSourceName: currDsInfo.value.databaseNameZh, requestAgreement: 'https' }; | 2450 | let params = { ...baseInfoFormRef.value?.formInline, ...tableInfoFormRef.value?.formInline, dataSourceName: currDsInfo.value.databaseNameZh, requestAgreement: 'https', dataSourceType: 1 }; |
| 2474 | if (params.apiType == '1') { | 2451 | // if (params.apiType == '1') { |
| 2475 | if (params.dataSourceType == 2) { | 2452 | // if (params.dataSourceType == 2) { |
| 2476 | params.directoryGuid = currDsInfo.value.directoryGuid; | 2453 | // params.directoryGuid = currDsInfo.value.directoryGuid; |
| 2477 | params.subjectDomainName = currDsInfo.value.subjectDomainName; | 2454 | // params.subjectDomainName = currDsInfo.value.subjectDomainName; |
| 2478 | let dsTable = dsTableList.value.find(d => d.value == params.tableGuid); | 2455 | // let dsTable = dsTableList.value.find(d => d.value == params.tableGuid); |
| 2479 | params.dataSourceGuid = dsTable.dataSourceGuid; | 2456 | // params.dataSourceGuid = dsTable.dataSourceGuid; |
| 2480 | params.tableName = dsTable.enName; | 2457 | // params.tableName = dsTable.enName; |
| 2481 | } | 2458 | // } |
| 2482 | } | 2459 | // } |
| 2483 | let defaultParamsDataInfo = defaultParamsTableInfo.value.data; | 2460 | let defaultParamsDataInfo = defaultParamsTableInfo.value.data; |
| 2484 | if (defaultParamsDataInfo.length == 3 && !defaultParamsDataInfo[2].value) { | 2461 | if (defaultParamsDataInfo.length == 3 && !defaultParamsDataInfo[2].value) { |
| 2485 | proxy.$ElMessage.error(`请填写参数appKey`); | 2462 | proxy.$ElMessage.error(`请填写参数appKey`); |
| ... | @@ -2550,31 +2527,17 @@ const startTestApi = () => { | ... | @@ -2550,31 +2527,17 @@ const startTestApi = () => { |
| 2550 | 2527 | ||
| 2551 | /** 提交新增API. */ | 2528 | /** 提交新增API. */ |
| 2552 | const save = (isSubmit: boolean = false) => { | 2529 | const save = (isSubmit: boolean = false) => { |
| 2553 | let params = { isSubmit: isSubmit ? 'Y' : 'N', ...baseInfoFormRef.value?.formInline, ...tableInfoFormRef.value?.formInline, dataSourceName: currDsInfo.value.databaseNameZh, requestAgreement: 'https' }; | 2530 | let params = { isSubmit: isSubmit ? 'Y' : 'N', ...baseInfoFormRef.value?.formInline, ...tableInfoFormRef.value?.formInline, dataSourceType: 1, dataSourceName: currDsInfo.value.databaseNameZh, requestAgreement: 'https' }; |
| 2554 | params.immediateApprove = isSubmit | 2531 | params.immediateApprove = isSubmit |
| 2555 | if (params.apiType == '1') { | 2532 | // if (params.apiType == '1') { |
| 2556 | if (params.dataSourceType == 2) { | 2533 | // if (params.dataSourceType == 2) { |
| 2557 | params.directoryGuid = currDsInfo.value.directoryGuid; | 2534 | // params.directoryGuid = currDsInfo.value.directoryGuid; |
| 2558 | params.subjectDomainName = currDsInfo.value.subjectDomainName; | 2535 | // params.subjectDomainName = currDsInfo.value.subjectDomainName; |
| 2559 | let dsTable = dsTableList.value.find(d => d.value == params.tableGuid); | 2536 | // let dsTable = dsTableList.value.find(d => d.value == params.tableGuid); |
| 2560 | params.dataSourceGuid = dsTable.dataSourceGuid; | 2537 | // params.dataSourceGuid = dsTable.dataSourceGuid; |
| 2561 | params.tableName = dsTable.enName; | 2538 | // params.tableName = dsTable.enName; |
| 2562 | } | ||
| 2563 | } | ||
| 2564 | /** 验证输入的query值, query参数的值应该不用存储 */ | ||
| 2565 | // let queryParamData: any[] = queryParamsTableInfo.value.data; | ||
| 2566 | // let dataIndex = 1; | ||
| 2567 | // for (const d of queryParamData) { | ||
| 2568 | // if (d.introductionValue && checkValidValue[d.dataType]) { | ||
| 2569 | // let v = checkValidValue[d.dataType](d.introductionValue, d.isManyValue == 'Y'); | ||
| 2570 | // if (v !== true) { | ||
| 2571 | // proxy.$ElMessage.error(`第 ${dataIndex} 个参数类型为${v},请输入合法的值`); | ||
| 2572 | // return; | ||
| 2573 | // } | 2539 | // } |
| 2574 | // } | 2540 | // } |
| 2575 | // dataIndex++; | ||
| 2576 | // } | ||
| 2577 | |||
| 2578 | let apiConfigAccessDTOS: any[] = []; | 2541 | let apiConfigAccessDTOS: any[] = []; |
| 2579 | if (apiType.value != '2') { //单表API | 2542 | if (apiType.value != '2') { //单表API |
| 2580 | inputParamsData.value.forEach(i => { | 2543 | inputParamsData.value.forEach(i => { |
| ... | @@ -2622,7 +2585,7 @@ const save = (isSubmit: boolean = false) => { | ... | @@ -2622,7 +2585,7 @@ const save = (isSubmit: boolean = false) => { |
| 2622 | addApi(params).then((res: any) => { | 2585 | addApi(params).then((res: any) => { |
| 2623 | fullscreenLoading.value = false; | 2586 | fullscreenLoading.value = false; |
| 2624 | if (res.code == proxy.$passCode) { | 2587 | if (res.code == proxy.$passCode) { |
| 2625 | proxy.$ElMessage.success(!isSubmit ? '新建API保存成功' : '新建API保存并提交成功'); | 2588 | proxy.$ElMessage.success(!isSubmit ? '新建API保存成功' : '新建API提交成功'); |
| 2626 | router.push({ | 2589 | router.push({ |
| 2627 | name: 'apiManagement' | 2590 | name: 'apiManagement' |
| 2628 | }); | 2591 | }); |
| ... | @@ -2637,7 +2600,7 @@ const save = (isSubmit: boolean = false) => { | ... | @@ -2637,7 +2600,7 @@ const save = (isSubmit: boolean = false) => { |
| 2637 | updateApi(params).then((res: any) => { | 2600 | updateApi(params).then((res: any) => { |
| 2638 | fullscreenLoading.value = false; | 2601 | fullscreenLoading.value = false; |
| 2639 | if (res.code == proxy.$passCode) { | 2602 | if (res.code == proxy.$passCode) { |
| 2640 | proxy.$ElMessage.success(!isSubmit ? 'API编辑保存成功' : 'API编辑保存并提交成功'); | 2603 | proxy.$ElMessage.success(!isSubmit ? 'API编辑保存成功' : 'API编辑成功'); |
| 2641 | router.push({ | 2604 | router.push({ |
| 2642 | name: 'apiManagement' | 2605 | name: 'apiManagement' |
| 2643 | }); | 2606 | }); |
| ... | @@ -2765,11 +2728,11 @@ const cancel = () => { | ... | @@ -2765,11 +2728,11 @@ const cancel = () => { |
| 2765 | <Form ref="resultInfoFormRef" :itemList="resultFormItems" formId="result-base-form" col="col2" /> | 2728 | <Form ref="resultInfoFormRef" :itemList="resultFormItems" formId="result-base-form" col="col2" /> |
| 2766 | </ContentWrap> | 2729 | </ContentWrap> |
| 2767 | </div> | 2730 | </div> |
| 2768 | <ContentWrap title="流程审批" v-show="needApprove" description="" :isExpand="flowExpand" :expand-swicth="true" class="mt16" | 2731 | <!-- <ContentWrap title="流程审批" v-show="needApprove" description="" :isExpand="flowExpand" :expand-swicth="true" |
| 2769 | @expand="(v) => flowExpand = v"> | 2732 | class="mt16" @expand="(v) => flowExpand = v"> |
| 2770 | <ApprovalProcess v-if="deploymentId" :deploymentId="deploymentId" :definitionId="''"> | 2733 | <ApprovalProcess v-if="deploymentId" :deploymentId="deploymentId" :definitionId="''"> |
| 2771 | </ApprovalProcess> | 2734 | </ApprovalProcess> |
| 2772 | </ContentWrap> | 2735 | </ContentWrap> --> |
| 2773 | </div> | 2736 | </div> |
| 2774 | <!-- <FlowBtnGroup v-show="step == 2" pageType="add" :approveVO="bizApproveVO" @save="save"></FlowBtnGroup> --> | 2737 | <!-- <FlowBtnGroup v-show="step == 2" pageType="add" :approveVO="bizApproveVO" @save="save"></FlowBtnGroup> --> |
| 2775 | <div class="bottom_tool_wrap"> | 2738 | <div class="bottom_tool_wrap"> |
| ... | @@ -2785,8 +2748,8 @@ const cancel = () => { | ... | @@ -2785,8 +2748,8 @@ const cancel = () => { |
| 2785 | <template v-else> | 2748 | <template v-else> |
| 2786 | <el-button @click="cancel">取消</el-button> | 2749 | <el-button @click="cancel">取消</el-button> |
| 2787 | <el-button type="primary" @click="previousStep(2)">上一步</el-button> | 2750 | <el-button type="primary" @click="previousStep(2)">上一步</el-button> |
| 2788 | <el-button v-if="!isDetail" type="primary" @click="save()">保存</el-button> | 2751 | <!-- <el-button v-if="!isDetail" type="primary" @click="save()">保存</el-button> --> |
| 2789 | <el-button v-if="!isDetail" type="primary" @click="save(true)">保存并提交</el-button> | 2752 | <el-button v-if="!isDetail" type="primary" @click="save(true)">提交</el-button> |
| 2790 | </template> | 2753 | </template> |
| 2791 | <!-- <template v-if="pageType == 'add'"> | 2754 | <!-- <template v-if="pageType == 'add'"> |
| 2792 | <template v-if="approveVO && approveVO.approveState == 'N'"> | 2755 | <template v-if="approveVO && approveVO.approveState == 'N'"> | ... | ... |
| ... | @@ -66,21 +66,22 @@ const tableSearchItemList: any = ref([ | ... | @@ -66,21 +66,22 @@ const tableSearchItemList: any = ref([ |
| 66 | placeholder: 'API类型', | 66 | placeholder: 'API类型', |
| 67 | options: apiTypes, | 67 | options: apiTypes, |
| 68 | clearable: true | 68 | clearable: true |
| 69 | }, { | 69 | }, |
| 70 | type: 'select', | 70 | // { |
| 71 | label: '', | 71 | // type: 'select', |
| 72 | field: 'approveState', | 72 | // label: '', |
| 73 | default: '', | 73 | // field: 'approveState', |
| 74 | placeholder: '全部状态', | 74 | // default: '', |
| 75 | options: [ | 75 | // placeholder: '全部状态', |
| 76 | { label: '草稿中', value: 'N' }, | 76 | // options: [ |
| 77 | { label: '审批中', value: 'A' }, | 77 | // { label: '草稿中', value: 'N' }, |
| 78 | { label: '已通过', value: 'Y' }, | 78 | // { label: '审批中', value: 'A' }, |
| 79 | { label: '已驳回', value: 'R' }, | 79 | // { label: '已通过', value: 'Y' }, |
| 80 | { label: '已撤销', value: 'C' }, | 80 | // { label: '已驳回', value: 'R' }, |
| 81 | ], | 81 | // { label: '已撤销', value: 'C' }, |
| 82 | clearable: true | 82 | // ], |
| 83 | } | 83 | // clearable: true |
| 84 | // } | ||
| 84 | ]); | 85 | ]); |
| 85 | 86 | ||
| 86 | const getTableData = () => { | 87 | const getTableData = () => { |
| ... | @@ -163,14 +164,15 @@ const tableInfo = ref({ | ... | @@ -163,14 +164,15 @@ const tableInfo = ref({ |
| 163 | }, | 164 | }, |
| 164 | { label: "API请求路径", field: "requestUrl", width: TableColumnWidth.DESCRIPTION }, | 165 | { label: "API请求路径", field: "requestUrl", width: TableColumnWidth.DESCRIPTION }, |
| 165 | { | 166 | { |
| 166 | label: '状态', field: 'apiState', type: 'switch', activeText: '启用', inactiveText: '停用', activeValue: 1, inactiveValue: 0, switchWidth: 56, width: 96, align: 'center', isDisabled: (scope) => { | 167 | label: '状态', field: 'apiState', type: 'switch', activeText: '启用', inactiveText: '停用', activeValue: 1, inactiveValue: 0, switchWidth: 56, width: 96, align: 'center' |
| 167 | if (scope.row.apiState == 1 && scope.row.bindingCount > 0) {//被授权的不能禁用。 | 168 | // , isDisabled: (scope) => { |
| 168 | return true; | 169 | // if (scope.row.apiState == 1) {//被授权的不能禁用。 |
| 169 | } | 170 | // return true; |
| 170 | return scope.row.approveState != 'Y';//正在审批中的不能停用。草稿中的不能启用。 | 171 | // } |
| 171 | } | 172 | // return scope.row.approveState != 'Y';//正在审批中的不能停用。草稿中的不能启用。 |
| 173 | // } | ||
| 172 | }, | 174 | }, |
| 173 | { label: "审批状态", field: "approveState", type: "tag", width: TableColumnWidth.STATE, align: 'center' }, | 175 | // { label: "审批状态", field: "approveState", type: "tag", width: TableColumnWidth.STATE, align: 'center' }, |
| 174 | { label: "API描述", field: "apiDescription", width: TableColumnWidth.DESCRIPTION }, | 176 | { label: "API描述", field: "apiDescription", width: TableColumnWidth.DESCRIPTION }, |
| 175 | { label: "修改人", field: "updateUserName", width: TableColumnWidth.USERNAME }, | 177 | { label: "修改人", field: "updateUserName", width: TableColumnWidth.USERNAME }, |
| 176 | { label: "修改时间", field: "updateTime", width: 170 }, | 178 | { label: "修改时间", field: "updateTime", width: 170 }, |
| ... | @@ -185,12 +187,12 @@ const tableInfo = ref({ | ... | @@ -185,12 +187,12 @@ const tableInfo = ref({ |
| 185 | label: "操作", | 187 | label: "操作", |
| 186 | type: "btn", | 188 | type: "btn", |
| 187 | isMore: false, | 189 | isMore: false, |
| 188 | width: 200, | 190 | width: 180, |
| 189 | btns: (scope) => { | 191 | btns: (scope) => { |
| 190 | const { row } = scope; | 192 | const { row } = scope; |
| 191 | let list: any = []; | 193 | let list: any = []; |
| 192 | list.push({ label: "编辑", value: "edit", click: apiManageTableBtnMap.EDIT }); | 194 | list.push({ label: "编辑", disabled: row.apiState == 1, value: "edit", click: apiManageTableBtnMap.EDIT }); |
| 193 | list.push({ label: "删除", value: "del", click: apiManageTableBtnMap.DELETE }); | 195 | list.push({ label: "删除", disabled: row.apiState == 1, value: "del", click: apiManageTableBtnMap.DELETE }); |
| 194 | list.push({ label: "详情", value: "detail", click: apiManageTableBtnMap.DETAIL }); | 196 | list.push({ label: "详情", value: "detail", click: apiManageTableBtnMap.DETAIL }); |
| 195 | list.push({ label: "复制", value: "copy", click: apiManageTableBtnMap.COPY }) | 197 | list.push({ label: "复制", value: "copy", click: apiManageTableBtnMap.COPY }) |
| 196 | return list; | 198 | return list; |
| ... | @@ -266,7 +268,7 @@ const apiManageTableBtnMap = { | ... | @@ -266,7 +268,7 @@ const apiManageTableBtnMap = { |
| 266 | let row = scope.row; | 268 | let row = scope.row; |
| 267 | router.push({ | 269 | router.push({ |
| 268 | name: 'apiDetail', | 270 | name: 'apiDetail', |
| 269 | query: { guid: row.guid, type: 'detail' } | 271 | query: { guid: row.guid, apiName: row.apiName } |
| 270 | }); | 272 | }); |
| 271 | return; | 273 | return; |
| 272 | // const approveVO = row.approveVO || {}; | 274 | // const approveVO = row.approveVO || {}; |
| ... | @@ -343,7 +345,7 @@ const apiManageTableBtnMap = { | ... | @@ -343,7 +345,7 @@ const apiManageTableBtnMap = { |
| 343 | if (res.code == proxy.$passCode) { | 345 | if (res.code == proxy.$passCode) { |
| 344 | APIDataPage.value.curr = 1; | 346 | APIDataPage.value.curr = 1; |
| 345 | getTableData(); | 347 | getTableData(); |
| 346 | proxy.$ElMessage.success('删除该API提交成功'); | 348 | proxy.$ElMessage.success('删除该API成功'); |
| 347 | } else { | 349 | } else { |
| 348 | proxy.$ElMessage.error(res.msg); | 350 | proxy.$ElMessage.error(res.msg); |
| 349 | } | 351 | } | ... | ... |
| ... | @@ -5,37 +5,33 @@ | ... | @@ -5,37 +5,33 @@ |
| 5 | <script lang="ts" setup name="apiTest"> | 5 | <script lang="ts" setup name="apiTest"> |
| 6 | import { ref } from 'vue'; | 6 | import { ref } from 'vue'; |
| 7 | import { | 7 | import { |
| 8 | getValidApiLabel, | 8 | getValidApi, |
| 9 | getSceneValidApiLabel, | ||
| 10 | getAllApi, | ||
| 11 | testApiData, | 9 | testApiData, |
| 12 | getApiDetail | 10 | getApiDetail |
| 13 | } from "@/api/modules/dataService"; | 11 | } from "@/api/modules/dataService"; |
| 14 | import { TableColumnWidth } from '@/utils/enum'; | 12 | import { TableColumnWidth } from '@/utils/enum'; |
| 15 | import { useValidator } from '@/hooks/useValidator'; | 13 | import { useValidator } from '@/hooks/useValidator'; |
| 16 | import { progressProps } from 'element-plus'; | ||
| 17 | import { useRouter } from "vue-router"; | 14 | import { useRouter } from "vue-router"; |
| 18 | 15 | ||
| 19 | const { required } = useValidator(); | 16 | const { required } = useValidator(); |
| 20 | const router = useRouter(); | 17 | const router = useRouter(); |
| 21 | const { proxy } = getCurrentInstance() as any; | 18 | const { proxy } = getCurrentInstance() as any; |
| 22 | /** API下拉列表。已发布的启用的API名称,选择后自动带出路径和请求参数。 */ | 19 | /** API下拉列表。已发布的启用的API名称,选择后自动带出路径和请求参数。 */ |
| 23 | const apiLabelList = ref([]); | 20 | const validApiList = ref([]); |
| 24 | const processDTOSValue = ref([]); | ||
| 25 | 21 | ||
| 26 | const apiFormRef = ref(); | 22 | const apiFormRef = ref(); |
| 27 | /** 选择要测试的API. */ | 23 | /** 选择要测试的API. */ |
| 28 | const apiFormItems = ref([ | 24 | const apiFormItems = ref([ |
| 29 | { | 25 | { |
| 30 | type: 'tree-select', | 26 | type: 'select', |
| 31 | label: 'API名称', | 27 | label: 'API名称', |
| 32 | field: 'apiGuid', | 28 | field: 'apiGuid', |
| 33 | default: '', | 29 | default: '', |
| 34 | placeholder: '请选择', | 30 | placeholder: '请选择', |
| 35 | options: [], | 31 | options: validApiList.value, |
| 36 | col: 'path-w30', | 32 | col: 'path-w30', |
| 37 | props: { | 33 | props: { |
| 38 | label: "sceneName", | 34 | label: "apiName", |
| 39 | children: "children", | 35 | children: "children", |
| 40 | value: 'guid', | 36 | value: 'guid', |
| 41 | isLeaf: 'isLeaf' | 37 | isLeaf: 'isLeaf' |
| ... | @@ -86,7 +82,7 @@ const apiFormItems = ref([ | ... | @@ -86,7 +82,7 @@ const apiFormItems = ref([ |
| 86 | ]); | 82 | ]); |
| 87 | 83 | ||
| 88 | const apiFormRules = ref({ | 84 | const apiFormRules = ref({ |
| 89 | apiGuid: [required('请选择数据产品')] | 85 | apiGuid: [required('请选择API')] |
| 90 | }); | 86 | }); |
| 91 | 87 | ||
| 92 | const requestParamsTableInfo = ref({ | 88 | const requestParamsTableInfo = ref({ |
| ... | @@ -208,98 +204,19 @@ const resultFormItems = ref([{ | ... | @@ -208,98 +204,19 @@ const resultFormItems = ref([{ |
| 208 | const getValidLabelPromise: any = ref(null); | 204 | const getValidLabelPromise: any = ref(null); |
| 209 | 205 | ||
| 210 | onBeforeMount(() => { | 206 | onBeforeMount(() => { |
| 211 | getValidLabelPromise.value = getSceneValidApiLabel().then((res: any) => { | 207 | getValidApi().then((res: any) => { |
| 212 | getValidLabelPromise.value = null; | ||
| 213 | if (res.code == proxy.$passCode) { | 208 | if (res.code == proxy.$passCode) { |
| 214 | apiLabelList.value = res.data || []; | 209 | validApiList.value = res.data || []; |
| 210 | apiFormItems.value[0].options = validApiList.value; | ||
| 215 | } else { | 211 | } else { |
| 216 | proxy.$ElMessage.error(res.msg); | 212 | proxy.$ElMessage.error(res.msg); |
| 217 | } | 213 | } |
| 218 | }) | 214 | }) |
| 219 | // selectApiDetailInfo.value = { | ||
| 220 | // requestUrl: 'baidu.com', | ||
| 221 | // sceneName: '场景A', | ||
| 222 | // sceneGuid: 'A', | ||
| 223 | // processOrderNo: [ | ||
| 224 | // { | ||
| 225 | // processOrderNo:1111, | ||
| 226 | // guid:'02e799002ad64cd3b1bc5aa31b592eca', | ||
| 227 | // requirementOrderName:'需求名称1', | ||
| 228 | // }, | ||
| 229 | // { | ||
| 230 | // processOrderNo:2222, | ||
| 231 | // guid:'02e799002ad64cd3b1bc5aa31b592eca', | ||
| 232 | // requirementOrderName:'需求名称2', | ||
| 233 | // } | ||
| 234 | // ] | ||
| 235 | // }; | ||
| 236 | if(selectApiDetailInfo.value?.processOrderNo?.length>0){ | ||
| 237 | selectApiDetailInfo.value.processOrderNo.forEach(item=>{ | ||
| 238 | item.noName=item.processOrderNo + '' + item.requirementOrderName | ||
| 239 | }) | ||
| 240 | } | ||
| 241 | console.log('selectApiDetailInfo',selectApiDetailInfo.value); | ||
| 242 | |||
| 243 | }) | 215 | }) |
| 244 | 216 | ||
| 245 | const apiNodeLoad = (node, resolve, item) => { | ||
| 246 | if (node.level === 0) { | ||
| 247 | if (getValidLabelPromise.value) { | ||
| 248 | getValidLabelPromise.value.then(() => { | ||
| 249 | resolve(apiLabelList.value); | ||
| 250 | }); | ||
| 251 | return; | ||
| 252 | } | ||
| 253 | resolve(apiLabelList.value) | ||
| 254 | } else if (node.level === 1) { | ||
| 255 | getAllApi(node.data.guid).then((res: any) => { | ||
| 256 | if (res.code == proxy.$passCode) { | ||
| 257 | const apiData = res.data?.map(d => { | ||
| 258 | d.sceneName = d.apiName; | ||
| 259 | d.isLeaf = true; | ||
| 260 | return d; | ||
| 261 | }) ?? []; | ||
| 262 | resolve(apiData); | ||
| 263 | } else { | ||
| 264 | proxy.$ElMessage.error(res.msg); | ||
| 265 | } | ||
| 266 | }); | ||
| 267 | } | ||
| 268 | } | ||
| 269 | |||
| 270 | const getApiDetailPromise: any = ref(null); | 217 | const getApiDetailPromise: any = ref(null); |
| 271 | const selectApiDetailInfo: any = ref({});////选择数据产品后带出来的信息 | 218 | const selectApiDetailInfo: any = ref({});////选择数据产品后带出来的信息 |
| 272 | 219 | ||
| 273 | const apiSelectNodeChange = (node, item) => { | ||
| 274 | if (!node.isLeaf) { | ||
| 275 | return true; | ||
| 276 | } | ||
| 277 | requestParamsTableInfo.value.loading = true; | ||
| 278 | getApiDetailPromise.value = getApiDetail(node.guid).then((res: any) => { | ||
| 279 | getApiDetailPromise.value = null; | ||
| 280 | requestParamsTableInfo.value.loading = false; | ||
| 281 | requestParamsTableInfo.value.data = []; | ||
| 282 | if (res.code == proxy.$passCode) { | ||
| 283 | let data = res.data; | ||
| 284 | selectApiDetailInfo.value = res.data || {}; | ||
| 285 | if(data.processDTOS&&data.processDTOS.length>0){ | ||
| 286 | let processDTOS=data.processDTOS || []; | ||
| 287 | if(processDTOS?.length>0){ | ||
| 288 | processDTOS.forEach(obj=>{ | ||
| 289 | obj.noName=obj.processOrderNo + '' + obj.requirementOrderName | ||
| 290 | }) | ||
| 291 | } | ||
| 292 | processDTOSValue.value = processDTOS || []; | ||
| 293 | |||
| 294 | } | ||
| 295 | |||
| 296 | } | ||
| 297 | else { | ||
| 298 | proxy.$ElMessage.error(res.msg); | ||
| 299 | } | ||
| 300 | }) | ||
| 301 | } | ||
| 302 | |||
| 303 | const apiSelectChange = (val) => { | 220 | const apiSelectChange = (val) => { |
| 304 | if (!val) {//清空值 | 221 | if (!val) {//清空值 |
| 305 | apiFormItems.value[0].default = val; | 222 | apiFormItems.value[0].default = val; |
| ... | @@ -310,13 +227,13 @@ const apiSelectChange = (val) => { | ... | @@ -310,13 +227,13 @@ const apiSelectChange = (val) => { |
| 310 | } else { | 227 | } else { |
| 311 | resultFormItems.value[0].default = ''; | 228 | resultFormItems.value[0].default = ''; |
| 312 | resultFormItems.value[1].default = ''; | 229 | resultFormItems.value[1].default = ''; |
| 313 | if (getApiDetailPromise.value) { | 230 | requestParamsTableInfo.value.loading = true; |
| 314 | getApiDetailPromise.value.then(() => { | 231 | getApiDetail(val).then((res: any) => { |
| 232 | requestParamsTableInfo.value.loading = false; | ||
| 233 | requestParamsTableInfo.value.data = []; | ||
| 234 | if (res.code == proxy.$passCode) { | ||
| 235 | selectApiDetailInfo.value = res.data || {}; | ||
| 315 | apiFormItems.value[0].default = val; | 236 | apiFormItems.value[0].default = val; |
| 316 | // apiFormItems.value[1].default = selectApiDetailInfo.value.requestUrl; | ||
| 317 | // apiFormItems.value[2].default = selectApiDetailInfo.value.sceneName; | ||
| 318 | // apiFormItems.value[3].default = selectApiDetailInfo.value.sceneGuid; | ||
| 319 | // apiFormItems.value[4].default = selectApiDetailInfo.value.processOrderNo; | ||
| 320 | let apiConfigAccessRSVOS = selectApiDetailInfo.value.apiConfigAccessRSVOS || []; | 237 | let apiConfigAccessRSVOS = selectApiDetailInfo.value.apiConfigAccessRSVOS || []; |
| 321 | apiConfigAccessRSVOS.forEach(vo => { | 238 | apiConfigAccessRSVOS.forEach(vo => { |
| 322 | if (vo.paramType == 'REQ') { | 239 | if (vo.paramType == 'REQ') { |
| ... | @@ -325,30 +242,13 @@ const apiSelectChange = (val) => { | ... | @@ -325,30 +242,13 @@ const apiSelectChange = (val) => { |
| 325 | requestParamsTableInfo.value.data.push({ ...vo, isConst: true, introductionValue: vo.defaultValue }); | 242 | requestParamsTableInfo.value.data.push({ ...vo, isConst: true, introductionValue: vo.defaultValue }); |
| 326 | } | 243 | } |
| 327 | }) | 244 | }) |
| 328 | if (selectApiDetailInfo.value.authenticationType == 'N') { | ||
| 329 | defaultParamsTableInfo.value.data = defaultParamsData.value.concat([{ | ||
| 330 | paramName: 'appKey', | ||
| 331 | dataType: '字符型', | ||
| 332 | isRequired: '是', | ||
| 333 | value: '' | ||
| 334 | }]); | ||
| 335 | } else { | ||
| 336 | defaultParamsTableInfo.value.data = defaultParamsData.value; | 245 | defaultParamsTableInfo.value.data = defaultParamsData.value; |
| 337 | } | 246 | } |
| 338 | }); | 247 | else { |
| 339 | } else { | 248 | proxy.$ElMessage.error(res.msg); |
| 340 | apiFormItems.value[0].default = val; | ||
| 341 | // apiFormItems.value[1].default = selectApiDetailInfo.value.requestUrl; | ||
| 342 | let apiConfigAccessRSVOS = selectApiDetailInfo.value.apiConfigAccessRSVOS || []; | ||
| 343 | apiConfigAccessRSVOS.forEach(vo => { | ||
| 344 | if (vo.paramType == 'REQ') { | ||
| 345 | requestParamsTableInfo.value.data.push({ ...vo, introductionValue: vo.defaultValue }); | ||
| 346 | } else if (vo.paramType == 'CONSTANT') { | ||
| 347 | requestParamsTableInfo.value.data.push({ ...vo, isConst: true, introductionValue: vo.defaultValue }); | ||
| 348 | } | 249 | } |
| 349 | }) | 250 | }) |
| 350 | } | 251 | } |
| 351 | } | ||
| 352 | } | 252 | } |
| 353 | 253 | ||
| 354 | const startTestApiBtnLoading = ref(false); | 254 | const startTestApiBtnLoading = ref(false); |
| ... | @@ -400,15 +300,6 @@ const startTestApi = () => { | ... | @@ -400,15 +300,6 @@ const startTestApi = () => { |
| 400 | } | 300 | } |
| 401 | }); | 301 | }); |
| 402 | } | 302 | } |
| 403 | const seeDetail = (row) => { | ||
| 404 | console.log('row',row); | ||
| 405 | router.push({ | ||
| 406 | name: 'processSheetDetail', | ||
| 407 | query: { | ||
| 408 | guid: row.guid, | ||
| 409 | } | ||
| 410 | }); | ||
| 411 | } | ||
| 412 | 303 | ||
| 413 | </script> | 304 | </script> |
| 414 | 305 | ||
| ... | @@ -417,25 +308,7 @@ const seeDetail = (row) => { | ... | @@ -417,25 +308,7 @@ const seeDetail = (row) => { |
| 417 | <ContentWrap id="id-requestParams" title="请求参数" description=""> | 308 | <ContentWrap id="id-requestParams" title="请求参数" description=""> |
| 418 | <div> | 309 | <div> |
| 419 | <Form ref="apiFormRef" :itemList="apiFormItems" formId="table-base-form" :rules="apiFormRules" col="col3" | 310 | <Form ref="apiFormRef" :itemList="apiFormItems" formId="table-base-form" :rules="apiFormRules" col="col3" |
| 420 | @treeSelectLoad="apiNodeLoad" @treeSelectNodeChange="apiSelectNodeChange" @select-change="apiSelectChange" /> | 311 | @select-change="apiSelectChange" /> |
| 421 | <el-row :gutter="24" class="mb10" v-if="selectApiDetailInfo?.sceneName"> | ||
| 422 | <el-col :span="24"> | ||
| 423 | <span class="label">API路径:</span> | ||
| 424 | <!-- --> | ||
| 425 | <span class="value">{{ selectApiDetailInfo?.requestUrl||'-' }}</span> | ||
| 426 | </el-col> | ||
| 427 | <!-- <el-col :span="12"> | ||
| 428 | <span class="label">场景名称:</span> | ||
| 429 | <span class="value">{{ selectApiDetailInfo?.sceneName }}</span> | ||
| 430 | </el-col> | ||
| 431 | --> | ||
| 432 | </el-row> | ||
| 433 | <!-- <el-row :gutter="24" class="mb10" v-if="selectApiDetailInfo?.sceneName"> | ||
| 434 | <el-col :span="24"> | ||
| 435 | <span class="label">加工单号:</span> | ||
| 436 | <span v-for="(obj,idx) in processDTOSValue" @click="seeDetail(obj)" class="value cursor" style="color:#4fa1a4;padding-right:8px">{{ obj.noName }}{{ idx<processDTOSValue.length-1?'、':'' }}</span> | ||
| 437 | </el-col> | ||
| 438 | </el-row> --> | ||
| 439 | </div> | 312 | </div> |
| 440 | 313 | ||
| 441 | <Table :tableInfo="requestParamsTableInfo" class="mb10 mt8" /> | 314 | <Table :tableInfo="requestParamsTableInfo" class="mb10 mt8" /> |
| ... | @@ -462,10 +335,12 @@ const seeDetail = (row) => { | ... | @@ -462,10 +335,12 @@ const seeDetail = (row) => { |
| 462 | width: calc(60% - 6px) !important; | 335 | width: calc(60% - 6px) !important; |
| 463 | max-width: 720px; | 336 | max-width: 720px; |
| 464 | } | 337 | } |
| 338 | |||
| 465 | .el-form-item.path-w30 { | 339 | .el-form-item.path-w30 { |
| 466 | width: calc(30% - 6px) !important; | 340 | width: calc(30% - 6px) !important; |
| 467 | max-width: 540px; | 341 | max-width: 540px; |
| 468 | } | 342 | } |
| 343 | |||
| 469 | .el-form-item.path-w20 { | 344 | .el-form-item.path-w20 { |
| 470 | width: calc(18% - 6px) !important; | 345 | width: calc(18% - 6px) !important; |
| 471 | max-width: 540px; | 346 | max-width: 540px; |
| ... | @@ -490,6 +365,7 @@ const seeDetail = (row) => { | ... | @@ -490,6 +365,7 @@ const seeDetail = (row) => { |
| 490 | .mb10 { | 365 | .mb10 { |
| 491 | margin-bottom: 10px; | 366 | margin-bottom: 10px; |
| 492 | } | 367 | } |
| 368 | |||
| 493 | .value { | 369 | .value { |
| 494 | color: #212121; | 370 | color: #212121; |
| 495 | } | 371 | } | ... | ... |
| 1 | <script lang="ts" setup name="detail_serviceApi"> | 1 | <script lang="ts" setup name="detail_serviceApi"> |
| 2 | import { ref } from "vue"; | 2 | import { ref } from "vue"; |
| 3 | import { TableColumnWidth } from '@/utils/enum'; | 3 | import { TableColumnWidth } from '@/utils/enum'; |
| 4 | import { getCamundaDeploymentId } from "@/api/modules/workFlowService" | ||
| 5 | import { | 4 | import { |
| 6 | getApiApprovalDetail, | 5 | getApiApprovalDetail, |
| 7 | getApiDetail, | 6 | getApiDetail, |
| 8 | apiTypes, | 7 | apiTypes, |
| 9 | } from "@/api/modules/dataService"; | 8 | } from "@/api/modules/dataService"; |
| 9 | import useUserStore from "@/store/modules/user"; | ||
| 10 | |||
| 11 | const userStore = useUserStore(); | ||
| 10 | const route = useRoute(); | 12 | const route = useRoute(); |
| 11 | const { proxy } = getCurrentInstance() as any; | 13 | const { proxy } = getCurrentInstance() as any; |
| 12 | const router = useRouter(); | 14 | const router = useRouter(); |
| ... | @@ -33,13 +35,13 @@ onBeforeMount(() => { | ... | @@ -33,13 +35,13 @@ onBeforeMount(() => { |
| 33 | if (route.query.guid) { | 35 | if (route.query.guid) { |
| 34 | getDetail(); | 36 | getDetail(); |
| 35 | } else { | 37 | } else { |
| 36 | getCamundaDeploymentId('10023').then((res: any) => { | 38 | // getCamundaDeploymentId('10023').then((res: any) => { |
| 37 | if (res.code == proxy.$passCode) { | 39 | // if (res.code == proxy.$passCode) { |
| 38 | deploymentId.value = res.data; | 40 | // deploymentId.value = res.data; |
| 39 | } else { | 41 | // } else { |
| 40 | proxy.$ElMessage.error(res.msg); | 42 | // proxy.$ElMessage.error(res.msg); |
| 41 | } | 43 | // } |
| 42 | }) | 44 | // }) |
| 43 | } | 45 | } |
| 44 | }); | 46 | }); |
| 45 | 47 | ||
| ... | @@ -68,8 +70,8 @@ const getDetail = () => { | ... | @@ -68,8 +70,8 @@ const getDetail = () => { |
| 68 | let { approveVO } = data | 70 | let { approveVO } = data |
| 69 | pageDetail.value = res.data; | 71 | pageDetail.value = res.data; |
| 70 | bizApproveVO.value = data.approveVO; | 72 | bizApproveVO.value = data.approveVO; |
| 71 | deploymentId.value = approveVO.camundaDeploymentId | 73 | deploymentId.value = approveVO?.camundaDeploymentId |
| 72 | processInstanceId.value = approveVO.camundaInstanceId | 74 | processInstanceId.value = approveVO?.camundaInstanceId |
| 73 | process.value?.renderProcessNodes(); | 75 | process.value?.renderProcessNodes(); |
| 74 | detailInfo.value = data; | 76 | detailInfo.value = data; |
| 75 | apiType.value = data.apiType; | 77 | apiType.value = data.apiType; |
| ... | @@ -104,11 +106,11 @@ const getDetail = () => { | ... | @@ -104,11 +106,11 @@ const getDetail = () => { |
| 104 | constData.push(vo); | 106 | constData.push(vo); |
| 105 | } | 107 | } |
| 106 | }); | 108 | }); |
| 107 | if(data.processDTOS&&data.processDTOS.length>0){ | 109 | if (data.processDTOS && data.processDTOS.length > 0) { |
| 108 | let processDTOS=data.processDTOS || []; | 110 | let processDTOS = data.processDTOS || []; |
| 109 | if(processDTOS?.length>0){ | 111 | if (processDTOS?.length > 0) { |
| 110 | processDTOS.forEach(obj=>{ | 112 | processDTOS.forEach(obj => { |
| 111 | obj.noName=obj.processOrderNo + '' + obj.requirementOrderName | 113 | obj.noName = obj.processOrderNo + '' + obj.requirementOrderName |
| 112 | }) | 114 | }) |
| 113 | } | 115 | } |
| 114 | processDTOSValue.value = processDTOS || []; | 116 | processDTOSValue.value = processDTOS || []; |
| ... | @@ -296,16 +298,24 @@ const sortParamsTableInfo = ref({ | ... | @@ -296,16 +298,24 @@ const sortParamsTableInfo = ref({ |
| 296 | loading: false | 298 | loading: false |
| 297 | }); | 299 | }); |
| 298 | 300 | ||
| 301 | const cancel = () => { | ||
| 302 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== route.fullPath)); | ||
| 303 | router.push({ | ||
| 304 | path: '/data-service/api-management' | ||
| 305 | }); | ||
| 306 | } | ||
| 307 | |||
| 299 | </script> | 308 | </script> |
| 300 | 309 | ||
| 301 | <template> | 310 | <template> |
| 302 | <div class="content_main" v-loading="detailLoading"> | 311 | <div class="page-main" v-loading="detailLoading"> |
| 303 | <ContentWrap title="基础信息" description="" :isExpand="baseInfoExpand" :expand-swicth="true" | 312 | <div class="content_main"> |
| 304 | class="mb16" @expand="(v) => baseInfoExpand = v"> | 313 | <ContentWrap title="基础信息" description="" :isExpand="baseInfoExpand" :expand-swicth="true" class="mb16" |
| 314 | @expand="(v) => baseInfoExpand = v"> | ||
| 305 | <div class="list_panel"> | 315 | <div class="list_panel"> |
| 306 | <div class="list_item"> | 316 | <div class="list_item"> |
| 307 | <span class="item_label">API类型:</span> | 317 | <span class="item_label">API类型:</span> |
| 308 | <span class="item_value">{{ apiTypes.find(a => a.value == apiType)?.label || '-' }}</span> | 318 | <span class="item_value">{{apiTypes.find(a => a.value == apiType)?.label || '-'}}</span> |
| 309 | </div> | 319 | </div> |
| 310 | <div class="list_item"> | 320 | <div class="list_item"> |
| 311 | <span class="item_label">API名称:</span> | 321 | <span class="item_label">API名称:</span> |
| ... | @@ -330,8 +340,8 @@ const sortParamsTableInfo = ref({ | ... | @@ -330,8 +340,8 @@ const sortParamsTableInfo = ref({ |
| 330 | <div class="list_item" v-if="detailInfo.authenticationType == 'N'"> | 340 | <div class="list_item" v-if="detailInfo.authenticationType == 'N'"> |
| 331 | <span class="item_label">IP白名单:</span> | 341 | <span class="item_label">IP白名单:</span> |
| 332 | <span class="item_value"> | 342 | <span class="item_value"> |
| 333 | <ellipsis-tooltip :content="detailInfo.whiteIPAddrs?.length ? detailInfo.whiteIPAddrs.join(',') : '-'" class-name="w100f mr8-i" | 343 | <ellipsis-tooltip :content="detailInfo.whiteIPAddrs?.length ? detailInfo.whiteIPAddrs.join(',') : '-'" |
| 334 | :refName="'tooltipOver' + 'WhiteIPs'"></ellipsis-tooltip> | 344 | class-name="w100f mr8-i" :refName="'tooltipOver' + 'WhiteIPs'"></ellipsis-tooltip> |
| 335 | </span> | 345 | </span> |
| 336 | </div> | 346 | </div> |
| 337 | <!-- 空白占位符 --> | 347 | <!-- 空白占位符 --> |
| ... | @@ -378,7 +388,8 @@ const sortParamsTableInfo = ref({ | ... | @@ -378,7 +388,8 @@ const sortParamsTableInfo = ref({ |
| 378 | </div> | 388 | </div> |
| 379 | <div class="list_item"> | 389 | <div class="list_item"> |
| 380 | <span class="item_label">后端超时:</span> | 390 | <span class="item_label">后端超时:</span> |
| 381 | <span class="item_value">{{ detailInfo.backstageOvertime == null ? '-' : (detailInfo.backstageOvertime + 'ms') }}</span> | 391 | <span class="item_value">{{ detailInfo.backstageOvertime == null ? '-' : (detailInfo.backstageOvertime + |
| 392 | 'ms') }}</span> | ||
| 382 | </div> | 393 | </div> |
| 383 | <div class="list_item is_block"> | 394 | <div class="list_item is_block"> |
| 384 | <span class="item_label">后台服务PATH:</span> | 395 | <span class="item_label">后台服务PATH:</span> |
| ... | @@ -391,7 +402,8 @@ const sortParamsTableInfo = ref({ | ... | @@ -391,7 +402,8 @@ const sortParamsTableInfo = ref({ |
| 391 | </ContentWrap> | 402 | </ContentWrap> |
| 392 | 403 | ||
| 393 | <template v-if="inputParamsTableInfo.data.length"> | 404 | <template v-if="inputParamsTableInfo.data.length"> |
| 394 | <div class="list_item" style="font-weight: 500;color: var(--el-color-regular);margin: 8px 0px;">{{ apiType == '3' ? '请求参数' : '入参定义' }}</div> | 405 | <div class="list_item" style="font-weight: 500;color: var(--el-color-regular);margin: 8px 0px;">{{ apiType == |
| 406 | '3' ? '请求参数' : '入参定义' }}</div> | ||
| 395 | <Table :tableInfo="inputParamsTableInfo" /> | 407 | <Table :tableInfo="inputParamsTableInfo" /> |
| 396 | </template> | 408 | </template> |
| 397 | <template v-if="requestParamsTableInfo.data.length"> | 409 | <template v-if="requestParamsTableInfo.data.length"> |
| ... | @@ -420,19 +432,28 @@ const sortParamsTableInfo = ref({ | ... | @@ -420,19 +432,28 @@ const sortParamsTableInfo = ref({ |
| 420 | <div class="list_item" style="font-weight: 500;color: var(--el-color-regular);margin: 8px 0px;">查询sql</div> | 432 | <div class="list_item" style="font-weight: 500;color: var(--el-color-regular);margin: 8px 0px;">查询sql</div> |
| 421 | <el-input v-model.trim="sql" :rows="10" type="textarea" :readonly="true" /> | 433 | <el-input v-model.trim="sql" :rows="10" type="textarea" :readonly="true" /> |
| 422 | </template> | 434 | </template> |
| 423 | <ContentWrap title="流程审批" v-if="detailInfo.approveVO && detailInfo.isApprove != 'N'" description="" :isExpand="flowExpand" :expand-swicth="true" | 435 | <!-- <ContentWrap title="流程审批" v-if="detailInfo.approveVO && detailInfo.isApprove != 'N'" description="" :isExpand="flowExpand" :expand-swicth="true" |
| 424 | class="mb16" @expand="(v) => flowExpand = v"> | 436 | class="mb16" @expand="(v) => flowExpand = v"> |
| 425 | <ApprovalProcess ref="process" v-if="deploymentId" :deploymentId="deploymentId" :processInstanceId="processInstanceId"> | 437 | <ApprovalProcess ref="process" v-if="deploymentId" :deploymentId="deploymentId" :processInstanceId="processInstanceId"> |
| 426 | </ApprovalProcess> | 438 | </ApprovalProcess> |
| 427 | </ContentWrap> | 439 | </ContentWrap> --> |
| 428 | <FlowBtnGroup pageType="detail" :approveVO="bizApproveVO" @refreshPage="getDetail"></FlowBtnGroup> | ||
| 429 | 440 | ||
| 430 | </div> | 441 | </div> |
| 442 | <div class="tool_btns"> | ||
| 443 | <div class="btns"> | ||
| 444 | <el-button :plain="true" @click="cancel">{{ '关闭' }}</el-button> | ||
| 445 | </div> | ||
| 446 | </div> | ||
| 447 | </div> | ||
| 431 | </template> | 448 | </template> |
| 432 | 449 | ||
| 433 | <style scoped lang="scss"> | 450 | <style scoped lang="scss"> |
| 451 | .page-main { | ||
| 452 | height: 100%; | ||
| 453 | } | ||
| 454 | |||
| 434 | .content_main { | 455 | .content_main { |
| 435 | height: calc(100% - 40px); | 456 | height: calc(100% - 44px); |
| 436 | padding: 16px; | 457 | padding: 16px; |
| 437 | overflow: hidden auto; | 458 | overflow: hidden auto; |
| 438 | position: sticky; | 459 | position: sticky; |
| ... | @@ -502,4 +523,14 @@ const sortParamsTableInfo = ref({ | ... | @@ -502,4 +523,14 @@ const sortParamsTableInfo = ref({ |
| 502 | min-height: 200px; | 523 | min-height: 200px; |
| 503 | } | 524 | } |
| 504 | } | 525 | } |
| 526 | |||
| 527 | .tool_btns { | ||
| 528 | width: 100%; | ||
| 529 | display: flex; | ||
| 530 | justify-content: center; | ||
| 531 | align-items: center; | ||
| 532 | height: 44px; | ||
| 533 | padding: 0 16px; | ||
| 534 | border-top: 1px solid var(--el-border-color-regular); | ||
| 535 | } | ||
| 505 | </style> | 536 | </style> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or sign in to post a comment