wenhongquan 9 年之前
父節點
當前提交
72892669f1

+ 0 - 1
VisualInspection/js/main.js

@@ -2,7 +2,6 @@ var MENU;
 //计算左面的
 $(document).ready(function () {
 
-    console.log($.zui.store.enable)
 
     setletftime();
 

+ 24 - 10
VisualInspection/js/role/permision.js

@@ -81,7 +81,7 @@ $(document).ready(function () {
             });
             return;
         }
-        loadPermisionRoleData(nodedata,0)
+        loadPermisionRoleData(nodedata, 0)
         $('#addRoleModal').modal('show');
     });
 
@@ -96,17 +96,17 @@ $(document).ready(function () {
 
     $('.datatable').on('click', 'button', function () {
         if (this.name == "user_edit") {
-             var nodedata = dept_tree.getSelectedNodes();
+            var nodedata = dept_tree.getSelectedNodes();
             edittype = "edit"
             var user = nodedata
-            loadPermisionRoleData(user,this.id)
+            loadPermisionRoleData(user, this.id)
             $('#addRoleModal').modal('show')
         }
         if (this.name == "user_delete") {
             var nodedata = dept_tree.getSelectedNodes();
             var data = {
-                "role_id":this.id,
-                "permission_id":nodedata[0].id
+                "role_id": this.id,
+                "permission_id": nodedata[0].id
             }
             PermisionRoleDELETE(data, function (data) {
                 layer.msg('角色删除成功!', {
@@ -232,23 +232,22 @@ function addobj(data) {
 function updateRole(permisionid) {
 
     RoleGetByPermision(permisionid, function (data) {
-        
+
         //跟新table
         var rowdata = [];
         if (data != null && data.length > 0) {
             for (var i = 0; i < data.length; i++) {
                 var role = data[i];
- 
+
                 RoleMap.set(role.id, role)
                 var roledata = {};
                 roledata["checked"] = false;
-                roledata["data"] = [i + 1,  typeof(role.des)=="undefined"?"":role.des, typeof(role.mod)=="undefined"?1:role.mod, '<button class="btn btn-primary" name="user_edit" id=' + role.id + '><i class="icon icon-edit"></i>修改</button>  <button class="btn btn-primary" name="user_delete" id=' + role.id + ' ><i class="icon icon-remove-circle"></i>删除</button>'];
+                roledata["data"] = [i + 1, typeof (role.des) == "undefined" ? "" : role.des, typeof (role.mod) == "undefined" ? getpertype(1) : getpertype(role.mod), '<button class="btn btn-primary" name="user_edit" id=' + role.id + '><i class="icon icon-edit"></i>修改</button>  <button class="btn btn-primary" name="user_delete" id=' + role.id + ' ><i class="icon icon-remove-circle"></i>删除</button>'];
                 rowdata.push(roledata);
 
-                RoleMap.set(role.id,role);
+                RoleMap.set(role.id, role);
             }
         }
-         console.log(cols)
 
         // 使用data参数更新数据:
         $('.datatable').datatable('load', {
@@ -260,4 +259,19 @@ function updateRole(permisionid) {
         function (error) {
 
         });
+}
+
+function getpertype(mod) {
+    switch (mod) {
+        case 1:
+            return "读写";
+        case 2:
+            return "写";
+        case 3:
+            return "读";
+        case 4:
+            return "删除";
+        default: return "读";
+    }
+
 }

+ 0 - 1
VisualInspection/js/user/addUser.js

@@ -153,7 +153,6 @@ function addUser() {
         "roleids": userroles
     }
 
-alert(userroles)
     if (userpassword != null && typeof (userpassword) != "undefined") {
         parm["password"] = userpassword;
     }

+ 0 - 1
VisualInspection/js/util/service.js

@@ -357,7 +357,6 @@ function uploadFile(file, name, successfunc, errorfunc) {
         data: form,
         success: function(response) {
             var data = response;
-            console.log(data)
             if (data.result_code == 0) {
                 successfunc(data.result_data)
             } else {

+ 5 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/cluster/UserInfoMapper.xml

@@ -48,6 +48,11 @@
         <if test="age != null">age = #{age},</if>
         <if test="password != null">password = #{password},</if>
         <if test="pic != null">pic = #{pic},</if>
+        <if test="workno != null">workno = #{workno},</if>
+        <if test="mobile != null">mobile = #{mobile},</if>
+        <if test="idno != null">idno = #{idno},</if>
+        <if test="email != null">email = #{email},</if>
+        
         id = #{id}
         WHERE
         id = #{id}