懒羊羊
2023-11-14 8286c62256f23bc2367a6729c0f46f84215e380b
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
var RoleInfoDlg = {
    data: {
        pid: "",
        pName: ""
    }
};
layui.use(['ax','layer'], function () {
    var $ = layui.$;
    var $ax = layui.ax;
    var layer = layui.layer;
 
    var ID_ = $("#ID_").attr("value");
 
    /**
     * 指定人员
     */
    $("#btnSetUser").click(function () {
        layer.open({
            type: 2,
            title: '指定人员',
            area: ['600px', '400px'],
            content: Feng.ctxPath + '/taskWaiting/delegateUserPage?ID_='+ ID_,
            end: function () {
            }
        });
    });
 
    /**
     * 委派
     */
    $("#delegate").click(function () {
        var id = $("#ID_").attr("value");
        var assignee = $("#setValue").attr("value");
 
        if (assignee == null || assignee == "") {
            layer.msg("请先指定人员或角色");
            return;
        }
        var ajax = new $ax(Feng.ctxPath + "/process/delegate", function () {
            var index = parent.layer.getFrameIndex(window.name);
            parent.layer.close(index);//关闭当前页
        }, function (data) {
            Feng.error("委派失败!" + data.responseJSON.message + "!");
        });
        ajax.set("id", id);
        ajax.set("assignee", assignee);
        ajax.start();
    });
 
    /**
     * 指定角色
     */
    $("#btnSetRole").click(function () {
 
        var formName = encodeURIComponent("parent.RoleInfoDlg.data.pName");
        var formId = encodeURIComponent("parent.RoleInfoDlg.data.pid");
        var treeUrl = encodeURIComponent("/role/roleTreeList");
 
        layer.open({
            type: 2,
            title: '指定角色',
            area: ['300px', '350px'],
            content: Feng.ctxPath + '/system/commonTree?formName=' + formName + "&formId=" + formId + "&treeUrl=" + treeUrl,
            end: function () {
                $("#delegateObj").val(RoleInfoDlg.data.pName);
                $("#setValue").attr("value",RoleInfoDlg.data.pid);
            }
        });
 
    });
 
 
});