Jelajahi Sumber

跑马灯配置页面修改

yanym 2 tahun lalu
induk
melakukan
578baf9ae8

+ 6 - 2
suishenbang-admin/src/main/resources/templates/system/lantern/add.html

@@ -41,7 +41,7 @@
             <div class="form-group">    
                 <label class="col-sm-3 control-label">公告人员:</label>
                 <div class="col-sm-8">
-                    <select title="请选择" name="userType" class="form-control m-b selectpicker" th:with="type=${@dict.getType('sys_lantern_permission')}" multiple>
+                    <select title="请选择" id="userType" name="userType" class="form-control m-b selectpicker" th:with="type=${@dict.getType('sys_lantern_permission')}" multiple>
                         <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                     </select>
                     <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
@@ -80,7 +80,11 @@
 
         function submitHandler() {
             if ($.validate.form()) {
-                $.operate.save(prefix + "/add", $('#form-lantern-add').serialize());
+                if ($('#userType').selectpicker('val') == null) {
+                    $.modal.msg("请选择通知人员");
+                }else {
+                    $.operate.save(prefix + "/add", $('#form-lantern-add').serialize());
+                }
             }
         }
 

+ 6 - 2
suishenbang-admin/src/main/resources/templates/system/lantern/edit.html

@@ -42,7 +42,7 @@
             <div class="form-group">    
                 <label class="col-sm-3 control-label">公告人员:</label>
                 <div class="col-sm-8">
-                    <select title="请选择" name="userType" class="form-control m-b selectpicker" th:with="type=${@dict.getType('sys_lantern_permission')}" multiple>
+                    <select title="请选择" id="userType" name="userType" class="form-control m-b selectpicker" th:with="type=${@dict.getType('sys_lantern_permission')}" multiple>
                         <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                     </select>
                     <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
@@ -81,7 +81,11 @@
 
         function submitHandler() {
             if ($.validate.form()) {
-                $.operate.save(prefix + "/edit", $('#form-lantern-edit').serialize());
+                if ($('#userType').selectpicker('val') == null) {
+                    $.modal.msg("请选择通知人员");
+                }else {
+                    $.operate.save(prefix + "/add", $('#form-lantern-add').serialize());
+                }
             }
         }