|
|
@ -30,7 +30,10 @@ |
|
|
|
</div> |
|
|
|
<a-menu mode="inline" :items="actionMenuItems" @click="actionGroupMenuItemClick"></a-menu> |
|
|
|
</a-col> |
|
|
|
<!-- --> |
|
|
|
<a-col :span="12" style="background-color: #f1f1f1;display:flex;flex-direction: column;"> |
|
|
|
|
|
|
|
|
|
|
|
<div v-if="null !== actionActiveGroup" |
|
|
|
style="height:0;flex-grow: 1;overflow-y: auto;margin-bottom: 10px;padding: 10px;"> |
|
|
|
<div v-for="item in actionActiveGroup.items" class="action" |
|
|
@ -45,18 +48,29 @@ |
|
|
|
:value="enumValue">{{enumValue}}</a-select-option> |
|
|
|
</a-select> |
|
|
|
<!-- 点击输入框后弹出键盘 --> |
|
|
|
<a-input v-else v-model:value="item.values[param]" :placeholder="param" @click="showKeyboard(item.values, param)"></a-input> |
|
|
|
<a-input v-else v-model:value="item.values[param]" :placeholder="param" |
|
|
|
@click="showKeyboard(item.values, param)"></a-input> |
|
|
|
</div> |
|
|
|
<a-button style="margin-left:5px;" @click="actionActionExecute(item)">执行</a-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style="padding:10px;"> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <div style="padding:10px;"> |
|
|
|
<a-textarea v-model:value="rawRequestContent" style="margin-bottom: 5px;height: 300px;"></a-textarea> |
|
|
|
<div> |
|
|
|
<a-button @click="actionSendRawRequest">发送</a-button> |
|
|
|
</div> |
|
|
|
</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">清空日志</a-button> |
|
|
@ -70,7 +84,23 @@ |
|
|
|
</a-collapse-panel> |
|
|
|
</a-collapse> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div style="padding:10px;"> |
|
|
|
<div style="margin-bottom: 5px;height: 600px; overflow-y: auto;"> |
|
|
|
<a-collapse> |
|
|
|
<a-collapse-panel v-for="(entry,index) in reports" :key="index" :header="entry.title"> |
|
|
|
<div style="white-space: pre-wrap;"> |
|
|
|
{{entry.content}} |
|
|
|
</div> |
|
|
|
</a-collapse-panel> |
|
|
|
</a-collapse> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</a-col> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</a-row> |
|
|
|
</div> |
|
|
|
<script> |
|
|
@ -82,6 +112,7 @@ |
|
|
|
actionActiveGroup: null, |
|
|
|
rawRequestContent: '', |
|
|
|
logs: [], |
|
|
|
reports: [], |
|
|
|
wsUrl: "ws://" + window.location.hostname + ":19001", |
|
|
|
ws: null, |
|
|
|
wsMessageIndex: 0, |
|
|
@ -103,12 +134,21 @@ |
|
|
|
this.ws.onmessage = event => { |
|
|
|
let data = JSON.parse(event.data); |
|
|
|
let responseEntry = {}; |
|
|
|
responseEntry.title = `${data.messageType}`; |
|
|
|
responseEntry.title = `${data.fromClass}.${data.fromFn}`; |
|
|
|
responseEntry.content = JSON.stringify(data, null, 2); |
|
|
|
this.logs.push(responseEntry); |
|
|
|
if ('Ack' === data.messageType && 'FNScheduler' === data.fromClass && 'geFnList' === data.fromFn) { |
|
|
|
this.actionListReload(data); |
|
|
|
} |
|
|
|
if ('Ack' === data.messageType) { |
|
|
|
this.logs.push(responseEntry); |
|
|
|
} |
|
|
|
if ('Report' === data.messageType) { |
|
|
|
this.reports.unshift(responseEntry); |
|
|
|
if (this.reports.length > 100) { |
|
|
|
this.reports.pop(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
this.ws.onopen = () => { |
|
|
|
this.wsMessageIndex++; |
|
|
|