| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 | <!DOCTYPE html><html>	<head>	    <title>添加管理员</title>	    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />		<!-- 所有的 css & js 资源 -->		<link rel="stylesheet" href="../../static/kj/element-ui/theme-chalk/index.css">		<link rel="stylesheet" href="../../static/sa.css"> 		<script src="../../static/kj/vue.min.js"></script>		<script src="../../static/kj/element-ui/index.js"></script>		<script src="https://unpkg.com/http-vue-loader@1.4.2/src/httpVueLoader.js"></script>		<script src="../../static/kj/jquery.min.js"></script>		<script src="../../static/kj/layer/layer.js"></script>		<script src="../../static/sa.js"></script>		<script src="../../static/kj/upload-util.js"></script>	</head>	<body>		<div class="vue-box" style="display: none;" :style="'display: block;'">			<!-- 参数栏 -->			<div class="c-panel">				<el-form>					<!-- 防止密码框被填充 -->					<div style="height: 0px; overflow: hidden;">						<el-input></el-input>						<el-input type="password"></el-input>					</div>					<!-- 表单 -->					<sa-item type="text" name="用户名" v-model="m.name" placeholder="请输入用户名" br></sa-item>					<sa-item type="password" name="密码" v-model="m.password" placeholder="请输入密码" br></sa-item>					<sa-item type="password" name="再输一次" v-model="m.againPassword" placeholder="请再输一次密码" br></sa-item>					<sa-item name="" br>						<el-button type="primary" icon="el-icon-plus" @click="ok()">保存</el-button>					</sa-item>				</el-form>			</div>		</div>	        <script>						var app = new Vue({				components: {					"sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue')				},				el: '.vue-box',				data: {					sa: sa, 	// 超级对象					m: {						id: 0,						customerId:sa.p('customerId',''),						name: '',						avatar: '',						password: '',						againPassword:'',						roleIds: []					},					roleList: []				},				methods: {					// 修改					ok: function(){						console.log(this.m)						// 表单校验 						let m = this.m;						sa.checkNull(m.name, '请输入用户名');						sa.checkNull(m.password, '请输入密码');						if(m.password!==m.againPassword){							sa.error('两次输入密码不一致');							return ;						}						m.roleId=3;						// 添加						sa.ajax('/admin/addPartnerAdmin', m, function(res){							sa.alert('增加成功', this.clean); 												}.bind(this));											},					clean(){						parent.app.f5();		// 刷新父页面列表						sa.closeCurrIframe();	// 关闭本页 					}				},				mounted: function(){					console.log(this.m);					// 加载角色 					sa.ajax('/role/getCustomerRoleList',{customerId:this.m.customerId}, function(res){						this.roleList = res.data;	// 数据  					}.bind(this), {msg: null});				}			})					</script>	</body></html>
 |