|
|
@@ -0,0 +1,139 @@
|
|
|
+<%@ page contentType="text/html; charset=utf-8"%>
|
|
|
+<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
|
|
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
|
|
|
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
|
|
+<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
|
|
|
+<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
|
|
|
+<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
|
|
|
+<c:set var="basePath" value="${pageContext.request.contextPath}"/>
|
|
|
+<div id="createDialog" class="crudDialog">
|
|
|
+ <form id="createForm" method="post">
|
|
|
+ <div class="radio">
|
|
|
+ <div class="radio radio-inline radio-success">
|
|
|
+ <input id="type_1" type="radio" name="type" value="1" checked>
|
|
|
+ <label for="type_1"> 目录 </label>
|
|
|
+ </div>
|
|
|
+ <div class="radio radio-inline radio-info">
|
|
|
+ <input id="type_2" type="radio" name="type" value="0">
|
|
|
+ <label for="type_2"> 菜单 </label>
|
|
|
+ </div>
|
|
|
+ <div class="radio radio-inline radio-warning">
|
|
|
+ <input id="type_3" type="radio" name="type" value="0">
|
|
|
+ <label for="type_3"> 按钮 </label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <select id="systemId" name="systemId">
|
|
|
+ <option value="0">请选择所属系统</option>
|
|
|
+ <c:forEach var="upmsSystem" items="${upmsSystems}">
|
|
|
+ <option value="${upmsSystem.systemId}">${upmsSystem.title}</option>
|
|
|
+ </c:forEach>
|
|
|
+ </select>
|
|
|
+ <select id="pid" name="pid">
|
|
|
+ <option value="0">请选择所属上级</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label for="name">名称</label>
|
|
|
+ <input id="name" type="text" class="form-control" name="name" maxlength="20">
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label for="permissionValue">权限值</label>
|
|
|
+ <input id="permissionValue" type="text" class="form-control" name="permissionValue" maxlength="50">
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label for="uri">路径</label>
|
|
|
+ <input id="uri" type="text" class="form-control" name="uri" maxlength="100">
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label for="icon">图标</label>
|
|
|
+ <input id="icon" type="text" class="form-control" name="icon" maxlength="50">
|
|
|
+ </div>
|
|
|
+ <div class="radio">
|
|
|
+ <div class="radio radio-inline radio-success">
|
|
|
+ <input id="status_1" type="radio" name="status" value="1" checked>
|
|
|
+ <label for="status_1"> 正常 </label>
|
|
|
+ </div>
|
|
|
+ <div class="radio radio-inline">
|
|
|
+ <input id="status_0" type="radio" name="status" value="0">
|
|
|
+ <label for="status_0"> 锁定 </label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group text-right dialog-buttons">
|
|
|
+ <a class="waves-effect waves-button" href="javascript:;" onclick="createSubmit();">保存</a>
|
|
|
+ <a class="waves-effect waves-button" href="javascript:;" onclick="createDialog.close();">取消</a>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+</div>
|
|
|
+<script>
|
|
|
+function createSubmit() {
|
|
|
+ $.ajax({
|
|
|
+ type: 'post',
|
|
|
+ url: '${basePath}/manage/user/create',
|
|
|
+ data: $('#createForm').serialize(),
|
|
|
+ beforeSend: function() {
|
|
|
+ if ($('#username').val() == '') {
|
|
|
+ $('#username').focus();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if ($('#password').val() == '' || $('#password').val().length < 5) {
|
|
|
+ $('#password').focus();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ success: function(result) {
|
|
|
+ if (result.code != 1) {
|
|
|
+ if (result.data instanceof Array) {
|
|
|
+ $.each(result.data, function(index, value) {
|
|
|
+ $.confirm({
|
|
|
+ theme: 'dark',
|
|
|
+ animation: 'rotateX',
|
|
|
+ closeAnimation: 'rotateX',
|
|
|
+ title: false,
|
|
|
+ content: value.errorMsg,
|
|
|
+ buttons: {
|
|
|
+ confirm: {
|
|
|
+ text: '确认',
|
|
|
+ btnClass: 'waves-effect waves-button waves-light'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ $.confirm({
|
|
|
+ theme: 'dark',
|
|
|
+ animation: 'rotateX',
|
|
|
+ closeAnimation: 'rotateX',
|
|
|
+ title: false,
|
|
|
+ content: result.data.errorMsg,
|
|
|
+ buttons: {
|
|
|
+ confirm: {
|
|
|
+ text: '确认',
|
|
|
+ btnClass: 'waves-effect waves-button waves-light'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ createDialog.close();
|
|
|
+ $table.bootstrapTable('refresh');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error: function(XMLHttpRequest, textStatus, errorThrown) {
|
|
|
+ $.confirm({
|
|
|
+ theme: 'dark',
|
|
|
+ animation: 'rotateX',
|
|
|
+ closeAnimation: 'rotateX',
|
|
|
+ title: false,
|
|
|
+ content: textStatus,
|
|
|
+ buttons: {
|
|
|
+ confirm: {
|
|
|
+ text: '确认',
|
|
|
+ btnClass: 'waves-effect waves-button waves-light'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+</script>
|