eoss 0.1.0-alpha.30 → 0.1.0-alpha.32
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/lib/eoss.common.js +503 -324
- package/lib/index.js +1 -1
- package/lib/lowcode-view.js +194 -113
- package/lib/lowcode.js +155 -104
- package/lib/main.js +104 -47
- package/lib/process-config.js +14 -18
- package/lib/process-module.js +9 -12
- package/lib/process-rule.js +2 -5
- package/lib/tabs.js +4 -0
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/lowcode-view.css +1 -1
- package/lib/theme-chalk/tabs.css +1 -1
- package/lib/wujie.js +2 -3
- package/package.json +1 -1
- package/packages/lowcode/src/attribute/javascript.vue +2 -0
- package/packages/lowcode/src/attribute/property.vue +38 -56
- package/packages/lowcode/src/attribute.vue +3 -1
- package/packages/lowcode/src/lowcode.vue +8 -2
- package/packages/lowcode/src/pages.vue +0 -1
- package/packages/lowcode/src/render.vue +15 -1
- package/packages/lowcode/src/util/source-generator.js +29 -15
- package/packages/lowcode/src/util/source-parser.js +35 -3
- package/packages/lowcode-view/src/{Modulels.vue → Modules.vue} +63 -74
- package/packages/lowcode-view/src/view.vue +54 -14
- package/packages/main/src/components/pages.vue +4 -1
- package/packages/main/src/components/router-page.vue +29 -1
- package/packages/main/src/components/sub-menu.vue +2 -0
- package/packages/main/src/early.vue +1 -0
- package/packages/main/src/gzw.vue +1 -0
- package/packages/main/src/minxs.js +13 -1
- package/packages/process-config/src/NodeConfig.vue +0 -1
- package/packages/process-config/src/NodeForm.vue +0 -1
- package/packages/process-module/src/FormList.vue +0 -1
- package/packages/process-module/src/main.vue +0 -2
- package/packages/process-rule/src/main.vue +0 -3
- package/packages/tabs/src/tabs.vue +5 -1
- package/packages/theme-chalk/src/lowcode-view.scss +1 -0
- package/packages/theme-chalk/src/tabs.scss +2 -1
- package/packages/wujie/src/wujie.vue +0 -1
- package/src/index.js +1 -1
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
ref="waterfallContainer"
|
|
10
10
|
class="es-lowcode-view__modules--waterfall"
|
|
11
11
|
v-model="models"
|
|
12
|
+
:style="styles"
|
|
12
13
|
>
|
|
13
14
|
<template v-if="results.length > 0">
|
|
14
15
|
<es-checkbox
|
|
@@ -47,6 +48,7 @@
|
|
|
47
48
|
|
|
48
49
|
<script>
|
|
49
50
|
import { ajax } from 'eoss/src/utils/ajax';
|
|
51
|
+
import { layoutWaterfall } from 'eoss/src/utils/util';
|
|
50
52
|
import Frame from './Iframe.vue';
|
|
51
53
|
import EsCheckbox from 'eoss/packages/checkbox';
|
|
52
54
|
import EsCheckboxGroup from 'eoss/packages/checkbox-group';
|
|
@@ -54,7 +56,7 @@ import EsEmpty from 'eoss/packages/empty';
|
|
|
54
56
|
import EsScrollbar from 'eoss/packages/scrollbar';
|
|
55
57
|
import EsPagination from 'eoss/packages/pagination';
|
|
56
58
|
export default {
|
|
57
|
-
name: '
|
|
59
|
+
name: 'Modules',
|
|
58
60
|
|
|
59
61
|
components: {
|
|
60
62
|
EsPagination,
|
|
@@ -67,6 +69,14 @@ export default {
|
|
|
67
69
|
|
|
68
70
|
props: {
|
|
69
71
|
url: String,
|
|
72
|
+
styles: {
|
|
73
|
+
type: Object,
|
|
74
|
+
default: () => ({})
|
|
75
|
+
},
|
|
76
|
+
pageStyle: {
|
|
77
|
+
type: Object,
|
|
78
|
+
default: () => ({})
|
|
79
|
+
},
|
|
70
80
|
filters: {
|
|
71
81
|
type: Array,
|
|
72
82
|
default: () => []
|
|
@@ -74,9 +84,7 @@ export default {
|
|
|
74
84
|
modules: {
|
|
75
85
|
type: Array,
|
|
76
86
|
default: () => []
|
|
77
|
-
}
|
|
78
|
-
columns: Number,
|
|
79
|
-
gap: Number
|
|
87
|
+
}
|
|
80
88
|
},
|
|
81
89
|
|
|
82
90
|
data() {
|
|
@@ -95,6 +103,13 @@ export default {
|
|
|
95
103
|
computed: {
|
|
96
104
|
filterIds() {
|
|
97
105
|
return this.filters.map((item) => item.id);
|
|
106
|
+
},
|
|
107
|
+
// 列数/列间距与 view.vue 同源:从 pageStyle 解析,缺省 2 列 0 间距
|
|
108
|
+
columnCount() {
|
|
109
|
+
return parseInt((this.pageStyle || {}).columns || 2, 10);
|
|
110
|
+
},
|
|
111
|
+
columnGap() {
|
|
112
|
+
return parseInt((this.pageStyle || {}).gap || 0, 10);
|
|
98
113
|
}
|
|
99
114
|
},
|
|
100
115
|
|
|
@@ -114,7 +129,7 @@ export default {
|
|
|
114
129
|
|
|
115
130
|
mounted() {
|
|
116
131
|
this.$nextTick(() => {
|
|
117
|
-
this.
|
|
132
|
+
this.layoutWaterfall();
|
|
118
133
|
});
|
|
119
134
|
},
|
|
120
135
|
|
|
@@ -168,83 +183,57 @@ export default {
|
|
|
168
183
|
this.getData();
|
|
169
184
|
},
|
|
170
185
|
/**
|
|
171
|
-
*
|
|
172
|
-
*
|
|
186
|
+
* 瀑布流布局:与 view.vue 保持同一套行为,
|
|
187
|
+
* masonry 模式复用 util.layoutWaterfall 完成元素分配与定位,
|
|
188
|
+
* 非 masonry(grid/flex)只清理子元素绝对定位残留,交还容器 CSS 控制
|
|
173
189
|
*/
|
|
174
190
|
layoutWaterfall() {
|
|
175
|
-
const
|
|
191
|
+
const ref = this.$refs.waterfallContainer;
|
|
192
|
+
const container = ref && ref.$el ? ref.$el : ref;
|
|
176
193
|
if (!container) return;
|
|
194
|
+
if (this.results.length === 0) return;
|
|
195
|
+
|
|
196
|
+
// 非瀑布流模式:grid/flex 由容器 CSS(styles prop)控制,重置子元素为普通流式布局
|
|
197
|
+
if ((this.pageStyle || {}).display !== 'masonry') {
|
|
198
|
+
const display = (this.pageStyle || {}).display;
|
|
199
|
+
this.results.forEach((item) => {
|
|
200
|
+
if (!item.style) this.$set(item, 'style', {});
|
|
201
|
+
if (item.style.position !== undefined) {
|
|
202
|
+
this.$set(item.style, 'position', '');
|
|
203
|
+
}
|
|
204
|
+
if (item.style.left !== undefined) {
|
|
205
|
+
this.$set(item.style, 'left', '');
|
|
206
|
+
}
|
|
207
|
+
if (item.style.top !== undefined) {
|
|
208
|
+
this.$set(item.style, 'top', '');
|
|
209
|
+
}
|
|
210
|
+
// grid 宽度由列宽/span 决定,移除瀑布流残留的 width
|
|
211
|
+
if (display === 'grid' && item.style.width) {
|
|
212
|
+
this.$delete(item.style, 'width');
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
container.style.height = 'auto';
|
|
216
|
+
container.style.position = '';
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
177
219
|
|
|
178
|
-
//
|
|
179
|
-
|
|
180
|
-
if (containerWidth === 0) return;
|
|
181
|
-
|
|
182
|
-
// 计算每列宽度
|
|
183
|
-
const columnWidth = (containerWidth - this.gap) / this.columns;
|
|
184
|
-
|
|
185
|
-
// 初始化每列高度数组
|
|
186
|
-
const columnHeights = [0, 0];
|
|
187
|
-
|
|
188
|
-
// 遍历所有元素,分配到高度最小的列
|
|
220
|
+
// util 按 px 解析 width,百分比宽度(如 '100%')会被 parseInt
|
|
221
|
+
// 误判成自定义像素宽度,这里先移除,让 util 回退到按 span 计算列宽
|
|
189
222
|
this.results.forEach((item) => {
|
|
190
|
-
const
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
parseInt(item.style.span ? item.style.span : item.span || 1),
|
|
194
|
-
this.columns
|
|
195
|
-
)
|
|
196
|
-
);
|
|
197
|
-
// 找到高度最小的列
|
|
198
|
-
let minColIndex = 0;
|
|
199
|
-
if (columnHeights[1] < columnHeights[0]) {
|
|
200
|
-
minColIndex = 1;
|
|
223
|
+
const width = item.style && item.style.width;
|
|
224
|
+
if (width && /%$/.test(String(width).trim())) {
|
|
225
|
+
this.$delete(item.style, 'width');
|
|
201
226
|
}
|
|
202
|
-
|
|
203
|
-
// 计算元素位置
|
|
204
|
-
let left = 0;
|
|
205
|
-
let top = 0;
|
|
206
|
-
const width = parseInt(
|
|
207
|
-
item.style.width ? item.style.width : item.width
|
|
208
|
-
);
|
|
209
|
-
const height = parseInt(
|
|
210
|
-
item.style.height ? item.style.height : item.height
|
|
211
|
-
);
|
|
212
|
-
const eleWidth = columnWidth * span + this.gap * (span - 1);
|
|
213
|
-
if (width == '100%' || span == this.columns) {
|
|
214
|
-
// 通栏元素,放在第一列顶部
|
|
215
|
-
left = 0;
|
|
216
|
-
top = Math.max(...columnHeights);
|
|
217
|
-
// 更新两列的高度为相同值
|
|
218
|
-
columnHeights[0] = columnHeights[1] = top + (height || 0) + this.gap;
|
|
219
|
-
} else {
|
|
220
|
-
// 普通元素,放在高度最小的列
|
|
221
|
-
left = minColIndex * (eleWidth + this.gap);
|
|
222
|
-
top = columnHeights[minColIndex];
|
|
223
|
-
// 更新该列的高度
|
|
224
|
-
columnHeights[minColIndex] += (height || 0) + this.gap;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
// 设置元素样式(使用Vue的$set确保响应式)
|
|
228
|
-
if (!item.style) {
|
|
229
|
-
this.$set(item, 'style', {});
|
|
230
|
-
}
|
|
231
|
-
this.$set(item.style, 'position', 'absolute');
|
|
232
|
-
this.$set(
|
|
233
|
-
item.style,
|
|
234
|
-
'width',
|
|
235
|
-
width == '100%' ? '100%' : `${eleWidth}px`
|
|
236
|
-
);
|
|
237
|
-
this.$set(item.style, 'height', `${height}px`);
|
|
238
|
-
this.$set(item.style, 'left', `${left}px`);
|
|
239
|
-
this.$set(item.style, 'top', `${top}px`);
|
|
240
|
-
|
|
241
|
-
// 已在位置计算部分更新了列高度
|
|
242
227
|
});
|
|
243
228
|
|
|
244
|
-
//
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
229
|
+
// 瀑布流核心计算复用 util,与页面渲染态保持同一套行为
|
|
230
|
+
layoutWaterfall(
|
|
231
|
+
this,
|
|
232
|
+
container,
|
|
233
|
+
this.results,
|
|
234
|
+
this.columnCount,
|
|
235
|
+
this.columnGap
|
|
236
|
+
);
|
|
248
237
|
}
|
|
249
238
|
}
|
|
250
239
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<div
|
|
4
4
|
class="es-lowcode-view__edit-switch"
|
|
5
5
|
:class="{ 'is-edit': edit }"
|
|
6
|
-
v-if="
|
|
6
|
+
v-if="isCanEdit"
|
|
7
7
|
v-guide="guideConfig"
|
|
8
8
|
>
|
|
9
9
|
<template v-if="!edit">
|
|
@@ -79,13 +79,15 @@
|
|
|
79
79
|
size="max"
|
|
80
80
|
@close="handleClose"
|
|
81
81
|
>
|
|
82
|
-
<
|
|
82
|
+
<modules
|
|
83
83
|
v-if="visible"
|
|
84
84
|
:modules="pagesMap"
|
|
85
85
|
:filters="pages"
|
|
86
86
|
:url="listsUrl"
|
|
87
|
+
:styles="containerStyle"
|
|
88
|
+
:pageStyle="pageStyle"
|
|
87
89
|
@add="handleAdd"
|
|
88
|
-
></
|
|
90
|
+
></modules>
|
|
89
91
|
</es-dialog>
|
|
90
92
|
</es-scrollbar>
|
|
91
93
|
</template>
|
|
@@ -93,8 +95,13 @@
|
|
|
93
95
|
<script>
|
|
94
96
|
import Sortable from 'sortablejs';
|
|
95
97
|
import Render from './render.vue';
|
|
96
|
-
import
|
|
97
|
-
import {
|
|
98
|
+
import Modules from './Modules.vue';
|
|
99
|
+
import {
|
|
100
|
+
pageGroup,
|
|
101
|
+
saveOrUpdate,
|
|
102
|
+
pageLists,
|
|
103
|
+
getByType
|
|
104
|
+
} from 'eoss/src/config/api';
|
|
98
105
|
import { loading, layoutWaterfall } from 'eoss/src/utils/util';
|
|
99
106
|
import { ajax } from 'eoss/src/utils/ajax';
|
|
100
107
|
import {
|
|
@@ -105,12 +112,13 @@ import EsButton from 'eoss/packages/button';
|
|
|
105
112
|
import EsDialog from 'eoss/packages/dialog';
|
|
106
113
|
import EsIcon from 'eoss/packages/icon';
|
|
107
114
|
import EsScrollbar from 'eoss/packages/scrollbar';
|
|
115
|
+
import { getStorage } from 'eoss/src/utils/storage';
|
|
108
116
|
// 编辑态下布局末尾预留的投放区域高度:masonry 计入容器高度,流式布局用 padding-bottom
|
|
109
117
|
const DROP_SPACE = 200;
|
|
110
118
|
export default {
|
|
111
119
|
name: 'LowcodeView',
|
|
112
120
|
|
|
113
|
-
components: { EsScrollbar, Render,
|
|
121
|
+
components: { EsScrollbar, Render, Modules, EsButton, EsDialog, EsIcon },
|
|
114
122
|
|
|
115
123
|
props: {
|
|
116
124
|
isEdit: {
|
|
@@ -128,6 +136,7 @@ export default {
|
|
|
128
136
|
|
|
129
137
|
data() {
|
|
130
138
|
return {
|
|
139
|
+
pageData: this.page,
|
|
131
140
|
// 组件列表
|
|
132
141
|
components: [],
|
|
133
142
|
// 列宽
|
|
@@ -163,11 +172,15 @@ export default {
|
|
|
163
172
|
buttonText: '知道了',
|
|
164
173
|
placement: 'left',
|
|
165
174
|
onClose: null
|
|
166
|
-
}
|
|
175
|
+
},
|
|
176
|
+
canEdit: false
|
|
167
177
|
};
|
|
168
178
|
},
|
|
169
179
|
|
|
170
180
|
computed: {
|
|
181
|
+
isCanEdit() {
|
|
182
|
+
return this.isEdit || this.canEdit;
|
|
183
|
+
},
|
|
171
184
|
styles() {
|
|
172
185
|
return {
|
|
173
186
|
'grid-template-columns': `repeat(${this.columnCount}, 1fr)`,
|
|
@@ -233,7 +246,7 @@ export default {
|
|
|
233
246
|
// 首次进入且可编辑时展示功能引导
|
|
234
247
|
try {
|
|
235
248
|
const show =
|
|
236
|
-
this.
|
|
249
|
+
this.isCanEdit && !localStorage.getItem('es-lowcode-view-guide');
|
|
237
250
|
this.showGuide = show;
|
|
238
251
|
this.guideConfig = {
|
|
239
252
|
...this.guideConfig,
|
|
@@ -288,13 +301,11 @@ export default {
|
|
|
288
301
|
mainPageComponentConfigId: this.pageId
|
|
289
302
|
}
|
|
290
303
|
})
|
|
291
|
-
.then((res) => {
|
|
304
|
+
.then(async (res) => {
|
|
292
305
|
if (res.rCode != 0) return;
|
|
293
306
|
const { pageInfo, targetList } = res.results || {};
|
|
294
|
-
console.log('pageInfo', pageInfo, targetList);
|
|
295
307
|
//targetList后续需要完善
|
|
296
308
|
if (!pageInfo) return;
|
|
297
|
-
// pageInfo.content 是一段 JSON 字符串,内部结构为 { children, style, ... }
|
|
298
309
|
const { content, ...page } = pageInfo;
|
|
299
310
|
let parsed = {};
|
|
300
311
|
try {
|
|
@@ -302,8 +313,34 @@ export default {
|
|
|
302
313
|
} catch (e) {
|
|
303
314
|
parsed = {};
|
|
304
315
|
}
|
|
316
|
+
// pageInfo.content 是一段 JSON 字符串,内部结构为 { children, style, ... }
|
|
317
|
+
if (pageInfo.code) {
|
|
318
|
+
const userConfig = await ajax({
|
|
319
|
+
url: getByType,
|
|
320
|
+
params: {
|
|
321
|
+
type: pageInfo.code
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
if (
|
|
325
|
+
userConfig.rCode === 0 &&
|
|
326
|
+
userConfig.results &&
|
|
327
|
+
userConfig.results[pageInfo.code] &&
|
|
328
|
+
userConfig.results[pageInfo.code].userConfig
|
|
329
|
+
) {
|
|
330
|
+
const modules = JSON.parse(
|
|
331
|
+
userConfig.results[pageInfo.code].userConfig
|
|
332
|
+
);
|
|
333
|
+
const { children, ...parseds } = parsed;
|
|
334
|
+
this.pageData = { ...page, ...parseds, children: modules };
|
|
335
|
+
this.pagesMap = children || [];
|
|
336
|
+
} else {
|
|
337
|
+
this.pageData = { ...page, ...parsed };
|
|
338
|
+
}
|
|
339
|
+
} else {
|
|
340
|
+
this.pageData = { ...page, ...parsed };
|
|
341
|
+
}
|
|
305
342
|
// 合并:page 保留元信息,parsed 提供 children/style 等渲染所需结构
|
|
306
|
-
this.setPageData(
|
|
343
|
+
this.setPageData(this.pageData);
|
|
307
344
|
// mounted 时 pages 尚为空,异步拿到数据后需重新触发布局
|
|
308
345
|
this.$nextTick(() => {
|
|
309
346
|
this.init();
|
|
@@ -320,6 +357,8 @@ export default {
|
|
|
320
357
|
* @param {Object} page 完整页面对象(含 children、style)
|
|
321
358
|
*/
|
|
322
359
|
setPageData(page) {
|
|
360
|
+
const customPage = (getStorage({ key: 'customPage' }) || '').split(',');
|
|
361
|
+
this.canEdit = customPage.includes(page.code);
|
|
323
362
|
const p = page || {};
|
|
324
363
|
this.pages = JSON.parse(JSON.stringify(p.children || []));
|
|
325
364
|
const style = p.style || {};
|
|
@@ -388,14 +427,15 @@ export default {
|
|
|
388
427
|
method: 'post',
|
|
389
428
|
format: false,
|
|
390
429
|
data: {
|
|
391
|
-
type:
|
|
430
|
+
type: this.pageData.code,
|
|
392
431
|
userConfig: JSON.stringify(this.pages)
|
|
393
432
|
}
|
|
394
433
|
})
|
|
395
434
|
.then((res) => {
|
|
396
435
|
if (res.rCode == 0 || res.status == 'success') {
|
|
397
436
|
this.$message.success('保存成功!');
|
|
398
|
-
|
|
437
|
+
// 保存成功后重新拉取页面配置,刷新渲染数据
|
|
438
|
+
this.getPagesMap();
|
|
399
439
|
this.edit = false;
|
|
400
440
|
this.$nextTick(() => {
|
|
401
441
|
this.layoutWaterfall();
|
|
@@ -228,10 +228,11 @@ export default {
|
|
|
228
228
|
handler(val) {
|
|
229
229
|
if (this.isFourthTabs) {
|
|
230
230
|
this.newTabs = val.map((item) => {
|
|
231
|
+
console.log('item', item);
|
|
231
232
|
let defaultActive =
|
|
232
233
|
(
|
|
233
234
|
(item.fourthTabs || []).filter(
|
|
234
|
-
(ele) => item.url
|
|
235
|
+
(ele) => item.url.indexOf(ele.url) > -1
|
|
235
236
|
)[0] || {}
|
|
236
237
|
).id || '';
|
|
237
238
|
return defaultActive
|
|
@@ -241,8 +242,10 @@ export default {
|
|
|
241
242
|
}
|
|
242
243
|
: item;
|
|
243
244
|
});
|
|
245
|
+
console.log('tabs', this.newTabs);
|
|
244
246
|
return;
|
|
245
247
|
}
|
|
248
|
+
console.log('tabs', val);
|
|
246
249
|
this.newTabs = val;
|
|
247
250
|
}
|
|
248
251
|
}
|
|
@@ -33,11 +33,23 @@ export default {
|
|
|
33
33
|
keys: String
|
|
34
34
|
},
|
|
35
35
|
|
|
36
|
+
provide() {
|
|
37
|
+
return {
|
|
38
|
+
// 向页面组件下发本页签独立解析的路由上下文,
|
|
39
|
+
// 页面组件应 inject 使用,避免多页签同开时读全局 $route 互相串
|
|
40
|
+
routerPageRoute: this.routeContext
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
|
|
36
44
|
data() {
|
|
37
45
|
return {
|
|
38
46
|
matchedComponent: null,
|
|
39
47
|
resolvedRoute: null,
|
|
40
|
-
refreshTrigger: false
|
|
48
|
+
refreshTrigger: false,
|
|
49
|
+
// 响应式路由上下文:route 为本页签 resolve 出的路由快照
|
|
50
|
+
routeContext: {
|
|
51
|
+
route: null
|
|
52
|
+
}
|
|
41
53
|
};
|
|
42
54
|
},
|
|
43
55
|
|
|
@@ -79,6 +91,7 @@ export default {
|
|
|
79
91
|
const record = matched[matched.length - 1];
|
|
80
92
|
this.matchedComponent = record.components.default;
|
|
81
93
|
this.resolvedRoute = resolved.route;
|
|
94
|
+
this.routeContext.route = this.pickRoute(resolved.route);
|
|
82
95
|
}
|
|
83
96
|
|
|
84
97
|
// 同步地址栏(可选,保持 URL 反映当前激活的 tab)
|
|
@@ -87,6 +100,21 @@ export default {
|
|
|
87
100
|
}
|
|
88
101
|
},
|
|
89
102
|
|
|
103
|
+
/**
|
|
104
|
+
* 提取路由快照:只保留页面组件常用的扁平字段,
|
|
105
|
+
* 避免把含循环引用的完整 route 对象交给响应式系统
|
|
106
|
+
*/
|
|
107
|
+
pickRoute(route) {
|
|
108
|
+
return {
|
|
109
|
+
path: route.path,
|
|
110
|
+
fullPath: route.fullPath,
|
|
111
|
+
name: route.name,
|
|
112
|
+
meta: route.meta,
|
|
113
|
+
params: { ...route.params },
|
|
114
|
+
query: { ...route.query }
|
|
115
|
+
};
|
|
116
|
+
},
|
|
117
|
+
|
|
90
118
|
/**
|
|
91
119
|
* 刷新当前页签路由
|
|
92
120
|
* 先卸载再重新挂载,实现完整刷新
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
:iconColors="backgroundColor"
|
|
41
41
|
:show-title="false"
|
|
42
42
|
:collapse="fold"
|
|
43
|
+
:unique-opened="uniqueOpened"
|
|
43
44
|
@select="handleSelect"
|
|
44
45
|
></es-menu>
|
|
45
46
|
</div>
|
|
@@ -68,6 +69,7 @@ export default {
|
|
|
68
69
|
active: String,
|
|
69
70
|
mode: String,
|
|
70
71
|
collapse: Boolean,
|
|
72
|
+
uniqueOpened: Boolean,
|
|
71
73
|
title: String,
|
|
72
74
|
closed: Boolean,
|
|
73
75
|
iconPosition: String,
|
|
@@ -490,6 +490,8 @@ export default {
|
|
|
490
490
|
fold: false,
|
|
491
491
|
// 菜单样式是否折叠形式
|
|
492
492
|
isCollapse: this.collapse,
|
|
493
|
+
// 菜单是否手风琴模式
|
|
494
|
+
uniqueOpened: true,
|
|
493
495
|
// 人工智能配置
|
|
494
496
|
aiConfig: null,
|
|
495
497
|
// im配置
|
|
@@ -1103,6 +1105,11 @@ export default {
|
|
|
1103
1105
|
if (path.indexOf(':') === -1 && path.indexOf('*') === -1) {
|
|
1104
1106
|
return false;
|
|
1105
1107
|
}
|
|
1108
|
+
// 根级兜底('*'、'/*')语义是「其余一切」,不代表本站真有该页面;
|
|
1109
|
+
// 若算命中,任何外部地址都会被误判为站内路由,resolve 到兜底组件(回首页/404)
|
|
1110
|
+
if (path.replace(/\//g, '') === '*') {
|
|
1111
|
+
return false;
|
|
1112
|
+
}
|
|
1106
1113
|
const paths = path.split('/');
|
|
1107
1114
|
const names = target.split('/');
|
|
1108
1115
|
let optional = 0;
|
|
@@ -1261,6 +1268,10 @@ export default {
|
|
|
1261
1268
|
case 'openModel':
|
|
1262
1269
|
setStorage({ key: 'openModel', value: res[i] });
|
|
1263
1270
|
break;
|
|
1271
|
+
// 自定义页面权限
|
|
1272
|
+
case 'customPages':
|
|
1273
|
+
setStorage({ key: 'customPages', value: res[i] });
|
|
1274
|
+
break;
|
|
1264
1275
|
case 'aiConfig':
|
|
1265
1276
|
if (typeof res[i] === 'string') {
|
|
1266
1277
|
try {
|
|
@@ -1328,7 +1339,8 @@ export default {
|
|
|
1328
1339
|
getAllApps() {
|
|
1329
1340
|
ajax({ url: getMainAppWithTag }).then((res) => {
|
|
1330
1341
|
if (res.rCode === 0) {
|
|
1331
|
-
|
|
1342
|
+
const { all = [], app_special_business_system = [], app_system = [] } = res.results;
|
|
1343
|
+
this.allTagApps = [...all, ...app_special_business_system, ...app_system];
|
|
1332
1344
|
}
|
|
1333
1345
|
});
|
|
1334
1346
|
},
|
|
@@ -95,7 +95,6 @@ export default {
|
|
|
95
95
|
{
|
|
96
96
|
text: '编辑',
|
|
97
97
|
event: (row) => {
|
|
98
|
-
console.log('row', row);
|
|
99
98
|
this.title = '编辑';
|
|
100
99
|
this.show = true;
|
|
101
100
|
this.id = row.id;
|
|
@@ -160,7 +159,6 @@ export default {
|
|
|
160
159
|
companyid: getStorage('orgId'),
|
|
161
160
|
...data
|
|
162
161
|
};
|
|
163
|
-
console.log(postData);
|
|
164
162
|
ajax({
|
|
165
163
|
method: 'post',
|
|
166
164
|
url: `/${this.bootName}${moduleSave}`,
|
|
@@ -506,7 +506,6 @@ export default {
|
|
|
506
506
|
this.id = '';
|
|
507
507
|
this.moduleListShow = false;
|
|
508
508
|
this.info = this.add + '?modulecode=' + this.moduleCode;
|
|
509
|
-
console.log(this.info);
|
|
510
509
|
this.show = true;
|
|
511
510
|
},
|
|
512
511
|
// 撤回所选
|
|
@@ -514,9 +513,7 @@ export default {
|
|
|
514
513
|
if (!this.multipleSelection) {
|
|
515
514
|
return this.$message.warning('您未勾选任何信息');
|
|
516
515
|
}
|
|
517
|
-
console.log(this.multipleSelection);
|
|
518
516
|
let ids = this.multipleSelection.map((item) => item.id).join(',');
|
|
519
|
-
console.log(ids);
|
|
520
517
|
this.recall(ids);
|
|
521
518
|
},
|
|
522
519
|
recall(id) {
|
|
@@ -116,7 +116,11 @@ export default {
|
|
|
116
116
|
currentName() {
|
|
117
117
|
if (this.$refs.nav) {
|
|
118
118
|
this.$nextTick(() => {
|
|
119
|
+
// 路由切换/卸载可能发生在两层 nextTick 之间,nav 引用会变 undefined,
|
|
120
|
+
// 回调内必须重新判空,否则抛错会打断同批 nextTick 回调队列
|
|
121
|
+
if (!this.$refs.nav) return;
|
|
119
122
|
this.$refs.nav.$nextTick((_) => {
|
|
123
|
+
if (!this.$refs.nav) return;
|
|
120
124
|
this.$refs.nav.scrollToActiveTab();
|
|
121
125
|
});
|
|
122
126
|
});
|
|
@@ -309,7 +313,7 @@ export default {
|
|
|
309
313
|
''
|
|
310
314
|
)}
|
|
311
315
|
{newButton}
|
|
312
|
-
|
|
316
|
+
<tab-nav {...navData} class={[hideBar ? 'is-hide' : '']} />
|
|
313
317
|
{this.$slots.append ? (
|
|
314
318
|
<div
|
|
315
319
|
ref={'append'}
|