瀏覽代碼

用户审核

denny 2 年之前
父節點
當前提交
0165850d51

+ 31 - 0
VinnoManagementSystem/src/api/wing/user.js

@@ -54,4 +54,35 @@ export default {
             });
         }
 	},
+    AuditPass: {
+		method: 'ConfirmIdentityApply',
+		name: "审核通过",
+		post: async function (code) {            
+            var data = {
+                'IdentityApplyCode': code, 
+            }
+            return await http.post({
+                "jsonrpc": "2.0",
+                "id": common.guid(),
+                "method": this.method,
+                "params": [data]
+            });
+        }
+	},
+    AuditReject: {
+		method: 'RejectIdentityApply',
+		name: "审核驳回",
+		post: async function (code, reason) {            
+            var data = {
+                'IdentityApplyCode': code, 
+                'RejectReason': reason
+            }
+            return await http.post({
+                "jsonrpc": "2.0",
+                "id": common.guid(),
+                "method": this.method,
+                "params": [data]
+            });
+        }
+	},
 }

+ 5 - 3
VinnoManagementSystem/src/locales/lang/en.js

@@ -86,9 +86,10 @@ export default {
 		rejectReasonRequired: "RejectReason Required",
 		auditText: "Approved or not",
 		doctorLicense: "Doctor's license",
-		cardFront: "Card Front",
-		cardreverse: "Card Reverse",
+		cardFront: "Card1",
+		cardreverse: "Card2",
 		applyRoleName: "Apply Role",
+		checkIsPass: "Please choice Approved or not",
 	},
 	dialogBox: {
 		confirmWarningText:"Confirm whether to ",
@@ -226,6 +227,7 @@ export default {
 		userQueryOptions7: "Department",
 		confirmShareDevice:"Share This Device?",
 		confirmCancelShareDevice:"Cancel Share This Device?",
-		removeDeviceBindUsers:"This operation will unbind the share user. Continue or not?"
+		removeDeviceBindUsers:"This operation will unbind the share user. Continue or not?",
+		rejectReasonRequired: "RejectReason Required",
 	}
 }

+ 15 - 13
VinnoManagementSystem/src/locales/lang/zh-cn.js

