Showing
3 changed files
with
15 additions
and
5 deletions
@@ -14,7 +14,7 @@ module.exports=function(app) { | @@ -14,7 +14,7 @@ module.exports=function(app) { | ||
14 | }); | 14 | }); |
15 | 15 | ||
16 | /*资源内容管理页*/ | 16 | /*资源内容管理页*/ |
17 | - app.get("/resource/content/index/:param","resource.resourceManage.ContentManage", "resourceManage_getUrlAction", function (response) { | 17 | + app.get("/resource/content/index/:param/:param","resource.resourceManage.ContentManage", "resourceManage_getUrlAction", function (response) { |
18 | this.$extend = { | 18 | this.$extend = { |
19 | data:response.data, | 19 | data:response.data, |
20 | moduleName: "资源管理", | 20 | moduleName: "资源管理", |
@@ -13,6 +13,8 @@ var currIndex = 0; | @@ -13,6 +13,8 @@ var currIndex = 0; | ||
13 | var lockStatus = 0; | 13 | var lockStatus = 0; |
14 | //资源id | 14 | //资源id |
15 | var param = location.href.substring(location.href.lastIndexOf("/") + 1); | 15 | var param = location.href.substring(location.href.lastIndexOf("/") + 1); |
16 | +//0:查看1:编辑 | ||
17 | +var lock_type = location.href.substring(location.href.lastIndexOf("/")-1,location.href.lastIndexOf("/")); | ||
16 | common.util.__ajax({ | 18 | common.util.__ajax({ |
17 | url: "/resources/resContentIndex", | 19 | url: "/resources/resContentIndex", |
18 | data: {id: param}, | 20 | data: {id: param}, |
@@ -21,13 +23,16 @@ common.util.__ajax({ | @@ -21,13 +23,16 @@ common.util.__ajax({ | ||
21 | resources = res.data; | 23 | resources = res.data; |
22 | console.log(resources); | 24 | console.log(resources); |
23 | }, true); | 25 | }, true); |
24 | -common.util.__ajax({ | 26 | +if(lock_type==1){ |
27 | + common.util.__ajax({ | ||
25 | url: "/resources/updateLock", | 28 | url: "/resources/updateLock", |
26 | data: {id: param, | 29 | data: {id: param, |
27 | status:1}, | 30 | status:1}, |
28 | async: false | 31 | async: false |
29 | -}, function (res) { | ||
30 | -}, true); | 32 | + }, function (res) { |
33 | + }, true); | ||
34 | +} | ||
35 | + | ||
31 | 36 | ||
32 | /*配置模块*/ | 37 | /*配置模块*/ |
33 | var edit = new common.edit2(".modal-body", { | 38 | var edit = new common.edit2(".modal-body", { |
@@ -580,6 +585,10 @@ function dateStrToSeconds(date) { | @@ -580,6 +585,10 @@ function dateStrToSeconds(date) { | ||
580 | 585 | ||
581 | 586 | ||
582 | function checkLockStatus(){ | 587 | function checkLockStatus(){ |
588 | + if(lock_type==0){ | ||
589 | + common.util.__tip("请点击内容编辑进行操作"); | ||
590 | + return false; | ||
591 | + } | ||
583 | common.util.__ajax({ | 592 | common.util.__ajax({ |
584 | url: "/resources/checkLock", | 593 | url: "/resources/checkLock", |
585 | data: {id: param}, | 594 | data: {id: param}, |
@@ -58,7 +58,8 @@ var g = new common.grid({ | @@ -58,7 +58,8 @@ var g = new common.grid({ | ||
58 | }}, | 58 | }}, |
59 | {display: "操作", name: "",render: function(item) { | 59 | {display: "操作", name: "",render: function(item) { |
60 | var arr = []; | 60 | var arr = []; |
61 | - arr.push('<a target="_blank" class="btn btn-xs btn-info contentManage" data-index="' + item.__index + '" href="/resource/content/index/' + item.id + '">内容管理</a>'); | 61 | + arr.push('<a target="_blank" class="btn btn-xs btn-info contentManage" data-index="' + item.__index + '" href="/resource/content/index/0/' + item.id + '">内容查看</a>'); |
62 | + arr.push('<a target="_blank" class="btn btn-xs btn-primary add2" data-index="' + item.__index + '" href="/resource/content/index/1/' + item.id + '">内容编辑</a>'); | ||
62 | arr.push('<a class="btn btn-xs btn-primary add2" data-index="' + item.__index + '">编辑</a>'); | 63 | arr.push('<a class="btn btn-xs btn-primary add2" data-index="' + item.__index + '">编辑</a>'); |
63 | arr.push('<a class="btn btn-xs btn-danger delbtn" data-index="' + item.__index + '">删除</a>'); | 64 | arr.push('<a class="btn btn-xs btn-danger delbtn" data-index="' + item.__index + '">删除</a>'); |
64 | if(item.lockPersonName !=''){ | 65 | if(item.lockPersonName !=''){ |
-
Please register or login to post a comment