[bug]禅道bug的修改

This commit is contained in:
dujie
2023-04-06 17:49:24 +08:00
parent e8ad0d1d74
commit e6f23cc716
9 changed files with 53 additions and 37 deletions
@@ -22,14 +22,14 @@
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="新密码">
<a-input type="password" placeholder="请输入新密码" v-decorator="[ 'password', validatorRules.password]" />
<a-input type="password" placeholder="请输入新密码" :maxLength="20" v-decorator="[ 'password', validatorRules.password]" />
</a-form-item>
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="确认新密码">
<a-input type="password" @blur="handleConfirmBlur" placeholder="请确认新密码" v-decorator="[ 'confirmpassword', validatorRules.confirmpassword]"/>
<a-input type="password" @blur="handleConfirmBlur" placeholder="请确认新密码" :maxLength="20" v-decorator="[ 'confirmpassword', validatorRules.confirmpassword]"/>
</a-form-item>
</a-form>
@@ -58,14 +58,14 @@ export default {
password: {
rules: [
{ required: true, message: '请输入新密码!' },
{ pattern: /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/, message: '密码由8位数字、大小写字母和特殊符号组成!' },
{ pattern: /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/, message: '密码由8-20位数字、大小写字母和特殊符号组成!' },
{ validator: this.validateToNextPassword }
]
},
confirmpassword: {
rules: [
{ required: true, message: '请确认新密码!' },
{ pattern: /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/, message: '密码由8位数字大小写字母和特殊符号组成!' },
{ pattern: /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/, message: '密码由8-20位数字大小写字母和特殊符号组成!' },
{ validator: this.validateToNextPassword }
]
}
+16 -8
View File
@@ -200,14 +200,22 @@ export const JeroListMixin = {
return
}
const that = this
postAction(that.url.delete, { id: id }).then((res) => {
if (res.success) {
// 重新计算分页问题
that.reCalculatePage(1)
that.$message.success(res.message)
that.loadData()
} else {
that.$message.warning(res.message)
this.$confirm({
title: '确认删除',
content: '确定要删除此条数据吗?',
onOk: function () {
postAction(that.url.delete, { id: id }).then((res) => {
if (res.success) {
that.$message.success(res.message)
// 判断当前删除的数据是否是最后一页的最后一条数据,如果是的话页码减一
if (that.ipagination.current > 1 && ((that.ipagination.current - 1) * that.ipagination.pageSize) + 1 === that.ipagination.total) {
that.ipagination.current -= 1
}
that.loadData()
} else {
that.$message.warning(res.message)
}
})
}
})
},
@@ -93,6 +93,8 @@ export default {
{
title: '名称',
align: 'center',
ellipsis: true,
width: 300,
dataIndex: 'itemText'
},
{
+11 -10
View File
@@ -77,16 +77,17 @@
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical"/>
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
<a-menu slot="overlay">
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
<a @click="handleDelete(record.id)">删除</a>
<!-- <a-dropdown>-->
<!-- <a class="ant-dropdown-link">更多 <a-icon type="down"/></a>-->
<!-- <a-menu slot="overlay">-->
<!-- <a-menu-item>-->
<!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
<!-- <a>删除</a>-->
<!-- </a-popconfirm>-->
<!-- </a-menu-item>-->
<!-- </a-menu>-->
<!-- </a-dropdown>-->
</span>
</a-table>
+2 -1
View File
@@ -195,7 +195,7 @@
<user-recycle-bin-modal :visible.sync="recycleBinVisible" @ok="modalFormOk"/>
<!-- 角色配置 -->
<!-- <a-modal title="角色配置" :width='650'>-->
<role-assignment ref="roleAssignmentModal" :selectedRowKeysArray='selectedRowKeys' @rolevisible='rolevisibleMethods'></role-assignment>
<role-assignment ref="roleAssignmentModal" :selectedRowKeysArray='selectedRowKeys' @ok="modalFormOk" @rolevisible='rolevisibleMethods'></role-assignment>
<!-- </a-modal>-->
</a-card>
@@ -439,6 +439,7 @@ export default {
}
},
rolevisibleMethods () {
this.onClearSelected()
this.selectedRowKeys = []
}
}
@@ -16,7 +16,7 @@
:wrapperCol="wrapperCol"
prop="itemText"
label="名称">
<a-input placeholder="请输入名称" v-model="model.itemText"/>
<a-input placeholder="请输入名称" :maxLength="50" v-model="model.itemText"/>
</a-form-model-item>
<a-form-model-item
@@ -31,7 +31,7 @@
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="描述">
<a-input v-model="model.description" />
<a-input :maxLength="50" v-model="model.description" />
</a-form-model-item>
<a-form-model-item
@@ -6,6 +6,7 @@
:closable="true"
:visible="visible"
:footer='null'
@cancel="handleCancel"
>
<div class='diolag-area'>
<a-spin :spinning='spinLoading'>
@@ -111,8 +112,9 @@ export default {
postAction('/sys/user/setRole', param).then((res) => {
this.visible = false
if (res.success) {
this.$emit('rolevisible', false)
this.$emit('ok', false)
this.$message.success(res.message)
this.selectedRole = []
} else {
this.$message.warning(res.message)
}
@@ -23,21 +23,21 @@
<a-form-model ref="form" :model="model" :rules="validatorRules">
<a-form-model-item label="用户账号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="username">
<a-input placeholder="请输入用户账号" v-model="model.username" :readOnly="!!model.id" :disabled="disableSubmit"/>
<a-input placeholder="请输入用户账号" :maxLength="50" v-model="model.username" :readOnly="!!model.id" :disabled="disableSubmit"/>
</a-form-model-item>
<template v-if="!model.id">
<a-form-model-item label="登录密码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="password" >
<a-input type="password" placeholder="请输入登录密码" v-model="model.password" />
<a-input-password type="password" placeholder="请输入登录密码" :maxLength="20" v-model="model.password" />
</a-form-model-item>
<a-form-model-item label="确认密码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="confirmpassword" >
<a-input type="password" @blur="handleConfirmBlur" placeholder="请重新输入登录密码" v-model="model.confirmpassword"/>
<a-input-password type="password" @blur="handleConfirmBlur" :maxLength="20" placeholder="请重新输入登录密码" v-model="model.confirmpassword"/>
</a-form-model-item>
</template>
<a-form-model-item label="用户姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="realname">
<a-input placeholder="请输入用户姓名" v-model="model.realname" :disabled="disableSubmit"/>
<a-input placeholder="请输入用户姓名" v-model="model.realname" :maxLength="50" :disabled="disableSubmit"/>
</a-form-model-item>
<!--<a-form-model-item label="工号" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
@@ -111,7 +111,7 @@
</a-form-model-item>
<a-form-model-item label="邮箱" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="email">
<a-input placeholder="请输入邮箱" v-model="model.email" :disabled="disableSubmit"/>
<a-input placeholder="请输入邮箱" v-model="model.email" :maxLength="50" :disabled="disableSubmit"/>
</a-form-model-item>
<a-form-model-item label="手机号码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone">
@@ -164,7 +164,7 @@ export default {
validatorRules: {
username: [{ required: true, message: '请输入用户账号!' },
{ validator: this.validateUsername }],
password: [{ required: true, pattern: /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/, message: '密码由8位数字大小写字母和特殊符号组成!' },
password: [{ required: true, pattern: /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/, message: '密码由8-20位数字大小写字母和特殊符号组成!' },
{ validator: this.validateToNextPassword, trigger: 'change' }],
confirmpassword: [{ required: true, message: '请重新输入登录密码!' },
{ validator: this.compareToFirstPassword }],
@@ -425,7 +425,7 @@ export default {
if (!value) {
callback()
} else {
if (new RegExp(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/).test(value)) {
if (new RegExp(/^\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/).test(value)) {
const params = {
tableName: 'sys_user',
fieldName: 'email',
@@ -66,7 +66,7 @@ function superRequest (options) {
}
}).catch(e => {
console.error('查询已删除的用户失败:', e)
this.$message.warning('查询已删除的用户失败:' + (e.message || e))
// this.$message.warning('查询已删除的用户失败:' + (e.message || e))
}).finally(() => {
this.loading = false
})
@@ -134,17 +134,19 @@ export default {
this.innerVisible = false
},
// 还原用户
handleRevert (userIds) {
handleRevert (userIds, userName) {
this.$confirm({
title: '恢复用户',
content: `您确定要恢复这 ${userIds.length} 个用户吗?`,
// content: `您确定要恢复这 ${userIds.length} 个用户吗?`,
content: `是否还原选中用户?`,
centered: true,
onOk: () => {
postAction(this.url.putRecycleBin, { userIds: userIds.join(',') }).then((res) => {
if (res.success) {
this.handleOk()
this.handleClearSelection()
this.$message.success(`还原 ${userIds.length} 个用户成功!`)
// this.$message.success(`还原 ${userIds.length} 个用户成功!`)
this.$message.success(`选中用户还原成功!`)
}
})
}