前端组件调整,剔除无用文件

This commit is contained in:
2019-09-28 20:12:43 +08:00
parent 0b0d659c5e
commit c29b8358be
3496 changed files with 893 additions and 393801 deletions

View File

@@ -542,12 +542,7 @@
},
// 弹出提示
alert: function(content, type) {
layer.alert(content, {
icon: $.model.icon(type),
title: "系统提示",
btn: ['确认'],
btnclass: ['btn btn-primary'],
});
$.model.msg(content, modal_status.SUCCESS);
},
// 消息提示并刷新父窗体
msgReload: function(msg, type) {
@@ -707,13 +702,13 @@
},
// 选卡页方式打开
openTab: function (title, url) {
createMenuItem(url, title);
$.page.createMenuItem(url, title);
},
// 选卡页同一页签打开
parentTab: function (title, url) {
var dataId = window.frameElement.getAttribute('data-id');
createMenuItem(url, title);
closeItem(dataId);
$.page.createMenuItem(url, title);
$.page.closeItem(dataId);
},
// 关闭选项卡
closeTab: function (dataId) {
@@ -841,6 +836,10 @@
add: function(id) {
$.model.open("添加" + $.table._option.modalName, $.operate.addUrl(id));
},
// 新建窗口
openTab: function(title, url){
$.model.openTab(title, url)
},
// 添加信息以tab页展现
addTab: function (id) {
$.model.openTab("添加" + $.table._option.modalName, $.operate.addUrl(id));
@@ -1355,7 +1354,26 @@ $(function() {
$.fn.select2.defaults.set( "theme", "bootstrap" );
$("select.form-control:not(.noselect2)").each(function () {
$(this).select2().on("change", function () {
$(this).valid();
// $(this).valid();
})
})
}
if($('select[data-form-type="tree"]').length > 0){
$('select[data-form-type="tree"]').each(function(){
var url = $(this).data('url');
var that = this;
$.ajax({
url: url,
type: 'get',
data: {tree:1},
success: function(res){
$(res.data).each(function(i, item){
$(that).append('<option value="'+item.id+'">'+item.title_show+'</option>');
})
$(that).select2()
},
dataType: 'json'
})
})
}
@@ -1492,7 +1510,7 @@ $(function() {
type = 'get'
}
var data = {};
$.each($($(this).attr('target-form')).serializeArray(), function(i, field) {
$.each($('.'+$(this).attr('target-form')).serializeArray(), function(i, field) {
data[field.name] = field.value;
});
$.operate.submit(url, type, 'json', data);