From 05166e6f2dc2e46219f6c3f82b6cc407f78c234e Mon Sep 17 00:00:00 2001
From: zhaoxiaoqiang <287285524@qq.com>
Date: Thu, 07 Sep 2023 14:45:55 +0800
Subject: [PATCH] 查看详情禁用富文本
---
src/views/account-management/account-list.vue | 67 ++++++---------------------------
1 files changed, 12 insertions(+), 55 deletions(-)
diff --git a/src/views/account-management/account-list.vue b/src/views/account-management/account-list.vue
index e5cced7..b844e32 100644
--- a/src/views/account-management/account-list.vue
+++ b/src/views/account-management/account-list.vue
@@ -2,7 +2,7 @@
* @Author: 小明丶
* @Date: 2020-05-11 17:38:01
* @LastEditors: zhaoxiaoqiang 287285524@qq.com
- * @LastEditTime: 2023-09-05 15:48:52
+ * @LastEditTime: 2023-09-05 17:46:59
* @Description: 账户管理
-->
<template>
@@ -38,7 +38,7 @@
<el-form-item label="用户名称:" prop="name">
<el-input
v-model.trim="creatForm.name"
- maxlength="20"
+ maxlength="30"
autocomplete="off"
placeholder="请输入用户名称"
></el-input>
@@ -62,27 +62,6 @@
:value="item.roleId">
</el-option>
</el-select>
- </el-form-item>
- <el-form-item label="密码:" v-show="title !== '编辑账户'" prop="password">
- <el-input
- type = "password"
- v-if="isCreat"
- v-model.trim="creatForm.password"
- maxlength="20"
- autocomplete="off"
- placeholder="请输入密码"
- ></el-input>
- </el-form-item>
- <el-form-item label="密码确认:" v-show="title !== '编辑账户'" prop="resPassword">
- <el-input
- type = "password"
- v-if="isCreat"
- v-model.trim="creatForm.resPassword"
- maxlength="20"
- autocomplete="off"
- placeholder="再次输入密码"
- ></el-input>
- <span v-else>{{creatForm.resPassword}}</span>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@@ -187,15 +166,13 @@
};
},
watch: {
- // dialogFormVisible: function(newVal) {
- // if (!newVal) {
- // this.creatForm.name = ""
- // this.creatForm.phone = ""
- // this.creatForm.password = ''
- // this.creatForm.resPassword = ''
- // this.creatForm.role = ''
- // }
- // }
+ dialogFormVisible: function(newVal) {
+ if (!newVal) {
+ this.creatForm.name = "";
+ this.creatForm.phone = "";
+ this.creatForm.role = '';
+ }
+ }
},
created(){
roleGetRoleList().then(res => {
@@ -245,10 +222,6 @@
this.$message.error('请输入用户名称');
return
}
- if(!v.checkName(this.creatForm.name)){
- this.$message.error('请输入正确用户名称');
- return
- }
if(v.checkValEmpty(this.creatForm.phone)){
this.$message.error('请输入用户手机号');
return
@@ -261,22 +234,7 @@
this.$message.error('请选择角色');
return
}
- if(v.checkValEmpty(this.creatForm.password) && this.isCreat){
- this.$message.error('请输入密码');
- return
- }
- if(!v.checkPassword(this.creatForm.password) && this.isCreat){
- this.$message.error('密码格式错误,请输入6~20位包含字母及数字');
- return
- }
- if(v.checkValEmpty(this.creatForm.resPassword) && this.isCreat){
- this.$message.error('请输入密码确认');
- return
- }
- if(this.creatForm.password!=this.creatForm.resPassword && this.isCreat){
- this.$message.error('密码输入不一致,请确认');
- return
- }
+
if(this.title === '新建账户') {
let temPassWord = md5(this.creatForm.phone+this.creatForm.password)
let temconfirmPwd = md5(this.creatForm.phone+this.creatForm.resPassword)
@@ -297,7 +255,6 @@
} else if (this.title === '编辑账户') {
let data = {userName: this.creatForm.name, userId: this.rowsInfo.userId, roleId:this.creatForm.role}
userUpdate(data).then(res => {
- console.log(res)
if(res) {
this.$notify({
title: '提示',
@@ -318,7 +275,7 @@
/**更新用户状态**/
updateContract(params) {
let {userId,status} = params.row;
- let data = { userId,status:status==1?0:1};
+ let data = { userId,status};
userManageDisabled(data).then(res => {
if(res) {
this.$notify({
@@ -326,7 +283,7 @@
message: '状态更新成功',
type: 'success'
})
- //this.qureys()
+ this.qureys()
}
}).catch(err => {})
},
--
Gitblit v1.8.0