save
This commit is contained in:
parent
3a522c5999
commit
5552f8bc4f
@ -730,6 +730,7 @@ EOF
|
|||||||
$html = str_replace("\n", "\n" . str_repeat(' ', 2), $html);
|
$html = str_replace("\n", "\n" . str_repeat(' ', 2), $html);
|
||||||
$js = $form->js(3);
|
$js = $form->js(3);
|
||||||
$table_js = LayuiForm::buildTable($table, 4);
|
$table_js = LayuiForm::buildTable($table, 4);
|
||||||
|
$controller_class_with_namespace = str_replace('\\', '\\\\', $controller_class_with_namespace);
|
||||||
$template_content = <<<EOF
|
$template_content = <<<EOF
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
@ -169,7 +169,7 @@
|
|||||||
<script src="/app/admin/admin/js/common.js"></script>
|
<script src="/app/admin/admin/js/common.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
// 相关接口
|
// 相关常量
|
||||||
const PRIMARY_KEY = 'id';
|
const PRIMARY_KEY = 'id';
|
||||||
const CONTROLLER = 'plugin\\admin\\app\\controller\\UserController';
|
const CONTROLLER = 'plugin\\admin\\app\\controller\\UserController';
|
||||||
const SELECT_API = "/app/admin/user/select";
|
const SELECT_API = "/app/admin/user/select";
|
||||||
@ -190,9 +190,9 @@
|
|||||||
el: "#sex",
|
el: "#sex",
|
||||||
name: "sex",
|
name: "sex",
|
||||||
initValue: initValue,
|
initValue: initValue,
|
||||||
data: e.data,
|
data: e.data,
|
||||||
model: {"icon":"hidden","label":{"type":"text"}},
|
model: {"icon":"hidden","label":{"type":"text"}},
|
||||||
clickClose: 'true',
|
clickClose: 'true',
|
||||||
radio: 'true',
|
radio: 'true',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -211,7 +211,7 @@
|
|||||||
layui.use(["laydate"], function() {
|
layui.use(["laydate"], function() {
|
||||||
layui.laydate.render({
|
layui.laydate.render({
|
||||||
elem: "#last_time",
|
elem: "#last_time",
|
||||||
range: ["#last_time-date-start", "#last_time-date-end"],
|
range: ["#last_time-date-start", "#last_time-date-end"],
|
||||||
type: 'datetime',
|
type: 'datetime',
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
@ -220,7 +220,7 @@
|
|||||||
layui.use(["laydate"], function() {
|
layui.use(["laydate"], function() {
|
||||||
layui.laydate.render({
|
layui.laydate.render({
|
||||||
elem: "#join_time",
|
elem: "#join_time",
|
||||||
range: ["#join_time-date-start", "#join_time-date-end"],
|
range: ["#join_time-date-start", "#join_time-date-end"],
|
||||||
type: 'datetime',
|
type: 'datetime',
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
@ -369,9 +369,9 @@
|
|||||||
layEvent: "refresh",
|
layEvent: "refresh",
|
||||||
icon: "layui-icon-refresh",
|
icon: "layui-icon-refresh",
|
||||||
}, "filter", "print", "exports"],
|
}, "filter", "print", "exports"],
|
||||||
done: function () {
|
done: function () {
|
||||||
layer.photos({photos: 'div[lay-id="data-table"]', anim: 5});
|
layer.photos({photos: 'div[lay-id="data-table"]', anim: 5});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -526,7 +526,6 @@
|
|||||||
scrollPos: 'fixed'
|
scrollPos: 'fixed'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
<i class="layui-icon"></i>上传图片
|
<i class="layui-icon"></i>上传图片
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="pear-btn pear-btn-primary pear-btn-sm" id="attachment-choose-avatar">
|
<button type="button" class="pear-btn pear-btn-primary pear-btn-sm" id="attachment-choose-avatar">
|
||||||
<i class="layui-icon"></i>选择图片
|
<i class="layui-icon"></i>选择附件
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -169,10 +169,10 @@
|
|||||||
el: "#sex",
|
el: "#sex",
|
||||||
name: "sex",
|
name: "sex",
|
||||||
initValue: initValue,
|
initValue: initValue,
|
||||||
data: e.data,
|
data: e.data,
|
||||||
value: '1',
|
value: '1',
|
||||||
model: {"icon":"hidden","label":{"type":"text"}},
|
model: {"icon":"hidden","label":{"type":"text"}},
|
||||||
clickClose: 'true',
|
clickClose: 'true',
|
||||||
radio: 'true',
|
radio: 'true',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -183,11 +183,11 @@
|
|||||||
layui.use(["upload", "layer"], function() {
|
layui.use(["upload", "layer"], function() {
|
||||||
let input = layui.$("#avatar").prev();
|
let input = layui.$("#avatar").prev();
|
||||||
input.prev().attr("src", input.val());
|
input.prev().attr("src", input.val());
|
||||||
layui.$('#attachment-choose-avatar').on('click', function() {
|
layui.$("#attachment-choose-avatar").on('click', function() {
|
||||||
parent.layer.open({
|
parent.layer.open({
|
||||||
type: 2,
|
type: 2,
|
||||||
title: '选择附件',
|
title: "选择附件",
|
||||||
content: '/app/admin/upload/attachment?ext=jpg,jpeg,png,gif,bmp',
|
content: "/app/admin/upload/attachment?ext=jpg,jpeg,png,gif,bmp",
|
||||||
area: ["95%", "90%"],
|
area: ["95%", "90%"],
|
||||||
success: function (layero, index) {
|
success: function (layero, index) {
|
||||||
parent.layui.$("#layui-layer" + index).data("callback", function (data) {
|
parent.layui.$("#layui-layer" + index).data("callback", function (data) {
|
||||||
@ -197,9 +197,9 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
layui.upload.render({
|
layui.upload.render({
|
||||||
elem: "#avatar",
|
elem: "#avatar",
|
||||||
url: '/app/admin/upload/avatar',
|
url: '/app/admin/upload/avatar',
|
||||||
acceptMime: 'image/gif,image/jpeg,image/jpg,image/png',
|
acceptMime: 'image/gif,image/jpeg,image/jpg,image/png',
|
||||||
field: '__file__',
|
field: '__file__',
|
||||||
done: function (res) {
|
done: function (res) {
|
||||||
if (res.code > 0) return layui.layer.msg(res.msg);
|
if (res.code > 0) return layui.layer.msg(res.msg);
|
||||||
@ -218,7 +218,7 @@
|
|||||||
// 字段 登录时间 last_time
|
// 字段 登录时间 last_time
|
||||||
layui.use(["laydate"], function() {
|
layui.use(["laydate"], function() {
|
||||||
layui.laydate.render({
|
layui.laydate.render({
|
||||||
elem: "#last_time",
|
elem: "#last_time",
|
||||||
type: 'datetime',
|
type: 'datetime',
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
@ -226,7 +226,7 @@
|
|||||||
// 字段 注册时间 join_time
|
// 字段 注册时间 join_time
|
||||||
layui.use(["laydate"], function() {
|
layui.use(["laydate"], function() {
|
||||||
layui.laydate.render({
|
layui.laydate.render({
|
||||||
elem: "#join_time",
|
elem: "#join_time",
|
||||||
type: 'datetime',
|
type: 'datetime',
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
@ -49,6 +49,9 @@
|
|||||||
<button type="button" class="pear-btn pear-btn-primary pear-btn-sm" id="avatar">
|
<button type="button" class="pear-btn pear-btn-primary pear-btn-sm" id="avatar">
|
||||||
<i class="layui-icon"></i>上传图片
|
<i class="layui-icon"></i>上传图片
|
||||||
</button>
|
</button>
|
||||||
|
<button type="button" class="pear-btn pear-btn-primary pear-btn-sm" id="attachment-choose-avatar">
|
||||||
|
<i class="layui-icon"></i>选择附件
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -190,9 +193,9 @@
|
|||||||
el: "#sex",
|
el: "#sex",
|
||||||
name: "sex",
|
name: "sex",
|
||||||
initValue: initValue,
|
initValue: initValue,
|
||||||
data: e.data,
|
data: e.data,
|
||||||
model: {"icon":"hidden","label":{"type":"text"}},
|
model: {"icon":"hidden","label":{"type":"text"}},
|
||||||
clickClose: 'true',
|
clickClose: 'true',
|
||||||
radio: 'true',
|
radio: 'true',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -203,10 +206,23 @@
|
|||||||
layui.use(["upload", "layer"], function() {
|
layui.use(["upload", "layer"], function() {
|
||||||
let input = layui.$("#avatar").prev();
|
let input = layui.$("#avatar").prev();
|
||||||
input.prev().attr("src", input.val());
|
input.prev().attr("src", input.val());
|
||||||
|
layui.$("#attachment-choose-avatar").on('click', function() {
|
||||||
|
parent.layer.open({
|
||||||
|
type: 2,
|
||||||
|
title: "选择附件",
|
||||||
|
content: "/app/admin/upload/attachment?ext=jpg,jpeg,png,gif,bmp",
|
||||||
|
area: ["95%", "90%"],
|
||||||
|
success: function (layero, index) {
|
||||||
|
parent.layui.$("#layui-layer" + index).data("callback", function (data) {
|
||||||
|
input.val(data.url).prev().attr("src", data.url);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
layui.upload.render({
|
layui.upload.render({
|
||||||
elem: "#avatar",
|
elem: "#avatar",
|
||||||
url: '/app/admin/upload/avatar',
|
url: '/app/admin/upload/avatar',
|
||||||
acceptMime: 'image/gif,image/jpeg,image/jpg,image/png',
|
acceptMime: 'image/gif,image/jpeg,image/jpg,image/png',
|
||||||
field: '__file__',
|
field: '__file__',
|
||||||
done: function (res) {
|
done: function (res) {
|
||||||
if (res.code > 0) return layui.layer.msg(res.msg);
|
if (res.code > 0) return layui.layer.msg(res.msg);
|
||||||
@ -225,7 +241,7 @@
|
|||||||
// 字段 登录时间 last_time
|
// 字段 登录时间 last_time
|
||||||
layui.use(["laydate"], function() {
|
layui.use(["laydate"], function() {
|
||||||
layui.laydate.render({
|
layui.laydate.render({
|
||||||
elem: "#last_time",
|
elem: "#last_time",
|
||||||
type: 'datetime',
|
type: 'datetime',
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
@ -233,7 +249,7 @@
|
|||||||
// 字段 注册时间 join_time
|
// 字段 注册时间 join_time
|
||||||
layui.use(["laydate"], function() {
|
layui.use(["laydate"], function() {
|
||||||
layui.laydate.render({
|
layui.laydate.render({
|
||||||
elem: "#join_time",
|
elem: "#join_time",
|
||||||
type: 'datetime',
|
type: 'datetime',
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user