Browse Source

update

storage-in-realtime
zhaohe 12 months ago
parent
commit
dc535d164a
  1. 25
      html/debug/index.html

25
html/debug/index.html

@ -2,7 +2,7 @@
<html>
<head>
<title>TMP</title>
<title>消毒API测试页面</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="./vue.global.js"></script>
@ -17,6 +17,7 @@
<script src="./ant-design-vue/antd.min.js"></script>
<link href="./ant-design-vue/reset.min.css" rel="stylesheet">
</head>
</head>
<body>
<div id="app" class="h-full">
@ -24,8 +25,8 @@
<a-col :span="6">
<div style="display:flex;padding:5px;">
<a-input v-model:value="wsUrl" style="margin-right:5px;"></a-input>
<a-button v-if="null === ws" @click="actionConnect">Connect</a-button>
<a-button v-else @click="actionDisconnect">Disconnect</a-button>
<a-button v-if="null === ws" @click="actionConnect">连接</a-button>
<a-button v-else @click="actionDisconnect">断开</a-button>
</div>
<a-menu mode="inline" :items="actionMenuItems" @click="actionGroupMenuItemClick"></a-menu>
</a-col>
@ -38,7 +39,12 @@
{{item.fnName}}
</div>
<div v-for="param in item.params">
<a-input v-model:value="item.values[param]" :placeholder="param" />
<a-select v-if="item.paramInfoMap[param].isEnum" v-model:value="item.values[param]" :placeholder="param"
:dropdownMatchSelectWidth="false">
<a-select-option v-for="enumValue in item.paramInfoMap[param].enumValues" :key="enumValue"
:value="enumValue">{{enumValue}}</a-select-option>
</a-select>
<a-input v-else v-model:value="item.values[param]" :placeholder="param" />
</div>
<a-button style="margin-left:5px;" @click="actionActionExecute(item)">执行</a-button>
</div>
@ -46,13 +52,13 @@
<div style="padding:10px;">
<a-textarea v-model:value="rawRequestContent" style="margin-bottom: 5px;height: 300px;"></a-textarea>
<div>
<a-button @click="actionSendRawRequest">Send</a-button>
<a-button @click="actionSendRawRequest">发送</a-button>
</div>
</div>
</a-col>
<a-col :span="6" style="height: 100%;display: flex;flex-direction: column;">
<div style="text-align: right; padding:10px;">
<a-button @click="actionClearLogs">Clear</a-button>
<a-button @click="actionClearLogs">清空日志</a-button>
</div>
<div style="height:0;flex-grow:1;overflow-y: auto;">
<a-collapse>
@ -140,6 +146,13 @@
}
item = structuredClone(action);
item.values = {};
item.paramInfoMap = {};
for (let i = 0; i < item.paramsTypeInfo.length; i++) {
let typeName = item.paramsTypeInfo[i];
let info = data.typeInfoList.find(p => p.typeName === typeName);
let name = item.params[i];
item.paramInfoMap[name] = info;
}
group.items.push(item);
}
},

Loading…
Cancel
Save