fix(项目管理): 修复环境bug
This commit is contained in:
parent
3029d1e078
commit
b88bd04cec
|
@ -142,8 +142,9 @@
|
|||
const focusKey = ref<string>('');
|
||||
// 所有的断言列表参数
|
||||
const assertions = defineModel<any[]>('params', { default: [] });
|
||||
const activeIds = ref('');
|
||||
// Item点击的key
|
||||
const activeKey = ref<string>(assertions.value[0].id);
|
||||
const activeKey = ref<string>('');
|
||||
// 展示的value
|
||||
const valueKey = computed(() => {
|
||||
return activeKey.value && assertions.value.find((item) => item.id === activeKey.value)?.assertionType;
|
||||
|
|
|
@ -259,7 +259,7 @@
|
|||
if (index > -1 && !props.isCopy) {
|
||||
const httpItem = {
|
||||
...form.value,
|
||||
hostname: `${protocol}:${url}`,
|
||||
hostname: `${protocol}://${url}`,
|
||||
pathMatchRule: {
|
||||
path,
|
||||
condition,
|
||||
|
@ -273,7 +273,7 @@
|
|||
const insertItem = {
|
||||
...form.value,
|
||||
id: getGenerateId(),
|
||||
hostname: `${protocol}:${url}`,
|
||||
hostname: `${protocol}://${url}`,
|
||||
order: store.currentEnvDetailInfo.config.httpConfig.length + 1,
|
||||
moduleMatchRule: { modules },
|
||||
};
|
||||
|
@ -325,7 +325,7 @@
|
|||
moduleId: currentItem.moduleMatchRule.modules.map((item) => item.moduleId) || [],
|
||||
path,
|
||||
condition,
|
||||
url: urlPath && urlPath?.length > 1 ? `//${urlPath[1]}` : '',
|
||||
url: urlPath && urlPath?.length > 1 ? `${urlPath[1]}` : '',
|
||||
};
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -202,6 +202,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import { VueDraggable } from 'vue-draggable-plus';
|
||||
|
||||
import MsButton from '@/components/pure/ms-button/index.vue';
|
||||
|
@ -464,12 +465,16 @@
|
|||
if (store.currentId === NEW_ENV_PARAM) {
|
||||
// 删除id为newEnvParam的环境
|
||||
envList.value = envList.value.filter((item) => item.id !== id);
|
||||
} else {
|
||||
await deleteEnv(id);
|
||||
store.setCurrentId(envList.value[0].id);
|
||||
}
|
||||
if (store.currentId === id) {
|
||||
store.setCurrentId('');
|
||||
if (id === NEW_ENV_PARAM) {
|
||||
envList.value = envList.value.filter((item) => item.id !== id);
|
||||
store.setCurrentId(envList.value[0].id);
|
||||
return;
|
||||
}
|
||||
await deleteEnv(id);
|
||||
Message.success(t('common.deleteSuccess'));
|
||||
store.setCurrentId(envList.value[0].id);
|
||||
searchData();
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line no-console
|
||||
|
@ -575,7 +580,7 @@
|
|||
padding: 7px 8px;
|
||||
height: 38px;
|
||||
box-sizing: border-box;
|
||||
border-radius: var(--border-radius-base);
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
.node-extra {
|
||||
opacity: 0;
|
||||
|
|
Loading…
Reference in New Issue