Skip to content

Commit 5bbdddd

Browse files
authored
Merge pull request #199 from yuchenyao/dev-0.9.0
change project page
2 parents 916c983 + 52cc28e commit 5bbdddd

File tree

11 files changed

+122
-83
lines changed

11 files changed

+122
-83
lines changed

web/src/commonData/i18n/common/en.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"project": {
2323
"projectName": "Project Name",
2424
"gotoScriptis": "Visit Scriptis",
25-
"createProject": "Create Project",
25+
"createproject": "Create Project",
2626
"editorProject": "Edit Project",
2727
"search": "Search Project",
2828
"deleteProject": "Delete Project",
@@ -81,9 +81,10 @@
8181
"publishSuccess": "Successfully published",
8282
"publishFailed": "Publish failed",
8383
"infoTitle": "Welcome",
84-
"infoHeader": "Welcome to DataSphere Studio !",
84+
"infoHeader": "Welcome to My Project !",
8585
"infoBodyFirstRow": "DataSphere Studio is a one-stop portal focusing on development and management of data application, as a part of WeDataSphere -- the big data platform of WeBank.",
8686
"infoBodySecondRow": "Based on Linkis computation middleware, it's able to easily integrate various data application systems, making the development of data application easier and simpler.",
87+
"workspace": "Workspace",
8788
"appTitle": "Application Navigation",
8889
"applicationStudio": "Business Application Development",
8990
"applicationMore": "More Information",
@@ -104,6 +105,7 @@
104105
"noData": "No data please add"
105106
},
106107
"workspace": {
108+
"infoHeader": "Welcome to DataSphere Studio !",
107109
"createWorkspace": "Create Workspace",
108110
"searchWorkspace": "Search Workspace",
109111
"workspaceList": "Workspace List",
@@ -130,8 +132,9 @@
130132
"HYP": "Change"
131133
},
132134
"workflow": {
135+
"infoHeader": "Welcome to Workflow!",
133136
"workflow": "Workflow",
134-
"createWorkflow": "Create workflow",
137+
"createworkflow": "Create workflow",
135138
"gotoVisualis": "Enter Visualis",
136139
"publishProject": "Publish project",
137140
"searchWorkflow": "Search for workflow",

web/src/commonData/i18n/common/zh.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"project": {
2424
"projectName": "工程名",
2525
"gotoScriptis": "进入Scriptis",
26-
"createProject": "创建工程",
26+
"createproject": "创建工程",
2727
"editorProject": "修改工程",
2828
"search": "搜索工程",
2929
"deleteProject": "删除工程",
@@ -82,11 +82,11 @@
8282
"publishSuccess": "发布成功",
8383
"publishFailed": "发布失败",
8484
"infoTitle": "欢迎信息",
85-
"infoHeader": "欢迎来到 DataSphere Studio !",
85+
"infoHeader": "欢迎来到工作流开发首页!",
8686
"infoBodyFirstRow": "DataSphere Studio是微众银行大数据平台——WeDataSphere,自研的一站式数据应用开发管理门户。",
8787
"infoBodySecondRow": "基于Linkis计算中间件构建,可轻松整合上层各数据应用系统,让数据应用开发变得简洁又易用。",
8888
"appTitle": "应用导航",
89-
"applicationStudio": "业务应用开发",
89+
"workspace": "工作空间",
9090
"applicationMore": "了解更多",
9191
"applicationTipsFirst": "工程 > 工作流,是应用开发的基本组织结构。",
9292
"applictaionTipsSecond": "在工作流拖拽编辑页面,DataSphere Studio已集成的所有数据应用系统,都将以工作流节点的形式出现,让您能够以业务的视角将其编排串连起来,快速实现全部业务。",
@@ -105,6 +105,7 @@
105105
"noData": "暂无数据请添加"
106106
},
107107
"workspace": {
108+
"infoHeader": "欢迎来到 DataSphere Studio !",
108109
"createWorkspace": "创建工作空间",
109110
"searchWorkspace": "搜索工作空间",
110111
"workspaceList": "工作空间列表",
@@ -131,8 +132,9 @@
131132
"HYP": "换一批"
132133
},
133134
"workflow": {
135+
"infoHeader": "欢迎来到工作流!",
134136
"workflow": "工作流",
135-
"createWorkflow": "创建工作流",
137+
"createworkflow": "创建工作流",
136138
"gotoVisualis": "进入Visualis",
137139
"publishProject": "发布工程",
138140
"searchWorkflow": "搜索工作流",

web/src/js/component/workflowContentItem/index.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@
3131
margin: 15px;
3232
box-shadow: 0 2px 12px 0 rgba(0,0,0,.2);
3333
background: #fff;
34+
.project-add {
35+
display: flex;
36+
flex-direction: column;
37+
justify-content: center;
38+
align-items: center;
39+
height: 100%;
40+
cursor: pointer;
41+
}
3442
.project-main {
3543
position: relative;
3644
height: 130px;

web/src/js/component/workflowContentItem/index.vue

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,19 @@
55
</h3>
66
<slot></slot>
77
<Row
8-
v-if="dataList.length > 0"
98
class="content-item">
9+
<i-col
10+
:xs="12" :sm="8" :md="6" :lg="4"
11+
class="project-item ">
12+
<div class="project-add" @click="add">
13+
<Icon
14+
type="ios-add"
15+
class="icon-blod"
16+
size="60"
17+
></Icon>
18+
<span>{{$t(`message.${source}.create${source}`)}}</span>
19+
</div>
20+
</i-col>
1021
<i-col
1122
class="project-item"
1223
:xs="12" :sm="8" :md="6" :lg="4"
@@ -151,9 +162,9 @@
151162
</i-col>
152163

153164
</Row>
154-
<div
165+
<!-- <div
155166
class="no-data"
156-
v-else>{{$t('message.workflowItem.nodata')}}</div>
167+
v-else>{{$t('message.workflowItem.nodata')}}</div> -->
157168
<Page
158169
v-if="dataList.length > 0 && pagination.size < dataList.length "
159170
class="page-bar"
@@ -200,6 +211,10 @@ export default {
200211
tagProp: {
201212
type: String,
202213
default: 'business',
214+
},
215+
source: {
216+
type: String,
217+
default: 'Project'
203218
}
204219
},
205220
data() {
@@ -221,12 +236,12 @@ export default {
221236
return (this.pagination.current - 1) * this.pagination.size <= index && index < this.pagination.current * this.pagination.size;
222237
});
223238
},
224-
pageNumer() {
239+
pageNumber() {
225240
return Math.ceil(this.dataList.length / this.pagination.size);
226241
},
227242
},
228243
watch: {
229-
pageNumer(val) {
244+
pageNumber(val) {
230245
if (val < this.pagination.current && val !== 0) {
231246
this.pagination.current = val;
232247
}
@@ -257,6 +272,9 @@ export default {
257272
publish(classifyId, project) {
258273
this.$emit('publish', classifyId, project);
259274
},
275+
add() {
276+
this.$emit('add');
277+
},
260278
isPercent(id) {
261279
let flag = false;
262280
this.precentList.map((item) => {

web/src/js/module/project/feature.vue

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
<div class="project-type-module">
44
<div class="project-type-header">
55
<svg t="1573033007700" viewBox="0 0 1025 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="113086" width="20" height="20"><path d="M451.310305 529.689024L50.690586 339.234666a72.444333 72.444333 0 0 1 0-135.09716L451.374302 13.619151a144.888665 144.888665 0 0 1 122.041821 0l400.491726 190.518355a72.444333 72.444333 0 0 1 0 135.033163L573.416123 529.753021c-38.71804 17.98309-83.387778 17.98309-122.041821 0z" fill="#5580EB" p-id="113087"></path><path d="M512.299218 784.460127c-29.118526 0-57.853071-6.655663-84.027747-19.519012l-392.940107-195.190119a54.333249 54.333249 0 1 1 48.18956-96.891095l392.556127 195.190119c22.91084 11.135436 49.597489 11.135436 72.444333 0l392.940107-195.190119a54.333249 54.333249 0 1 1 48.189561 96.891095l-393.324088 195.190119a189.43041 189.43041 0 0 1-84.027746 19.519012z m0 229.620375a189.43041 189.43041 0 0 1-84.027747-19.519012l-392.940107-195.190118a54.333249 54.333249 0 1 1 48.18956-96.891095l392.556127 195.190118c22.846843 11.26343 49.597489 11.26343 72.444333 0l392.940107-195.190118a54.333249 54.333249 0 1 1 48.189561 96.827098l-393.324088 195.190119a189.43041 189.43041 0 0 1-84.027746 19.583008z" fill="#5580EB" opacity=".5" p-id="113088"></path></svg>
6-
<span class="project-type-header-label">{{$t('message.project.applicationStudio')}}</span>
6+
<span class="project-type-header-label">{{$t('message.project.workspace')}}</span>
77
</div>
88
<div
99
class="project-type-more"
1010
:class="{'en': isEnEnv, 'cn': !isEnEnv}">
1111
</div>
12-
<div class="project-type-list">
12+
<!-- <div class="project-type-list">
1313
<div class="project-type-list-item-wrap">
1414
<svg t="1572508997540" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3412" xmlns:xlink="http://www.w3.org/1999/xlink" width="30" height="30">
1515
<path d="M468.89187555 244.16003161L405.84786173 124.9330568H77.68240987v774.65170172h368.68449976c-9.0617679-19.02971259-16.44063605-38.96560197-21.8776968-59.54876049H133.6064632V303.7087921h782.03056989v197.15817876c7.24941431 6.47269136 15.01664395 12.03920592 21.74824296 19.15916642 12.81592889 13.72210569 23.81950419 28.60929581 34.04635654 44.14375507V244.16003161H468.89187555z m-335.28541235-59.67821433h239.74848791l31.45728 59.5487605H133.6064632v-59.5487605z m614.38786371 536.32720592h111.71865284v59.5487605h-111.71865284v119.22697482h-55.92405333v-119.22697482h-111.71865283v-59.5487605h111.71865283v-119.22697481h55.92405333v119.22697481z m-27.83257283-238.32449579c-138.77450272 0-251.39933235 120.00369778-251.39933235 268.09887606 0 148.09517827 112.49537581 268.22832987 251.26987852 268.22832986 138.90395653 0 251.39933235-120.00369778 251.39933234-268.09887605 0-71.07015111-26.40858075-139.29231803-73.52977383-189.64985678s-111.0713837-78.57847309-177.74010468-78.57847309z m-0.12945383 476.64899161c-107.83503803-0.25890765-195.21637136-93.4656632-195.34582519-208.55011555 0.12945383-115.21390617 87.51078717-208.42066173 195.47527902-208.67956939 52.16989235 0 101.36234667 21.74824297 138.2566874 61.10220642 37.02379457 39.35396347 57.21859161 91.78276347 57.21859161 147.57736297-0.12945383 115.21390617-87.64024098 208.55011555-195.60473284 208.55011555z" fill="#2d8cf0" p-id="3413"></path>
@@ -21,9 +21,9 @@
2121
<p class="project-type-list-item-title">{{$t('message.project.createProject')}}</p>
2222
</div>
2323
</div>
24-
</div>
24+
</div> -->
2525
</div>
26-
<div class="project-type-module">
26+
<!-- <div class="project-type-module">
2727
<div class="project-type-header">
2828
<svg t="1572509911758" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9923" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18">
2929
<path d="M447.7 62H94.1C76.4 62 62 74.6 62 90.1v478.1c0 15.5 14.4 28.1 32.1 28.1h353.6c17.8 0 32.1-12.6 32.1-28.1V90.1c0.1-15.5-14.3-28.1-32.1-28.1z m-32.1 478.1H126.3V118.3h289.3v421.8z" fill="#37B1C9" p-id="9924"></path><path d="M447.7 652.6H94.1c-17.8 0-32.1 12.6-32.1 28.1v253.1c0 15.5 14.4 28.1 32.1 28.1h353.6c17.8 0 32.1-12.6 32.1-28.1v-253c0.1-15.6-14.3-28.2-32.1-28.2z m-32.1 253.2H126.3V708.9h289.3v196.9zM929.9 62H576.3c-17.8 0-32.1 12.6-32.1 28.1v253.1c0 15.5 14.4 28.1 32.1 28.1h353.6c17.8 0 32.1-12.6 32.1-28.1V90.1c0-15.5-14.4-28.1-32.1-28.1z m-32.2 253.1H608.4V118.3h289.3v196.8z" fill="#9BD8E4" p-id="9925"></path><path d="M929.9 427.6H576.3c-17.8 0-32.1 12.6-32.1 28.1v478.1c0 15.5 14.4 28.1 32.1 28.1h353.6c17.8 0 32.1-12.6 32.1-28.1v-478c0-15.6-14.4-28.2-32.1-28.2z m-32.2 478.2H608.4V483.9h289.3v421.9z" fill="#37B1C9" p-id="9926"></path>
@@ -52,7 +52,7 @@
5252
</div>
5353
</div>
5454
</div>
55-
</div>
55+
</div> -->
5656
</div>
5757
</template>
5858
<script>
@@ -71,13 +71,13 @@ export default {
7171
}
7272
},
7373
methods: {
74-
goto(type) {
75-
console.log('--->', type)
76-
this.gotoCommonIframe(type);
77-
},
78-
createProject() {
79-
this.$emit('add-project');
80-
},
74+
// goto(type) {
75+
// console.log('--->', type)
76+
// this.gotoCommonIframe(type);
77+
// },
78+
// createProject() {
79+
// this.$emit('add-project');
80+
// },
8181
linkTo() {
8282
const newTab = window.open('about:blank');
8383
setTimeout(() => {

web/src/js/module/project/index.vue

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
<div class="page-bgc-header">
44
<div class="header-info">
55
<h1>{{$t('message.project.infoHeader')}}</h1>
6-
<p>{{$t('message.project.infoBodyFirstRow')}}</p>
7-
<p>{{$t('message.project.infoBodySecondRow')}}</p>
86
</div>
9-
<feature @add-project="addProject"></feature>
7+
<feature />
108
</div>
119
<template v-if="dataList.length > 0">
1210
<project-content-item
@@ -17,8 +15,10 @@
1715
:data-list="item.dssProjectList"
1816
:current-data="item"
1917
:precent-list="precentList"
18+
source="project"
2019
tag-prop="business"
2120
@goto="gotoWorkflow"
21+
@add="addProject"
2222
@modify="projectModify"
2323
@delete="deleteProject"
2424
@copy="copyProject"
@@ -158,6 +158,7 @@ export default {
158158
showResourceView: false, // 是否展示资源文件上传
159159
projectResources: [], // 工程级别资源文件
160160
activeItem: {},
161+
workspaceId: 1 // 默认工作空间Id
161162
};
162163
},
163164
computed: {
@@ -171,7 +172,14 @@ export default {
171172
return this.$t('message.project.tips');
172173
}
173174
},
175+
watch: {
176+
$route() {
177+
this.workspaceId = this.$route.query.workspaceId; //获取传来的参数
178+
this.getclassListData();
179+
}
180+
},
174181
created() {
182+
this.workspaceId = this.$route.query.workspaceId;
175183
// 获取所有分类和工程
176184
this.getclassListData();
177185
},
@@ -183,7 +191,7 @@ export default {
183191
methods: {
184192
getclassListData() {
185193
this.loading = true;
186-
return api.fetch(`/dss/tree`, {}, 'get').then((res) => {
194+
return api.fetch(`/dss/tree`, { workspaceId: this.workspaceId }, 'get').then((res) => {
187195
this.cacheData = res.data;
188196
this.dataList = this.cacheData;
189197
this.activeItem = this.dataList[0];
@@ -208,10 +216,11 @@ export default {
208216
return item.id === projectData.taxonomyID;
209217
});
210218
if (this.checkName(projectList[0].dssProjectList, projectData.name, projectData.id)) return this.$Message.warning(this.$t('message.project.nameUnrepeatable'));
219+
projectData.workspaceId = this.workspaceId;
211220
this.loading = true;
212221
if (this.actionType === 'add') {
213222
api.fetch('/dss/addProject', projectData, 'post').then(() => {
214-
this.$Message.success(`${this.$t('message.project.createProject')}${this.$t('message.newConst.success')}`);
223+
this.$Message.success(`${this.$t('message.project.createproject')}${this.$t('message.newConst.success')}`);
215224
this.getclassListData().then((data) => {
216225
// 新建完工程进到工作流页
217226
const currentProject = data[0].dssProjectList.filter((project) => project.name === projectData.name)[0];
@@ -221,6 +230,7 @@ export default {
221230
projectTaxonomyID: 1,
222231
projectID: currentProject.latestVersion.projectID,
223232
projectVersionID: currentProject.latestVersion.id,
233+
workspaceId: this.workspaceId
224234
}
225235
});
226236
});
@@ -312,7 +322,7 @@ export default {
312322
projectID: subItem.id,
313323
projectVersionID: subItem.latestVersion.id,
314324
projectName: subItem.name,
315-
workspaceId: this.$route.query.workspaceId
325+
workspaceId: this.workspaceId
316326
}
317327
this.$router.push({
318328
name: 'Workflow',

web/src/js/module/project/module/projectForm.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,14 @@
1616
<Input
1717
v-model="projectDataCurrent.name"
1818
:placeholder="$t('message.newConst.enterName')"
19-
:disabled="actionType === 'modify'"></Input>
19+
:disabled="actionType === 'modify'"/>
2020
</FormItem>
2121
<FormItem
2222
:label="$t('message.project.product')"
2323
prop="product">
2424
<Input
2525
v-model="projectDataCurrent.product"
26-
:placeholder="$t('message.newConst.enterName')">
27-
</Input>
26+
:placeholder="$t('message.newConst.enterName')"/>
2827
</FormItem>
2928
<FormItem
3029
:label="$t('message.project.appArea')"
@@ -54,7 +53,7 @@
5453
<Input
5554
v-model="projectDataCurrent.description"
5655
type="textarea"
57-
:placeholder="$t('message.project.pleaseInputProjectDesc')"></Input>
56+
:placeholder="$t('message.project.pleaseInputProjectDesc')"/>
5857
</FormItem>
5958
</Form>
6059
<div slot="footer">

0 commit comments

Comments
 (0)