Compare commits

...

3 Commits

Author SHA1 Message Date
阿斌
16a3c9b3bd
Pre Merge pull request !41 from 阿斌/N/A 2026-06-17 14:19:00 +00:00
lin
2b4b127e4a 兼容部分宇视设备ElementName和configType不一致的情况 2026-06-17 22:18:40 +08:00
阿斌
34d1dbb399
修复两次密码不一致时,任然可以修改密码,且成功提交,密码用*代替
还有以下一处需要修改web\src\layout\components\dialog\changePassword.vue

Signed-off-by: 阿斌 <38912748@qq.com>
2025-08-23 15:03:02 +00:00
2 changed files with 19 additions and 2 deletions

View File

@ -1148,6 +1148,15 @@ public class SIPCommander implements ISIPCommander {
if (code == ErrorCode.SUCCESS.getCode() && data instanceof Element) { if (code == ErrorCode.SUCCESS.getCode() && data instanceof Element) {
Element responseElement = (Element) data; Element responseElement = (Element) data;
Element configElement = responseElement.element(configType); Element configElement = responseElement.element(configType);
if (configElement == null) {
// 兼容部分宇视设备ElementName和configType不一致的情况
for (Element child : responseElement.elements()) {
if (child.element("Item") != null) {
configElement = child;
break;
}
}
}
if (configElement != null) { if (configElement != null) {
try { try {
T result = configClass.getDeclaredConstructor().newInstance(); T result = configClass.getDeclaredConstructor().newInstance();

View File

@ -13,10 +13,10 @@
<div id="shared" style="margin-right: 20px;"> <div id="shared" style="margin-right: 20px;">
<el-form ref="passwordForm" :rules="rules" status-icon label-width="80px"> <el-form ref="passwordForm" :rules="rules" status-icon label-width="80px">
<el-form-item label="新密码" prop="newPassword"> <el-form-item label="新密码" prop="newPassword">
<el-input v-model="newPassword" autocomplete="off" /> <el-input v-model="newPassword" autocomplete="off" type="password" />
</el-form-item> </el-form-item>
<el-form-item label="确认密码" prop="confirmPassword"> <el-form-item label="确认密码" prop="confirmPassword">
<el-input v-model="confirmPassword" autocomplete="off" /> <el-input v-model="confirmPassword" autocomplete="off" type="password" />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -88,6 +88,14 @@ export default {
} }
}, },
onSubmit: function() { onSubmit: function() {
if (this.newPassword !== this.confirmPassword) {
this.$message({
showClose: true,
message: '两次输入密码不一致!',
type: 'error'
})
return
}
this.$store.dispatch('user/changePasswordForAdmin', { this.$store.dispatch('user/changePasswordForAdmin', {
password: this.newPassword, password: this.newPassword,
userId: this.form.id userId: this.form.id