权限控制

master
Caps 6 years ago
parent 9f14961d23
commit 5c665b83e1

@ -92,7 +92,7 @@
} }
}, },
mounted: function () { mounted: function () {
let startDate = this.$moment(new Date()).add(-30,"day").format("YYYY-MM-DD"); let startDate = this.$moment(new Date()).add(-29,"day").format("YYYY-MM-DD");
let endDate = this.$moment(new Date()).format("YYYY-MM-DD"); let endDate = this.$moment(new Date()).format("YYYY-MM-DD");
this.selectDate.push(startDate); this.selectDate.push(startDate);
this.selectDate.push(endDate); this.selectDate.push(endDate);

@ -120,7 +120,7 @@
} }
}, },
mounted: function () { mounted: function () {
let startDate = this.$moment(new Date()).add(-30,"day").format("YYYY-MM-DD"); let startDate = this.$moment(new Date()).add(-29,"day").format("YYYY-MM-DD");
let endDate = this.$moment(new Date()).format("YYYY-MM-DD"); let endDate = this.$moment(new Date()).format("YYYY-MM-DD");
this.selectDate.push(startDate); this.selectDate.push(startDate);
this.selectDate.push(endDate); this.selectDate.push(endDate);

@ -108,7 +108,7 @@
} }
}, },
mounted: function () { mounted: function () {
let startDate = this.$moment(new Date()).add(-30,"day").format("YYYY-MM-DD"); let startDate = this.$moment(new Date()).add(-29,"day").format("YYYY-MM-DD");
let endDate = this.$moment(new Date()).format("YYYY-MM-DD"); let endDate = this.$moment(new Date()).format("YYYY-MM-DD");
this.selectDate.push(startDate); this.selectDate.push(startDate);
this.selectDate.push(endDate); this.selectDate.push(endDate);

@ -27,8 +27,8 @@
<i-input disabled placeholder="请输入账号" style="width: 300px;" v-model="modifyFrom.account"/> <i-input disabled placeholder="请输入账号" style="width: 300px;" v-model="modifyFrom.account"/>
</Form-Item> </Form-Item>
<Form-Item prop="password"> <Form-Item prop="password">
<span class="name-font" style="width: 80px;display: inline-block">密码</span> <span class="name-font" style="width: 80px;display: inline-block" >密码</span>
<i-input placeholder="请输入密码" style="width: 300px;" v-model="modifyFrom.password" type="password"/> <i-input placeholder="请输入密码" style="width: 300px;" v-model="modifyFrom.password" @on-change="check" type="password"/>
</Form-Item> </Form-Item>
<Form-Item prop="confirmPassword"> <Form-Item prop="confirmPassword">
<span class="name-font" style="width: 80px;display: inline-block">确认密码</span> <span class="name-font" style="width: 80px;display: inline-block">确认密码</span>
@ -82,6 +82,16 @@
shopId: this.$route.query.shopId, shopId: this.$route.query.shopId,
type:this.$route.query.type type:this.$route.query.type
}, },
passwordCheck:[
{required:true,message:'密码不能为空',trigger:'blur'},
{ min: 1, max: 11, message: '长度在 1 到 11 个字符', trigger: 'blur' },
{ pattern: /^[0-9a-zA-Z]*$/g, message: '只可以输入数字和字母',trigger: 'blur'},
],
confirmPasswordCheck:[
{required:true,message:'确认密码不能为空',trigger:'blur'},
{ min: 1, max: 11, message: '长度在 1 到 11 个字符', trigger: 'blur' },
{ pattern: /^[0-9a-zA-Z]*$/g, message: '只可以输入数字和字母',trigger: 'blur'},
],
modifyValidate: { modifyValidate: {
userName:[ userName:[
{required:true,message:'用户名不能为空',trigger:'blur'}, {required:true,message:'用户名不能为空',trigger:'blur'},
@ -90,19 +100,11 @@
], ],
account:[ account:[
{required:true,message:'账号不能为空',trigger:'blur'}, {required:true,message:'账号不能为空',trigger:'blur'},
{ min: 1, max: 12, message: '长度在 1 到 12 个字符', trigger: 'blur' }, { min: 2, max: 8, message: '长度在 2 到 8 个字符', trigger: 'blur' },
{ pattern: /^[0-9a-zA-Z]*$/g, message: '只可以输入数字和字母',trigger: 'blur'},
],
password:[
{required:true,message:'密码不能为空',trigger:'blur'},
{ min: 1, max: 11, message: '长度在 1 到 11 个字符', trigger: 'blur' },
{ pattern: /^[0-9a-zA-Z]*$/g, message: '只可以输入数字和字母',trigger: 'blur'},
],
confirmPassword:[
{required:true,message:'确认密码不能为空',trigger:'blur'},
{ min: 1, max: 11, message: '长度在 1 到 11 个字符', trigger: 'blur' },
{ pattern: /^[0-9a-zA-Z]*$/g, message: '只可以输入数字和字母',trigger: 'blur'}, { pattern: /^[0-9a-zA-Z]*$/g, message: '只可以输入数字和字母',trigger: 'blur'},
], ],
password:null,
confirmPassword:null,
}, },
selectRole: this.$route.query.roleId, selectRole: this.$route.query.roleId,
roleList: [], roleList: [],
@ -236,6 +238,11 @@
} }
}); });
}, },
check(){
debugger
this.modifyValidate.password = this.passwordCheck;
this.modifyValidate.confirmPassword = this.confirmPasswordCheck;
}
} }
} }

Loading…
Cancel
Save