|
@@ -8,65 +8,66 @@
|
|
name: 'addPageSubPagePublic',
|
|
name: 'addPageSubPagePublic',
|
|
methods:{
|
|
methods:{
|
|
upDataClick(){
|
|
upDataClick(){
|
|
- let self = this;
|
|
|
|
- self.$parent.$refs["form"].validate(valid => {
|
|
|
|
- if (valid) {
|
|
|
|
- if(self.$parent.form.email){
|
|
|
|
- let re = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/;
|
|
|
|
- if(!re.test(self.$parent.form.email)){
|
|
|
|
- self.msgError('请输入正确的邮箱地址')
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- let obj = JSON.parse(JSON.stringify(self.$parent.form));
|
|
|
|
- // obj.position = obj.position+'';
|
|
|
|
- if(self.$parent.propsData.userId){
|
|
|
|
- //编辑
|
|
|
|
- obj.userId = self.$parent.propsData.userId
|
|
|
|
- obj.roleIds = self.$parent.form.position?self.$parent.form.roleIds:[];
|
|
|
|
- putUserStudent(obj).then(response => {
|
|
|
|
- if(response.code==200){
|
|
|
|
- self.msgSuccess(response.msg)
|
|
|
|
- self.$parent.outPageButton()
|
|
|
|
- }else if(response.code==205){
|
|
|
|
- self.$confirm(response.msg, "警告", {
|
|
|
|
- confirmButtonText: "确定",
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
- type: "warning"
|
|
|
|
- }).then(() => {
|
|
|
|
- // 确定
|
|
|
|
- self.$router.push({ path: '/comprehensive/laboratoryManagement/accessAuthorization' });
|
|
|
|
- }).catch(function() {
|
|
|
|
- // 取消
|
|
|
|
- self.$parent.outPageButton();
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- });
|
|
|
|
- }else{
|
|
|
|
- //新增
|
|
|
|
- addUserStudent(obj).then(response => {
|
|
|
|
- if(response.code==200){
|
|
|
|
- self.msgSuccess(response.msg)
|
|
|
|
- self.$parent.outPageButton()
|
|
|
|
- }else if(response.code==205){
|
|
|
|
- self.$confirm(response.msg, "警告", {
|
|
|
|
- confirmButtonText: "确定",
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
- type: "warning"
|
|
|
|
- }).then(() => {
|
|
|
|
- // 确定
|
|
|
|
- self.$router.push({ path: '/comprehensive/laboratoryManagement/accessAuthorization' });
|
|
|
|
- }).catch(function() {
|
|
|
|
- // 取消
|
|
|
|
- self.$parent.outPageButton();
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ this.$parent.upDataClick();
|
|
|
|
+ // let self = this;
|
|
|
|
+ // self.$parent.$refs["form"].validate(valid => {
|
|
|
|
+ // if (valid) {
|
|
|
|
+ // if(self.$parent.form.email){
|
|
|
|
+ // let re = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/;
|
|
|
|
+ // if(!re.test(self.$parent.form.email)){
|
|
|
|
+ // self.msgError('请输入正确的邮箱地址')
|
|
|
|
+ // return
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // let obj = JSON.parse(JSON.stringify(self.$parent.form));
|
|
|
|
+ // // obj.position = obj.position+'';
|
|
|
|
+ // if(self.$parent.propsData.userId){
|
|
|
|
+ // //编辑
|
|
|
|
+ // obj.userId = self.$parent.propsData.userId
|
|
|
|
+ // obj.roleIds = self.$parent.form.position?self.$parent.form.roleIds:[];
|
|
|
|
+ // putUserStudent(obj).then(response => {
|
|
|
|
+ // if(response.code==200){
|
|
|
|
+ // self.msgSuccess(response.msg)
|
|
|
|
+ // self.$parent.outPageButton()
|
|
|
|
+ // }else if(response.code==205){
|
|
|
|
+ // self.$confirm(response.msg, "警告", {
|
|
|
|
+ // confirmButtonText: "确定",
|
|
|
|
+ // cancelButtonText: "取消",
|
|
|
|
+ // type: "warning"
|
|
|
|
+ // }).then(() => {
|
|
|
|
+ // // 确定
|
|
|
|
+ // self.$router.push({ path: '/comprehensive/laboratoryManagement/accessAuthorization' });
|
|
|
|
+ // }).catch(function() {
|
|
|
|
+ // // 取消
|
|
|
|
+ // self.$parent.outPageButton();
|
|
|
|
+ // });
|
|
|
|
+ // }
|
|
|
|
+ //
|
|
|
|
+ // });
|
|
|
|
+ // }else{
|
|
|
|
+ // //新增
|
|
|
|
+ // addUserStudent(obj).then(response => {
|
|
|
|
+ // if(response.code==200){
|
|
|
|
+ // self.msgSuccess(response.msg)
|
|
|
|
+ // self.$parent.outPageButton()
|
|
|
|
+ // }else if(response.code==205){
|
|
|
|
+ // self.$confirm(response.msg, "警告", {
|
|
|
|
+ // confirmButtonText: "确定",
|
|
|
|
+ // cancelButtonText: "取消",
|
|
|
|
+ // type: "warning"
|
|
|
|
+ // }).then(() => {
|
|
|
|
+ // // 确定
|
|
|
|
+ // self.$router.push({ path: '/comprehensive/laboratoryManagement/accessAuthorization' });
|
|
|
|
+ // }).catch(function() {
|
|
|
|
+ // // 取消
|
|
|
|
+ // self.$parent.outPageButton();
|
|
|
|
+ // });
|
|
|
|
+ // }
|
|
|
|
+ //
|
|
|
|
+ // });
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
},
|
|
},
|
|
}
|
|
}
|
|
}
|
|
}
|