@@ -74,7 +74,7 @@ export default {
 		description: "描述"
 	},
 	user: {
-		dynamic: '近期动',
+		dynamic: '近期动',
 		info: '个人信息',
 		settings: '设置',
 		nightmode: "黑夜模式",
@@ -83,21 +83,21 @@ export default {
 		language_msg: '翻译进行中,暂翻译了本视图的文本',
 		personSetting: '个人设置',
 		modifyPwd: '修改密码',
-		loginOut: '退出登',
+		loginOut: '退出登',
 		userName: '用户名',
 		fullName: "用户姓名",
 		phone: "手机号",
 		email: "邮箱",
 		hospitalName: "所在医院",
 		userStatus: "用户状态",
-		authenticationState: "认证状",
-		userStatusPlaceholder: "请选择用户状",
-		nonactivated: "未激",
-		activated: "已激",
-		uncertified: "未认",
-		waitcertified: "待审",
-		rejected: "已拒",
-		certified: "已认",
+		authenticationState: "认证状",
+		userStatusPlaceholder: "请选择用户状",
+		nonactivated: "未激",
+		activated: "已激",
+		uncertified: "未认",
+		waitcertified: "待审",
+		rejected: "已拒",
+		certified: "已认",
 		registerTime: "注册时间",
 		certificationAudit: "认证审核",
 		rejectReason: "拒绝原因",
@@ -105,8 +105,8 @@ export default {
 		rejectReasonRequired: "拒绝原因必填",
 		auditText: "是否审核通过",
 		doctorLicense: "医师执照",
-		cardFront: "身份证正面",
-		cardreverse: "身份证反面",
+		cardFront: "身份证1",
+		cardreverse: "身份证2",
 		applyRoleName: "申请角色",
 		assignUser: "分配负责人",
 		authorityName: "权限名称",
@@ -116,6 +116,7 @@ export default {
 		uniqueCodeRequire: "请输入权限唯一码",
 		frontAuthority: "上级权限",
 		selectItem: "请选择左侧菜单后操作",
+		checkIsPass: "请选择是否审核通过",
 	},
 	admin: {
 		assignAdmin: "分配管理员",
@@ -226,6 +227,7 @@ export default {
 		userQueryOptions7: "所属科室",
 		confirmShareDevice: "分享当前设备?",
 		confirmCancelShareDevice: "取消分享当前设备?",
-		removeDeviceBindUsers: "此操作将解除已绑定的分享用户, 是否继续?"
+		removeDeviceBindUsers: "此操作将解除已绑定的分享用户, 是否继续?",
+		rejectReasonRequired: "拒绝原因必填",
 	},
 }

+ 48 - 59
VinnoManagementSystem/src/views/userManage/userAudit.vue

@@ -40,26 +40,26 @@
 			<el-row :gutter="15">
 				<el-col :span="12">
 					<el-form-item :label="$t('user.cardFront')">
-						<el-image v-show="true" :src="imgurl" style="width:100%;height:135px"></el-image>
+						<el-image v-show="form.cardFront!=''" :src="form.cardFront" style="width:100%;height:135px"></el-image>
 					</el-form-item>
 				</el-col>
 				<el-col :span="12">
 					<el-form-item :label="$t('user.cardreverse')">
-						<el-image v-show="true" :src="imgurl" style="width:100%;height:135px"></el-image>
+						<el-image v-show="form.cardreverse!=''" :src="form.cardreverse" style="width:100%;height:135px"></el-image>
 					</el-form-item>
 				</el-col>
 			</el-row>
 			<el-row :gutter="15">
 				<el-col :span="24">
 					<el-form-item :label="$t('user.doctorLicense')">
-						<el-image v-show="true" :src="imgurl" style="width:40%;height:135px"></el-image>
+						<el-image v-show="form.doctorLicense!=''" :src="form.doctorLicense" style="width:40%;height:135px"></el-image>
 					</el-form-item>
 				</el-col>
 			</el-row>
 			<el-row :gutter="15">
 				<el-col :span="24">
 					<el-form-item :label="$t('user.auditText')">
-						<el-radio-group v-model="form.applyRoleName">
+						<el-radio-group v-model="form.radio">
 							<el-radio v-for="_item in radioList" :key="_item.value" :label="_item.value">{{_item.label}}</el-radio>
 						</el-radio-group>
 					</el-form-item>
@@ -67,8 +67,8 @@
 			</el-row>
 			<el-row :gutter="15">
 				<el-col :span="24">
-					<el-form-item :label="$t('user.rejectReason')">
-						<el-input type="textarea" v-model="form.rejectReason" :laceholder="$t('user.inputRejectReason')" clearable></el-input>
+					<el-form-item v-if="form.radio=='2'" :label="$t('user.rejectReason')">
+						<el-input type="textarea"  v-if="form.radio=='2'" v-model="form.rejectReason" :laceholder="$t('user.inputRejectReason')" clearable></el-input>
 					</el-form-item>
 				</el-col>
 			</el-row>
@@ -88,7 +88,6 @@
 				titleMap: this.$t('user.certificationAudit'),
 				visible: false,
 				isSaveing: false,
-				imgurl:"http://192.168.6.80:2800/img/avatar.jpg",
 				//表单数据
 				form: {
 					fullName: '',
@@ -99,44 +98,16 @@
 					applyRoleName: '',
 					radio: '',
 					rejectReason: '',
-					identityApplyCode: ''
+					identityApplyCode: '',
+					cardFront:'',
+					cardreverse:'',
+					doctorLicense:''
 				},
 				//审核列表
 				radioList:[
 					{ label: this.$t('yes'), value: 1 },
 					{ label: this.$t('no'), value: 2 }
 				],
-				//验证规则
-				rules: {
-					code: [
-						{required: true, message: this.$t('login.inputAdminCode')}
-					],
-                    oldPassword: [
-						{required: true, message: this.$t('login.inputAdminOldPwd')},
-					],
-					password: [
-						{required: true, message: this.$t('login.inputAdminPwd')},
-						{validator: (rule, value, callback) => {
-                            let reg= /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{4,20}$/
-                            if(!reg.test(value)){
-								callback(new Error(this.$t('login.inputPwdValidate')))
-                            }
-							else{
-                                callback()
-                            }
-						}, trigger: 'blur'}
-					],
-					password2: [
-						{required: true, message: this.$t('login.againInputPwd')},
-						{validator: (rule, value, callback) => {
-							if (value !== this.form.password) {
-								callback(new Error(this.$t('login.pwdDiff')));
-							}else{
-								callback();
-							}
-						}}
-					]
-				}
 			}
 		},
 		methods: {
@@ -160,36 +131,54 @@
 					this.form.applyRoleName = res.IdentityApplyRoleName
 					this.form.identityApplyCode = res.IdentityApplyCode
 					if (res.IdentityCard != null && res.IdentityCard.length > 0) {
-						this.idUrl1 = res.IdentityCard[0]
-						this.idUrl1List.push(res.IdentityCard[0])
+						this.form.cardFront = res.IdentityCard[0]
 						if (res.IdentityCard.length > 1) {
-						this.idUrl2 = res.IdentityCard[1]
-						this.idUrl2List.push(res.IdentityCard[1])
+							this.form.cardreverse = res.IdentityCard[1]
 						}
 					}
 					if (res.LicenseCard != null && res.LicenseCard.length > 0) {
-						this.licenseUrl = res.LicenseCard[0]
-						this.licenseUrlList.push(res.LicenseCard[0])
+						this.form.doctorLicense = res.LicenseCard[0]
 					}
 				}
 			},
 			//表单提交方法
