Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-4
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
office
haoban-4
Commits
712713e3
Commit
712713e3
authored
Sep 07, 2020
by
caoyanzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 新建、编辑审核组
parent
ca64a9e6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
120 additions
and
5 deletions
+120
-5
index.html
public/index.html
+1
-0
review.js
src/api/review.js
+12
-0
audit-group-list.vue
src/views/review-center/audit-group-list.vue
+3
-1
create-audit-group.vue
src/views/review-center/create-audit-group.vue
+104
-4
No files found.
public/index.html
View file @
712713e3
...
@@ -28,5 +28,6 @@
...
@@ -28,5 +28,6 @@
<script
src=
"//web-1251519181.file.myqcloud.com/lib-4.0/axios/0.19.0/axios.min.js"
></script>
<script
src=
"//web-1251519181.file.myqcloud.com/lib-4.0/axios/0.19.0/axios.min.js"
></script>
<script
src=
"//web-1251519181.file.myqcloud.com/components/pagination.1.0.8.js"
></script>
<script
src=
"//web-1251519181.file.myqcloud.com/components/pagination.1.0.8.js"
></script>
<script
src=
"//web-1251519181.file.myqcloud.com/components/perm-button.1.0.0.js"
></script>
<script
src=
"//web-1251519181.file.myqcloud.com/components/perm-button.1.0.0.js"
></script>
<script
src=
"//web-1251519181.file.myqcloud.com/components/transfer.1.0.24.js"
></script>
</body>
</body>
</html>
</html>
src/api/review.js
View file @
712713e3
...
@@ -33,6 +33,18 @@ let api = {
...
@@ -33,6 +33,18 @@ let api = {
getAuditDetail
:
'/audit/batch-log-list'
,
// 同意详情
getAuditDetail
:
'/audit/batch-log-list'
,
// 同意详情
getAuditGroupList
:
'/auditGroup/audit-group-list'
,
// 获取审核组列表
getAuditGroupList
:
'/auditGroup/audit-group-list'
,
// 获取审核组列表
delAuditGroup
:
'/auditGroup/del-audit-group'
,
// 删除审核组
delAuditGroup
:
'/auditGroup/del-audit-group'
,
// 删除审核组
auditGroupDetail
:
'/auditGroup/audit-group-detail'
,
// 获取审核组详情
editAuditGroup
:
{
url
:
'/auditGroup/edit-audit-group'
,
method
:
'post'
,
useFormData
:
true
},
// 编辑审核组
addAuditGroup
:
{
url
:
'/auditGroup/add-audit-group'
,
method
:
'post'
,
useFormData
:
true
},
// 新增审核组
getAdminList
:
'/auditGroup/select-manager-list'
,
// 新建、编辑审核组-管理员列表
};
};
api
=
getFetch
(
api
,
'/hb-manage-web'
);
api
=
getFetch
(
api
,
'/hb-manage-web'
);
...
...
src/views/review-center/audit-group-list.vue
View file @
712713e3
...
@@ -31,11 +31,13 @@ export default {
...
@@ -31,11 +31,13 @@ export default {
};
};
},
},
created
()
{
created
()
{
const
haobanUser
=
JSON
.
parse
(
localStorage
.
getItem
(
'haoBanUser'
)
||
'{}'
);
this
.
wxEnterpriseId
=
haobanUser
.
wxEnterpriseId
;
this
.
getGroupList
();
this
.
getGroupList
();
},
},
methods
:
{
methods
:
{
getGroupList
()
{
getGroupList
()
{
getAuditGroupList
().
then
(
res
=>
{
getAuditGroupList
(
{
wxEnterpriseId
:
this
.
wxEnterpriseId
}
).
then
(
res
=>
{
this
.
groupList
=
res
.
result
||
[];
this
.
groupList
=
res
.
result
||
[];
});
});
},
},
...
...
src/views/review-center/create-audit-group.vue
View file @
712713e3
<
template
>
<
template
>
<div>
新建审核组
</div>
<el-form
:model=
"groupData"
:rules=
"groupDataRules"
ref=
"groupData"
label-width=
"110px"
class=
"group-detail"
>
<el-form-item
label=
"审核组名称"
prop=
"auditGroupName"
>
<el-input
placeholder=
"请输入内容"
maxlength=
"20"
show-word-limit
style=
"width: 481px"
v-model
.
trim=
"groupData.auditGroupName"
></el-input>
</el-form-item>
<el-form-item
label=
"选择管理员"
prop=
"auditPerson"
>
<dm-transfer
v-model=
"groupData.auditPerson"
:titles=
"['全选', '已选']"
:button-texts=
"['移除', '转入']"
:props=
"
{label: 'staffName', key: 'staffId'}"
:data="adminList">
</dm-transfer>
</el-form-item>
<el-form-item
style=
"margin-top: 50px"
>
<el-button
type=
"primary"
:loading=
"loading"
@
click=
"onSave"
>
{{
groupData
.
auditGroupId
?
'保存'
:
'确认新建'
}}
</el-button>
</el-form-item>
</el-form>
</
template
>
</
template
>
<
script
>
<
script
>
import
fetch
from
'@/api/review'
;
const
{
auditGroupDetail
,
editAuditGroup
,
addAuditGroup
,
getAdminList
}
=
fetch
;
export
default
{
export
default
{
name
:
'CreateAuditGroup'
name
:
'CreateAuditGroup'
,
data
()
{
return
{
adminList
:
[],
groupData
:
{
auditGroupName
:
''
,
// 审核组名称
auditPerson
:
[],
// [{staffId:1111,staffName:"dsds",roleName:"sdd",roleId:sdsd}]
wxEnterpriseId
:
''
,
auditGroupId
:
''
},
groupDataRules
:
{
auditGroupName
:
[
{
required
:
true
,
message
:
'请输入审核组名称'
,
trigger
:
'blur'
}
],
auditPerson
:
[
{
required
:
true
,
message
:
'请选择管理员'
,
trigger
:
'blur'
}
]
}
};
},
created
()
{
const
{
auditGroupId
}
=
this
.
$route
.
query
;
const
haobanUser
=
JSON
.
parse
(
localStorage
.
getItem
(
'haoBanUser'
)
||
'{}'
);
this
.
groupData
.
wxEnterpriseId
=
haobanUser
.
wxEnterpriseId
;
if
(
auditGroupId
)
{
this
.
getGroupDetail
(
auditGroupId
);
}
this
.
getAdminList
();
},
methods
:
{
getAdminList
()
{
const
{
wxEnterpriseId
}
=
this
.
groupData
;
getAdminList
({
wxEnterpriseId
}).
then
(
res
=>
{
this
.
adminList
=
res
.
result
||
[];
});
},
getGroupDetail
(
auditGroupId
)
{
auditGroupDetail
({
auditGroupId
}).
then
(
res
=>
{
const
{
auditGroupName
,
auditGroupId
,
auditPerson
}
=
res
.
result
||
{};
Object
.
assign
(
this
.
groupData
,
{
auditGroupName
,
auditGroupId
});
if
(
Array
.
isArray
(
auditPerson
))
{
this
.
groupData
.
auditPerson
=
auditPerson
.
map
(
el
=>
el
.
staffId
);
}
});
},
// 新建、编辑受审组的保存
onSave
()
{
this
.
$refs
.
groupData
.
validate
(
vali
=>
{
if
(
!
vali
)
return
;
const
{
auditGroupName
,
auditPerson
,
auditGroupId
,
wxEnterpriseId
}
=
this
.
groupData
;
const
params
=
{
auditGroupName
,
wxEnterpriseId
,
auditPerson
:
[]
};
params
.
auditPerson
=
this
.
adminList
.
filter
(
el
=>
auditPerson
.
some
(
item
=>
item
==
el
.
staffId
));
params
.
auditPerson
=
JSON
.
stringify
(
params
.
auditPerson
);
this
.
loading
=
true
;
if
(
auditGroupId
)
{
params
.
auditGroupId
=
auditGroupId
;
editAuditGroup
(
params
).
then
(
succ
.
bind
(
this
,
'保存成功!'
)).
finally
(()
=>
this
.
loading
=
false
);
}
else
{
addAuditGroup
(
params
).
then
(
succ
.
bind
(
this
,
'新建成功!'
)).
finally
(()
=>
this
.
loading
=
false
);
}
function
succ
(
message
)
{
this
.
$message
.
success
(
message
);
this
.
$router
.
go
(
-
1
);
}
});
}
}
};
};
</
script
>
</
script
>
\ No newline at end of file
<
style
lang=
"less"
scoped
>
.group-detail
{
padding
:
30px
;
min-height
:
100%
;
background-color
:
#fff
;
}
/
deep
/
.el-transfer-panel__body
,
/
deep
/
.el-transfer-panel__list
{
height
:
264px
;
}
</
style
>
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