@zgfe/modules-page 1.0.1-alpha.0 → 1.0.1-alpha.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/dist/esm/components/groupModal/index.js +27 -25
- package/dist/esm/components/groupModal/utils.js +8 -5
- package/dist/esm/components/pageSelect/index.js +27 -4
- package/dist/esm/components/searchPanel/index.js +1 -1
- package/dist/esm/components/searchPanel/index.less +3 -5
- package/dist/esm/components/searchPanel/util.d.ts +3 -11
- package/dist/esm/components/searchPanel/util.js +7 -11
- package/dist/esm/modules/empty/index.less +11 -11
- package/dist/esm/modules/home/index.js +1 -2
- package/dist/esm/modules/home/utils.js +15 -2
- package/package.json +1 -1
|
@@ -11,7 +11,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
11
11
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
13
|
import { BizDialog, BizGlobalDataContext, IconFont, ajax } from '@zgfe/business-lib';
|
|
14
|
-
import { Button, Form, Input } from 'antd';
|
|
14
|
+
import { Button, Form, Input, Spin } from 'antd';
|
|
15
15
|
import React, { useContext, useEffect, useRef, useState } from 'react';
|
|
16
16
|
import "./index.less";
|
|
17
17
|
import PageItem from "./pageItem";
|
|
@@ -24,29 +24,25 @@ var GroupModal = function GroupModal(props) {
|
|
|
24
24
|
_useState2 = _slicedToArray(_useState, 2),
|
|
25
25
|
loading = _useState2[0],
|
|
26
26
|
setLoading = _useState2[1];
|
|
27
|
-
var _useState3 = useState(false),
|
|
28
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
29
|
-
delLoading = _useState4[0],
|
|
30
|
-
setDelLoading = _useState4[1];
|
|
31
27
|
var _useContext = useContext(BizGlobalDataContext),
|
|
32
28
|
currentApp = _useContext.currentApp,
|
|
33
29
|
isDemo = _useContext.isDemo;
|
|
34
30
|
var refForm = useRef();
|
|
35
31
|
// 默认的url数组
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
defaultOption =
|
|
39
|
-
setDefaultOption =
|
|
32
|
+
var _useState3 = useState(mockData),
|
|
33
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
34
|
+
defaultOption = _useState4[0],
|
|
35
|
+
setDefaultOption = _useState4[1];
|
|
40
36
|
// 是否校验
|
|
41
|
-
var
|
|
42
|
-
|
|
43
|
-
validate =
|
|
44
|
-
setValidate =
|
|
37
|
+
var _useState5 = useState(false),
|
|
38
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
39
|
+
validate = _useState6[0],
|
|
40
|
+
setValidate = _useState6[1];
|
|
45
41
|
// 按钮组
|
|
46
|
-
var
|
|
47
|
-
|
|
48
|
-
btnList =
|
|
49
|
-
setBtnList =
|
|
42
|
+
var _useState7 = useState([]),
|
|
43
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
44
|
+
btnList = _useState8[0],
|
|
45
|
+
setBtnList = _useState8[1];
|
|
50
46
|
useEffect(function () {
|
|
51
47
|
getPageEsData('', setDefaultOption, currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId, currentApp === null || currentApp === void 0 ? void 0 : currentApp.platform);
|
|
52
48
|
setBtnList(function () {
|
|
@@ -57,7 +53,6 @@ var GroupModal = function GroupModal(props) {
|
|
|
57
53
|
}, "\u53D6\u6D88"), /*#__PURE__*/React.createElement(Button, {
|
|
58
54
|
key: "submit",
|
|
59
55
|
type: "primary",
|
|
60
|
-
loading: loading,
|
|
61
56
|
onClick: onOk
|
|
62
57
|
}, "\u786E\u5B9A")];
|
|
63
58
|
if (props.value) {
|
|
@@ -66,7 +61,6 @@ var GroupModal = function GroupModal(props) {
|
|
|
66
61
|
type: "text",
|
|
67
62
|
className: "".concat(classPrefix, "-footer-del"),
|
|
68
63
|
onClick: onDelete,
|
|
69
|
-
loading: delLoading,
|
|
70
64
|
icon: /*#__PURE__*/React.createElement(IconFont, {
|
|
71
65
|
type: "shanchu2"
|
|
72
66
|
})
|
|
@@ -76,7 +70,7 @@ var GroupModal = function GroupModal(props) {
|
|
|
76
70
|
});
|
|
77
71
|
}, []);
|
|
78
72
|
var onDelete = function onDelete() {
|
|
79
|
-
|
|
73
|
+
setLoading(true);
|
|
80
74
|
ajax(api.deletePageGroup, {
|
|
81
75
|
method: 'post',
|
|
82
76
|
data: {
|
|
@@ -84,9 +78,11 @@ var GroupModal = function GroupModal(props) {
|
|
|
84
78
|
platform: (currentApp === null || currentApp === void 0 ? void 0 : currentApp.platform) || 0,
|
|
85
79
|
id: props.value.id
|
|
86
80
|
}
|
|
87
|
-
}).then(function () {
|
|
88
|
-
|
|
81
|
+
}).then(function (res) {
|
|
82
|
+
if (!res) return;
|
|
89
83
|
props.onOk && props.onOk();
|
|
84
|
+
}).finally(function () {
|
|
85
|
+
setLoading(false);
|
|
90
86
|
});
|
|
91
87
|
};
|
|
92
88
|
var onOk = function onOk() {
|
|
@@ -97,7 +93,7 @@ var GroupModal = function GroupModal(props) {
|
|
|
97
93
|
var _props$value;
|
|
98
94
|
setValidate(true);
|
|
99
95
|
var flag = true;
|
|
100
|
-
data.
|
|
96
|
+
data.filters.forEach(function (item) {
|
|
101
97
|
if (!item.param) {
|
|
102
98
|
flag = false;
|
|
103
99
|
}
|
|
@@ -106,11 +102,15 @@ var GroupModal = function GroupModal(props) {
|
|
|
106
102
|
setLoading(true);
|
|
107
103
|
var url = props.value ? api.updatePageGroup : api.addPageGroup;
|
|
108
104
|
ajax(url, {
|
|
105
|
+
method: 'post',
|
|
109
106
|
data: _objectSpread({
|
|
110
107
|
id: (_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.id
|
|
111
108
|
}, data)
|
|
112
|
-
}).then(function () {
|
|
109
|
+
}).then(function (res) {
|
|
110
|
+
if (!res) return;
|
|
113
111
|
props.onOk && props.onOk();
|
|
112
|
+
}).finally(function () {
|
|
113
|
+
setLoading(false);
|
|
114
114
|
});
|
|
115
115
|
};
|
|
116
116
|
return /*#__PURE__*/React.createElement(BizDialog, {
|
|
@@ -123,7 +123,9 @@ var GroupModal = function GroupModal(props) {
|
|
|
123
123
|
disabled: isDemo
|
|
124
124
|
},
|
|
125
125
|
footer: btnList
|
|
126
|
-
}, /*#__PURE__*/React.createElement(
|
|
126
|
+
}, /*#__PURE__*/React.createElement(Spin, {
|
|
127
|
+
spinning: loading
|
|
128
|
+
}, /*#__PURE__*/React.createElement(Form, {
|
|
127
129
|
ref: refForm,
|
|
128
130
|
onFinish: onSubmit,
|
|
129
131
|
initialValues: props.value,
|
|
@@ -2,11 +2,14 @@ import { ajax } from '@zgfe/business-lib';
|
|
|
2
2
|
import API from "../../constants/api";
|
|
3
3
|
export var getPageEsData = function getPageEsData(searchValue, callback, appId, platform) {
|
|
4
4
|
ajax(API.getPageEsData, {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
method: 'post',
|
|
6
|
+
data: {
|
|
7
|
+
appId: appId,
|
|
8
|
+
platform: platform || 0,
|
|
9
|
+
limit: 10000,
|
|
10
|
+
attr: 0,
|
|
11
|
+
v: searchValue
|
|
12
|
+
}
|
|
10
13
|
}).then(function (res) {
|
|
11
14
|
if (!res || !res.data) return;
|
|
12
15
|
var list = res.data.sources;
|
|
@@ -15,6 +15,7 @@ import { pageTypes } from "../../constants";
|
|
|
15
15
|
import React, { useContext, useEffect, useState } from 'react';
|
|
16
16
|
import "./index.less";
|
|
17
17
|
import { ModulesPageContext } from "../../modules/home/types";
|
|
18
|
+
import { Tooltip } from 'antd';
|
|
18
19
|
var PageSelect = function PageSelect(props) {
|
|
19
20
|
// 根据类型展示的列表
|
|
20
21
|
var _useState = useState([]),
|
|
@@ -37,7 +38,27 @@ var PageSelect = function PageSelect(props) {
|
|
|
37
38
|
pageGroupList = _useContext.pageGroupList,
|
|
38
39
|
currentClickPage = _useContext.currentClickPage;
|
|
39
40
|
useEffect(function () {
|
|
40
|
-
|
|
41
|
+
var _props$value, _props$value2;
|
|
42
|
+
if (!props.value) return;
|
|
43
|
+
var type = (_props$value = props.value) !== null && _props$value !== void 0 && _props$value.pageGroup || ((_props$value2 = props.value) === null || _props$value2 === void 0 ? void 0 : _props$value2.pageGroup) === 0 ? 1 : 0;
|
|
44
|
+
setCurrentType(pageTypes[type]);
|
|
45
|
+
setCurrentValue(function () {
|
|
46
|
+
if (type === 1) {
|
|
47
|
+
var data = props.value;
|
|
48
|
+
return {
|
|
49
|
+
id: "".concat(data.pageTitle ? data.pageTitle + '-' : '').concat(data.pageUrl),
|
|
50
|
+
pageTitle: data.pageTitle,
|
|
51
|
+
pageUrl: data.pageUrl
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
return pageGroupList.filter(function (item) {
|
|
55
|
+
var _props$value3;
|
|
56
|
+
return item.id === ((_props$value3 = props.value) === null || _props$value3 === void 0 ? void 0 : _props$value3.pageGroup);
|
|
57
|
+
})[0];
|
|
58
|
+
});
|
|
59
|
+
}, []);
|
|
60
|
+
useEffect(function () {
|
|
61
|
+
if (!currentClickPage) return;
|
|
41
62
|
setCurrentValue(function () {
|
|
42
63
|
if (currentClickPage && currentClickPage.pageUrl) {
|
|
43
64
|
var _ref = currentClickPage,
|
|
@@ -94,13 +115,15 @@ var PageSelect = function PageSelect(props) {
|
|
|
94
115
|
options: options,
|
|
95
116
|
labelField: currentType.value === 'page' ? 'pageTitle' : 'name',
|
|
96
117
|
popupContainer: true,
|
|
97
|
-
enableSearch:
|
|
118
|
+
enableSearch: options.length > 5,
|
|
98
119
|
onChange: setCurrentValue,
|
|
99
120
|
customLabel: getCustomLabel
|
|
100
|
-
}), /*#__PURE__*/React.createElement(
|
|
121
|
+
}), /*#__PURE__*/React.createElement(Tooltip, {
|
|
122
|
+
title: "\u6DFB\u52A0\u5C5E\u6027\u7B5B\u9009"
|
|
123
|
+
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
101
124
|
className: "".concat(classPrefix, "-panel-icon").concat(!props.enableAdd ? ' disabled' : ''),
|
|
102
125
|
type: "shaixuan",
|
|
103
126
|
onClick: props.onAdd
|
|
104
|
-
})));
|
|
127
|
+
}))));
|
|
105
128
|
};
|
|
106
129
|
export default PageSelect;
|
|
@@ -12,7 +12,7 @@ import { BizAttrConditionGroup, BizGlobalDataContext, BizUserGroup, IconFont } f
|
|
|
12
12
|
import PageSelect from "../pageSelect";
|
|
13
13
|
import { formValue, formatValue } from "./util";
|
|
14
14
|
var SearchPanel = function SearchPanel(props) {
|
|
15
|
-
var classPrefix = 'search-panel';
|
|
15
|
+
var classPrefix = 'page-search-panel';
|
|
16
16
|
// form 值
|
|
17
17
|
var _Form$useForm = Form.useForm(),
|
|
18
18
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@import '~@zgfe/business-lib/es/assets/styles/inner.less';
|
|
2
2
|
|
|
3
|
-
.search-panel {
|
|
3
|
+
.page-search-panel {
|
|
4
4
|
&-title.ant-form-item {
|
|
5
5
|
margin-bottom: 12px;
|
|
6
6
|
padding-left: 24px;
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
&:hover {
|
|
22
22
|
background: #e8efff;
|
|
23
23
|
}
|
|
24
|
-
.search-panel-item.ant-form-item {
|
|
24
|
+
.page-search-panel-item.ant-form-item {
|
|
25
25
|
margin-bottom: 0;
|
|
26
26
|
padding: 4px 0;
|
|
27
27
|
}
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
&-item3:not(.search-panel-hidden) {
|
|
42
|
+
&-item3:not(.page-search-panel-hidden) {
|
|
43
43
|
margin-bottom: 20px;
|
|
44
44
|
padding: 4px 24px;
|
|
45
45
|
&:hover {
|
|
@@ -49,8 +49,6 @@
|
|
|
49
49
|
|
|
50
50
|
&-item2 {
|
|
51
51
|
margin-bottom: 4px;
|
|
52
|
-
.page-select-panel {
|
|
53
|
-
}
|
|
54
52
|
}
|
|
55
53
|
|
|
56
54
|
&-hidden.ant-form-item {
|
|
@@ -2,17 +2,9 @@ import { BizSelectTypes } from '@zgfe/business-lib';
|
|
|
2
2
|
import { FormValue, SearchValue } from './types';
|
|
3
3
|
export declare const formValue: (source?: SearchValue, userGroupList?: BizSelectTypes.Option[]) => FormValue;
|
|
4
4
|
export declare const formatValue: (source: FormValue) => {
|
|
5
|
-
filters: import("@zgfe/business-lib").AttrConditionTypes.GroupValue | undefined;
|
|
6
|
-
userGroup: number[];
|
|
7
|
-
} | {
|
|
8
|
-
filters: import("@zgfe/business-lib").AttrConditionTypes.GroupValue | undefined;
|
|
9
|
-
type?: string | undefined;
|
|
10
|
-
pageUrl?: string | undefined;
|
|
11
|
-
pageTitle?: string | undefined;
|
|
12
5
|
userGroup: number[];
|
|
13
|
-
|
|
6
|
+
pageTitle: string | undefined;
|
|
7
|
+
pageUrl: string | undefined;
|
|
8
|
+
pageGroup: number | undefined;
|
|
14
9
|
filters: import("@zgfe/business-lib").AttrConditionTypes.GroupValue | undefined;
|
|
15
|
-
type?: string | undefined;
|
|
16
|
-
pageGroup?: number | undefined;
|
|
17
|
-
userGroup: number[];
|
|
18
10
|
};
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
1
|
import _ from 'lodash';
|
|
8
2
|
export var formValue = function formValue(source, userGroupList) {
|
|
9
3
|
var data = _.cloneDeep(source) || {};
|
|
@@ -35,7 +29,7 @@ export var formValue = function formValue(source, userGroupList) {
|
|
|
35
29
|
};
|
|
36
30
|
};
|
|
37
31
|
export var formatValue = function formatValue(source) {
|
|
38
|
-
var _data$userGroup2;
|
|
32
|
+
var _data$userGroup2, _data$page, _data$page2, _data$page3;
|
|
39
33
|
var data = _.cloneDeep(source) || {};
|
|
40
34
|
var group = [];
|
|
41
35
|
(_data$userGroup2 = data.userGroup) === null || _data$userGroup2 === void 0 ? void 0 : _data$userGroup2.forEach(function (item) {
|
|
@@ -43,9 +37,11 @@ export var formatValue = function formatValue(source) {
|
|
|
43
37
|
group.push(item.id);
|
|
44
38
|
}
|
|
45
39
|
});
|
|
46
|
-
return
|
|
47
|
-
userGroup: group
|
|
48
|
-
|
|
40
|
+
return {
|
|
41
|
+
userGroup: group,
|
|
42
|
+
pageTitle: (_data$page = data.page) === null || _data$page === void 0 ? void 0 : _data$page.pageTitle,
|
|
43
|
+
pageUrl: (_data$page2 = data.page) === null || _data$page2 === void 0 ? void 0 : _data$page2.pageUrl,
|
|
44
|
+
pageGroup: (_data$page3 = data.page) === null || _data$page3 === void 0 ? void 0 : _data$page3.pageGroup,
|
|
49
45
|
filters: data.filters
|
|
50
|
-
}
|
|
46
|
+
};
|
|
51
47
|
};
|
|
@@ -11,22 +11,22 @@
|
|
|
11
11
|
&-content {
|
|
12
12
|
width: 400px;
|
|
13
13
|
margin-left: 136px;
|
|
14
|
-
&-title {
|
|
15
|
-
margin-bottom: 24px;
|
|
16
|
-
font-weight: 500;
|
|
17
|
-
font-size: 28px;
|
|
18
|
-
}
|
|
19
|
-
&-title-secondary {
|
|
20
|
-
margin-top: 24px;
|
|
21
|
-
margin-bottom: 8px;
|
|
22
|
-
font-weight: 500;
|
|
23
|
-
font-size: 16px;
|
|
24
|
-
}
|
|
25
14
|
p {
|
|
26
15
|
color: #9aa1a9;
|
|
27
16
|
font-size: 14px;
|
|
28
17
|
}
|
|
29
18
|
}
|
|
19
|
+
&-title {
|
|
20
|
+
margin-bottom: 24px;
|
|
21
|
+
font-weight: 500;
|
|
22
|
+
font-size: 28px;
|
|
23
|
+
}
|
|
24
|
+
&-title-secondary {
|
|
25
|
+
margin-top: 24px;
|
|
26
|
+
margin-bottom: 8px;
|
|
27
|
+
font-weight: 500;
|
|
28
|
+
font-size: 16px;
|
|
29
|
+
}
|
|
30
30
|
|
|
31
31
|
&-code-container {
|
|
32
32
|
position: relative;
|
|
@@ -93,7 +93,6 @@ var ModulesPage = function ModulesPage(props) {
|
|
|
93
93
|
return flag;
|
|
94
94
|
}, [eventGroupList]);
|
|
95
95
|
useEffect(function () {
|
|
96
|
-
if (isEmpty) return;
|
|
97
96
|
var param = {
|
|
98
97
|
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
99
98
|
platform: (currentApp === null || currentApp === void 0 ? void 0 : currentApp.platform) || 0
|
|
@@ -110,7 +109,7 @@ var ModulesPage = function ModulesPage(props) {
|
|
|
110
109
|
if (isEmpty) return;
|
|
111
110
|
if (!searchValue) return;
|
|
112
111
|
console.log('searchValue:', searchValue);
|
|
113
|
-
var type =
|
|
112
|
+
var type = searchValue !== null && searchValue !== void 0 && searchValue.pageGroup || (searchValue === null || searchValue === void 0 ? void 0 : searchValue.pageGroup) === 0 ? 'pageGroup' : 'page';
|
|
114
113
|
setCurrentType(type);
|
|
115
114
|
// 选择概览时,跳到列表页
|
|
116
115
|
if (type === 'page' && !(searchValue !== null && searchValue !== void 0 && searchValue.pageUrl) || type === 'pageGroup' && !(searchValue !== null && searchValue !== void 0 && searchValue.pageGroup)) {
|
|
@@ -12,7 +12,14 @@ export var getPageList = function getPageList(data, callback) {
|
|
|
12
12
|
method: 'post',
|
|
13
13
|
data: data
|
|
14
14
|
}).then(function (res) {
|
|
15
|
-
if (!res)
|
|
15
|
+
if (!res) {
|
|
16
|
+
callback([{
|
|
17
|
+
id: '页面概览',
|
|
18
|
+
pageTitle: '页面概览',
|
|
19
|
+
pageUrl: ''
|
|
20
|
+
}]);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
16
23
|
var list = res.data;
|
|
17
24
|
list.unshift({
|
|
18
25
|
pageTitle: '页面概览',
|
|
@@ -34,7 +41,13 @@ export var getPageGroupList = function getPageGroupList(data, callback) {
|
|
|
34
41
|
method: 'post',
|
|
35
42
|
data: data
|
|
36
43
|
}).then(function (res) {
|
|
37
|
-
if (!res)
|
|
44
|
+
if (!res) {
|
|
45
|
+
callback([{
|
|
46
|
+
id: 0,
|
|
47
|
+
name: '全部页面组'
|
|
48
|
+
}]);
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
38
51
|
var list = res.data;
|
|
39
52
|
list.unshift({
|
|
40
53
|
id: 0,
|