ap-dev 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dev/ApiPanel/index.vue +90 -8
- package/dev/DevDoc/index.vue +2 -1
- package/dev/OperatePanel/index.vue +30 -1
- package/dev/dev/devStore.js +6 -1
- package/dev/dev/index.vue +1 -1
- package/package.json +1 -1
- package/dev/ApiPanel/modules/TestApi.vue +0 -13
- /package/dev/ApiPanel/{modules → tabs}/Test.vue +0 -0
package/dev/ApiPanel/index.vue
CHANGED
|
@@ -12,13 +12,24 @@
|
|
|
12
12
|
<div v-if="showCustom">
|
|
13
13
|
<component :is="customComponent" />
|
|
14
14
|
</div>
|
|
15
|
-
<div v-html="doc" v-if="showDoc" class="api-doc ap-doc">
|
|
15
|
+
<div ref="docRef1" v-html="doc" v-if="showDoc" class="api-doc ap-doc">
|
|
16
16
|
</div>
|
|
17
17
|
<el-tabs v-if="showTabs" v-model="tabActiveName" tabPosition="left" class="api-tabs sap-dev-api" @tab-click="clickTabEvent">
|
|
18
18
|
<template v-for="(item,index) in tabs">
|
|
19
|
-
<el-tab-pane :label="item.fdName" :name="item
|
|
20
|
-
<
|
|
21
|
-
|
|
19
|
+
<el-tab-pane :label="item.fdName" :name="getTabName(item)" :id="item.fdId" class="api-tab">
|
|
20
|
+
<el-tabs v-if="showTopTabs" v-model="toptabActiveName" type="card" @tab-click="clickTopTabEvent">
|
|
21
|
+
<template v-for="(item2,index2) in topTabs">
|
|
22
|
+
<el-tab-pane :label="item2.fdName" :name="getTabName(item2)">
|
|
23
|
+
<div ref="docRef2" v-if="!showTopTabsCustom" v-html="doc" class="api-doc ap-doc"></div>
|
|
24
|
+
<component v-else :is="customComponent" />
|
|
25
|
+
</el-tab-pane>
|
|
26
|
+
</template>
|
|
27
|
+
</el-tabs>
|
|
28
|
+
|
|
29
|
+
<div v-else>
|
|
30
|
+
<div ref="docRef3" v-if="!showTabsCustom" v-html="doc" class="api-doc ap-doc"></div>
|
|
31
|
+
<component v-else :is="customComponent" />
|
|
32
|
+
</div>
|
|
22
33
|
</el-tab-pane>
|
|
23
34
|
</template>
|
|
24
35
|
</el-tabs>
|
|
@@ -55,12 +66,17 @@ export default {
|
|
|
55
66
|
showDoc: false,
|
|
56
67
|
showTabs: false,
|
|
57
68
|
showTabsCustom: false,
|
|
69
|
+
showTopTabs: false,
|
|
70
|
+
showTopTabsCustom: false,
|
|
58
71
|
tabActiveName: "",
|
|
59
72
|
tabs: [],
|
|
60
73
|
doc: "",
|
|
61
74
|
currentComponent: 'ApiLog',
|
|
62
75
|
imgSrc: [],
|
|
63
76
|
clickTime: null,
|
|
77
|
+
// ----- 右上侧 -----
|
|
78
|
+
toptabActiveName: null,
|
|
79
|
+
topTabs: [], // 左侧顶部
|
|
64
80
|
}
|
|
65
81
|
},
|
|
66
82
|
methods: {
|
|
@@ -69,6 +85,7 @@ export default {
|
|
|
69
85
|
let treeOptions = {
|
|
70
86
|
showTitle: false,
|
|
71
87
|
onClick: (data, node, comp) => {
|
|
88
|
+
this.scrollTop();
|
|
72
89
|
this.selectedDocTypeId = data.fdId;
|
|
73
90
|
this.hideContentFn();
|
|
74
91
|
// 自定义组件
|
|
@@ -134,21 +151,69 @@ export default {
|
|
|
134
151
|
this.loading = false;
|
|
135
152
|
})
|
|
136
153
|
},
|
|
154
|
+
getTabName(obj){
|
|
155
|
+
// 分组
|
|
156
|
+
if (obj.fdType == 1) {
|
|
157
|
+
return '%%' + obj.fdId;
|
|
158
|
+
}
|
|
159
|
+
// 自定义组件
|
|
160
|
+
if( obj.fdCustom != null && obj.fdCustom != '' && obj.fdCustom != undefined ) {
|
|
161
|
+
return '##' + obj.fdCustom;
|
|
162
|
+
} else {
|
|
163
|
+
// 文档Id
|
|
164
|
+
return obj.fdId;
|
|
165
|
+
}
|
|
166
|
+
},
|
|
137
167
|
clickTabEvent(tab) {
|
|
168
|
+
this.scrollTop();
|
|
138
169
|
let name = tab._props.name;
|
|
170
|
+
// 左上菜单
|
|
171
|
+
if (name.startsWith('%%')) {
|
|
172
|
+
this.$request({
|
|
173
|
+
url: '/apd/dev/DevDoc/getDocGroup',
|
|
174
|
+
method: 'post',
|
|
175
|
+
data: {
|
|
176
|
+
id: name.substring(2, name.length)
|
|
177
|
+
}
|
|
178
|
+
}).then(response => {
|
|
179
|
+
this.topTabs = response.data
|
|
180
|
+
})
|
|
181
|
+
this.showTopTabsFn();
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
// 自定义组件
|
|
139
185
|
if (name.startsWith('##')) {
|
|
140
186
|
this.showTabsCustom = true;
|
|
187
|
+
this.showTopTabs = false;
|
|
141
188
|
this.customComponent = name.substring(2, name.length);
|
|
142
|
-
|
|
143
|
-
this.showTabsCustom = false;
|
|
144
|
-
this.selectedDocTypeId = name;
|
|
145
|
-
this.getDocText();
|
|
189
|
+
return;
|
|
146
190
|
}
|
|
147
191
|
|
|
192
|
+
// 文档
|
|
193
|
+
this.showTabsCustom = false;
|
|
194
|
+
this.showTopTabs = false;
|
|
195
|
+
this.selectedDocTypeId = name;
|
|
196
|
+
this.getDocText();
|
|
197
|
+
|
|
198
|
+
},
|
|
199
|
+
clickTopTabEvent(tab) {
|
|
200
|
+
this.scrollTop();
|
|
201
|
+
let name = tab._props.name;
|
|
202
|
+
// 自定义组件
|
|
203
|
+
if (name.startsWith('##')) {
|
|
204
|
+
this.showTopTabsCustom = true;
|
|
205
|
+
this.customComponent = name.substring(2, name.length);
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
// 文档
|
|
209
|
+
this.showTopTabsCustom = false;
|
|
210
|
+
this.selectedDocTypeId = name;
|
|
211
|
+
this.getDocText();
|
|
148
212
|
},
|
|
149
213
|
hideContentFn() {
|
|
150
214
|
this.showDoc = false;
|
|
151
215
|
this.showTabs = false;
|
|
216
|
+
this.showTopTabs = false;
|
|
152
217
|
this.doc = "";
|
|
153
218
|
this.tabActiveName = "";
|
|
154
219
|
},
|
|
@@ -156,16 +221,33 @@ export default {
|
|
|
156
221
|
this.showCustom = true;
|
|
157
222
|
this.showDoc = false;
|
|
158
223
|
this.showTabs = false;
|
|
224
|
+
this.showTopTabs = false;
|
|
159
225
|
},
|
|
160
226
|
showDocFn() {
|
|
161
227
|
this.showCustom = false;
|
|
162
228
|
this.showDoc = true;
|
|
163
229
|
this.showTabs = false;
|
|
230
|
+
this.showTopTabs = false;
|
|
164
231
|
},
|
|
165
232
|
showTabsFn() {
|
|
166
233
|
this.showCustom = false;
|
|
167
234
|
this.showDoc = false;
|
|
168
235
|
this.showTabs = true;
|
|
236
|
+
this.showTopTabs = false;
|
|
237
|
+
},
|
|
238
|
+
showTopTabsFn() {
|
|
239
|
+
this.showCustom = false;
|
|
240
|
+
this.showDoc = false;
|
|
241
|
+
this.showTabs = true;
|
|
242
|
+
this.showTopTabs = true;
|
|
243
|
+
},
|
|
244
|
+
scrollTop(){
|
|
245
|
+
// 回到顶部
|
|
246
|
+
let ctn = document.getElementsByClassName('el-tabs__content')
|
|
247
|
+
if (ctn != null && ctn.length <1) {
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
ctn[0].scrollTop = 0;
|
|
169
251
|
},
|
|
170
252
|
addImgClick(){
|
|
171
253
|
// 添加图片点击事件,双击查看大图
|
package/dev/DevDoc/index.vue
CHANGED
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
<el-form-item label='布局' prop='fdLayout'>
|
|
28
28
|
<el-select v-model="tDevDocTypeForm.fdLayout" filterable placeholder="请选择布局">
|
|
29
29
|
<el-option key="one" label="单页" value="one"></el-option>
|
|
30
|
-
<el-option key="left" label="左侧" value="left"></el-option>
|
|
30
|
+
<el-option key="left" label="左侧(二级)" value="left"></el-option>
|
|
31
|
+
<el-option key="lefttop" label="左上(三级)" value="lefttop"></el-option>
|
|
31
32
|
</el-select>
|
|
32
33
|
</el-form-item>
|
|
33
34
|
<el-form-item label='自定义组件' prop='fdCustom' placeholder="请输入自定义组件名">
|
|
@@ -48,6 +48,21 @@
|
|
|
48
48
|
</div>
|
|
49
49
|
</div>
|
|
50
50
|
<div class="flex">
|
|
51
|
+
<!-- <div class="ap-dev-tool-item flex flex-center">-->
|
|
52
|
+
<!-- <div class="ap-dev-tool-item-icon1">-->
|
|
53
|
+
<!-- <i class="el-icon-vue"/>-->
|
|
54
|
+
<!-- </div>-->
|
|
55
|
+
<!-- <el-dropdown trigger="click" @command="clickEvent">-->
|
|
56
|
+
<!-- <span class="el-dropdown-link ap-dev-tool-item-text1">-->
|
|
57
|
+
<!-- {{ currentModel }}<i class="el-icon-caret-bottom"/>-->
|
|
58
|
+
<!-- </span>-->
|
|
59
|
+
<!-- <el-dropdown-menu slot="dropdown">-->
|
|
60
|
+
<!-- <el-dropdown-item :command="{name:'AP'}">AP中台</el-dropdown-item>-->
|
|
61
|
+
<!-- <el-dropdown-item :command="{name:'MES'}">MES</el-dropdown-item>-->
|
|
62
|
+
<!-- <el-dropdown-item :command="{name:'ABAP'}">SAP-ABAP</el-dropdown-item>-->
|
|
63
|
+
<!-- </el-dropdown-menu>-->
|
|
64
|
+
<!-- </el-dropdown>-->
|
|
65
|
+
<!-- </div>-->
|
|
51
66
|
<div class="ap-dev-tool-item flex flex-center" @click="currentDesignPanel('config-panel', $event)">
|
|
52
67
|
<div class="ap-dev-tool-item-icon">
|
|
53
68
|
<i class="el-icon-setting"/>
|
|
@@ -61,12 +76,19 @@
|
|
|
61
76
|
<script>
|
|
62
77
|
import ApDevBase from './../CustomPanel/items/base/ApDevBase'
|
|
63
78
|
import {addClass, removeClass} from 'ap-util/util/StyleUtil'
|
|
79
|
+
import {setCurrentCompanyId} from "ap-util/util/LoginUserUtil";
|
|
64
80
|
|
|
65
81
|
export default {
|
|
66
82
|
name: 'OperatePanel',
|
|
67
83
|
extends: ApDevBase,
|
|
68
84
|
data() {
|
|
69
|
-
return {
|
|
85
|
+
return {
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
computed: {
|
|
89
|
+
currentModel() {
|
|
90
|
+
return this.$store.state.tempData.currentModel
|
|
91
|
+
}
|
|
70
92
|
},
|
|
71
93
|
methods: {
|
|
72
94
|
currentDesignPanel(type, event) {
|
|
@@ -77,6 +99,13 @@ export default {
|
|
|
77
99
|
}
|
|
78
100
|
addClass( event.currentTarget,"ap-dev-tool-item-active");
|
|
79
101
|
this.$store.commit('updateCurrentDesignPanel', type);
|
|
102
|
+
},
|
|
103
|
+
clickEvent(item) {
|
|
104
|
+
this.currentModel = item.name;
|
|
105
|
+
this.$store.commit('updateCurrentModel', item.name);
|
|
106
|
+
},
|
|
107
|
+
showMenu(type){
|
|
108
|
+
return this.currentModel == type;
|
|
80
109
|
}
|
|
81
110
|
}
|
|
82
111
|
}
|
package/dev/dev/devStore.js
CHANGED
|
@@ -83,7 +83,8 @@ const apDevStore = new Vuex.Store({
|
|
|
83
83
|
},
|
|
84
84
|
tempData: {
|
|
85
85
|
copyItem: {},
|
|
86
|
-
currentDesignPanel: 'api-panel'
|
|
86
|
+
currentDesignPanel: 'api-panel',
|
|
87
|
+
currentModel: 'AP'
|
|
87
88
|
}
|
|
88
89
|
},
|
|
89
90
|
strict: true,
|
|
@@ -350,6 +351,10 @@ const apDevStore = new Vuex.Store({
|
|
|
350
351
|
// 更新当前设计的页面
|
|
351
352
|
updateCurrentDesignPanel(state, param) {
|
|
352
353
|
state.tempData.currentDesignPanel = param
|
|
354
|
+
},
|
|
355
|
+
// 更新当前设计的页面
|
|
356
|
+
updateCurrentModel(state, param) {
|
|
357
|
+
state.tempData.currentModel = param
|
|
353
358
|
}
|
|
354
359
|
|
|
355
360
|
|
package/dev/dev/index.vue
CHANGED
package/package.json
CHANGED
|
File without changes
|