Skip to content

Commit

Permalink
fix:体验提单修复 (#1483)
Browse files Browse the repository at this point in the history
  • Loading branch information
leafage-collb authored Jul 23, 2024
1 parent 40a09ac commit e425d0a
Show file tree
Hide file tree
Showing 5 changed files with 367 additions and 373 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,12 @@
},
methods: {
handleClick () {
this.$refs.tagInput.focusInputer();
if (!this.needsLogin || this.disabled) return;
this.popupLogin();
// 解决 focus 直接覆盖了清空事件
setTimeout(() => {
this.$refs.tagInput.focusInputer();
if (!this.needsLogin || this.disabled) return;
this.popupLogin();
}, 0);
},
/**
* 过滤数据的回调函数
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,11 @@
<div v-if="deploymentInfoBackUp?.build_method === 'custom_image' && !isSmartApp">
<!-- allowMultipleImage 为false 代表可以需要自己选择一条tag -->
<div v-if="!allowMultipleImage">
<div class="code-depot mb15">
<span class="pr20">{{ $t('镜像仓库') }}:</span>
<div
class="code-depot mb15"
v-bk-overflow-tips="{ content: deploymentInfoBackUp.repo_url }"
>
<span>{{ $t('镜像仓库') }}:</span>
{{ deploymentInfoBackUp.repo_url }}
</div>
<div>
Expand Down Expand Up @@ -145,10 +148,11 @@
<div v-else>
<template v-if="!isSmartApp">
<div
class="code-depot mb10"
v-if="deploymentInfoBackUp.repo_url"
class="code-depot mb10"
v-bk-overflow-tips="{ content: deploymentInfoBackUp.repo_url }"
>
<span class="pr20">{{ $t('代码仓库') }}:</span>
<span>{{ $t('代码仓库') }}:</span>
{{ deploymentInfoBackUp.repo_url }}
</div>
<div class="image-source">
Expand Down Expand Up @@ -1487,4 +1491,9 @@ export default {
min-height: 620px;
}
}
.code-depot {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
v-model="moduleValue"
style="width: 150px;"
:clearable="false"
@change="getDeployHistory(1)"
>
<bk-option
v-for="option in curAppModuleList"
Expand All @@ -34,21 +35,10 @@
v-model="personnelSelectorList"
style="width: 350px;"
:placeholder="$t('请输入')"
:max-data="1"
:multiple="false"
@change="getDeployHistory(1)"
/>
</bk-form-item>
<bk-form-item
label=""
style="vertical-align: top;"
>
<bk-button
theme="primary"
type="button"
@click.stop.prevent="getDeployHistory(1)"
>
{{ $t('查询') }}
</bk-button>
</bk-form-item>
</bk-form>
</section>
<bk-table
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,13 @@
</div>
</template>

<script>import deployDetail from './deploy-detail';
<script>
import deployDetail from './deploy-detail';
import deployPreview from './deploy-preview';
import deployDialog from './deploy-dialog';
import deployStatusDetail from './deploy-status-detail';
import appBaseMixin from '@/mixins/app-base-mixin';
import _ from 'lodash';
import { cloneDeep } from 'lodash';
import { bus } from '@/common/bus';
export default {
Expand Down Expand Up @@ -258,7 +259,6 @@ export default {
isLoading: false,
},
isShowDialog: false,
isAppOffline: false, // 是否下架
isFirstDeploy: false, // 是否是第一次部署
listLoading: false,
deploymentInfoData: [], // 部署信息列表
Expand Down Expand Up @@ -288,6 +288,10 @@ export default {
disableModuleTitle() {
return this.$t('是否下架 {n} 模块', { n: this.curModuleId });
},
// 普通应用app
isDefaultApp() {
return this.curAppInfo.application.type === 'default';
},
},
watch: {
Expand Down Expand Up @@ -402,8 +406,10 @@ export default {
// 获取部署版本信息
async getModuleReleaseInfo(listLoading = true) {
if (this.intervalTimer || this.isShowSideslider
|| this.isDialogShowSideslider) return; // 如果已经有了timer则return 打开了侧边栏也不需要watch
// 避免切换切换应用时,普通应用请求当前list接口
if (this.isDefaultApp) return;
// 如果已经有了timer则return 打开了侧边栏也不需要watch
if (this.intervalTimer || this.isShowSideslider || this.isDialogShowSideslider) return;
try {
this.listLoading = listLoading;
const res = await this.$store.dispatch('deploy/getModuleReleaseList', {
Expand Down Expand Up @@ -434,7 +440,7 @@ export default {
rvInst: res.rv_inst,
rvProc: res.rv_proc,
};
this.deploymentInfoDataBackUp = _.cloneDeep(res.data);
this.deploymentInfoDataBackUp = cloneDeep(res.data);
const hasOfflinedData = res.data.filter(e => e.state.offline.pending) || []; // 有正在下架的数据
const hasDeployData = res.data.filter(e => e.state.deployment.pending) || []; // 有正在部署的数据
this.isWatchOfflineing = !!(hasOfflinedData.length); // 如果还存在下架中的数据,这说明还有模块在下架中
Expand Down
Loading

0 comments on commit e425d0a

Please sign in to comment.