-			submit(){
-				this.$refs.dialogForm.validate(async (valid) => {
-					if (valid) {
-						this.isSaveing = true;
-                        var res = await this.$API.user.modifyUserPassword.post(this.form);
-						this.isSaveing = false;
-						if(res){
-							this.visible = false;
-							this.$message.success(this.$t('response.operateSuccess'))
-						}else{
-							this.$alert(res.message, this.$t('dialogBox.confirmWarningTitle'), {type: 'error'})
-						}
+			async submit(){
+				//通过
+				if (this.form.radio === 1) {
+					this.isSaveing = true;
+					var res = await this.$API.user.AuditPass.post(this.form.identityApplyCode);
+					this.isSaveing = false;
+					if(res){	
+						this.$emit('success');
+						this.visible = false;
+						this.$message.success(this.$t('response.operateSuccess'))
+					}else{
+						this.$alert(res.message, this.$t('dialogBox.confirmWarningTitle'), {type: 'error'})
+					}
+				}
+				//驳回
+				else if (this.form.radio === 2) {
+					//驳回原因必填
+					if (this.form.rejectReason === '') {
+						this.$alert(this.$t("device.rejectReasonRequired"), this.$t('dialogBox.confirmWarningTitle'), {type: 'error'})
+						return false
+					}
+					this.isSaveing = true;
+					var result = await this.$API.user.AuditReject.post(this.form.identityApplyCode, this.form.rejectReason);
+					this.isSaveing = false;
+					if(result){
+						this.$emit('success');
+						this.visible = false;
+						this.$message.success(this.$t('response.operateSuccess'))
 					}else{
-						return false;
+						this.$alert(result.message, this.$t('dialogBox.confirmWarningTitle'), {type: 'error'})
 					}
-				})
+				}
+				//审核状态必填
+				else {
+					this.$alert(this.$t("user.checkIsPass"), this.$t('dialogBox.confirmWarningTitle'), {type: 'error'})
+					return false
+				}
 			}
 		}
 	}