1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
| /**
| 入驻小区
| **/
| (function(vc) {
| vc.extends({
| data: {
| configMenuInfo: {
| $step: {},
| index: 0,
| infos: []
| }
| },
| _initMethod: function() {
| $that._initStep();
| },
| _initEvent: function() {
| vc.on("configMenu", "notify", function(_info) {
| $that.configMenuInfo.infos[$that.configMenuInfo.index] = _info;
| });
| },
| methods: {
| _initStep: function() {
| $that.configMenuInfo.$step = $("#step");
| $that.configMenuInfo.$step.step({
| index: 0,
| time: 500,
| title: ["选择菜单组", "菜单信息", "权限信息"]
| });
| $that.configMenuInfo.index = $that.configMenuInfo.$step.getIndex();
| },
| _prevStep: function() {
| $that.configMenuInfo.$step.prevStep();
| $that.configMenuInfo.index = $that.configMenuInfo.$step.getIndex();
| vc.emit('viewMenuGroupInfo', 'onIndex', $that.configMenuInfo.index);
| vc.emit('addMenuView', 'onIndex', $that.configMenuInfo.index);
| vc.emit('addPrivilegeView', 'onIndex', $that.configMenuInfo.index);
| },
| _nextStep: function() {
| var _currentData = $that.configMenuInfo.infos[$that.configMenuInfo.index];
| if (_currentData == null || _currentData == undefined) {
| vc.toast("请选择或填写必选信息");
| return;
| }
| $that.configMenuInfo.$step.nextStep();
| $that.configMenuInfo.index = $that.configMenuInfo.$step.getIndex();
| vc.emit('viewMenuGroupInfo', 'onIndex', $that.configMenuInfo.index);
| vc.emit('addMenuView', 'onIndex', $that.configMenuInfo.index);
| vc.emit('addPrivilegeView', 'onIndex', $that.configMenuInfo.index);
| },
| _finishStep: function() {
| var _currentData = $that.configMenuInfo.infos[$that.configMenuInfo.index];
| if (_currentData == null || _currentData == undefined) {
| vc.toast("请选择或填写必选信息");
| return;
| }
| var param = {
| data: $that.configMenuInfo.infos
| }
| vc.http.post(
| 'configMenuBinding',
| 'binding',
| JSON.stringify(param), {
| emulateJSON: true
| },
| function(json, res) {
| let _json = JSON.parse(json);
| if (_json.code == 0) {
| vc.toast('处理成功');
| //关闭model
| //vc.jumpToPage("/#/pages/dev/menuManage?" + vc.objToGetParam(JSON.parse(json)));
| vc.goBack();
| return;
| } else {
| vc.toast(_json.msg);
| }
| },
| function(errInfo, error) {
| console.log('请求失败处理');
| vc.toast(errInfo);
| }
| );
| }
| }
| });
| })(window.vc);
|
|