|
|
|
@ -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: '' } |
|
|
|
|