Authored by wangwei

资源位内容增加查看功能

... ... @@ -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: "资源管理",
... ...
... ... @@ -13,6 +13,8 @@ var currIndex = 0;
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},
... ... @@ -21,13 +23,16 @@ common.util.__ajax({
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", {
... ... @@ -580,6 +585,10 @@ function dateStrToSeconds(date) {
function checkLockStatus(){
if(lock_type==0){
common.util.__tip("请点击内容编辑进行操作");
return false;
}
common.util.__ajax({
url: "/resources/checkLock",
data: {id: param},
... ...
... ... @@ -58,7 +58,8 @@ var g = new common.grid({
}},
{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 add2" 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 !=''){
... ...