refactor(接口测试): 场景步骤加载优化
This commit is contained in:
parent
d9b4fab522
commit
f89f1edc34
|
@ -5,13 +5,13 @@
|
||||||
|
|
||||||
<!--操作按钮-->
|
<!--操作按钮-->
|
||||||
<div class="ms-opt-btn">
|
<div class="ms-opt-btn">
|
||||||
<el-tooltip :content="$t('commons.follow')" placement="bottom" effect="dark" v-if="!showFollow">
|
<el-tooltip :content="$t('commons.follow')" placement="bottom" effect="dark" v-show="!showFollow">
|
||||||
<i class="el-icon-star-off" style="color: #783987; font-size: 25px; margin-right: 5px;cursor: pointer;position: relative; top: 5px; " @click="saveFollow"/>
|
<i class="el-icon-star-off" style="color: #783987; font-size: 25px; margin-right: 5px;cursor: pointer;position: relative; top: 5px; " @click="saveFollow"/>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip :content="$t('commons.cancel')" placement="bottom" effect="dark" v-if="showFollow">
|
<el-tooltip :content="$t('commons.cancel')" placement="bottom" effect="dark" v-show="showFollow">
|
||||||
<i class="el-icon-star-on" style="color: #783987; font-size: 28px; margin-right: 5px;cursor: pointer;position: relative; top: 5px; " @click="saveFollow"/>
|
<i class="el-icon-star-on" style="color: #783987; font-size: 28px; margin-right: 5px;cursor: pointer;position: relative; top: 5px; " @click="saveFollow"/>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-link type="primary" style="margin-right: 5px" @click="openHis" v-if="path === '/api/automation/update'">{{ $t('operating_log.change_history') }}</el-link>
|
<el-link type="primary" style="margin-right: 5px" @click="openHis" v-show="path === '/api/automation/update'">{{ $t('operating_log.change_history') }}</el-link>
|
||||||
<!-- 版本历史 -->
|
<!-- 版本历史 -->
|
||||||
<ms-version-history v-xpack
|
<ms-version-history v-xpack
|
||||||
ref="versionHistory"
|
ref="versionHistory"
|
||||||
|
@ -195,7 +195,7 @@
|
||||||
highlight-current
|
highlight-current
|
||||||
@node-expand="nodeExpand"
|
@node-expand="nodeExpand"
|
||||||
@node-collapse="nodeCollapse"
|
@node-collapse="nodeCollapse"
|
||||||
:allow-drop="allowDrop" @node-drag-end="allowDrag" @node-click="nodeClick" draggable ref="stepTree" v-if="showHideTree">
|
:allow-drop="allowDrop" @node-drag-end="allowDrag" @node-click="nodeClick" draggable ref="stepTree">
|
||||||
<span class="custom-tree-node father" slot-scope="{node, data}" style="width: 96%">
|
<span class="custom-tree-node father" slot-scope="{node, data}" style="width: 96%">
|
||||||
<!-- 步骤组件-->
|
<!-- 步骤组件-->
|
||||||
<ms-component-config
|
<ms-component-config
|
||||||
|
@ -467,7 +467,6 @@ export default {
|
||||||
levels: PRIORITY,
|
levels: PRIORITY,
|
||||||
scenario: {},
|
scenario: {},
|
||||||
loading: false,
|
loading: false,
|
||||||
showHideTree: true,
|
|
||||||
apiListVisible: false,
|
apiListVisible: false,
|
||||||
customizeVisible: false,
|
customizeVisible: false,
|
||||||
isBtnHide: false,
|
isBtnHide: false,
|
||||||
|
@ -1218,9 +1217,8 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
showHide() {
|
showHide() {
|
||||||
this.showHideTree = false
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.showHideTree = true
|
this.$store.state.forceRerenderIndex = getUUID();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
runDebug(runScenario) {
|
runDebug(runScenario) {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<div class="header" @click="active(data)">
|
<div class="header" @click="active(data)">
|
||||||
<slot name="beforeHeaderLeft">
|
<slot name="beforeHeaderLeft">
|
||||||
<div v-if="data.index" class="el-step__icon is-text enable-switch" :style="{'color': color, 'background-color': backgroundColor}">
|
<div v-if="data.index" class="el-step__icon is-text enable-switch" :style="{'color': color, 'background-color': backgroundColor}">
|
||||||
<div class="el-step__icon-inner">{{ data.index }}</div>
|
<div class="el-step__icon-inner" :key="$store.state.forceRerenderIndex">{{ data.index }}</div>
|
||||||
</div>
|
</div>
|
||||||
<slot name="behindHeaderLeft" v-if="!isMax"></slot>
|
<slot name="behindHeaderLeft" v-if="!isMax"></slot>
|
||||||
<el-tag class="ms-left-btn" size="small" :style="{'color': color, 'background-color': backgroundColor}">{{ title }}</el-tag>
|
<el-tag class="ms-left-btn" size="small" :style="{'color': color, 'background-color': backgroundColor}">{{ title }}</el-tag>
|
||||||
|
|
|
@ -34,7 +34,8 @@ const state = {
|
||||||
apiStatus: new Map(),
|
apiStatus: new Map(),
|
||||||
testCaseMap: new Map(),
|
testCaseMap: new Map(),
|
||||||
curTabId: null,
|
curTabId: null,
|
||||||
testCaseDefaultValue: {}
|
testCaseDefaultValue: {},
|
||||||
|
forceRerenderIndex: "",
|
||||||
}
|
}
|
||||||
|
|
||||||
const store = new Vuex.Store({
|
const store = new Vuex.Store({
|
||||||
|
|
Loading…
Reference in New Issue