From 34f99d106551b51bf2af3bbd40c64624a3af25eb Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期六, 09 九月 2023 09:43:57 +0800
Subject: [PATCH] #

---
 src/main/webapp/views/dept/dept.html |   50 +++++++++++++++++++++++++++-----------------------
 1 files changed, 27 insertions(+), 23 deletions(-)

diff --git a/src/main/webapp/views/dept/dept.html b/src/main/webapp/views/dept/dept.html
index ce85e9f..28d0c6a 100644
--- a/src/main/webapp/views/dept/dept.html
+++ b/src/main/webapp/views/dept/dept.html
@@ -155,13 +155,13 @@
                 ,{type: 'numbers'}
                 ,{field: 'name', align: 'left',title: '鍚嶇О', minWidth: 150}
                 // ,{field: 'uuid', align: 'center',title: '缂栧彿'}
-                ,{field: 'type$', align: 'center',title: '绫诲瀷'}
-                ,{field: 'leading', align: 'center',title: '璐熻矗浜�'}
+                ,{field: 'email', align: 'center',title: '閭'}
+                ,{field: 'phone', align: 'center',title: '鑱旂郴鐢佃瘽'}
                 ,{field: 'img', align: 'center',title: '鍥剧墖', hide: true}
                 // ,{field: 'brief', align: 'center',title: '绠�瑕佹弿杩�'}
                 // ,{field: 'count', align: 'center',title: '鏁伴噺'}
                 ,{field: 'sort', align: 'center',title: '鎺掑簭'}
-                ,{field: 'status$', align: 'center',title: '鐘舵��'}
+                // ,{field: 'status$', align: 'center',title: '鐘舵��'}
                 ,{field: 'updateTime$', align: 'center',title: '淇敼鏃堕棿'}
                 ,{field: 'updateBy$', align: 'center',title: '淇敼浜哄憳', hide: true}
                 ,{field: 'memo', align: 'center',title: '澶囨敞', hide: true}
@@ -217,7 +217,9 @@
                     form.val('detail', mData);
                     // 琛ㄥ崟鎻愪氦浜嬩欢
                     form.on('submit(editSubmit)', function (data) {
-                        data.field.parentId = insXmSel.getValue('valueStr');
+                        if(insXmSel != null){
+                            data.field.parentId = insXmSel.getValue('valueStr');
+                        }
                         var loadIndex = layer.load(2);
                         $.ajax({
                             url: baseUrl+"/dept/"+(mData?'update':'add')+"/auth",
@@ -240,25 +242,27 @@
                         return false;
                     });
                     // 娓叉煋涓嬫媺鏍�
-                    var insXmSel = xmSelect.render({
-                        el: '#deptParentSel',
-                        height: '250px',
-                        data: insTb.options.data,
-                        initValue: mData ? [mData.parentId] : [],
-                        model: {label: {type: 'text'}},
-                        prop: {
-                            name: 'name',
-                            value: 'id'
-                        },
-                        radio: true,
-                        clickClose: true,
-                        tree: {
-                            show: true,
-                            indent: 15,
-                            strict: false,
-                            expandedKeys: true
-                        }
-                    });
+                    if(mData == null || mData.parentId != null ) {//闈為《绾ф牴鑺傜偣锛屼笖鏄慨鏀�
+                        var insXmSel = xmSelect.render({
+                            el: '#deptParentSel',
+                            height: '250px',
+                            data: insTb.options.data,
+                            initValue: mData ? [mData.parentId] : [],
+                            model: {label: {type: 'text'}},
+                            prop: {
+                                name: 'name',
+                                value: 'id'
+                            },
+                            radio: true,
+                            clickClose: true,
+                            tree: {
+                                show: true,
+                                indent: 15,
+                                strict: false,
+                                expandedKeys: true
+                            }
+                        });
+                    }
                     // 寮圭獥涓嶅嚭鐜版粴鍔ㄦ潯
                     $(layero).children('.layui-layer-content').css('overflow', 'visible');
                     layui.form.render('select');

--
Gitblit v1.9.1