@@ -164,10 +171,9 @@ const formRules = reactive({
],
})
-
-
const systemRef = ref(null)
const emit = defineEmits(['action'])
+const roleList = ref([])
const submitForm = async () => {
if (!systemRef) return
@@ -182,11 +188,12 @@ const submitForm = async () => {
const clearForm = () => {
if (!systemRef) return
- systemRef.value.resetFields()
+ systemRef.value.resetFields();
+ systemForm.system_role_id = roleList.value[0].role_id;
}
const setForm = (data) => {
- systemForm.value = Object.assign(systemForm, data);
+ Object.assign(systemForm, data);
}
const orgData = ref([])
@@ -216,9 +223,21 @@ const copyText = (data) => {
}
);
}
+const getRoleList = () => {
+ $axios.get(`/apaas/system/v5/org/select/role?is_admin=1`)
+ .then((res) => {
+ if (res.data.code == 200) {
+ roleList.value = res.data.data;
+ systemForm.system_role_id = roleList.value[0].role_id;
+ }else {
+
+ }
+ })
+}
onBeforeMount(() =>{
getOrgTree()
+ getRoleList()
})
onMounted(() => {
diff --git a/src/page/main/system/organization/index.vue b/src/page/main/system/organization/index.vue
index d96df4f3f9fbe1492bb087ce71d75c07f06a8ea7..2e8d100e009d9df77fec0e62dfd6c08ae17b4260 100644
--- a/src/page/main/system/organization/index.vue
+++ b/src/page/main/system/organization/index.vue
@@ -52,13 +52,16 @@
-
+
- {{ row.account }}
+ {{ row.system_account }}
+
+
+
-
+
编辑
@@ -204,12 +207,12 @@ import orgForm from './org-form.vue';
{
label: "账号",
prop: "system_account",
- width: 180
+ minWidth: 150
},
{
label: "手机号",
prop: "contact_phone",
- minWidth: 120
+ width: 150
},
{
label: "角色",
@@ -219,7 +222,7 @@ import orgForm from './org-form.vue';
{
label: "创建时间",
prop: "created_time",
- width: 150
+ width: 200
},
{
label: "是否启用",
@@ -254,17 +257,13 @@ import orgForm from './org-form.vue';
const addAccount = (params) => {
if(selectTreeDataType.value === 1) {
router.push({
- path: "/system/organization/system-user",
- query: {
- type: params
- }
+ path: "/system/organization/org-user",
+
})
}else {
router.push({
path: "/system/organization/platform-user",
- query: {
- type: params
- }
+
})
}
@@ -508,6 +507,10 @@ import orgForm from './org-form.vue';
})
}
+ const searchChange = (val) => {
+ orgTree.value.filterTree(val);
+ }
+
const goDetail = (params) => {
router.push({
path: "/system/organization/user-detail",
@@ -517,8 +520,22 @@ import orgForm from './org-form.vue';
})
}
- const searchChange = (val) => {
- orgTree.value.filterTree(val);
+ const editAccount = (data) => {
+ if(selectTreeDataType === 1) {
+ router.push({
+ path: "/system/organization/platform-user",
+ query: {
+ id: data.id
+ }
+ })
+ } else {
+ router.push({
+ path: "/system/organization/org-user",
+ query: {
+ id: data.id
+ }
+ })
+ }
}
onBeforeMount(() => {
diff --git a/src/page/main/system/organization/system-user/index.vue b/src/page/main/system/organization/org-user/index.vue
similarity index 60%
rename from src/page/main/system/organization/system-user/index.vue
rename to src/page/main/system/organization/org-user/index.vue
index 1dfb873eb0aa94ca837641966f6e955bcca9ffda..80cea2e8af2add6df50e151e86db6eed1fc9ee39 100644
--- a/src/page/main/system/organization/system-user/index.vue
+++ b/src/page/main/system/organization/org-user/index.vue
@@ -44,14 +44,17 @@
-
-
+
+
-
-
平台用户新增成功
+
+

+

+
+
{{route.query.id ? (successFlag ? '组织用户编辑成功' : '组织用户编辑失败') : (successFlag ? '组织用户新增成功' : '组织用户新增失败')}}
返回列表
-
继续创建
+
继续创建
@@ -76,51 +79,87 @@