sys_resource.html 5.4 KB
<style>
	.model-select-box { width: 197px; height: 27px; line-height: 27px; border: 1px solid #aaa; float: left; margin-right: 20px; text-indent: 5px; position: relative; }
    .model-select-text { height: 27px; padding-right: 27px; background: url(http://t43-2.yunpan.360.cn/p/800-600.e692334dad266bef653533e12fa291286932eb10.3619c0.jpg?t=64368e238226776012c7ea2a6ad4dcce&d=20140221) no-repeat right 0; cursor: pointer; -moz-user-select: none; -webkit-user-select: none; user-select: none; }
    .model-select-option { display: none; position: absolute; background: #fff; width: 100%; left: -1px; border: 1px solid #aaa; }
    .model-select-option li { line-height: 14px; color: #555; cursor: pointer; }
    .model-select-option li.seleced { background: #06C; color: #fff; }
</style>
<div class="pageheader notab">
	<h1 class="pagetitle">系统管理-菜单资源管理</h1>
	<span class="pagedesc">管理V商城中的菜单资源</span>
</div>
<!--pageheader-->
<div id="contentwrapper" class="contentwrapper">
	<div id="basicform" class="subcontent">
		<div class="contenttitle2">
			<h3>菜单资源管理</h3>
		</div>
		<div style="width: 100%">
			<!-- 左边添加表单 -->
			<div style="width: 60%; float: left;">
				<div style="background-color: #EEEEEE; color: #666666; border-left: 1px solid #ddd; border-top: 1px solid #ddd; border-right: 1px solid #ddd; width: 100%; height: 30px;">
					<span style="height: 30px; line-height: 30px; background-color: #EEEEEE;height: 16px; margin-left: 13px;">添加菜单资源</span>
				</div>
				<form class="stdform stdform2" method="post" action="javascript:void(0);" style="width: 100%; margin-bottom: 20px;">
					<input type="hidden" id="firstname2" class="longinput" name="id"
							ng-model="resource.id" ng-value="{{resource.id}}"/>
					<p>
						<label>菜单资源名称</label>
						<span class="field">
							<input type="text" id="firstname2" class="longinput" name="name"
							ng-model="resource.name" ng-value="{{resource.name}}"/>
						</span>
					</p>
					<p>
						<label>菜单资源类型</label>
						<span class="field">
							<input type="radio" name="radiofield" value="0"  ng-model="resource.type" checked="checked"/>菜单&nbsp; &nbsp;
							<input type="radio" name="radiofield" value="1" ng-model="resource.type" />按钮&nbsp; &nbsp;
						</span>
					</p>
					<p ng-if="resource.type == 0">
						<label>父级菜单</label>
						<span class="field">
		                    <select name="selection" id="selection2" ng-model="resource.parentId">
								<option ng-value='0' selected>--一级菜单--</option>
    							<option ng-repeat="oneResource in parantResource" value="{{oneResource.id}}">{{oneResource.name}}</option>  
							</select>
						</span>
					</p>
					<p ng-if="resource.type == 1">
						<label>菜单选择</label>
						<span class="field">
		                    <!-- <select name="selection" id="selection2" ng-model="resource.parentId">
								<option ng-value='0' selected>--一级菜单--</option>
    							<option ng-repeat="oneResource in parantResource" value="{{oneResource.id}}">{{oneResource.name}}</option>  
							</select> -->
							<select ng-model="selected1" ng-options="m.name for m in parantResource" ng-change="changeClassification(selected1)">
						        <option value="0">-- 请选择 --</option>
						    </select>
						    <select ng-model="selected2" ng-options="c.name for c in childResource" ng-change="changeChildClassification(selected2)">
						        <option value="0">-- 请选择 --</option>
						    </select>
						</span>
					</p>
					<p>
						<label>菜单URL</label>
						<span class="field">
							<input type="text" id="firstname2" class="longinput" name="resourceUrl"
							ng-model="resource.resourceUrl" ng-value="{{resource.resourceUrl}}"/>
						</span>
					</p>
					<p>
						<label>菜单目标</label>
						<span class="field">
							<input type="text" id="firstname2" class="longinput" name="target"
							ng-model="resource.target" ng-value="{{resource.target}}"/>
						</span>
					</p>
					<p>
						<label>菜单图标</label>
						<span class="field">
							<input type="text" id="firstname2" class="longinput" name="target"
							ng-model="resource.iconImg" ng-value="{{resource.iconImg}}"/>
						</span>
					</p>
					<p>
						<label>位置</label>
						<span class="field">
							<input type="text" id="firstname2" class="longinput" name="sort"
									ng-model="resource.sort" ng-value="{{resource.sort}}" style="width: 60px;"/>
						</span>
					</p>
					<p class="stdformbutton">
						<button class="submit radius2" ng-click="onSubmitSysResource()">提交</button>
						<input type="reset" class="reset radius2" value="重置" />
						<button ng-if="resource.id != 0" class="submit radius2" ng-click="deleteSysResource()" style="background-color: red; margin-left: 20px;">删除</button>
					</p>
				</form>
			</div>
			<!-- 右边菜单树 -->
			<div style="width: 40%; float: left;">
				<div style="background-color: #EEEEEE; color: #666666; border: 1px solid #ddd; width: 99%; height: 30px;">
					<span style="height: 30px; line-height: 30px; background-color: #EEEEEE;height: 16px; margin-left: 13px;">菜单树</span>
				</div>
				<div style="width: 99.4%; height: 446px; overflow-y :yes;overflow:auto; ">
					<ul tree id="treeDemo" class="ztree" style="margin-left: 7px;" ng-model="selectNode"></ul>
				</div>
			</div>
		</div>
	</div>
</div>