55a23cac by lihua

api服务接口联调

1 parent 4d39b6ef
...@@ -96,7 +96,7 @@ VITE_API_CIRCULATION_URL = http://192.168.6.22:29900/circulation ...@@ -96,7 +96,7 @@ VITE_API_CIRCULATION_URL = http://192.168.6.22:29900/circulation
96 VITE_APP_DATA_DELIVERY = http://192.168.6.20:38052/ 96 VITE_APP_DATA_DELIVERY = http://192.168.6.20:38052/
97 97
98 #数据服务接口地址 98 #数据服务接口地址
99 VITE_APP_SERVICE_BASEURL = ms-daop-jgjf-data-open-service 99 VITE_APP_SERVICE_BASEURL = ms-daop-trust-api-service
100 100
101 # 本地访问地址 101 # 本地访问地址
102 # VITE_API_CIRCULATION_URL = http://localhost:9000/circulation 102 # VITE_API_CIRCULATION_URL = http://localhost:9000/circulation
......
1 # 页面标题 1 # 页面标题
2 VITE_APP_TITLE = 可信数据空间 2 VITE_APP_TITLE = 可信数据空间
3 # 接口域名 3 # 接口域名
4 VITE_API_BASEURL = http://192.168.6.20:28052/ 4 VITE_API_BASEURL = http://192.168.6.20:58052/
5 # VITE_API_BASEURL = http://49.4.26.201:31709/ 5 # VITE_API_BASEURL = http://49.4.26.201:31709/
6 6
7 VITE_IDASS_BASEURL = https://idaas-test.csbr.cn/login 7 VITE_IDASS_BASEURL = https://idaas-test.csbr.cn/login
...@@ -123,7 +123,7 @@ VITE_API_MESSAGE = ms-daop-message-service ...@@ -123,7 +123,7 @@ VITE_API_MESSAGE = ms-daop-message-service
123 VITE_APP_PERSONAL_URL = ms-daop-personel-service 123 VITE_APP_PERSONAL_URL = ms-daop-personel-service
124 124
125 #数据服务接口地址 125 #数据服务接口地址
126 VITE_APP_SERVICE_BASEURL = ms-daop-jgjf-data-open-service 126 VITE_APP_SERVICE_BASEURL = ms-daop-trust-api-service
127 127
128 #流通平台接口地址 128 #流通平台接口地址
129 VITE_APP_CIRCULATION = http://192.168.6.20:18052/ 129 VITE_APP_CIRCULATION = http://192.168.6.20:18052/
......
...@@ -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 ],
......
...@@ -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'
...@@ -43,7 +39,7 @@ const apiFormItems = ref([ ...@@ -43,7 +39,7 @@ const apiFormItems = ref([
43 filterable: true, 39 filterable: true,
44 clearable: true, 40 clearable: true,
45 required: true 41 required: true
46 }, 42 },
47 // { 43 // {
48 // type: 'input', 44 // type: 'input',
49 // label: 'API路径', 45 // label: 'API路径',
...@@ -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,29 +242,12 @@ const apiSelectChange = (val) => { ...@@ -325,29 +242,12 @@ 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') { 245 defaultParamsTableInfo.value.data = defaultParamsData.value;
329 defaultParamsTableInfo.value.data = defaultParamsData.value.concat([{ 246 }
330 paramName: 'appKey', 247 else {
331 dataType: '字符型', 248 proxy.$ElMessage.error(res.msg);
332 isRequired: '是', 249 }
333 value: '' 250 })
334 }]);
335 } else {
336 defaultParamsTableInfo.value.data = defaultParamsData.value;
337 }
338 });
339 } else {
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 }
349 })
350 }
351 } 251 }
352 } 252 }
353 253
...@@ -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,27 +308,9 @@ const seeDetail = (row) => { ...@@ -417,27 +308,9 @@ 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" />
442 </ContentWrap> 315 </ContentWrap>
443 <ContentWrap id="id-defaultParams" title="DEFAULT" description="" class="mt16"> 316 <ContentWrap id="id-defaultParams" title="DEFAULT" description="" class="mt16">
...@@ -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 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!