Authored by 陶雨

资源管理 -> 平台管理、资源分类管理

... ... @@ -6,7 +6,12 @@
module.exports=function(app) {
/*平台管理首页*/
app.get("/resource/platform/index","resource.platformManage.Index");
app.get("/resource/platform/index","resource.platformManage.Index", function () {
this.$extend = {
moduleName: "平台管理",
pageName: "平台列表"
}
});
/*平台管理列表*/
app.post("/resources/findResPlatforms","platformManage_findResPlatforms");
... ...
... ... @@ -6,7 +6,12 @@
module.exports=function(app) {
/*资源分类管理首页*/
app.get("/resource/sort/index","resource.resourceSortManage.Index");
app.get("/resource/sort/index","resource.resourceSortManage.Index", function () {
this.$extend = {
moduleName: "资源分类管理",
pageName: "资源分类列表"
}
});
/*资源分类管理列表*/
app.post("/resources/resSortIndex","resourceSortManage_resSortIndex");
... ...
... ... @@ -31,12 +31,9 @@ module.exports={
},
deleteResPlatform:{
title: "删除平台",
url: '/resources/updateResPlatform',
url: '/resources/deleteResPlatform',
params: [
{name: 'platformId', type: 'number'},
{name: 'platformName', type: 'string'},
{name: 'platformFlag', type: 'string'},
{name: 'status', type: 'number'}
{name: 'platformId', type: 'number'}
]
}
}
... ...
<%include '../../../common/views/__ui/header'%>
<%include '../../../common/views/__partail/ListHeader'%>
<div class="pageheader">
<div class="media">
<div class="pageicon pull-left">
<i class="fa fa-th-list"></i>
</div>
<div class="media-body">
<ul class="breadcrumb">
<li><a href=""><i class="glyphicon glyphicon-home"></i></a></li>
<li><a href="">平台管理</a></li>
<li>平台列表</li>
</ul>
<div>
<div style="width: 30%;float: left;">
<h4>平台列表</h4>
</div>
</div>
</div>
</div>
</div>
<div class="contentpanel">
<div class="panel-heading">
<a class="btn btn-success " id="add-platform"><i class="fa fa-plus"></i> 添加平台</a>
... ... @@ -37,15 +16,15 @@
<div class="form-group">
<label class="col-sm-3 control-label">平台名称 <span class="asterisk">*</span></label>
<div class="col-sm-9">
<input type="hidden" value="<%platformId%>", id="platformId" />
<input type="text" name="platform_name" class="form-control" value="<%platformName%>" id="platformName" placeholder="请填写平台名称" required="required">
<input type="hidden" value="[[platformId]]", id="platformId" />
<input type="text" name="platform_name" class="form-control" value="[[platformName]]" id="platformName" placeholder="请填写平台名称" required="required">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">平台标志</label>
<div class="col-sm-9">
<input type="text" name="platform_flag" value="<%platformFlag%>" id="platformFlag" class="form-control">
<input type="text" name="platform_flag" value="[[platformFlag]]" id="platformFlag" class="form-control">
</div>
</div>
... ... @@ -62,7 +41,7 @@
</div><!-- rdio -->
<label id="genderError" class="error"></label>
</div>
<input type="hidden" value="<%status%>" id="status" for="radio" />
<input type="hidden" value="[[status]]" id="status" for="radio" />
</div><!-- form-group -->
</div>
... ...
<%include '../../../common/views/__ui/header'%>
<%include '../../../common/views/__partail/ListHeader'%>
<div class="pageheader">
<div class="media">
<div class="pageicon pull-left">
<i class="fa fa-th-list"></i>
</div>
<div class="media-body">
<ul class="breadcrumb">
<li><a href=""><i class="glyphicon glyphicon-home"></i></a></li>
<li><a href="">资源分类管理</a></li>
<li>资源分类列表</li>
</ul>
<div>
<div style="width: 30%;float: left;">
<h4>资源分类列表</h4>
</div>
</div>
</div>
</div>
</div>
<div class="contentpanel">
<div class="panel-heading">
<a class="btn btn-success " id="add-resource"><i class="fa fa-plus"></i> 添加资源分类</a>
... ... @@ -37,19 +16,19 @@
<div class="form-group">
<label class="col-sm-3 control-label">名称 <span class="asterisk">*</span></label>
<div class="col-sm-9">
<input type="hidden" value="<%sortId%>", id="sortId" />
<input type="text" name="platform_name" class="form-control" value="<%sortName%>" id="sortName" placeholder="请填写平台名称" required="required">
<input type="hidden" value="[[sortId]]", id="sortId" />
<input type="text" name="platform_name" class="form-control" value="[[sortName]]" id="sortName" placeholder="请填写平台名称" required="required">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">所属平台<span class="asterisk">*</span></label>
<div class="col-sm-9">
<select class="form-control attr_input" data-index='<%__index%>' value="<%platformId||''%>" id="platformId" required>
<select class="form-control attr_input" data-index='[[__index]]' value="[[platformId||'']]" id="platformId" required>
<option value="">请选择</option>
<%each platforms as item index%>
<option value="<%item.platformId%>"><%item.platformName%></option>
<%/each%>
[[each platforms as item index]]
<option value="[[item.platformId]]">[[item.platformName]]</option>
[[/each]]
</select>
</div>
</div>
... ... @@ -67,7 +46,7 @@
</div><!-- rdio -->
<label id="genderError" class="error"></label>
</div>
<input type="hidden" value="<%status%>" id="status" for="radio" />
<input type="hidden" value="[[status]]" id="status" for="radio" />
</div><!-- form-group -->
</div>
... ...
... ... @@ -4,8 +4,8 @@
*/
var $ = require('jquery'),
common = require('../common/common'),
util = require('../common/util');
common = require('../../../common/common'),
util = require('../../../common/util');
var g = new common.grid({
el: "#content-list",
... ... @@ -63,15 +63,15 @@ var Bll = {
function() {
e.submit(url,function(option){
//option.data;
console.log(option.data);
//console.log(option.data);
option.success=function(res){
dialog.close();
util.__tip(res.data.message, 'success');
util.__tip(res.message, 'success');
g.reload();
};
option.error=function(res){
dialog.close();
util.__tip(res.data.message);
util.__tip(res.message);
}
});
return false;
... ...
... ... @@ -4,8 +4,8 @@
*/
var $ = require('jquery'),
common = require('../common/common'),
util = require('../common/util');
common = require('../../../common/common'),
util = require('../../../common/util');
var ENUM = [];
var platformList = [];
... ... @@ -71,12 +71,12 @@ var Bll = {
//console.log(option.data);
option.success=function(res){
dialog.close();
util.__tip(res.data.message, 'success');
util.__tip(res.message, 'success');
Bll.init();
};
option.error=function(res){
dialog.close();
util.__tip(res.data.message);
util.__tip(res.message);
}
});
return false;
... ...