Skip to content

Commit 1840b7a

Browse files
author
张晨曦
committed
fix bugs
1 parent eafcfc7 commit 1840b7a

File tree

8 files changed

+138
-119
lines changed

8 files changed

+138
-119
lines changed

web/package-lock.json

Lines changed: 93 additions & 94 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"svgo": "1.3.0",
6161
"vue": "2.6.12",
6262
"vue-i18n": "8.22.1",
63-
"vue-luban-menu": "^1.4.0",
63+
"vue-luban-menu": "file:vue-luban-menu-1.3.2.tgz",
6464
"vue-router": "3.4.8",
6565
"vuedraggable": "2.24.3",
6666
"vuescroll": "4.16.1",

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,6 @@
5656
height: 100%;
5757
}
5858
}
59-
.process-tab {
60-
display: none;
61-
@include bg-color($light-base-color, $dark-base-color);
62-
}
63-
.process-container {
64-
height: 100%;
65-
}
6659
}
6760
.process-tab {
6861
display: flex;

web/src/apps/workflows/module/common/workflowTree/tree-item.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ export default {
166166
this.onAddClick(this.model);
167167
},
168168
handleItemClick(e) {
169+
this.handleItemToggle()
169170
this.onItemClick(this.model);
170171
},
171172
handleItemToggle(e) {

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
<template>
22
<div class="workflow-wrap">
33
<div class="workflow-nav-tree" :class="{ 'tree-fold': treeFold }">
4-
<div class="workflow-nav-tree-switch">
4+
<div class="workflow-nav-tree-switch" @click="handleTreeToggle">
55
<span class="project-nav-tree-top-t-icon">
66
<SvgIcon
77
icon-class="dev_center_flod"
88
style="opacity: 0.65"
9-
@click="handleTreeToggle"
109
/>
1110
</span>
1211
</div>

web/src/common/service/apiCommonMethod.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ const GetAreaMap = () => api.fetch(`${API_PATH.PROJECT_PATH}listApplicationArea
5757
// 获取常用功能列表
5858
const GetFavorites = (workspaceId) => api.fetch(`${API_PATH.WORKSPACE_PATH}workspaces/${workspaceId}/favorites`, workspaceId, 'get')
5959

60+
// 获奖 钉一钉 功能列表
61+
const GetCollections = (workspaceId) => api.fetch(`${API_PATH.WORKSPACE_PATH}workspaces/${workspaceId}/components`, {workspaceId, type: 'dingyiding'}, 'get')
62+
6063
// 添加常用应用
6164
const AddFavorite = (workspaceId, data) => api.fetch(`${API_PATH.WORKSPACE_PATH}workspaces/${workspaceId}/favorites`, data, 'post')
6265

@@ -79,5 +82,6 @@ export {
7982
GetWorkspaceBaseInfo,
8083
GetFavorites,
8184
AddFavorite,
82-
RemoveFavorite
85+
RemoveFavorite,
86+
GetCollections
8387
}

web/src/dss/module/header/index.vue

Lines changed: 37 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
v-for="app in collections"
123123
:key="app.id"
124124
class="menu-item"
125-
@click="goCollectedUrl"
125+
@click="goCollectedUrl(app)"
126126
>
127127
{{ app.title }}
128128
</li>
@@ -163,6 +163,7 @@ import {
163163
GetFavorites,
164164
AddFavorite,
165165
RemoveFavorite,
166+
GetCollections
166167
} from "@/common/service/apiCommonMethod.js";
167168
export default {
168169
directives: {
@@ -203,6 +204,7 @@ export default {
203204
this.getApplications();
204205
this.getWorkspaces();
205206
this.getWorkspaceFavorites();
207+
this.getWorkspaceCollections()
206208
}
207209
})
208210
.catch((err) => {
@@ -258,6 +260,7 @@ export default {
258260
this.getApplications();
259261
this.getWorkspaces();
260262
this.getWorkspaceFavorites();
263+
this.getWorkspaceCollections();
261264
}
262265
})
263266
.catch((err) => {
@@ -348,6 +351,17 @@ export default {
348351
});
349352
}
350353
},
354+
getWorkspaceCollections() {
355+
if (this.$route.query.workspaceId) {
356+
GetCollections(this.$route.query.workspaceId).then(data => {
357+
let collections = data.favorites || [];
358+
collections.forEach(item => {
359+
item['collectedId'] = item.menuApplicationId
360+
})
361+
this.collections = collections || [];
362+
})
363+
}
364+
},
351365
addFavorite(app) {
352366
if (this.$route.query.workspaceId) {
353367
AddFavorite(this.$route.query.workspaceId, {
@@ -362,7 +376,6 @@ export default {
362376
}
363377
},
364378
removeFavorite(app) {
365-
366379
if (this.$route.query.workspaceId) {
367380
RemoveFavorite({
368381
workspaceId: this.$route.query.workspaceId,
@@ -374,27 +387,37 @@ export default {
374387
});
375388
376389
this.collections = this.collections.filter(
377-
(i) => i.id !== app.id
390+
(i) => i.menuApplicationId !== app.menuApplicationId
378391
);
379392
}
380393
},
381394
addCollection(app) {
382-
let _this = this;
383-
if (_this.$route.query.workspaceId) {
384-
if ( _this.collections.length < 5 ) {
385-
_this.collections = this.collections.concat(app);
395+
if (this.$route.query.workspaceId) {
396+
if ( this.collections.length < 5 ) {
397+
AddFavorite(this.$route.query.workspaceId, {
398+
menuApplicationId: app.menuApplicationId,
399+
type: 'dingyiding'
400+
}).then((data) => {
401+
app.collectedId = app.menuApplicationId
402+
this.collections = this.collections.concat(app);
403+
})
386404
} else {
387-
_this.$Message.warning('目前只支持钉五个快捷入口')
405+
this.$Message.warning('目前只支持钉五个快捷入口')
388406
}
389-
390407
}
391408
},
392409
removeCollection(app) {
393-
let _this = this;
394-
if (_this.$route.query.workspaceId) {
395-
_this.collections = _this.collections.filter(
396-
(i) => i.collectedId !== app.collectedId
397-
);
410+
app.collectedId = app.menuApplicationId
411+
if (this.$route.query.workspaceId) {
412+
RemoveFavorite({
413+
workspaceId: this.$route.query.workspaceId,
414+
applicationId: app.menuApplicationId,
415+
type: 'dingyiding'
416+
}).then(() => {
417+
this.collections = this.collections.filter(
418+
(i) => i.collectedId !== app.collectedId
419+
);
420+
})
398421
}
399422
},
400423
handleMenuClick(item) {

web/vue-luban-menu-1.3.2.tgz

11.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)