Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
Project
Project
Details
Activity
Releases
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
罗超
confucius
Commits
57dd65aa
Commit
57dd65aa
authored
Aug 06, 2021
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
c8b340af
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
273 additions
and
21 deletions
+273
-21
wechat.js
src/api/system/wechat.js
+55
-21
groupingManage.vue
src/pages/enterprise/groupingManage.vue
+218
-0
No files found.
src/api/system/wechat.js
View file @
57dd65aa
...
...
@@ -16,33 +16,67 @@ export function getWeChatConfigInfo(data) {
* 获取网站导航分页
*
*/
export
function
setWeChatConfig
(
data
)
{
return
request
({
url
:
'/QYWeChat/SetWeChatConfig'
,
method
:
'post'
,
data
})
}
export
function
setWeChatConfig
(
data
)
{
return
request
({
url
:
'/QYWeChat/SetWeChatConfig'
,
method
:
'post'
,
data
})
}
/**
* 初始化 同步部门至企业微信
*
*/
export
function
setSyncEduDepartment
(
data
)
{
return
request
({
url
:
'/QYWeChat/SetSyncEduDepartment'
,
method
:
'post'
,
data
})
}
export
function
setSyncEduDepartment
(
data
)
{
return
request
({
url
:
'/QYWeChat/SetSyncEduDepartment'
,
method
:
'post'
,
data
})
}
/**
* 初始化 同步员工至企业微信
*
*/
export
function
SetSynvEduEmployee
(
data
)
{
return
request
({
url
:
'/QYWeChat/SetSynvEduEmployee'
,
method
:
'post'
,
data
})
}
\ No newline at end of file
export
function
SetSynvEduEmployee
(
data
)
{
return
request
({
url
:
'/QYWeChat/SetSynvEduEmployee'
,
method
:
'post'
,
data
})
}
/**
* 分组管理 素材分组分页列表
*
*/
export
function
getWeChatMediumGroupPageList
(
data
)
{
return
request
({
url
:
'/QYWeChat/GetWeChatMediumGroupPageList'
,
method
:
'post'
,
data
})
}
/**
* 分组管理 新增修改分组
*
*/
export
function
setWeChatMediumGroup
(
data
)
{
return
request
({
url
:
'/QYWeChat/SetWeChatMediumGroup'
,
method
:
'post'
,
data
})
}
/**
* 分组管理 新增修改分组
*
*/
export
function
delWeChatMediumGroup
(
data
)
{
return
request
({
url
:
'/QYWeChat/DelWeChatMediumGroup'
,
method
:
'post'
,
data
})
}
\ No newline at end of file
src/pages/enterprise/groupingManage.vue
View file @
57dd65aa
<
template
>
<div
class=
"page-body"
>
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col-3"
>
<q-input
@
input=
"resetSearch"
clearable
standout=
"bg-primary text-white"
v-model=
"msg.Name"
label=
"分组名称"
@
clear=
"resetSearch"
maxlength=
"20"
/>
</div>
</div>
</div>
<div
class=
"page-content"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table"
separator=
"none"
:data=
"dataList"
:columns=
"columns"
>
<template
v-slot:top=
"props"
>
<div
class=
"col-2 q-table__title"
>
分组列表
</div>
<q-space
/>
<div
class=
"page-option"
>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
icon=
"add"
label=
"新增分组"
@
click=
"EditCategory(null)"
/>
</div>
</
template
>
<
template
v-slot:body-cell-CateId=
"props"
>
<q-td
:props=
"props"
>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"编辑"
@
click=
"EditCategory(props.row)"
/>
<q-btn
flat
size=
"xs"
icon=
"delete"
color=
"negative"
style=
"font-weight:400;"
label=
"删除"
@
click=
"deleteCategory(props.row)"
/>
</q-td>
</
template
>
<
template
v-slot:bottom
>
<q-pagination
class=
"full-width justify-end"
v-model=
"msg.PageIndex"
color=
"primary"
:max=
"msg.PageCount"
:input=
"true"
@
input=
"changePage"
/>
</
template
>
</q-table>
</div>
<q-dialog
v-model=
"isShow"
persistent
>
<q-card
style=
"width: 520px; max-width: 80vw;"
>
<q-card-section>
<div
class=
"text-h6"
>
新增分组
</div>
</q-card-section>
<q-separator
/>
<q-card-section
class=
"q-pt-none"
style=
"margin-top: 15px;padding: 20px;"
>
<q-input
filled
clearable
standout=
"bg-primary text-white"
v-model=
"addMsg.Name"
label=
"分组名称"
:rules=
"[val => !!val || '请输入分组名称']"
ref=
"Name"
/>
<q-input
filled
clearable
standout=
"bg-primary text-white"
v-model=
"addMsg.Sort"
label=
"分组排序"
style=
"margin-top: 20px;"
:rules=
"[val => !!val || '请输入分组排序']"
ref=
"Sort"
/>
</q-card-section>
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
class=
"q-mr-md"
label=
"取消"
@
click=
"isShow = false"
/>
<q-btn
color=
"accent"
class=
"q-mr-md"
label=
"确定"
@
click=
"submit()"
/>
</q-card-actions>
</q-card>
</q-dialog>
</div>
</template>
<
script
>
import
{
getWeChatMediumGroupPageList
,
setWeChatMediumGroup
,
delWeChatMediumGroup
}
from
'../../api/system/wechat'
;
const
addobj
=
{
Id
:
0
,
Name
:
''
,
Sort
:
1
}
export
default
{
meta
:
{
title
:
"分组管理"
},
data
()
{
return
{
msg
:
{
PageIndex
:
1
,
PageSize
:
10
,
rowsPerPage
:
15
,
Name
:
""
,
//系列名称
},
currentUrl
:
""
,
dataList
:
[],
keyWords
:
''
,
isShow
:
false
,
loading
:
true
,
columns
:
[{
name
:
'Id'
,
label
:
'ID'
,
field
:
'Id'
,
align
:
'left'
},
{
name
:
'Sort'
,
label
:
'排序'
,
field
:
'Sort'
,
align
:
'left'
},
{
name
:
'Name'
,
label
:
'分组名称'
,
field
:
'Name'
,
align
:
'center'
},
{
name
:
'UpdateByName'
,
label
:
'创建人'
,
field
:
'UpdateByName'
,
align
:
'center'
},
{
name
:
'UpdateTime'
,
label
:
'创建时间'
,
field
:
'UpdateTime'
,
align
:
'center'
},
{
name
:
'CateId'
,
label
:
'操作'
,
field
:
'CateId'
}
],
addMsg
:
Object
.
assign
({},
addobj
)
}
},
mounted
()
{
this
.
getcategorypage
()
},
methods
:
{
//重新查询
resetSearch
()
{
this
.
msg
.
PageIndex
=
1
;
this
.
getcategorypage
();
},
changePage
(
val
)
{
this
.
msg
.
PageIndex
=
val
;
this
.
getcategorypage
()
},
//删除系列
deleteCategory
(
item
)
{
let
delMsg
=
{
MediumId
:
item
.
Id
,
};
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
'是否确定删除该分组?'
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
delWeChatMediumGroup
(
delMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'删除成功!'
,
position
:
'top'
})
this
.
getcategorypage
();
}
})
}).
onCancel
(()
=>
{
});
},
//刷新页面
refreshPage
()
{
this
.
getcategorypage
();
},
//获取课程系列分页列表
getcategorypage
()
{
this
.
loading
=
true
;
getWeChatMediumGroupPageList
(
this
.
msg
).
then
(
res
=>
{
this
.
loading
=
false
;
this
.
dataList
=
res
.
Data
.
PageData
;
this
.
msg
.
PageCount
=
res
.
Data
.
PageCount
})
},
//新增修改课程系列
EditCategory
(
obj
)
{
if
(
obj
)
{
this
.
addMsg
.
Id
=
obj
.
Id
this
.
addMsg
.
Name
=
obj
.
Name
this
.
addMsg
.
Sort
=
obj
.
Sort
}
else
{
this
.
addMsg
=
Object
.
assign
({},
addobj
)
}
this
.
isShow
=
true
;
},
submit
()
{
this
.
$refs
.
Name
.
validate
();
this
.
$refs
.
Sort
.
validate
();
if
(
!
this
.
$refs
.
Name
.
hasError
&&
!
this
.
$refs
.
Sort
.
hasError
)
{
setWeChatMediumGroup
(
this
.
addMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'数据保存成功!'
,
position
:
'top'
})
this
.
resetSearch
()
this
.
isShow
=
false
;
}
})
}
}
}
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
\ No newline at end of file
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