新需求
This commit is contained in:
parent
1e918b7a92
commit
8b12394422
|
|
@ -157,7 +157,7 @@ function addData(id) {
|
|||
let param = {
|
||||
'id': id
|
||||
}
|
||||
openIframe2("addOrEditUser", title, "signatureBoard.html", '50%', '70%', param);
|
||||
openIframe2("addOrEditUser", title, "signatureBoard.html", '40%', '60%', param);
|
||||
}
|
||||
|
||||
function addDataTemp(id) {
|
||||
|
|
@ -165,7 +165,7 @@ function addDataTemp(id) {
|
|||
let param = {
|
||||
'id': id
|
||||
}
|
||||
openIframe2("addOrEditUserTemp", title, "signatureBoard.html", '1000px', '625px', param);
|
||||
openIframe2("addOrEditUserTemp", title, "signatureBoard.html", '40%', '60%', param);
|
||||
}
|
||||
|
||||
/*删除用户*/
|
||||
|
|
|
|||
|
|
@ -10,39 +10,6 @@
|
|||
<link rel="stylesheet" href="../../js/layui-v2.6.8/css/layui.css" media="all">
|
||||
</head>
|
||||
<style>
|
||||
.layui-layout-admin .layui-header {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.layui-layout-admin .layui-body {
|
||||
position: inherit;
|
||||
}
|
||||
|
||||
.layui-container img {
|
||||
width: 800px;
|
||||
}
|
||||
|
||||
.flex-container {
|
||||
display: flex;
|
||||
flex-direction: column; /* 设置为列方向,以便按钮在画布下方 */
|
||||
align-items: center; /* 居中子元素(包括画布和按钮容器) */
|
||||
justify-content: center; /* 在交叉轴上居中(对于列方向,即水平居中) */
|
||||
/* 如果需要限制容器的宽度或高度,可以在这里设置 */
|
||||
width: 100%; /* 或者你想要的任何宽度 */
|
||||
padding: 20px; /* 为容器添加一些内边距 */
|
||||
}
|
||||
|
||||
.button-container {
|
||||
display: flex; /* 使按钮水平排列 */
|
||||
justify-content: space-around; /* 在按钮之间平均分配空间 */
|
||||
/* 如果需要,可以为按钮容器添加更多样式,如边距或背景色 */
|
||||
}
|
||||
|
||||
/* 如果需要,还可以为按钮添加一些额外的样式或边距 */
|
||||
.layui-btn {
|
||||
margin-top: 10px; /* 按钮与画布之间的空间 */
|
||||
}
|
||||
|
||||
.navbar {
|
||||
background-color: #d2d2d2; /* 导航栏背景色 */
|
||||
padding: 10px 0; /* 导航栏内边距 */
|
||||
|
|
@ -61,20 +28,14 @@
|
|||
margin: 0 10px; /* 导航项之间的间距 */
|
||||
}
|
||||
|
||||
.nav-item a {
|
||||
color: white; /* 链接颜色 */
|
||||
text-decoration: none; /* 移除下划线 */
|
||||
padding: 8px 16px; /* 链接内边距,增加点击区域 */
|
||||
display: block; /* 将链接显示为块级元素,以便应用完整的内边距和背景色(如果需要) */
|
||||
}
|
||||
|
||||
.nav-item.active a, .nav-item a:hover {
|
||||
background-color: #555; /* 激活或悬停时的背景色 */
|
||||
}
|
||||
|
||||
.content-area {
|
||||
/* 内容区域的样式,如边距、填充等 */
|
||||
margin-top: 20px; /* 导航栏和内容区域之间的间距 */
|
||||
align-content: center;
|
||||
text-align: center;
|
||||
}
|
||||
.layui-btn {
|
||||
margin-top: 10px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
@ -102,6 +63,16 @@
|
|||
|
||||
<!-- 图片上传区域(初始隐藏) -->
|
||||
<div class="layui-container flex-container" id="upload-container" style="display:none;">
|
||||
<!-- 假设有一个预览区域 -->
|
||||
<div style="display: flex;justify-content: center;align-content: center;align-items: center;">
|
||||
<div id="image-preview"
|
||||
style="margin-top:10px; border:1px solid #ccc; width:400px; height:200px; display:flex; justify-content:center; align-items:center; overflow:hidden;">
|
||||
<!-- 图片将在这里预览 -->
|
||||
<img id="previewImage" src="" alt="图片预览" style="max-width:100%; max-height:100%;">
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- 文件输入元素,设置为不可见 -->
|
||||
<input type="file" id="fileInput" style="display:none;" accept="image/*">
|
||||
<button class="layui-btn layui-btn-danger" id="uploadBtn">
|
||||
|
|
@ -110,12 +81,8 @@
|
|||
<button class="layui-btn" id="saveBtns">
|
||||
<i class="layui-icon"></i> 保存图片
|
||||
</button>
|
||||
<!-- 假设有一个预览区域 -->
|
||||
<div id="image-preview"
|
||||
style="margin-top:10px; border:1px solid #ccc; width:400px; height:200px; display:flex; justify-content:center; align-items:center; overflow:hidden;">
|
||||
<!-- 图片将在这里预览 -->
|
||||
<img id="previewImage" src="" alt="图片预览" style="max-width:100%; max-height:100%;">
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -126,7 +93,7 @@
|
|||
<script src="../../js/ajaxRequest.js"></script>
|
||||
<script type="text/javascript">
|
||||
var id = 0;
|
||||
var base64EncodedString =null ;
|
||||
var base64EncodedString = null;
|
||||
layui.use(['jquery'], function () {
|
||||
var upload = layui.upload;
|
||||
var layer = layui.layer;
|
||||
|
|
@ -256,7 +223,7 @@
|
|||
});
|
||||
|
||||
// 绑定保存图片按钮的点击事件
|
||||
$('#saveBtns').on('click', function() {
|
||||
$('#saveBtns').on('click', function () {
|
||||
var file = $('#fileInput')[0].files[0];
|
||||
if (!file) {
|
||||
layer.msg('请先选择图片!', {icon: 7});
|
||||
|
|
@ -276,8 +243,8 @@
|
|||
'signImg': image,
|
||||
'id': id
|
||||
}
|
||||
params={
|
||||
encryptedData:encryptCBC(JSON.stringify(params))
|
||||
params = {
|
||||
encryptedData: encryptCBC(JSON.stringify(params))
|
||||
}
|
||||
ajaxRequest(url, "POST", params, true, function () {
|
||||
}, function (result) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue