Skip to content

Commit fdfacf3

Browse files
author
张晨曦
committed
dev center完成大部分功能还有业务问题和bug
1 parent ec1b3cf commit fdfacf3

File tree

11 files changed

+344
-57
lines changed

11 files changed

+344
-57
lines changed
9.81 KB
Loading

web/src/apps/workflows/assets/styles/workflow.scss

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,28 @@
7676
@include border-color($primary-color, $dark-primary-color);
7777
}
7878
}
79+
.project-nav-tree-bottom {
80+
width: 100%;
81+
height: 34px;
82+
padding: 0 15px;
83+
margin-top: 8px;
84+
line-height: 34px;
85+
.project-nav-add {
86+
line-height: 34px;
87+
text-align: center;
88+
height: 34px;
89+
border: 1px dashed #dee4ec;
90+
font-family: PingFangSC-Regular;
91+
font-size: 14px;
92+
color: rgba(0, 0, 0, 0.65);
93+
font-weight: 400;
94+
cursor: pointer;
95+
&:hover {
96+
background-color: #2E92F7;
97+
color: #fff;
98+
}
99+
}
100+
}
79101
.project-nav-tree {
80102
position: absolute;
81103
width: 250px;
@@ -131,7 +153,7 @@
131153
}
132154
.workflowListContainer {
133155
display: flex;
134-
margin: 0 $padding-25;
156+
// margin: 0 $padding-25;
135157
min-height: 100%;
136158
padding: $padding-25;
137159
border: $border-width-base $border-style-base $border-color-base;

web/src/apps/workflows/module/common/tabList/index.scss

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,18 @@
1010
&.tree-fold {
1111
margin-left: 0px;
1212
}
13+
.tap-menu {
14+
min-width: 98px;
15+
height: 40px;
16+
box-sizing: border-box;
17+
line-height: 40px;
18+
text-align: center;
19+
padding: 0 12px;
20+
// &.active {
21+
// border-top: 1px solid #2e92f7;
22+
// }
23+
}
24+
1325
.tap-bar {
1426
// background: #fff;
1527
&.tree-fold {
@@ -45,7 +57,6 @@
4557
}
4658
}
4759
.bottomTapList {
48-
padding: 0px 16px;
4960
border-bottom: $border-width-base $border-style-base $border-color-base;
5061
@include border-color(
5162
$background-color-base,

web/src/apps/workflows/module/common/tabList/index.vue

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,19 @@
6060
{{ currentButton.dicName }}
6161
</div> -->
6262
<div class="bottomRightContainer">
63+
<div class="tap-menu">
64+
<Dropdown @on-click="swtichMenu">
65+
<a href="javascript:void(0)">
66+
{{ currentMenu }}
67+
<Icon type="ios-arrow-down"></Icon>
68+
</a>
69+
<DropdownMenu slot="list">
70+
<DropdownItem name='dev_center'>开发中心</DropdownItem>
71+
<DropdownItem name='devOps_center'>运维中心</DropdownItem>
72+
<DropdownItem name='calc_center'>实时计算中心</DropdownItem>
73+
</DropdownMenu>
74+
</Dropdown>
75+
</div>
6376
<template v-for="(work, index) in bottomTapList">
6477
<div
6578
:key="work.tabId"
@@ -149,7 +162,13 @@ export default {
149162
},
150163
data() {
151164
return {
152-
currentButton: {}
165+
currentButton: {},
166+
menuList: {
167+
'dev_center': '开发中心',
168+
'devOps_center': '运维中心',
169+
'calc_center': '实时计算中心',
170+
},
171+
currentMenu: '开发中心'
153172
};
154173
},
155174
computed: {},
@@ -198,6 +217,9 @@ export default {
198217
},
199218
menuHandleChangeButton() {
200219
this.$emit("menuHandleChangeButton");
220+
},
221+
swtichMenu(name) {
222+
this.currentMenu = this.menuList[name]
201223
}
202224
}
203225
};
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
<template>
2+
<div class="void-page-wrap">
3+
<div class="void-page-main">
4+
<div class="void-page-main-img">
5+
<img src="../../../assets/img/void_page.png" alt="空页面" />
6+
</div>
7+
<div class="void-page-main-title">
8+
<span>{{ tipTitle }}</span>
9+
</div>
10+
<div class="void-page-main-button">
11+
<Button
12+
icon="md-add"
13+
@click.stop="buttonClick"
14+
class="void-page-main-button-item"
15+
>{{ tipTitle.slice(-3) === "工作流" ? "添加工作流" : "添加项目" }}</Button
16+
>
17+
</div>
18+
</div>
19+
</div>
20+
</template>
21+
22+
<script>
23+
export default {
24+
name: 'VoidPage',
25+
props: {
26+
tipTitle: String,
27+
buttonClick: {
28+
type: Function,
29+
default: () => {}
30+
}
31+
}
32+
};
33+
</script>
34+
35+
<style lang="scss" scoped>
36+
@import "@/common/style/variables.scss";
37+
38+
.void-page-wrap {
39+
display: flex;
40+
justify-content: center;
41+
align-items: center;
42+
width: 100%;
43+
height: 100%;
44+
background-color: #fff;
45+
.void-page-main {
46+
&-title {
47+
font-family: PingFangSC-Regular;
48+
font-size: 14px;
49+
color: rgba(0, 0, 0, 0.45);
50+
letter-spacing: 0;
51+
text-align: center;
52+
line-height: 28px;
53+
font-weight: 400;
54+
margin-top: 24px;
55+
margin-bottom: 16px;
56+
}
57+
&-button {
58+
min-width: 106px;
59+
height: 32px;
60+
line-height: 32px;
61+
text-align: center;
62+
&-item {
63+
background: #2e92f7;
64+
color: #fff;
65+
}
66+
}
67+
}
68+
}
69+
</style>

web/src/apps/workflows/module/workflow/index.vue

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div class="page-bgc">
3-
<div v-if="!dataMapModule">
4-
<template v-if="dataList.length > 0">
3+
<div v-if="!dataMapModule" style="width: 100%; height: 100%">
4+
<template v-if="dataList[0]['dwsFlowList'] && dataList[0]['dwsFlowList'].length > 0">
55
<project-content-item
66
ref="projectConentItem"
77
v-for="item in dataList"
@@ -62,16 +62,23 @@
6262
<slot name="tagList"></slot>
6363
</project-content-item>
6464
</template>
65+
6566
<template v-else>
66-
<div class="no-data">
67+
<VoidPage
68+
tipTitle="该项目下没有工作流,请先添加一个工作流"
69+
:buttonClick="ProjectMergeAdd"
70+
/>
71+
</template>
72+
73+
<div class="no-data" v-show="dataList.length <= 0">
6774
<img
6875
class="no-data-img"
6976
src="../../../../dss/assets/images/no-data.svg"
7077
:alt="$t('message.workflow.searchWorkflow')"
7178
/>
7279
<div>{{ $t("message.workflow.searchWorkflow") }}</div>
7380
</div>
74-
</template>
81+
7582
</div>
7683
<div class="process-bar" v-else>
7784
<dataMap
@@ -168,6 +175,7 @@ import commonModule from "@/apps/workflows/module/common";
168175
import WorkflowForm from "./module/workflowForm.vue";
169176
import WorkflowFormNew from "./module/workflowFormNew.vue";
170177
import VersionDetail from "./module/versionDetail.vue";
178+
import VoidPage from '../common/voidPage/index.vue'
171179
import storage from "@/common/helper/storage";
172180
import api from "@/common/service/api";
173181
import pinyin from "pinyin";
@@ -204,7 +212,8 @@ export default {
204212
WorkflowFormNew,
205213
VersionDetail,
206214
dataMap,
207-
publishComponent
215+
publishComponent,
216+
VoidPage
208217
},
209218
data() {
210219
return {

web/src/apps/workflows/module/workflow/module/workflowModal.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ export default {
122122
},
123123
ProjectMergeConfirm(orchestratorData) {
124124
orchestratorData.dssLabels = [this.getCurrentDsslabels()];
125+
orchestratorData.labels = { route: this.getCurrentDsslabels() };
125126
if (this.checkName(this.flowList, orchestratorData.orchestratorName, orchestratorData.id)) return this.$Message.warning(this.$t('message.workflow.nameUnrepeatable'));
126127
api.fetch(`${this.$API_PATH.PROJECT_PATH}createOrchestrator`, orchestratorData, 'post').then(() => {
127128
this.$Message.success(this.$t('message.workflow.createdSuccess'));
@@ -185,4 +186,4 @@ export default {
185186
padding: 120px 0;
186187
@include font-color(#515a6e, $dark-text-color);
187188
}
188-
</style>
189+
</style>

0 commit comments

Comments
 (0)