Authored by xuhongyun

build

... ... @@ -18,6 +18,8 @@ webpackJsonp([112],{
var lockStatus = 0;
//资源id
var param = location.href.substring(location.href.lastIndexOf("/") + 1);
//0:查看1:编辑
var lock_type = location.href.substring(location.href.lastIndexOf("/")-1,location.href.lastIndexOf("/"));
common.util.__ajax({
url: "/resources/resContentIndex",
data: {id: param},
... ... @@ -26,13 +28,15 @@ webpackJsonp([112],{
resources = res.data;
console.log(resources);
}, true);
common.util.__ajax({
url: "/resources/updateLock",
data: {id: param,
if(lock_type==1){
common.util.__ajax({
url: "/resources/updateLock",
data: {id: param,
status:1},
async: false
}, function (res) {
}, true);
async: false
}, function (res) {
}, true);
}
/*配置模块*/
var edit = new common.edit2(".modal-body", {
... ... @@ -454,6 +458,16 @@ webpackJsonp([112],{
});
});
window.onbeforeunload = function(){
if(lock_type==1){
common.util.__ajax({
url: "/resources/updateLock",
data: {id: param,
status:0}
}, function () {
});
}
}
/*删除*/
$(document).on("click", ".del", function () {//删除
if(!checkLockStatus()){
... ... @@ -585,6 +599,10 @@ webpackJsonp([112],{
function checkLockStatus(){
if(lock_type==0){
common.util.__tip("请点击内容编辑进行操作");
return false;
}
common.util.__ajax({
url: "/resources/checkLock",
data: {id: param},
... ... @@ -741,6 +759,9 @@ webpackJsonp([112],{
});
//删除tab
$(document).on("click", "#delTab", function() {
if(!checkLockStatus()){
return false;
}
if(times[currIndex].status == "进行中") {
common.util.__tip("进行中的页面不能删除");
return false;
... ... @@ -1601,6 +1622,7 @@ webpackJsonp([112],{
return errArr;
}
/***/ },
/***/ 46:
... ...
... ... @@ -62,7 +62,8 @@ webpackJsonp([113],[
}},
{display: "操作", name: "",render: function(item) {
var arr = [];
arr.push('<a target="_blank" class="btn btn-xs btn-info contentManage" data-index="' + item.__index + '" href="/resource/content/index/' + item.id + '">内容管理</a>');
arr.push('<a target="_blank" class="btn btn-xs btn-info contentManage" data-index="' + item.__index + '" href="/resource/content/index/0/' + item.id + '">内容查看</a>');
arr.push('<a target="_blank" class="btn btn-xs btn-primary add" data-index="' + item.__index + '" href="/resource/content/index/1/' + item.id + '">内容编辑</a>');
arr.push('<a class="btn btn-xs btn-primary add2" data-index="' + item.__index + '">编辑</a>');
arr.push('<a class="btn btn-xs btn-danger delbtn" data-index="' + item.__index + '">删除</a>');
if(item.lockPersonName !=''){
... ...
... ... @@ -14,7 +14,7 @@ module.exports=function(app) {
});
/*资源内容管理页*/
app.get("/resource/content/index/:param","resource.resourceManage.ContentManage", "resourceManage_getUrlAction", function (response) {
app.get("/resource/content/index/:param/:param","resource.resourceManage.ContentManage", "resourceManage_getUrlAction", function (response) {
this.$extend = {
data:response.data,
moduleName: "资源管理",
... ...