All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.modules.sys.userinfo.ctrl.userinfo.delete.js Maven / Gradle / Ivy

There is a newer version: 5.0.2101
Show newest version
define(function(require) {
	var Config = require('config');
	var Core = require('core/core');
	var Page = require('core/page');
	
	// 删除数据字典
	var UserInfoDelete = Page.extend(function() {
		
		// @override
		this.submit = function(table, data) {
			var userCodes = [];
			for(var i = 0; i < data.length; i++){
				userCodes.push(data[i].userCode);
			}
			Core.ajax(Config.ContextPath+'system/userinfo/'+userCodes, {
            	type: 'json',
                method: 'post',
                data: {
                    _method: 'delete'
                }
			}).then(function(){
				return require('loaders/cache/loader.system').loadAll()
			}).then(function() {
				table.datagrid('reload');
				var layout = $('#userinfo_panel').layout('panel', 'east');
				layout.panel('setTitle','机构与权限');
				layout.panel('clear');
            });
		};
	});
	
	return UserInfoDelete;
});




© 2015 - 2024 Weber Informatics LLC | Privacy Policy