Skip to content

Commit 0cc3eb6

Browse files
author
yuchenyao
committed
改造工程页
1 parent ca05eff commit 0cc3eb6

File tree

8 files changed

+72
-52
lines changed

8 files changed

+72
-52
lines changed

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

Lines changed: 3 additions & 2 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",
@@ -84,6 +84,7 @@
8484
"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",
@@ -133,7 +134,7 @@
133134
"workflow": {
134135
"infoHeader": "Welcome to Workflow!",
135136
"workflow": "Workflow",
136-
"createWorkflow": "Create workflow",
137+
"createworkflow": "Create workflow",
137138
"gotoVisualis": "Enter Visualis",
138139
"publishProject": "Publish project",
139140
"searchWorkflow": "Search for workflow",

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

Lines changed: 2 additions & 2 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": "删除工程",
@@ -134,7 +134,7 @@
134134
"workflow": {
135135
"infoHeader": "欢迎来到工作流!",
136136
"workflow": "工作流",
137-
"createWorkflow": "创建工作流",
137+
"createworkflow": "创建工作流",
138138
"gotoVisualis": "进入Visualis",
139139
"publishProject": "发布工程",
140140
"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: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@
77
<Row
88
v-if="dataList.length > 0"
99
class="content-item">
10+
<i-col
11+
:xs="12" :sm="8" :md="6" :lg="4"
12+
class="project-item ">
13+
<div class="project-add" @click="add">
14+
<Icon
15+
type="ios-add"
16+
class="icon-blod"
17+
size="60"
18+
></Icon>
19+
<span>{{$t(`message.${source}.create${source}`)}}</span>
20+
</div>
21+
</i-col>
1022
<i-col
1123
class="project-item"
1224
:xs="12" :sm="8" :md="6" :lg="4"
@@ -200,6 +212,10 @@ export default {
200212
tagProp: {
201213
type: String,
202214
default: 'business',
215+
},
216+
source: {
217+
type: String,
218+
default: 'Project'
203219
}
204220
},
205221
data() {
@@ -221,12 +237,12 @@ export default {
221237
return (this.pagination.current - 1) * this.pagination.size <= index && index < this.pagination.current * this.pagination.size;
222238
});
223239
},
224-
pageNumer() {
240+
pageNumber() {
225241
return Math.ceil(this.dataList.length / this.pagination.size);
226242
},
227243
},
228244
watch: {
229-
pageNumer(val) {
245+
pageNumber(val) {
230246
if (val < this.pagination.current && val !== 0) {
231247
this.pagination.current = val;
232248
}
@@ -257,6 +273,9 @@ export default {
257273
publish(classifyId, project) {
258274
this.$emit('publish', classifyId, project);
259275
},
276+
add() {
277+
this.$emit('add');
278+
},
260279
isPercent(id) {
261280
let flag = false;
262281
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: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@
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
1311
v-for="item in dataList"
1412
:key="item.id"
1513
:hide-button-bar="false"
1614
:hide-publish-andcopy="false"
17-
:data-list="item.dssProjectList"
15+
:data-list="item.dwsProjectList"
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"
@@ -186,7 +186,7 @@ export default {
186186
return api.fetch(`/dss/tree`, {}, 'get').then((res) => {
187187
this.cacheData = res.data;
188188
this.dataList = this.cacheData;
189-
this.activeItem = this.dataList[0];
189+
// this.activeItem = this.dataList[0];
190190
this.dataList.forEach(item => {
191191
this.sortType[item.id] = this.$t('message.project.updteTime');
192192
})
@@ -207,14 +207,14 @@ export default {
207207
let projectList = this.cacheData.filter((item) => {
208208
return item.id === projectData.taxonomyID;
209209
});
210-
if (this.checkName(projectList[0].dssProjectList, projectData.name, projectData.id)) return this.$Message.warning(this.$t('message.project.nameUnrepeatable'));
210+
if (this.checkName(projectList[0].dwsProjectList, projectData.name, projectData.id)) return this.$Message.warning(this.$t('message.project.nameUnrepeatable'));
211211
this.loading = true;
212212
if (this.actionType === 'add') {
213213
api.fetch('/dss/addProject', projectData, 'post').then(() => {
214214
this.$Message.success(`${this.$t('message.project.createProject')}${this.$t('message.newConst.success')}`);
215215
this.getclassListData().then((data) => {
216216
// 新建完工程进到工作流页
217-
const currentProject = data[0].dssProjectList.filter((project) => project.name === projectData.name)[0];
217+
const currentProject = data[0].dwsProjectList.filter((project) => project.name === projectData.name)[0];
218218
this.$router.push({
219219
name: 'Workflow',
220220
query: {
@@ -331,7 +331,7 @@ export default {
331331
let tepArray = storage.get('projectList', 'local');
332332
this.dataList = tepArray.map((item) => {
333333
if (id === item.id) {
334-
item.dssProjectList = item.dssProjectList.filter((subItem) => {
334+
item.dwsProjectList = item.dwsProjectList.filter((subItem) => {
335335
return subItem.name.indexOf(event.target.value) != -1;
336336
});
337337
}
@@ -400,7 +400,7 @@ export default {
400400
let projectList = this.cacheData.filter((item) => {
401401
return item.id === this.currentProjectData.taxonomyID;
402402
});
403-
if (this.checkName(projectList[0].dssProjectList, name, this.currentProjectData.id)) return this.$Message.warning(this.$t('message.project.nameUnrepeatable'));
403+
if (this.checkName(projectList[0].dwsProjectList, name, this.currentProjectData.id)) return this.$Message.warning(this.$t('message.project.nameUnrepeatable'));
404404
};
405405
this.dispatch('Project:copy', copyCheckName);
406406
} else if (this.currentForm === 'publishForm') {
@@ -492,7 +492,7 @@ export default {
492492
this.sortType[id] = name === 'updateTime' ? this.$t('message.project.updteTime') : this.$t('message.project.name')
493493
this.dataList = this.dataList.map((item) => {
494494
if (!id || id === item.id) {
495-
item.dssProjectList = item.dssProjectList.sort((a, b) => {
495+
item.dwsProjectList = item.dwsProjectList.sort((a, b) => {
496496
if (name === 'updateTime') {
497497
return b.latestVersion[name] - a.latestVersion[name];
498498
} else {

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">

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

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
11
<template>
22
<div class="page-bgc">
3-
<Row style="padding:20px 25px 10px">
4-
<i-col
5-
v-if="!myReadonly"
6-
:xs="6" :sm="5" :md="4" :lg="4"
7-
class="entry">
8-
<div @click="addProject">
9-
<Icon
10-
type="ios-add"
11-
class="icon-blod"
12-
size="25"
13-
></Icon>
14-
<span>{{$t('message.workflow.createWorkflow')}}</span>
15-
</div>
16-
</i-col>
17-
</Row>
3+
<div class="page-bgc-header">
4+
<div class="header-info">
5+
<h1>{{$t('message.workflow.infoHeader')}}</h1>
6+
</div>
7+
<!-- <feature @add-project="addProject"></feature> -->
8+
</div>
189
<div>
1910
<template v-if="dataList.length > 0">
2011
<project-content-item
@@ -23,9 +14,11 @@
2314
:hide-button-bar="false"
2415
:hide-publish-andcopy="true"
2516
:current-data="item"
26-
:data-list="item.dssFlowList"
17+
:data-list="item.dwsFlowList"
2718
:readonly="myReadonly"
19+
source="workflow"
2820
tag-prop="uses"
21+
@add="addProject"
2922
@goto="gotoWorkflow"
3023
@detail="versionDetail"
3124
@modify="projectModify"
@@ -191,7 +184,7 @@ export default {
191184
let flowList = this.cacheData.filter((item) => {
192185
return item.id === projectData.taxonomyID;
193186
});
194-
if (this.checkName(flowList[0].dssFlowList, projectData.name, projectData.id)) return this.$Message.warning(this.$t('message.workflow.nameUnrepeatable'));
187+
if (this.checkName(flowList[0].dwsFlowList, projectData.name, projectData.id)) return this.$Message.warning(this.$t('message.workflow.nameUnrepeatable'));
195188
this.loading = true;
196189
if (this.actionType === 'add') {
197190
api.fetch('/dss/addFlow', projectData, 'post').then(() => {
@@ -363,8 +356,8 @@ export default {
363356
projectVersionID: +this.$route.query.projectVersionID,
364357
};
365358
for (let i = 0; i < this.dataList.length; i++) {
366-
for (let j = 0; j < this.dataList[i].dssFlowList.length; j++) {
367-
if (this.dataList[i].dssFlowList[j].id === project.id) {
359+
for (let j = 0; j < this.dataList[i].dwsFlowList.length; j++) {
360+
if (this.dataList[i].dwsFlowList[j].id === project.id) {
368361
this.flowTaxonomyID = this.dataList[i].id;
369362
break;
370363
}
@@ -385,7 +378,7 @@ export default {
385378
let tepArray = storage.get('flowsList');
386379
this.dataList = tepArray.map((item) => {
387380
if (id === item.id) {
388-
item.dssFlowList = item.dssFlowList.filter((subItem) => {
381+
item.dwsFlowList = item.dwsFlowList.filter((subItem) => {
389382
return subItem.name.indexOf(event.target.value) != -1;
390383
});
391384
}

0 commit comments

Comments
 (0)