Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
so-manage-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
smart-operation
so-manage-ui
Commits
2239de58
Commit
2239de58
authored
Jul 04, 2023
by
李鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权限管理接口联调
parent
db85c473
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
42 additions
and
453 deletions
+42
-453
src/components/login-by-account.vue
src/components/login-by-account.vue
+1
-3
src/page/main/authority/organization/directory-form.vue
src/page/main/authority/organization/directory-form.vue
+1
-1
src/page/main/authority/organization/index.vue
src/page/main/authority/organization/index.vue
+32
-426
src/page/main/authority/organization/org-detail/index.vue
src/page/main/authority/organization/org-detail/index.vue
+1
-1
src/page/main/authority/organization/org-form.vue
src/page/main/authority/organization/org-form.vue
+1
-12
src/page/main/authority/organization/org-user/org-account-form.vue
...main/authority/organization/org-user/org-account-form.vue
+1
-1
src/page/main/authority/organization/platform-user/index.vue
src/page/main/authority/organization/platform-user/index.vue
+1
-1
src/page/main/authority/organization/tree.vue
src/page/main/authority/organization/tree.vue
+4
-8
No files found.
src/components/login-by-account.vue
View file @
2239de58
...
@@ -120,9 +120,7 @@ const login = () => {
...
@@ -120,9 +120,7 @@ const login = () => {
ElMessage
.
error
(
data
.
data
);
ElMessage
.
error
(
data
.
data
);
}
}
})
})
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{});
console
.
log
(
error
);
});
};
};
const
getUserInfo
=
()
=>
{
const
getUserInfo
=
()
=>
{
return
axios
.
get
(
`/v1/api/user/getUserInfo`
);
return
axios
.
get
(
`/v1/api/user/getUserInfo`
);
...
...
src/page/main/authority/organization/directory-form.vue
View file @
2239de58
...
@@ -77,7 +77,7 @@ const treeProps = {
...
@@ -77,7 +77,7 @@ const treeProps = {
disabled
:
"
disabled
"
,
disabled
:
"
disabled
"
,
};
};
const
getOrgTree
=
()
=>
{
const
getOrgTree
=
()
=>
{
axios
.
get
(
`/
apaas/system/v5
/org/tree`
).
then
((
res
)
=>
{
axios
.
get
(
`/
v1/api
/org/tree`
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
const
orgDataTemp
=
res
.
data
.
data
||
[];
const
orgDataTemp
=
res
.
data
.
data
||
[];
orgDataTemp
.
shift
();
orgDataTemp
.
shift
();
...
...
src/page/main/authority/organization/index.vue
View file @
2239de58
...
@@ -22,29 +22,19 @@
...
@@ -22,29 +22,19 @@
</span>
</span>
<span>
基本信息
</span>
<span>
基本信息
</span>
</span>
</span>
<span
class=
"can_click_text detail_btn"
v-if=
"selectTreeDataType === 1"
@
click=
"toOrgDetail"
>
查看详情
<bg-icon
style=
"font-size: 8px; color: #95a3ca; vertical-align: middle"
icon=
"#bg-ic-arrow-right"
/>
</span>
</div>
</div>
<bg-info
class=
"info_box"
v-if=
"selectTreeDataType === 1"
:data=
"baseInfo"
></bg-info>
<bg-info
class=
"info_box"
:data=
"baseInfo"
></bg-info>
<bg-info
class=
"info_box"
v-if=
"selectTreeDataType === 2"
:data=
"baseInfo2"
></bg-info>
</div>
</div>
<div
class=
"main_container bgc_white"
>
<div
class=
"main_container bgc_white"
>
<bg-filter-group
@
search=
"changeSearch"
v-model=
"filter.key_word"
placeholder=
"请输入关键字"
>
<bg-filter-group
@
search=
"changeSearch"
v-model=
"filter.key_word"
placeholder=
"请输入关键字"
>
<template
v-slot:left_action
>
<template
v-slot:left_action
>
<div
class=
"apaas_button"
>
<div
class=
"title"
>
<el-button
type=
"primary"
@
click=
"addAccount"
>
<span
class=
"icon_box"
>
<bg-icon
style=
"font-size: 12px; color: #fff; margin-right: 8px"
icon=
"#bg-ic-add"
></bg-icon>
<span
class=
"step_icon"
>
{{
selectTreeDataType
===
1
?
"
新增组织管理员
"
:
"
新增平台用户
"
}}
<bg-icon
icon=
"#bg-ic-file"
></bg-icon>
</el-button>
</span>
<el-button
@
click=
"deleteBatch"
>
批量删除
</el-button>
<span>
用户列表
</span>
<el-button
@
click=
"resetPsd"
>
重置密码
</el-button>
</span>
<span
class=
"header_info"
>
已选择
<span
style=
"color: #202531; font-weight: bold"
>
{{
selected
.
length
}}
</span
>
项
</span
>
<span
class=
"header_info can_click_text"
@
click=
"clearSelected"
>
清空
</span>
</div>
</div>
</
template
>
</
template
>
<
template
v-slot:filter_group
>
<
template
v-slot:filter_group
>
...
@@ -68,42 +58,9 @@
...
@@ -68,42 +58,9 @@
</
template
>
</
template
>
</bg-filter-group>
</bg-filter-group>
<div
class=
"table_container apaas_scroll"
>
<div
class=
"table_container apaas_scroll"
>
<bg-table
<bg-table
ref=
"dataTable"
:headers=
"headers"
:rows=
"tableRows"
:isIndex=
"true"
:stripe=
"true"
>
ref=
"dataTable"
:headers=
"headers"
:rows=
"tableRows"
:isIndex=
"true"
canEdit
canEditFlag=
"canSelect"
:stripe=
"true"
:select=
"true"
@
selectAc=
"selectRows"
>
<
template
v-slot:system_account=
"{ row }"
>
<span
@
click=
"goDetail(row)"
class=
"can_click_text"
>
{{
row
.
system_account
}}
</span>
</
template
>
<
template
v-slot:state=
"{ row }"
>
<bg-switch
@
click=
"stateChange(row)"
:labels=
"['否', '是']"
:values=
"[0, 1]"
v-model=
"row.state"
:disabled=
"row.is_admin == 4"
></bg-switch>
</
template
>
<
template
v-slot:action=
"{ row }"
>
<
template
v-slot:action=
"{ row }"
>
<bg-table-btn
:disabled=
"row.is_admin == 4"
@
click=
"editAccount(row)"
class=
"can_click_text"
>
<bg-table-btn
@
click=
"goDetail(row)"
class=
"can_click_text"
>
详情
</bg-table-btn>
编辑
</bg-table-btn>
<bg-table-btn
:disabled=
"row.is_admin == 4 && userInfo.is_admin !== 4"
@
click=
"editPsdAccount(row)"
class=
"can_click_text"
>
修改密码
</bg-table-btn>
<bg-table-btn
:disabled=
"row.is_admin == 4"
@
click=
"deleteAccount(row)"
class=
"can_click_text"
>
删除
</bg-table-btn>
</
template
>
</
template
>
</bg-table>
</bg-table>
<div
class=
"pagination_box"
>
<div
class=
"pagination_box"
>
...
@@ -163,172 +120,49 @@
...
@@ -163,172 +120,49 @@
</span>
</span>
</
template
>
</
template
>
</el-dialog>
</el-dialog>
<el-dialog
v-model=
"deleteRowFlag"
title=
"删除"
width=
"520px"
:before-close=
"handleCloseRowDelete"
>
<div
class=
"warning_info"
>
<bg-icon
style=
"font-size: 12px; color: #a9b1c7; margin-right: 8px; vertical-align: baseline"
icon=
"#bg-ic-circle-tips"
></bg-icon>
您正在对
<span
class=
"danger_info"
>
{{ selectedRow.system_account }}
</span
>
做删除操作。
</div>
<
template
#footer
>
<span
class=
"dialog-footer"
>
<el-button
@
click=
"handleCloseRowDelete"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"deleteRowConfirm"
>
确定
</el-button>
</span>
</
template
>
</el-dialog>
<el-dialog
v-model=
"editFlag"
title=
"修改密码"
width=
"520px"
:before-close=
"handleCloseEdit"
>
<div
class=
"warning_info"
>
<bg-icon
style=
"font-size: 12px; color: #a9b1c7; margin-right: 8px; vertical-align: baseline"
icon=
"#bg-ic-circle-tips"
></bg-icon>
您正在对
<span
class=
"danger_info"
>
{{ selectedRow.system_account }}
</span
>
做修改密码操作,修改后旧密码将无法登录。
</div>
<div>
<el-form
:label-position=
"'right'"
label-width=
"120px"
:model=
"passwordForm"
:rules=
"passwordFormRules"
ref=
"passwordRef"
style=
"max-width: 80%"
>
<el-form-item
label=
"新密码"
prop=
"password"
>
<el-input
v-model=
"passwordForm.password"
:type=
"password_eye ? 'text' : 'password'"
placeholder=
"请输入密码"
>
<
template
#suffix
>
<bg-icon
@
click=
"password_eye = !password_eye"
class=
"icon_eye"
icon=
"#bg-ic-eye"
></bg-icon>
</
template
>
</el-input>
</el-form-item>
<el-form-item
label=
"确认新密码"
prop=
"confirm_password"
>
<el-input
v-model=
"passwordForm.confirm_password"
:type=
"confirm_eye ? 'text' : 'password'"
placeholder=
"请确认新密码"
>
<
template
#suffix
>
<bg-icon
@
click=
"confirm_eye = !confirm_eye"
class=
"icon_eye"
icon=
"#bg-ic-eye"
></bg-icon>
</
template
>
</el-input>
</el-form-item>
</el-form>
</div>
<
template
#footer
>
<span
class=
"dialog-footer"
>
<el-button
@
click=
"handleCloseEdit"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"editConfirm"
>
确定
</el-button>
</span>
</
template
>
</el-dialog>
<el-dialog
v-model=
"deleteFlag"
title=
"删除"
width=
"520px"
:before-close=
"handleCloseDelete"
>
<div
class=
"warning_info"
>
<bg-icon
style=
"font-size: 12px; color: #a9b1c7; mdeleteconfirmargin-right: 8px; vertical-align: baseline"
icon=
"#bg-ic-circle-tips"
></bg-icon>
您正在对
<span
class=
"danger_info"
>
{{ selectedName.join("、") }}
</span
>
做删除操作。
</div>
<
template
#footer
>
<span
class=
"dialog-footer"
>
<el-button
@
click=
"handleCloseDelete"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"deleteConfirm"
>
确定
</el-button>
</span>
</
template
>
</el-dialog>
<el-dialog
v-model=
"resetFlag"
title=
"重置密码"
width=
"520px"
:before-close=
"handleCloseReset"
>
<div
class=
"warning_info"
>
<bg-icon
style=
"font-size: 12px; color: #a9b1c7; margin-right: 8px; vertical-align: baseline"
icon=
"#bg-ic-circle-tips"
></bg-icon>
您正在对
<span
class=
"danger_info"
>
{{ selectedName.join("、") }}
</span
>
做重置密码操作。
</div>
<div>
重置密码为123456,是否继续?
</div>
<
template
#footer
>
<span
class=
"dialog-footer"
>
<el-button
@
click=
"handleCloseReset"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"resetConfirm"
>
确定
</el-button>
</span>
</
template
>
</el-dialog>
</div>
</div>
</template>
</template>
<
script
setup
>
<
script
setup
>
import
{
Search
}
from
"
@element-plus/icons-vue
"
;
import
{
Search
}
from
"
@element-plus/icons-vue
"
;
import
{
computed
,
onBeforeMount
,
nextTick
,
reactive
,
ref
,
toRefs
}
from
"
@vue/runtime-core
"
;
import
{
onBeforeMount
,
nextTick
,
reactive
,
ref
}
from
"
@vue/runtime-core
"
;
import
{
useRouter
}
from
"
vue-router
"
;
import
{
useRouter
}
from
"
vue-router
"
;
import
tree
from
"
./tree.vue
"
;
import
tree
from
"
./tree.vue
"
;
import
directoryForm
from
"
./directory-form.vue
"
;
import
directoryForm
from
"
./directory-form.vue
"
;
import
orgForm
from
"
./org-form.vue
"
;
import
orgForm
from
"
./org-form.vue
"
;
import
CryptoJS
from
"
crypto-js
"
;
import
{
downloadFileFormatNew
}
from
"
@/services/helper
"
;
import
{
downloadFileFormatNew
}
from
"
@/services/helper
"
;
import
store
from
"
@/store
"
;
import
axios
from
"
@/request/http.js
"
;
import
axios
from
"
@/request/http.js
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
bgBreadcrumb
from
"
@/components/bg-breadcrumb.vue
"
;
import
bgBreadcrumb
from
"
@/components/bg-breadcrumb.vue
"
;
const
dataTable
=
ref
(
null
);
const
dataTable
=
ref
(
null
);
const
toOrgDetail
=
()
=>
{
router
.
push
({
path
:
"
/authority/organization/org-detail
"
,
query
:
{
id
:
selectOrgNode
.
value
.
organization_id
,
},
});
};
const
baseInfo
=
reactive
([
const
baseInfo
=
reactive
([
{
name
:
"
组织类型
"
,
value
:
""
,
nameWidth
:
130
,
},
{
name
:
"
组织代码
"
,
value
:
""
,
nameWidth
:
130
,
},
{
{
name
:
"
组织名称
"
,
name
:
"
组织名称
"
,
value
:
""
,
value
:
""
,
callback
:
toOrgDetail
,
nameWidth
:
130
,
nameWidth
:
130
,
},
},
{
{
name
:
"
创建时间
"
,
name
:
"
组织代码
"
,
value
:
""
,
nameWidth
:
130
,
},
{
name
:
"
组织管理员数量
"
,
value
:
""
,
nameWidth
:
130
,
},
{
name
:
"
业务系统数量
"
,
value
:
""
,
value
:
""
,
nameWidth
:
130
,
nameWidth
:
130
,
},
},
]);
const
baseInfo2
=
reactive
([
{
{
name
:
"
组织
名称
"
,
name
:
"
组织
描述
"
,
value
:
""
,
value
:
""
,
nameWidth
:
130
,
nameWidth
:
130
,
},
},
{
{
name
:
"
组织代码
"
,
name
:
"
用户数量
"
,
value
:
""
,
value
:
""
,
nameWidth
:
130
,
nameWidth
:
130
,
},
},
{
{
name
:
"
用户数
"
,
name
:
"
创建时间
"
,
value
:
""
,
value
:
""
,
nameWidth
:
130
,
nameWidth
:
130
,
full
:
true
,
},
},
]);
]);
const
headers
=
reactive
([
const
headers
=
reactive
([
...
@@ -352,11 +186,6 @@ const headers = reactive([
...
@@ -352,11 +186,6 @@ const headers = reactive([
prop
:
"
created_time
"
,
prop
:
"
created_time
"
,
minWidth
:
200
,
minWidth
:
200
,
},
},
{
label
:
"
是否启用
"
,
prop
:
"
state
"
,
width
:
80
,
},
{
{
label
:
"
操作
"
,
label
:
"
操作
"
,
prop
:
"
action
"
,
prop
:
"
action
"
,
...
@@ -393,57 +222,8 @@ const filter = reactive({
...
@@ -393,57 +222,8 @@ const filter = reactive({
page
:
1
,
page
:
1
,
limit
:
10
,
limit
:
10
,
});
});
const
deleteFlag
=
ref
(
false
);
const
deleteRowFlag
=
ref
(
false
);
const
resetFlag
=
ref
(
false
);
const
selectedRow
=
ref
({});
const
selected
=
ref
([]);
const
selectedName
=
ref
([]);
const
editFlag
=
ref
(
false
);
const
password_eye
=
ref
(
false
);
const
confirm_eye
=
ref
(
false
);
const
passwordRef
=
ref
(
null
);
const
passwordForm
=
reactive
({
password
:
""
,
confirm_password
:
""
,
});
const
search
=
ref
(
""
);
const
userInfo
=
computed
(()
=>
{
return
store
.
state
.
userInfo
;
});
const
validatePass
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
!==
passwordForm
.
password
)
{
callback
(
new
Error
(
"
密码输入不一致
"
));
}
else
{
callback
();
}
};
const
passwordFormRules
=
reactive
({
password
:
[
{
required
:
true
,
message
:
"
请输入密码
"
,
trigger
:
"
blur
"
},
{
min
:
8
,
message
:
"
密码长度不得低于8位
"
,
trigger
:
"
blur
"
},
],
confirm_password
:
[
{
required
:
true
,
message
:
"
请确认密码
"
,
trigger
:
"
blur
"
},
{
validator
:
validatePass
,
trigger
:
"
blur
"
},
],
});
const
addAccount
=
()
=>
{
const
search
=
ref
(
""
);
if
(
selectTreeDataType
.
value
===
1
)
{
router
.
push
({
path
:
"
/authority/organization/org-user
"
,
query
:
{
orgId
:
selectOrgNode
.
value
.
organization_id
,
},
});
}
else
{
router
.
push
({
path
:
"
/authority/organization/platform-user
"
,
});
}
};
const
changeSize
=
(
size
)
=>
{
const
changeSize
=
(
size
)
=>
{
filter
.
limit
=
size
;
filter
.
limit
=
size
;
...
@@ -492,7 +272,7 @@ const getDirectoryFromData = (data) => {
...
@@ -492,7 +272,7 @@ const getDirectoryFromData = (data) => {
name
:
data
.
name
,
name
:
data
.
name
,
data_type
:
0
,
data_type
:
0
,
};
};
axios
.
post
(
`/
apaas/system/v5
/org/add`
,
params
).
then
((
res
)
=>
{
axios
.
post
(
`/
v1/api
/org/add`
,
params
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
ElMessage
.
success
(
res
.
data
.
msg
);
ElMessage
.
success
(
res
.
data
.
msg
);
orgTree
.
value
.
getOrgTree
(
res
.
data
.
data
.
id
);
orgTree
.
value
.
getOrgTree
(
res
.
data
.
data
.
id
);
...
@@ -506,7 +286,7 @@ const getDirectoryFromData = (data) => {
...
@@ -506,7 +286,7 @@ const getDirectoryFromData = (data) => {
name
:
data
.
name
,
name
:
data
.
name
,
data_type
:
0
,
data_type
:
0
,
};
};
axios
.
put
(
`/
apaas/system/v5
/org/
${
actionTreeData
.
value
.
id
}
`
,
params
).
then
((
res
)
=>
{
axios
.
put
(
`/
v1/api
/org/
${
actionTreeData
.
value
.
id
}
`
,
params
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
ElMessage
.
success
(
res
.
data
.
msg
);
ElMessage
.
success
(
res
.
data
.
msg
);
orgTree
.
value
.
getOrgTree
(
actionTreeData
.
value
.
id
);
orgTree
.
value
.
getOrgTree
(
actionTreeData
.
value
.
id
);
...
@@ -536,11 +316,9 @@ const getOrgFormData = (data) => {
...
@@ -536,11 +316,9 @@ const getOrgFormData = (data) => {
name
:
data
.
name
,
name
:
data
.
name
,
organization_code
:
data
.
organization_code
,
organization_code
:
data
.
organization_code
,
description
:
data
.
description
,
description
:
data
.
description
,
attachment
:
data
.
attachment
&&
data
.
attachment
.
length
>
0
?
data
.
attachment
.
map
((
item
)
=>
item
.
url
).
join
(
"
,
"
)
:
""
,
data_type
:
1
,
data_type
:
1
,
};
};
axios
.
post
(
`/
apaas/system/v5
/org/add`
,
params
).
then
((
res
)
=>
{
axios
.
post
(
`/
v1/api
/org/add`
,
params
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
ElMessage
.
success
(
res
.
data
.
msg
);
ElMessage
.
success
(
res
.
data
.
msg
);
orgTree
.
value
.
getOrgTree
(
res
.
data
.
data
.
id
);
orgTree
.
value
.
getOrgTree
(
res
.
data
.
data
.
id
);
...
@@ -555,11 +333,9 @@ const getOrgFormData = (data) => {
...
@@ -555,11 +333,9 @@ const getOrgFormData = (data) => {
name
:
data
.
name
,
name
:
data
.
name
,
organization_code
:
data
.
organization_code
,
organization_code
:
data
.
organization_code
,
description
:
data
.
description
,
description
:
data
.
description
,
attachment
:
data
.
attachment
&&
data
.
attachment
.
length
>
0
?
data
.
attachment
.
map
((
item
)
=>
item
.
url
).
join
(
"
,
"
)
:
""
,
data_type
:
1
,
data_type
:
1
,
};
};
axios
.
put
(
`/
apaas/system/v5
/org/
${
actionTreeData
.
value
.
id
}
`
,
params
).
then
((
res
)
=>
{
axios
.
put
(
`/
v1/api
/org/
${
actionTreeData
.
value
.
id
}
`
,
params
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
ElMessage
.
success
(
res
.
data
.
msg
);
ElMessage
.
success
(
res
.
data
.
msg
);
orgTree
.
value
.
getOrgTree
(
actionTreeData
.
value
.
id
);
orgTree
.
value
.
getOrgTree
(
actionTreeData
.
value
.
id
);
...
@@ -577,7 +353,7 @@ const handleCloseDelNode = () => {
...
@@ -577,7 +353,7 @@ const handleCloseDelNode = () => {
//删除目录/组织
//删除目录/组织
const
confirmDelNode
=
()
=>
{
const
confirmDelNode
=
()
=>
{
axios
.
delete
(
`/
apaas/system/v5
/org/
${
actionTreeData
.
value
.
id
}
`
).
then
((
res
)
=>
{
axios
.
delete
(
`/
v1/api
/org/
${
actionTreeData
.
value
.
id
}
`
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
ElMessage
.
success
(
res
.
data
.
msg
);
ElMessage
.
success
(
res
.
data
.
msg
);
orgTree
.
value
.
getOrgTree
(
actionTreeData
.
value
.
id
===
selectTreeData
.
value
.
id
?
null
:
selectTreeData
.
value
.
id
);
orgTree
.
value
.
getOrgTree
(
actionTreeData
.
value
.
id
===
selectTreeData
.
value
.
id
?
null
:
selectTreeData
.
value
.
id
);
...
@@ -589,7 +365,7 @@ const confirmDelNode = () => {
...
@@ -589,7 +365,7 @@ const confirmDelNode = () => {
};
};
const
moveOrg
=
(
params
)
=>
{
const
moveOrg
=
(
params
)
=>
{
axios
.
put
(
`/
apaas/system/v5
/org/sort`
,
params
).
then
((
res
)
=>
{
axios
.
put
(
`/
v1/api
/org/sort`
,
params
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
ElMessage
.
success
(
res
.
data
.
msg
);
ElMessage
.
success
(
res
.
data
.
msg
);
orgTree
.
value
.
getOrgTree
(
selectTreeData
.
value
.
id
);
orgTree
.
value
.
getOrgTree
(
selectTreeData
.
value
.
id
);
...
@@ -615,9 +391,6 @@ const treeAction = (data) => {
...
@@ -615,9 +391,6 @@ const treeAction = (data) => {
level
:
data
.
data
.
value
.
p_organization_id
?
false
:
true
,
level
:
data
.
data
.
value
.
p_organization_id
?
false
:
true
,
organization_code
:
data
.
data
.
value
.
organization_code
,
organization_code
:
data
.
data
.
value
.
organization_code
,
description
:
data
.
data
.
value
.
description
,
description
:
data
.
data
.
value
.
description
,
attachment
:
data
.
data
.
value
.
attachment
.
split
(
"
,
"
).
map
((
i
)
=>
{
return
{
name
:
downloadFileFormatNew
(
i
),
url
:
i
};
}),
});
});
}
else
if
(
data
.
action
===
"
create
"
)
{
}
else
if
(
data
.
action
===
"
create
"
)
{
orgFormRef
.
value
.
setForm
({
p_organization_id
:
data
.
data
.
value
.
organization_id
});
orgFormRef
.
value
.
setForm
({
p_organization_id
:
data
.
data
.
value
.
organization_id
});
...
@@ -662,39 +435,23 @@ const getTableRows = () => {
...
@@ -662,39 +435,23 @@ const getTableRows = () => {
let
params
=
{
let
params
=
{
...
filter
,
...
filter
,
organization_id
:
selectTreeData
.
value
.
organization_id
,
organization_id
:
selectTreeData
.
value
.
organization_id
,
data_type
:
selectTreeData
.
value
.
data_type
,
};
};
axios
axios
.
get
(
`/
apaas/system/v5
/org/detail`
,
{
.
get
(
`/
v1/api
/org/detail`
,
{
params
,
params
,
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
tableRows
.
value
=
(
res
.
data
.
data
.
org_users
.
data
||
[]).
map
((
item
)
=>
{
tableRows
.
value
=
(
(
res
.
data
.
data
&&
res
.
data
.
data
.
org_users
.
data
)
||
[]).
map
((
item
)
=>
{
item
.
system_role
=
item
.
system_role
?
item
.
system_role
.
join
(
"
、
"
)
:
"
-
"
;
item
.
system_role
=
item
.
system_role
?
item
.
system_role
.
join
(
"
、
"
)
:
"
-
"
;
return
item
;
return
item
;
});
});
tableRows
.
value
.
forEach
((
e
)
=>
{
tableTotal
.
value
=
(
res
.
data
.
data
&&
res
.
data
.
data
.
org_users
.
total
)
||
0
;
if
(
e
.
is_admin
==
4
&&
userInfo
.
value
.
is_admin
!=
4
)
{
baseInfo
[
0
].
value
=
(
res
.
data
.
data
&&
res
.
data
.
data
.
org_info
.
name
)
||
""
;
e
.
canSelect
=
1
;
baseInfo
[
1
].
value
=
(
res
.
data
.
data
&&
res
.
data
.
data
.
org_info
.
organization_code
)
||
""
;
}
else
{
baseInfo
[
2
].
value
=
(
res
.
data
.
data
&&
res
.
data
.
data
.
org_info
.
description
)
||
""
;
e
.
canSelect
=
0
;
baseInfo
[
3
].
value
=
(
res
.
data
.
data
&&
res
.
data
.
data
.
org_info
.
platform_users_number
)
||
""
;
}
baseInfo
[
4
].
value
=
(
res
.
data
.
data
&&
res
.
data
.
data
.
org_info
.
created_time
)
||
""
;
});
tableTotal
.
value
=
res
.
data
.
data
.
org_users
.
total
;
if
(
params
.
data_type
===
1
)
{
baseInfo
[
0
].
value
=
res
.
data
.
data
.
org_info
.
organization_type
;
baseInfo
[
1
].
value
=
res
.
data
.
data
.
org_info
.
organization_code
;
baseInfo
[
2
].
value
=
res
.
data
.
data
.
org_info
.
name
;
baseInfo
[
3
].
value
=
res
.
data
.
data
.
org_info
.
created_time
;
baseInfo
[
4
].
value
=
res
.
data
.
data
.
org_info
.
org_admin_number
;
baseInfo
[
5
].
value
=
res
.
data
.
data
.
org_info
.
business_system_number
;
}
else
{
baseInfo2
[
0
].
value
=
res
.
data
.
data
.
org_info
.
name
;
baseInfo2
[
1
].
value
=
res
.
data
.
data
.
org_info
.
organization_code
;
baseInfo2
[
2
].
value
=
res
.
data
.
data
.
org_info
.
platform_users_number
;
}
console
.
log
(
baseInfo
);
}
else
{
}
else
{
ElMessage
.
error
(
res
.
data
.
data
);
ElMessage
.
error
(
res
.
data
.
data
);
}
}
...
@@ -713,157 +470,6 @@ const goDetail = (params) => {
...
@@ -713,157 +470,6 @@ const goDetail = (params) => {
},
},
});
});
};
};
const
stateChange
=
(
row
)
=>
{
if
(
row
.
is_admin
==
4
)
{
return
;
}
const
state
=
row
.
state
.
toString
();
axios
.
post
(
`/apaas/system/v5/user/state/
${
row
.
id
}
/
${
state
}
`
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
ElMessage
.
success
(
res
.
data
.
msg
);
getTableRows
();
}
else
{
ElMessage
.
error
(
res
.
data
.
data
);
row
.
state
=
row
.
state
==
0
?
1
:
0
;
}
});
};
const
editPsdAccount
=
(
data
)
=>
{
selectedRow
.
value
=
data
;
editFlag
.
value
=
true
;
};
const
handleCloseEdit
=
()
=>
{
if
(
!
passwordRef
)
return
;
passwordRef
.
value
.
resetFields
();
editFlag
.
value
=
false
;
};
const
editConfirm
=
()
=>
{
if
(
!
passwordRef
)
return
;
passwordRef
.
value
.
validate
((
valid
,
fields
)
=>
{
if
(
valid
)
{
axios
.
post
(
`/apaas/system/v5/user/editpwd`
,
{
id
:
selectedRow
.
value
.
id
,
password
:
CryptoJS
.
AES
.
encrypt
(
passwordForm
.
password
,
"
swuE9cmCZQwrkYRV
"
).
toString
(),
})
.
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
ElMessage
.
success
(
res
.
data
.
msg
);
}
else
{
ElMessage
.
error
(
res
.
data
.
data
);
}
handleCloseEdit
();
});
}
});
};
const
deleteAccount
=
(
data
)
=>
{
if
(
data
.
state
===
0
)
{
selectedRow
.
value
=
data
;
deleteRowFlag
.
value
=
true
;
}
else
{
ElMessage
.
error
(
"
当前状态已启用,不可删除!
"
);
}
};
const
handleCloseRowDelete
=
()
=>
{
deleteRowFlag
.
value
=
false
;
};
const
deleteRowConfirm
=
()
=>
{
axios
.
delete
(
`/apaas/system/v5/user/delete`
,
{
data
:
{
ids
:
[
selectedRow
.
value
.
id
]
}
}).
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
ElMessage
.
success
(
res
.
data
.
msg
);
getTableRows
();
}
else
{
ElMessage
.
error
(
res
.
data
.
data
);
}
handleCloseRowDelete
();
});
};
const
editAccount
=
(
data
)
=>
{
if
(
selectTreeDataType
.
value
===
1
)
{
router
.
push
({
path
:
"
/authority/organization/org-user/edit
"
,
query
:
{
id
:
data
.
id
,
orgId
:
selectOrgNode
.
value
.
organization_id
,
},
});
}
else
{
router
.
push
({
path
:
"
/authority/organization/platform-user/edit
"
,
query
:
{
id
:
data
.
id
,
},
});
}
};
const
handleCloseDelete
=
()
=>
{
deleteFlag
.
value
=
false
;
};
const
deleteConfirm
=
()
=>
{
const
ids
=
selected
.
value
.
map
((
item
)
=>
item
.
id
);
axios
.
delete
(
`/apaas/system/v5/user/delete`
,
{
data
:
{
ids
:
ids
}
}).
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
ElMessage
.
success
(
res
.
data
.
msg
);
getTableRows
();
}
else
{
ElMessage
.
error
(
res
.
data
.
data
);
}
handleCloseDelete
();
});
};
const
deleteBatch
=
()
=>
{
if
(
selectedName
.
value
.
length
>
0
)
{
deleteFlag
.
value
=
true
;
}
else
{
ElMessage
.
error
(
"
请先选择需要操作的数据!
"
);
}
};
const
handleCloseReset
=
()
=>
{
resetFlag
.
value
=
false
;
};
const
resetPsd
=
()
=>
{
if
(
selectedName
.
value
.
length
>
0
)
{
resetFlag
.
value
=
true
;
}
else
{
ElMessage
.
error
(
"
请先选择需要操作的数据!
"
);
}
};
const
resetConfirm
=
()
=>
{
const
ids
=
selected
.
value
.
map
((
item
)
=>
item
.
id
);
axios
.
post
(
`/apaas/system/v5/user/resetpwd`
,
{
ids
:
ids
}).
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
ElMessage
.
success
(
res
.
data
.
msg
);
getTableRows
();
}
else
{
ElMessage
.
error
(
res
.
data
.
data
);
}
handleCloseReset
();
});
};
const
selectRows
=
(
data
)
=>
{
selected
.
value
=
data
.
selection
;
selectedName
.
value
=
data
.
selection
.
map
((
item
)
=>
item
.
system_account
);
};
const
clearSelected
=
()
=>
{
dataTable
.
value
.
clearTable
();
};
onBeforeMount
(()
=>
{});
onBeforeMount
(()
=>
{});
</
script
>
</
script
>
...
...
src/page/main/authority/organization/org-detail/index.vue
View file @
2239de58
...
@@ -149,7 +149,7 @@ const formatFile = (url) => {
...
@@ -149,7 +149,7 @@ const formatFile = (url) => {
const
getDetail
=
()
=>
{
const
getDetail
=
()
=>
{
axios
axios
.
get
(
`/
apaas/system/v5
/org/detail?organization_id=
${
route
.
query
.
id
}
&key_word=&state=&limit=&page=&data_type=1`
)
.
get
(
`/
v1/api
/org/detail?organization_id=
${
route
.
query
.
id
}
&key_word=&state=&limit=&page=&data_type=1`
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
const
detail
=
res
.
data
.
data
.
org_info
;
const
detail
=
res
.
data
.
data
.
org_info
;
...
...
src/page/main/authority/organization/org-form.vue
View file @
2239de58
...
@@ -22,16 +22,6 @@
...
@@ -22,16 +22,6 @@
<el-form-item
label=
"组织介绍"
prop=
"description"
>
<el-form-item
label=
"组织介绍"
prop=
"description"
>
<el-input
type=
"textarea"
:rows=
"3"
v-model=
"orgForm.description"
maxlength=
"300"
show-word-limit
/>
<el-input
type=
"textarea"
:rows=
"3"
v-model=
"orgForm.description"
maxlength=
"300"
show-word-limit
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"组织附件"
prop=
"logo"
>
<bg-upload
v-model=
"orgForm.attachment"
customTips
:limit=
"3"
:fileTypes=
"['zip', 'rar', 'doc', 'docx', 'xlsx', 'xls', 'png', 'jpg']"
:otherInfo=
"'最多可上传三个附件,可上传zip,rar,doc,docx,xlsx,xls,png,jpg,可上传营业执照和相关协议文件等'"
>
<span>
将文件拖到此处,或 点击上传
</span>
</bg-upload>
</el-form-item>
</el-form>
</el-form>
</
template
>
</
template
>
...
@@ -51,7 +41,6 @@ const orgForm = reactive({
...
@@ -51,7 +41,6 @@ const orgForm = reactive({
name
:
""
,
name
:
""
,
organization_code
:
""
,
organization_code
:
""
,
description
:
""
,
description
:
""
,
attachment
:
[],
});
});
const
checkCode
=
(
rule
,
value
,
callback
)
=>
{
const
checkCode
=
(
rule
,
value
,
callback
)
=>
{
...
@@ -115,7 +104,7 @@ const treeProps = {
...
@@ -115,7 +104,7 @@ const treeProps = {
disabled
:
"
disabled
"
,
disabled
:
"
disabled
"
,
};
};
const
getOrgTree
=
()
=>
{
const
getOrgTree
=
()
=>
{
axios
.
get
(
`/
apaas/system/v5
/org/tree`
).
then
((
res
)
=>
{
axios
.
get
(
`/
v1/api
/org/tree`
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
const
orgDataTemp
=
res
.
data
.
data
||
[];
const
orgDataTemp
=
res
.
data
.
data
||
[];
orgDataTemp
.
shift
();
orgDataTemp
.
shift
();
...
...
src/page/main/authority/organization/org-user/org-account-form.vue
View file @
2239de58
...
@@ -198,7 +198,7 @@ const treeProps = {
...
@@ -198,7 +198,7 @@ const treeProps = {
value
:
"
organization_id
"
,
value
:
"
organization_id
"
,
};
};
const
getOrgTree
=
()
=>
{
const
getOrgTree
=
()
=>
{
axios
.
get
(
`/
apaas/system/v5
/org/tree`
).
then
((
res
)
=>
{
axios
.
get
(
`/
v1/api
/org/tree`
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
orgData
.
value
=
res
.
data
.
data
||
[];
orgData
.
value
=
res
.
data
.
data
||
[];
}
else
{
}
else
{
...
...
src/page/main/authority/organization/platform-user/index.vue
View file @
2239de58
...
@@ -211,7 +211,7 @@ const cancel = () => {
...
@@ -211,7 +211,7 @@ const cancel = () => {
};
};
const
getOrgTree
=
()
=>
{
const
getOrgTree
=
()
=>
{
axios
.
get
(
`/
apaas/system/v5
/org/tree`
).
then
((
res
)
=>
{
axios
.
get
(
`/
v1/api
/org/tree`
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
orgId
.
value
=
res
.
data
.
data
[
0
].
organization_id
;
orgId
.
value
=
res
.
data
.
data
[
0
].
organization_id
;
}
else
{
}
else
{
...
...
src/page/main/authority/organization/tree.vue
View file @
2239de58
...
@@ -20,10 +20,7 @@
...
@@ -20,10 +20,7 @@
@click.stop="showAction($event, data, node)">
@click.stop="showAction($event, data, node)">
<bg-icon
class=
"tree-more"
icon=
"#bg-ic-s-more"
></bg-icon>
<bg-icon
class=
"tree-more"
icon=
"#bg-ic-s-more"
></bg-icon>
</span>
</span>
<span
<span
v-else
class=
"tree-action-box"
@
click.stop=
"showAction($event, data, node)"
>
v-else
class=
"tree-action-box"
@
click.stop=
"showAction($event, data, node)"
>
<bg-icon
class=
"tree-more"
icon=
"#bg-ic-s-more"
></bg-icon>
<bg-icon
class=
"tree-more"
icon=
"#bg-ic-s-more"
></bg-icon>
</span>
</span>
</div>
</div>
...
@@ -141,8 +138,8 @@
...
@@ -141,8 +138,8 @@
</template>
</template>
<
script
setup
>
<
script
setup
>
import
{
re
active
,
toRefs
,
ref
,
computed
,
onBeforeMount
,
onBeforeUnmount
,
watch
,
nextTick
}
from
"
vue
"
;
import
{
re
f
,
onBeforeMount
,
onBeforeUnmount
,
nextTick
}
from
"
vue
"
;
import
{
useRoute
,
useRouter
}
from
"
vue-router
"
;
import
{
useRoute
}
from
"
vue-router
"
;
import
axios
from
"
@/request/http.js
"
;
import
axios
from
"
@/request/http.js
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
const
route
=
useRoute
();
const
route
=
useRoute
();
...
@@ -174,10 +171,9 @@ const defaultProps = {
...
@@ -174,10 +171,9 @@ const defaultProps = {
};
};
const
getOrgTree
=
(
data
)
=>
{
const
getOrgTree
=
(
data
)
=>
{
axios
.
get
(
`/
apaas/system/v5
/org/tree`
).
then
((
res
)
=>
{
axios
.
get
(
`/
v1/api
/org/tree`
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
orgData
.
value
=
res
.
data
.
data
||
[];
orgData
.
value
=
res
.
data
.
data
||
[];
console
.
log
(
route
.
query
.
id
);
if
(
route
.
query
.
id
)
{
if
(
route
.
query
.
id
)
{
searchItem
(
orgData
.
value
,
route
.
query
.
id
);
searchItem
(
orgData
.
value
,
route
.
query
.
id
);
data
=
selectNodeObj
.
value
;
data
=
selectNodeObj
.
value
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment