|
@@ -210,35 +210,49 @@ function update(url) {
|
|
}
|
|
}
|
|
//逻辑删除项目
|
|
//逻辑删除项目
|
|
function deleteItem(id) {
|
|
function deleteItem(id) {
|
|
- $.ajax({
|
|
|
|
- type: "post",
|
|
|
|
- url: "${ctx}/project/tem/deleteItem",
|
|
|
|
- data:{'id':id},
|
|
|
|
- dataType: "json",
|
|
|
|
- success: function(data){
|
|
|
|
- if(data.success){
|
|
|
|
- layer.msg(data.msg, {icon: 6});
|
|
|
|
- window.location.reload();
|
|
|
|
- }else{
|
|
|
|
- layer.msg(data.msg, {icon: 5});
|
|
|
|
- }
|
|
|
|
|
|
+ layer.msg('你确定要删除吗?', {
|
|
|
|
+ icon: 3
|
|
|
|
+ , time: 0 //不自动关闭
|
|
|
|
+ , btn: ['确定', '取消']
|
|
|
|
+ , yes: function (index) {
|
|
|
|
+ $.ajax({
|
|
|
|
+ type: "post",
|
|
|
|
+ url: "${ctx}/project/tem/deleteItem",
|
|
|
|
+ data: {'id': id},
|
|
|
|
+ dataType: "json",
|
|
|
|
+ success: function (data) {
|
|
|
|
+ if (data.success) {
|
|
|
|
+ layer.msg(data.msg, {icon: 6});
|
|
|
|
+ window.location.reload();
|
|
|
|
+ } else {
|
|
|
|
+ layer.msg(data.msg, {icon: 5});
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
//删除工程
|
|
//删除工程
|
|
function deleteProject(id) {
|
|
function deleteProject(id) {
|
|
- $.ajax({
|
|
|
|
- type: "post",
|
|
|
|
- url: "${ctx}/project/deleteProject",
|
|
|
|
- data:{'id':id},
|
|
|
|
- dataType: "json",
|
|
|
|
- success: function(data){
|
|
|
|
- if(data.success){
|
|
|
|
- layer.msg(data.msg, {icon: 6});
|
|
|
|
- window.location.reload();
|
|
|
|
- }else{
|
|
|
|
- layer.msg(data.msg, {icon: 5});
|
|
|
|
- }
|
|
|
|
|
|
+ layer.msg('你确定要删除吗?', {
|
|
|
|
+ icon: 3
|
|
|
|
+ , time: 0 //不自动关闭
|
|
|
|
+ , btn: ['确定', '取消']
|
|
|
|
+ , yes: function (index) {
|
|
|
|
+ $.ajax({
|
|
|
|
+ type: "post",
|
|
|
|
+ url: "${ctx}/project/deleteProject",
|
|
|
|
+ data: {'id': id},
|
|
|
|
+ dataType: "json",
|
|
|
|
+ success: function (data) {
|
|
|
|
+ if (data.success) {
|
|
|
|
+ layer.msg(data.msg, {icon: 6});
|
|
|
|
+ window.location.reload();
|
|
|
|
+ } else {
|
|
|
|
+ layer.msg(data.msg, {icon: 5});
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|