Skip to content

Commit 8a7f39c

Browse files
committed
Java:MultiDataSource 中 APIAuto 新增支持给单接口用例打标签及筛选,添加标签后不自动筛选,修改脚本、参数注入配置后自动刷新列表
1 parent 5f1cfb1 commit 8a7f39c

File tree

2 files changed

+115
-58
lines changed
  • APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api

2 files changed

+115
-58
lines changed

APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/index.html

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,10 @@
239239
<input v-show="isCaseGroupEditable" style="min-width: 60px; width: 40%; margin-right: 6px" v-model="item.Chain.groupName" @keyup="doOnKeyUp(event, 'chainGroup', false, item)" />
240240
<a href="javascript:void(0)" @click="selectChainGroup(index, item.Chain)" :style="{ color: index == currentChainGroupIndex ? 'black' : 'gray' }" >{{ (isCaseItemShow() ? '' : (index + 1) + '. ') + (isCaseGroupEditable ? '' : item.Chain.groupName) }}</a>
241241
<ul style="display: inline-flex; position: absolute; top: 6px; right: 84px; padding: 0px; height: 27px; overflow: scroll hidden;">
242-
<li style="margin: 0px; padding: 2px; border: #DDD 1px solid; border-radius: 2px " v-for="(tag, ind) in item.Chain.tagList" :id="'tag' + index" >
243-
<a href="javascript:void(0)" style="position: relative; min-width: 6px; width: auto; height: 30px; " @click="removeChainTag(ind, tag, index, item)" >{{ tag }}</a>
242+
<li style="margin: 0px; padding: 2px; background-color: rgba(255, 255, 255, 0.6); border: #DDD 1px solid; border-radius: 2px " v-for="(tag, ind) in item.Chain.tagList" :id="'tag' + index" >
243+
<a href="javascript:void(0)" style="position: relative; min-width: 6px; width: auto; height: 30px; " @click="removeTag(ind, tag, index, item)" >{{ tag }}</a>
244244
</li>
245-
</ul><button class="hint--left" data-hint="新增标签" style="position: absolute; right: 60px; top: 6px;" href="javascript:void(0)" @click="changeChainTag(index, item)"> + </button><a style="right: 0px; position: absolute; z-index: 100; width: fit-content; background-color: white; margin-right: 24px" class="hint--left" :data-hint="item.Chain.groupName">{{' (' + (item.Chain.count - 1) + ') '}}</a>
245+
</ul><button class="hint--left" data-hint="新增标签" style="position: absolute; right: 60px; top: 6px;" href="javascript:void(0)" @click="changeTag(index, item)"> + </button><a style="right: 0px; position: absolute; z-index: 100; width: fit-content; background-color: white; margin-right: 24px" class="hint--left" :data-hint="item.Chain.groupName">{{' (' + (item.Chain.count - 1) + ') '}}</a>
246246
<svg class="icon" @click="remove(item, index, true, false, false, true)" style="background-color: white; width: 27px; height: 18px; right: -2px; top: 10px; padding-left: 3px; padding-right: 4px; padding-top: 2px; padding-bottom: 2px;" >
247247
<use xlink:href="svg/icon.svg#trash"></use>
248248
</svg>
@@ -259,24 +259,29 @@
259259
</div>
260260
</div>
261261

262-
<div v-show="isChainShow && ! isLocalShow" style="left: 0px; display: inline-flex; width: 100%; bottom: 36px; padding: 4px 10px 4px 10px; position: absolute; background-color: white; z-index: 102">
263-
<input id="vChainTagAdd" style="width: 64px; height: 30px; text-align: center" @keyup="doOnKeyUp(event, 'chainTagAdd', false, {'name': vChainTagAdd.value})" placeholder="新增标签,回车来添加" />
262+
<div v-show="((isChainShow && isChainGroupShow())) || (isCaseItemShow() && ! (isChainShow || isLocalShow))" style="left: 0px; display: inline-flex; width: 100%; bottom: 36px; padding: 4px 10px 4px 10px; position: absolute; background-color: white; z-index: 102">
263+
<input id="vTagAdd" style="width: 64px; height: 30px; text-align: center" @keyup="doOnKeyUp(event, 'chainTagAdd', false, {'name': vTagAdd.value})" placeholder="新增标签,回车来添加" />
264264
<ul style="display: inline-flex; padding: 0px; width: 100%; height: 30px; overflow: hidden;overflow-x: scroll;">
265-
<li style="margin: 0px; padding: 2px; border: #DDD 1px solid; border-radius: 2px " v-for="(item, index) in chainTags" :id="'tag' + index" >
266-
<a href="javascript:void(0)" style="position: relative; min-width: 6px; width: auto; height: 30px; " @click="selectChainTag(index, item)" :style="{ color: item.selected ? 'red' : 'gray' }" >{{ item.name }}</a>
265+
<li style="margin: 0px; padding: 2px; border: #DDD 1px solid; border-radius: 2px " v-for="(item, index) in tags" :id="'tag' + index" >
266+
<a href="javascript:void(0)" style="position: relative; min-width: 6px; width: auto; height: 30px; " @click="selectTag(index, item, ! isChainShow)" :style="{ color: item.selected ? 'red' : 'gray' }" >{{ item.name }}</a>
267267
</li>
268268
</ul>
269269
</div>
270270

