diff --git a/package.json b/package.json index 6bbaa2e..8b214b4 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,8 @@ }, "rules": { "no-debugger": "off", - "no-undef": "off" + "no-undef": "off", + "no-unused-vars" : "off" } }, "browserslist": [ diff --git a/src/components/ServiceConfiguration.vue b/src/components/ServiceConfiguration.vue index 6bf7869..ecabf6d 100644 --- a/src/components/ServiceConfiguration.vue +++ b/src/components/ServiceConfiguration.vue @@ -1,10 +1,5 @@ - - - {{ status.name }} : {{ status.value }} - - @@ -28,33 +23,48 @@ 保存 - - - {{ group.name }} - - {{ action.name }} - - {{ action.name }} - - {{ actionParam.name }} : - - - - - {{ enumItem.name }} - - {{ actionParam }} - - - - + + + + + {{ group.name }} + + + + {{ action.name }} + + + + + TRUE + FALSE + + + + + {{ enumItem.name }} + + + {{ actionParam }} + + + + + + + - - + + + + {{ status.name }} : {{ status.value }} + + + + + @@ -64,6 +74,7 @@ import { onUnmounted, ref, watch } from 'vue'; import ApiClient from '@/utils/ApiClient'; import ServiceConfigurationParamValueEdit from './ServiceConfigurationParamValueEdit.vue' import ServiceConfigurationActionLog from './ServiceConfigurationActionLog.vue' +import ServiceConfigurationActionParamFile from './ServiceConfigurationActionParamFile.vue' /** @var {Object} */ const props = defineProps({ serviceKey : String, @@ -167,13 +178,16 @@ async function serviceActionReload() { for ( let item of list ) { let group = actions.value.find(i => i.name === item.group); if ( undefined === group ) { - group = {name:item.group, items:[]}; + group = {name:item.group, items:[], order:0}; actions.value.push(group); } + if ( item.groupOrder > group.order ) { + group.order = item.groupOrder; + } group.items.push(item); group.items.sort((a,b) => b.order - a.order || a.params.length - b.params.length); } - actions.value.sort((a,b) => a.name.localeCompare(b.name)); + actions.value.sort((a,b) => b.order - a.order || b.items.length - a.items.length || a.name.localeCompare(b.name)); } catch ( e ) {/** nothing to do here */} } diff --git a/src/components/ServiceConfigurationActionLog.vue b/src/components/ServiceConfigurationActionLog.vue index f27aa6d..bc2e118 100644 --- a/src/components/ServiceConfigurationActionLog.vue +++ b/src/components/ServiceConfigurationActionLog.vue @@ -11,13 +11,14 @@ - - 响应内容: - {{ JSON.stringify(props.log.response, null, 2) }} + {{ JSON.stringify(props.log.response, null, 2) }} + + + \ No newline at end of file diff --git a/src/components/ServiceConfigurationParamValueObjectEdit.vue b/src/components/ServiceConfigurationParamValueObjectEdit.vue index d8339af..78e9d30 100644 --- a/src/components/ServiceConfigurationParamValueObjectEdit.vue +++ b/src/components/ServiceConfigurationParamValueObjectEdit.vue @@ -47,7 +47,6 @@ onMounted(mounted); // on mounted async function mounted() { tableData.value = await setupTableData(props.structClassName); - console.log(tableData.value); } // setup tree data @@ -111,11 +110,10 @@ function actionEditEable() { // ok async function actionOk() { let newValue = generateJsonData(tableData.value); - console.log(newValue); emits('update:value', newValue); emits('change'); await nextTick(); emits('save-request'); - isModalOpen.value = true; + isModalOpen.value = false; } \ No newline at end of file diff --git a/src/utils/ApiClient.js b/src/utils/ApiClient.js index d16c9cb..2ded40c 100644 --- a/src/utils/ApiClient.js +++ b/src/utils/ApiClient.js @@ -29,7 +29,9 @@ export default class ApiClient { Modal.error({title: '请求错误',content:content,width:800}); throw new Error(`API【${name}】调用失败 : ${response.data}`); } - response.data.data.$dataType = response.data.dataType; + if ( 'object' === typeof(response.data.data) ) { + response.data.data.$dataType = response.data.dataType; + } return response.data.data; } } \ No newline at end of file