Commit b036ae20 authored by lwy's avatar lwy

用户管理

parent 499ac20e
...@@ -320,26 +320,6 @@ ...@@ -320,26 +320,6 @@
</template> </template>
</el-dialog> </el-dialog>
<!-- 分配角色 -->
<el-dialog v-model="dialogRole" title="分配角色" width="600px" append-to-body>
<el-form ref="userRef" :model="form" label-width="80px">
<el-form-item prop="roleNames">
<el-checkbox-group v-model="selectedFactories">
<div style="display: flex; flex-wrap: wrap;">
<div v-for="(role, index) in allRoles" :key="index" style="width: 33%; margin-bottom: 10px;">
<el-checkbox :label="role">{{ role }}</el-checkbox>
</div>
</div>
</el-checkbox-group>
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="cancel">取 消</el-button>
<el-button type="primary" @click="submitForm">保 存</el-button>
</span>
</template>
</el-dialog>
<!-- 添加或修改用户配置对话框 --> <!-- 添加或修改用户配置对话框 -->
<el-dialog v-model="open" :title="title" width="600px" append-to-body> <el-dialog v-model="open" :title="title" width="600px" append-to-body>
...@@ -517,7 +497,6 @@ const { sys_normal_disable, sys_user_sex, sys_user_status, sys_user_type } = pro ...@@ -517,7 +497,6 @@ const { sys_normal_disable, sys_user_sex, sys_user_status, sys_user_type } = pro
'sys_user_type' 'sys_user_type'
) )
const dialogFactory = ref(false) const dialogFactory = ref(false)
const dialogRole = ref(false)
const divsionDialog = ref(false) const divsionDialog = ref(false)
// 选中的工厂列表 // 选中的工厂列表
const selectedFactories = ref([]); const selectedFactories = ref([]);
...@@ -662,13 +641,7 @@ function openFactoryDialog(row) { ...@@ -662,13 +641,7 @@ function openFactoryDialog(row) {
selectedFactories.value = row.factoryName ? row.factoryName.split(',') : []; selectedFactories.value = row.factoryName ? row.factoryName.split(',') : [];
} }
// 解析 factoryName(假设存储为 JSON 字符串数组) // 解析 factoryName(假设存储为 JSON 字符串数组)
function parseFactoryName(factoryName) {
try {
return JSON.parse(factoryName || '[]'); // 默认空数组
} catch (e) {
return [];
}
}
// 监听选中的工厂变化,更新表单数据 // 监听选中的工厂变化,更新表单数据
watch(selectedFactories, (newVal) => { watch(selectedFactories, (newVal) => {
...@@ -807,7 +780,6 @@ function handleCommand(command, row) { ...@@ -807,7 +780,6 @@ function handleCommand(command, row) {
/** 跳转角色分配 */ /** 跳转角色分配 */
function handleAuthRole(row) { function handleAuthRole(row) {
dialogRole.value = true
const userId = row.userId const userId = row.userId
router.push('/system/user-auth/role/' + userId) router.push('/system/user-auth/role/' + userId)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment