Browse Source

fix some bug

master
zhaohe 7 months ago
parent
commit
8646a7d419
  1. 3
      src/App.vue
  2. 12
      src/components/ServiceConfigurationActions.vue
  3. 2
      src/components/ServiceConfigurationParamValueEdit.vue
  4. 4
      src/components/ServiceConfigurationParamValueObjectEdit.vue
  5. 9
      src/utils/ApiClient.js

3
src/App.vue

@ -1,10 +1,11 @@
<template>
<a-layout class="h-full">
<a-layout-sider>
<a-layout-sider collapsible>
<a-menu class="h-full"
v-model:selectedKeys="menuSelectedKeys"
:items="menuItems"
@click="actionMenuItemClick"
style="white-space: normal;"
></a-menu>
</a-layout-sider>
<a-layout>

12
src/components/ServiceConfigurationActions.vue

@ -17,18 +17,18 @@
<a-select-option :value="true">TRUE</a-select-option>
<a-select-option :value="false">FALSE</a-select-option>
</a-select>
<a-input v-else-if="'String' === actionParam.type" class="w-24"
<a-input v-else-if="'java.lang.String' === actionParam.type" class="w-24"
v-model:value="actionParam.value" :placeholder="actionParam.name" />
<a-input-number v-else-if="'Integer' === actionParam.type" class="w-24"
<a-input-number v-else-if="'java.lang.Integer' === actionParam.type" class="w-24"
v-model:value="actionParam.value" :placeholder="actionParam.name" />
<a-input-number v-else-if="'Double' === actionParam.type" class="w-24"
<a-input-number v-else-if="'java.lang.Double' === actionParam.type" class="w-24"
v-model:value="actionParam.value" :placeholder="actionParam.name" :step="0.01" />
<a-select v-else-if="'Enum' === actionParam.type" v-model:value="actionParam.value"
<a-select v-else-if="'java.lang.Enum' === actionParam.type" v-model:value="actionParam.value"
:dropdownMatchSelectWidth="false">
<a-select-option v-for="(enumItem, enumIndex) in actionParam.options" :key="enumIndex"
:value="enumItem.value">{{ enumItem.name }}</a-select-option>
</a-select>
<service-configuration-action-param-file v-else-if="'ExtUIFile' === actionParam.type"
<service-configuration-action-param-file v-else-if="'a8k.extui.type.param.ExtUIFile' === actionParam.type"
v-model:value="actionParam.value" />
<span v-else>{{ actionParam }}</span>
</div>
@ -98,7 +98,7 @@ async function actionServiceExecute(action) {
for (let item of action.params) {
params.params.push(item.value);
let type = item.type;
if ('Enum' === type) {
if ('java.lang.Enum' === type) {
type = item.typeEnum;
}
params.paramTypes.push(type);

2
src/components/ServiceConfigurationParamValueEdit.vue

@ -1,7 +1,7 @@
<template>
<div>
<!-- integer -->
<a-input-number v-if="'Integer' === props.param.type"
<a-input-number v-if="'java.lang.Integer' === props.param.type"
class="!w-full"
v-model:value="value"
@change="actionValueUpdate"

4
src/components/ServiceConfigurationParamValueObjectEdit.vue

@ -11,13 +11,13 @@
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'value'">
<!-- Integer -->
<a-input-number v-if="'Integer' === record.type"
<a-input-number v-if="'java.lang.Integer' === record.type"
size="small" class="w-full !border-none"
v-model:value="record.value"
></a-input-number>
<!-- Double -->
<a-input-number v-if="'Double' === record.type"
<a-input-number v-if="'java.lang.Double' === record.type"
size="small" class="w-full !border-none" :step="0.01"
v-model:value="record.value"
></a-input-number>

9
src/utils/ApiClient.js

@ -18,9 +18,6 @@ export default class ApiClient {
async call( name, params={} ) {
let response = await axios({
method: 'post',
// url: `/api/${name}`,
// url: `http://localhost:80/api/${name}`,
//根据不同的环境配置不同的url,生产环境下使用/api/${name},开发环境下使用http://localhost:80/api/${name}
url: process.env.NODE_ENV === 'production' ? `/api/${name}` : `http://localhost:8080/api/${name}`,
data: params
});
@ -51,11 +48,9 @@ export default class ApiClient {
Modal.error({title: '请求错误',content:content,width:800});
throw new Error(`API【${name}】调用失败 : ${response.data}`);
}
if ( 'MESSAGE' === response.data.appRetType ) {
Modal.info({title:'通知', content:response.data.message});
}
if ( null !== response.data.data && 'object' === typeof(response.data.data) ) {
if (null !== response.data.data && 'object' === typeof(response.data.data) ) {
response.data.data.$dataType = response.data.dataType;
// Modal.info({title:'通知', content:response.data.message});
}
return response.data.data;
}
Loading…
Cancel
Save