271271
<div v-show="isLocalShow || isCaseItemShow()" :style="{width: isCaseGroupShow() && ! isLocalShow ? '60%' : '100%'}" style="float: right; flex-grow: 1; height: 100%;">
272272
<input id="vChainAdd" v-show="isChainShow && currentChainGroupIndex >= 0" style="width: 100%; text-align: center" @keyup="doOnKeyUp(event, 'chainAdd', false, {'groupName': vChainAdd.value})" placeholder="输入名称,回车来搜索及添加" />
273273

274-
<ul class="historys" style="width: 100%; height: 100%;overflow: hidden;overflow-y: scroll;padding-bottom: 50px">
274+
<ul class="historys" style="width: 100%; height: 100%;overflow: hidden;overflow-y: scroll;padding-bottom: 100px">
275275
<li v-for="(item, index) in testCases" :id="'docItem' + index" >
276276
<div style="display: inline-table">
277277
<button class="hint--right" :data-hint="item.Document.url" v-show="isShowMethod()" style="width: 60px; margin-right: 0px;padding: 0px;" id="vDocMethod" @click="restoreRemoteAndTest(index, item)">{{ getMethodName(item.Document.method, item.Document.type) }}</button>
278278
<button class="hint--right" :data-hint="item.Document.request" v-show="isShowType()" style="width: 48px;margin-right: 6px;padding: 0px" id="vDocType" @click="restoreRemoteAndTest(index, item)">{{ getTypeName(item.Document.type, item.Document.method) }}</button>
279279
<a class="hint--rounded hint--no-animate" ref="testCaseTexts" @mouseover="setRequestHint(index, item)" href="javascript:void(0)" @click="restoreRemote(index, item)" :style="{ color: index == currentDocIndex ? 'black' : 'gray' }"> {{(isCaseGroupShow() ? '' : (index + 1) + '. ') + (item.Document.version > 0 ? 'V' + item.Document.version : 'V*') + ' ' + item.Document.name + ' ' + item.Document.url}}</a>
280+
<ul v-show="! (isChainShow || isLocalShow)" style="display: inline-flex; position: absolute; right: 56px; padding: 0px; height: 27px; overflow: scroll hidden;">
281+
<li style="margin: 0px; padding: 2px; background-color: rgba(255, 255, 255, 0.7); border: #DDD 1px solid; border-radius: 2px " v-for="(tag, ind) in item.Document.tagList" :id="'tag' + index" >
282+
<a href="javascript:void(0)" style="position: relative; min-width: 6px; width: auto; height: 30px; " @click="removeTag(ind, tag, index, item, true)" >{{ tag }}</a>
283+
</li>
284+
</ul><button v-show="! (isChainShow || isLocalShow)" class="hint--left" data-hint="新增标签" style="position: absolute; right: 32px;" href="javascript:void(0)" @click="changeTag(index, item, true)"> + </button>
280285
<button v-show="isChainShow && isChainItemShow()" class="hint--left" :data-hint="StringUtil.isEmpty((item.Chain || {}).testAccount, true) ? '绑定帐号' : '解绑帐号 ' + (item.Chain || {}).testAccount + '@' + (((item.Chain || {}).testInfo || {}).baseUrl || '')" :style="{color: ((item.Chain || {}).testInfo || {}).isLoggedIn ? 'red' : 'black' }" style="position: absolute; right: 31px;" id="vDocAccount" @click="bindAccount(index, item)">{{ (item.Chain || {}).testName || (item.Chain || {}).testAccount || '+' }}</button>
281286
<div v-show="isStatisticsEnabled" style="position: absolute; right: 31px; top: 9px; display: inline-flex">
282287
<div v-show="(item.totalCount || 0) > 0" style="background: lightgray; padding: 1px; margin-right: 2px; display: inline-block; position: relative" @click="restoreRemote(index, item, null, true)" >

0 commit comments

Comments
 (0)