fix(项目设置): 修复环境编辑缺少全屏按钮的缺陷
--bug=1018538 --user=王孝刚 【项目设置】项目设置-项目环境-配置环境缺少全屏展示按钮 https://www.tapd.cn/55049933/s/1269812
This commit is contained in:
parent
f557a88d31
commit
6ab16db891
|
@ -3,6 +3,13 @@
|
||||||
<div class="msDialogHeader">
|
<div class="msDialogHeader">
|
||||||
<span style="float: left;font-size: 18px;color: #303133;">{{ title }}</span>
|
<span style="float: left;font-size: 18px;color: #303133;">{{ title }}</span>
|
||||||
|
|
||||||
|
<div style="float: right; margin-right: 30px">
|
||||||
|
<el-tooltip effect="dark" :content="$t('commons.full_screen_editing')"
|
||||||
|
placement="top-start">
|
||||||
|
<font-awesome-icon class="alt-ico" :icon="['fa', 'expand-alt']" size="lg" @click="fullScreen"/>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div v-if="!hideButton" style="float: right;width: fit-content;">
|
<div v-if="!hideButton" style="float: right;width: fit-content;">
|
||||||
<div style="float: left; margin-right: 8px;">
|
<div style="float: left; margin-right: 8px;">
|
||||||
<slot name="other"></slot>
|
<slot name="other"></slot>
|
||||||
|
@ -39,6 +46,9 @@ export default {
|
||||||
},
|
},
|
||||||
confirm() {
|
confirm() {
|
||||||
this.$emit("confirm");
|
this.$emit("confirm");
|
||||||
|
},
|
||||||
|
fullScreen() {
|
||||||
|
this.$emit("fullScreen");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,4 +63,9 @@ export default {
|
||||||
.msDialogHeader {
|
.msDialogHeader {
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.alt-ico {
|
||||||
|
font-size: 13px;
|
||||||
|
color: #8c939d;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -59,11 +59,12 @@
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<!-- 创建、编辑、复制环境时的对话框 -->
|
<!-- 创建、编辑、复制环境时的对话框 -->
|
||||||
<el-dialog :visible.sync="dialogVisible" :close-on-click-modal="false" width="66%" top="50px">
|
<el-dialog :visible.sync="dialogVisible" :close-on-click-modal="false" width="66%" top="50px"
|
||||||
|
:fullscreen="isFullScreen">
|
||||||
<template #title>
|
<template #title>
|
||||||
<ms-dialog-header :title="dialogTitle" :hide-button="true"
|
<ms-dialog-header :title="dialogTitle" :hide-button="true"
|
||||||
@cancel="dialogVisible = false"
|
@cancel="dialogVisible = false"
|
||||||
@confirm="save"/>
|
@confirm="save" @fullScreen="fullScreen"/>
|
||||||
</template>
|
</template>
|
||||||
<environment-edit
|
<environment-edit
|
||||||
:if-create="ifCreate"
|
:if-create="ifCreate"
|
||||||
|
@ -77,7 +78,8 @@
|
||||||
@refreshAfterSave="refresh">
|
@refreshAfterSave="refresh">
|
||||||
</environment-edit>
|
</environment-edit>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<environment-import :project-list="projectList" :to-import-project-id="currentProjectId" @refresh="refresh" ref="envImport"></environment-import>
|
<environment-import :project-list="projectList" :to-import-project-id="currentProjectId" @refresh="refresh"
|
||||||
|
ref="envImport"></environment-import>
|
||||||
|
|
||||||
<el-dialog title="域名列表" :visible.sync="domainVisible">
|
<el-dialog title="域名列表" :visible.sync="domainVisible">
|
||||||
<el-table :data="conditions">
|
<el-table :data="conditions">
|
||||||
|
@ -139,7 +141,7 @@ import EnvironmentEdit from "metersphere-frontend/src/components/environment/Env
|
||||||
import MsAsideItem from "metersphere-frontend/src/components/MsAsideItem";
|
import MsAsideItem from "metersphere-frontend/src/components/MsAsideItem";
|
||||||
import MsAsideContainer from "metersphere-frontend/src/components/MsAsideContainer";
|
import MsAsideContainer from "metersphere-frontend/src/components/MsAsideContainer";
|
||||||
import ProjectSwitch from "metersphere-frontend/src/components/head/ProjectSwitch";
|
import ProjectSwitch from "metersphere-frontend/src/components/head/ProjectSwitch";
|
||||||
import {downloadFile} from "metersphere-frontend/src/utils";
|
import {downloadFile, operationConfirm} from "metersphere-frontend/src/utils";
|
||||||
import {getCurrentProjectID} from "metersphere-frontend/src/utils/token";
|
import {getCurrentProjectID} from "metersphere-frontend/src/utils/token";
|
||||||
import EnvironmentImport from "./EnvironmentImport";
|
import EnvironmentImport from "./EnvironmentImport";
|
||||||
import MsMainContainer from "metersphere-frontend/src/components/MsMainContainer";
|
import MsMainContainer from "metersphere-frontend/src/components/MsMainContainer";
|
||||||
|
@ -147,7 +149,6 @@ import MsContainer from "metersphere-frontend/src/components/MsContainer";
|
||||||
import MsDialogHeader from "metersphere-frontend/src/components/MsDialogHeader";
|
import MsDialogHeader from "metersphere-frontend/src/components/MsDialogHeader";
|
||||||
import {listAllProject} from "../../../api/project";
|
import {listAllProject} from "../../../api/project";
|
||||||
import {delEnvironmentById, getEnvironmentPages} from "../../../api/environment";
|
import {delEnvironmentById, getEnvironmentPages} from "../../../api/environment";
|
||||||
import {operationConfirm} from "metersphere-frontend/src/utils";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "EnvironmentList",
|
name: "EnvironmentList",
|
||||||
|
@ -191,6 +192,7 @@ export default {
|
||||||
projectFilters: [],
|
projectFilters: [],
|
||||||
screenHeight: 'calc(100vh - 155px)',
|
screenHeight: 'calc(100vh - 155px)',
|
||||||
ifCreate: false, //是否是创建环境
|
ifCreate: false, //是否是创建环境
|
||||||
|
isFullScreen: false //是否全屏
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -201,6 +203,9 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
fullScreen() {
|
||||||
|
this.isFullScreen = !this.isFullScreen;
|
||||||
|
},
|
||||||
showInfo(row) {
|
showInfo(row) {
|
||||||
const config = JSON.parse(row.config);
|
const config = JSON.parse(row.config);
|
||||||
this.conditions = config.httpConfig.conditions;
|
this.conditions = config.httpConfig.conditions;
|
||||||
|
|
|
@ -64,11 +64,12 @@
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<!-- 创建、编辑、复制环境时的对话框 -->
|
<!-- 创建、编辑、复制环境时的对话框 -->
|
||||||
<el-dialog :visible.sync="dialogVisible" :close-on-click-modal="false" top="50px" width="66%">
|
<el-dialog :visible.sync="dialogVisible" :close-on-click-modal="false" top="50px" width="66%"
|
||||||
|
:fullscreen="isFullScreen">
|
||||||
<template #title>
|
<template #title>
|
||||||
<ms-dialog-header :title="dialogTitle"
|
<ms-dialog-header :title="dialogTitle"
|
||||||
@cancel="dialogVisible = false"
|
@cancel="dialogVisible = false"
|
||||||
@confirm="save"/>
|
@confirm="save" @fullScreen="fullScreen"/>
|
||||||
</template>
|
</template>
|
||||||
<environment-edit
|
<environment-edit
|
||||||
:if-create="ifCreate"
|
:if-create="ifCreate"
|
||||||
|
@ -136,7 +137,7 @@ import MsTableOperatorButton from "metersphere-frontend/src/components/MsTableOp
|
||||||
import MsTablePagination from "metersphere-frontend/src/components/pagination/TablePagination";
|
import MsTablePagination from "metersphere-frontend/src/components/pagination/TablePagination";
|
||||||
import {Environment, parseEnvironment} from "metersphere-frontend/src/model/EnvironmentModel";
|
import {Environment, parseEnvironment} from "metersphere-frontend/src/model/EnvironmentModel";
|
||||||
import ProjectSwitch from "metersphere-frontend/src/components/head/ProjectSwitch";
|
import ProjectSwitch from "metersphere-frontend/src/components/head/ProjectSwitch";
|
||||||
import {downloadFile, strMapToObj} from "metersphere-frontend/src/utils";
|
import {downloadFile, operationConfirm, strMapToObj} from "metersphere-frontend/src/utils";
|
||||||
import EnvironmentImport from "./EnvironmentImport";
|
import EnvironmentImport from "./EnvironmentImport";
|
||||||
import ShowMoreBtn from "metersphere-frontend/src/components/table/ShowMoreBtn";
|
import ShowMoreBtn from "metersphere-frontend/src/components/table/ShowMoreBtn";
|
||||||
import {
|
import {
|
||||||
|
@ -150,7 +151,6 @@ import MsDialogHeader from "metersphere-frontend/src/components/MsDialogHeader";
|
||||||
import EnvironmentEdit from "metersphere-frontend/src/components/environment/EnvironmentEdit"
|
import EnvironmentEdit from "metersphere-frontend/src/components/environment/EnvironmentEdit"
|
||||||
import {listAllProject} from "../../../api/project";
|
import {listAllProject} from "../../../api/project";
|
||||||
import {batchAddEnvGroup, delEnvironmentById, getEnvironmentPages} from "../../../api/environment";
|
import {batchAddEnvGroup, delEnvironmentById, getEnvironmentPages} from "../../../api/environment";
|
||||||
import {operationConfirm} from "metersphere-frontend/src/utils";
|
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -204,6 +204,7 @@ export default {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
ifCreate: false, //是否是创建环境
|
ifCreate: false, //是否是创建环境
|
||||||
|
isFullScreen: false //是否全屏
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -228,6 +229,9 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
fullScreen() {
|
||||||
|
this.isFullScreen = !this.isFullScreen;
|
||||||
|
},
|
||||||
showInfo(row) {
|
showInfo(row) {
|
||||||
const config = JSON.parse(row.config);
|
const config = JSON.parse(row.config);
|
||||||
this.conditions = config.httpConfig.conditions;
|
this.conditions = config.httpConfig.conditions;
|
||||||
|
@ -427,7 +431,7 @@ export default {
|
||||||
if (obj.protocol && obj.socket) {
|
if (obj.protocol && obj.socket) {
|
||||||
return obj.protocol + "://" + obj.socket;
|
return obj.protocol + "://" + obj.socket;
|
||||||
}
|
}
|
||||||
} else if (config.httpConfig && config.httpConfig.conditions.length > 1) {
|
} else if (config.httpConfig && config.httpConfig.conditions.length > 1) {
|
||||||
return "SHOW_INFO";
|
return "SHOW_INFO";
|
||||||
} else if (config.tcpConfig && config.tcpConfig.server) {
|
} else if (config.tcpConfig && config.tcpConfig.server) {
|
||||||
return config.tcpConfig.server;
|
return config.tcpConfig.server;
|
||||||
|
|
Loading…
Reference in New Issue