Browse Source

批量加密IFS密码

master
han\hanst 1 month ago
parent
commit
924a31a698
  1. 22
      src/views/modules/sys/user.vue

22
src/views/modules/sys/user.vue

@ -42,6 +42,7 @@
</el-button>
<el-button type="primary" @click="openDepartmentDialog">部门管理</el-button>
<el-button type="primary" @click="openPostDialog">岗位管理</el-button>
<el-button v-if="isAuth('sys:user:save')" type="warning" @click="batchEncryptIfsPassword">批量加密IFS密码</el-button>
</el-form-item>
</el-form>
<el-table
@ -1827,6 +1828,27 @@ export default {
}).catch(() => {})
},
// ===== IFS =====
batchEncryptIfsPassword () {
this.$confirm('此操作将把数据库中所有明文 IFS 密码转换为 AES 加密存储,已加密的会自动跳过。确认执行?', '批量加密IFS密码', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('/sys/user/batchEncryptIfsPassword'),
method: 'post',
data: this.$http.adornData({}, false)
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message.success(`操作成功,共处理 ${data.count} 条记录`)
} else {
this.$message.error(data.msg || '操作失败')
}
})
}).catch(() => {})
},
// ===== =====
openPostDialog () {
this.postQuery = { site: this.$store.state.user.site, postNo: '', postName: '' }

Loading…
Cancel
Save