mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-05 09:42:47 +08:00
实现view的扩展架构;调整think-view依赖;发布新版本
This commit is contained in:
10
extend/base/admin/view/system/uploadfile/_common.js
Normal file
10
extend/base/admin/view/system/uploadfile/_common.js
Normal file
@@ -0,0 +1,10 @@
|
||||
var init = {
|
||||
table_elem: '#currentTable',
|
||||
table_render_id: 'currentTableRenderId',
|
||||
index_url: 'system.uploadfile/index',
|
||||
add_url: 'system.uploadfile/add',
|
||||
edit_url: 'system.uploadfile/edit',
|
||||
delete_url: 'system.uploadfile/delete',
|
||||
modify_url: 'system.uploadfile/modify',
|
||||
export_url: 'system.uploadfile/export',
|
||||
};
|
||||
15
extend/base/admin/view/system/uploadfile/add.html
Normal file
15
extend/base/admin/view/system/uploadfile/add.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<div class="layuimini-container">
|
||||
<form id="app-form" class="layui-form layuimini-form">
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label required">文件信息</label>
|
||||
<div class="layui-input-block layuimini-upload">
|
||||
<input name="head_img" class="layui-input layui-col-xs6" lay-verify="required" lay-reqtext="请上传文件" placeholder="请上传文件" value="">
|
||||
<div class="layuimini-upload-btn">
|
||||
<span><a class="layui-btn" data-upload="head_img" data-upload-number="*" data-upload-exts=""><i class="fa fa-upload"></i> 上传文件</a></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
4
extend/base/admin/view/system/uploadfile/add.js
Normal file
4
extend/base/admin/view/system/uploadfile/add.js
Normal file
@@ -0,0 +1,4 @@
|
||||
$(function () {
|
||||
|
||||
ua.listen();
|
||||
});
|
||||
10
extend/base/admin/view/system/uploadfile/index.html
Normal file
10
extend/base/admin/view/system/uploadfile/index.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<div class="layuimini-container">
|
||||
<div class="layuimini-main">
|
||||
<table id="currentTable" class="layui-table layui-hide"
|
||||
data-auth-add="{:auth('system.menu/add')}"
|
||||
data-auth-edit="{:auth('system.menu/edit')}"
|
||||
data-auth-delete="{:auth('system.menu/delete')}"
|
||||
lay-filter="currentTable">
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
34
extend/base/admin/view/system/uploadfile/index.js
Normal file
34
extend/base/admin/view/system/uploadfile/index.js
Normal file
@@ -0,0 +1,34 @@
|
||||
$(function () {
|
||||
|
||||
ua.table.render({
|
||||
init: init,
|
||||
cols: [[
|
||||
{ type: "checkbox" },
|
||||
{ field: 'id', width: 80, title: 'ID' },
|
||||
{ field: 'upload_type', minWidth: 80, title: '存储位置', search: 'select', selectList: { 'local': '本地', 'alioss': '阿里云', 'qnoss': '七牛云', ',txcos': '腾讯云' } },
|
||||
{ field: 'url', minWidth: 80, search: false, title: '文件预览', templet: ua.table.filePreview },
|
||||
{
|
||||
field: 'url', minWidth: 120, title: '保存地址', templet: ua.table.url, urlNameField: function (data) {
|
||||
return data.url;
|
||||
}
|
||||
},
|
||||
{ field: 'original_name', minWidth: 80, title: '文件原名' },
|
||||
{ field: 'mime_type', minWidth: 80, title: 'mime类型' },
|
||||
{ field: 'file_ext', minWidth: 80, title: '文件后缀' },
|
||||
{ field: 'create_time', minWidth: 80, title: '创建时间', search: 'range' },
|
||||
{
|
||||
width: 250, title: '操作', templet: ua.table.tool, operat: ['delete'], fixed: 'right', hide: function () {
|
||||
var selectMode = ua.getQueryVariable("select_mode");
|
||||
|
||||
console.log(selectMode);
|
||||
if (selectMode == 'radio' || selectMode == 'checkbox') {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
]],
|
||||
});
|
||||
|
||||
ua.listen();
|
||||
});
|
||||
Reference in New Issue
Block a user