提交 1be241b7 编写于 作者: doc_wei's avatar doc_wei

知识库类型整改

上级 63d7d2b2
......@@ -10,7 +10,6 @@ layui.config({
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$;
var parentType;
showGrid({
id: "showForm",
url: reqBasePath + "knowledgetype006",
......@@ -27,12 +26,12 @@ layui.config({
rowId: parent.rowId,
name: $("#typeName").val()
};
AjaxPostUtil.request({url:reqBasePath + "knowledgetype007", params:params, type:'json', callback:function(json){
AjaxPostUtil.request({url: reqBasePath + "knowledgetype007", params: params, type: 'json', method: "POST", callback: function(json){
if(json.returnCode == 0){
parent.layer.close(index);
parent.refreshCode = '0';
}else{
winui.window.msg(json.returnMessage, {icon: 2,time: 2000});
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}});
}
......
......@@ -61,15 +61,7 @@ layui.config({
}
});
form.render();
form.on('submit(formSearch)', function (data) {
if (winui.verifyForm(data.elem)) {
loadTable();
}
return false;
});
//添加
// 添加
$("body").on("click", "#addBean", function(){
_openNewWindows({
url: "../../tpl/knowledgetype/knowledgetypeadd.html",
......@@ -86,7 +78,7 @@ layui.config({
}});
});
//删除
// 删除
function delet(data){
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index);
......@@ -101,39 +93,39 @@ layui.config({
});
}
//上线
// 上线
function up(data){
var msg = '确认上线选中数据吗?';
layer.confirm(msg, { icon: 3, title: '上线知识库类型' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url:reqBasePath + "knowledgetype004", params:{rowId: data.id}, type:'json', callback:function(json){
AjaxPostUtil.request({url: reqBasePath + "knowledgetype004", params: {rowId: data.id}, type: 'json', method: 'POST', callback: function(json){
if(json.returnCode == 0){
winui.window.msg("上线成功", {icon: 1,time: 2000});
winui.window.msg("上线成功", {icon: 1, time: 2000});
loadTable();
}else{
winui.window.msg(json.returnMessage, {icon: 2,time: 2000});
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}});
});
}
//下线
// 下线
function down(data){
var msg = '确认下线选中数据吗?';
layer.confirm(msg, { icon: 3, title: '下线知识库类型' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url:reqBasePath + "knowledgetype005", params:{rowId: data.id}, type:'json', callback:function(json){
AjaxPostUtil.request({url: reqBasePath + "knowledgetype005", params: {rowId: data.id}, type: 'json', method: 'POST', callback: function(json){
if(json.returnCode == 0){
winui.window.msg("下线成功", {icon: 1,time: 2000});
winui.window.msg("下线成功", {icon: 1, time: 2000});
loadTable();
}else{
winui.window.msg(json.returnMessage, {icon: 2,time: 2000});
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}});
});
}
//编辑
// 编辑
function edit(data){
rowId = data.id;
_openNewWindows({
......@@ -151,8 +143,16 @@ layui.config({
}
});
}
//刷新数据
form.render();
form.on('submit(formSearch)', function (data) {
if (winui.verifyForm(data.elem)) {
loadTable();
}
return false;
});
// 刷新数据
$("body").on("click", "#reloadTable", function(){
loadTable();
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册