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
06d943e3
Commit
06d943e3
authored
Aug 20, 2021
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
标签处理
parent
2a921c99
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
122 additions
and
68 deletions
+122
-68
App.vue
src/App.vue
+1
-1
wechat.js
src/api/system/wechat.js
+12
-0
customerLabel.vue
src/pages/enterprise/customerLabel.vue
+109
-67
No files found.
src/App.vue
View file @
06d943e3
...
...
@@ -20,7 +20,7 @@ export default {
</
script
>
<
style
>
@import
url("//at.alicdn.com/t/font_2077629_
yt6s3mpdrdj
.css")
;
@import
url("//at.alicdn.com/t/font_2077629_
ltga4el15kc
.css")
;
.q-scrollarea__thumb
{
z-index
:
999999
!important
;
}
...
...
src/api/system/wechat.js
View file @
06d943e3
...
...
@@ -318,6 +318,18 @@ export function SetSynvEduEmployee(data) {
})
}
/**
* 初始化同步企业微信标签
*
*/
export
function
setSyncWeChatLable
(
data
)
{
return
request
({
url
:
'/QYWeChat/SetSyncWeChatLable'
,
method
:
'post'
,
data
})
}
...
...
src/pages/enterprise/customerLabel.vue
View file @
06d943e3
...
...
@@ -18,6 +18,11 @@
<template
v-slot:top=
"props"
>
<div
class=
"col-2 q-table__title"
></div>
<q-space
/>
<q-btn
color=
"accent"
style=
"float:right;margin-right:10px;"
size=
"sm"
class=
"q-mr-md"
@
click=
"synchronisation()"
>
<i
class=
"iconfont icon-tongbu"
></i>
<div
style=
"margin-left: 5px;"
>
同步企业微信标签
</div>
</q-btn>
<q-btn
color=
"accent"
style=
"float:right;margin-right:0;"
size=
"sm"
class=
"q-mr-md"
icon=
"add"
label=
"添加标签组"
@
click=
"EditCategory()"
></q-btn>
</
template
>
...
...
@@ -36,22 +41,25 @@
<q-td
:props=
"props"
>
<div
style=
"display: flex;flex-wrap: wrap;max-width: 1200px;"
>
<div
v-for=
"(x,y) in props.row.ChildList"
:key=
'y'
style=
"margin: 5px;"
>
<q-btn-group
>
<q-btn-dropdown
auto-close
rounded
:label=
"x.Name"
split
>
<!-- dropdown content goes here -->
<q-list
padding
style=
"width: 100px;display: flex;align-items: center;background-color: #3FC4FF;justify-content: center;"
>
<!--
<q-btn
flat
style=
"color: #3FC4FF"
icon=
"edit"
@
click=
"getParent(x,2)"
size=
"xs"
/>
<q-btn-group>
<q-btn-dropdown
auto-close
rounded
:label=
"x.Name"
split
>
<!-- dropdown content goes here -->
<q-list
padding
style=
"width: 100px;display: flex;align-items: center;background-color: #3FC4FF;justify-content: center;"
>
<!--
<q-btn
flat
style=
"color: #3FC4FF"
icon=
"edit"
@
click=
"getParent(x,2)"
size=
"xs"
/>
<q-btn
flat
style=
"color: #FF0080"
icon=
"delete"
@
click=
"goDetailed(x)"
size=
"xs"
/>
-->
<q-btn
flat
style=
"color: white"
icon=
"edit"
@
click=
"getParent(x,2)"
size=
"xs"
/>
<q-btn
flat
style=
"color: white"
icon=
"delete"
@
click=
"goDetailed(x)"
size=
"xs"
/>
</q-list>
</q-btn-dropdown>
</q-btn-group>
<q-btn
flat
style=
"color: white"
icon=
"edit"
@
click=
"getParent(x,2)"
size=
"xs"
/>
<q-btn
flat
style=
"color: white"
icon=
"delete"
@
click=
"goDetailed(x)"
size=
"xs"
/>
</q-list>
</q-btn-dropdown>
</q-btn-group>
</div>
<q-btn
flat
size=
"sm"
icon=
"add"
style=
"font-weight:400;color: #3FC4FF;margin-top: 10px;"
label=
"添加标签"
@
click=
"getParent(props.row,3)"
/>
label=
"添加标签"
@
click=
"getParent(props.row,3)"
/>
</div>
</q-td>
...
...
@@ -92,12 +100,12 @@
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
v-for=
"(x,y) in addMsg.ChildList"
:key=
'y'
style=
"margin-top: 0px;"
>
<div
class=
"col-7"
>
<q-input
filled
clearable
standout=
"bg-primary text-white"
v-model=
"x.Name"
label=
"输入标签名称"
maxlength=
"20"
/>
<q-input
filled
clearable
standout=
"bg-primary text-white"
v-model=
"x.Name"
label=
"输入标签名称"
maxlength=
"20"
/>
</div>
<div
class=
"col-3"
>
<q-input
filled
standout=
"bg-primary text-white"
v-model=
"x.Sort"
label=
"输入排序"
maxlength=
"20"
type=
"number"
/>
<q-input
filled
standout=
"bg-primary text-white"
v-model=
"x.Sort"
label=
"输入排序"
maxlength=
"20"
type=
"number"
/>
</div>
<div
class=
"col-2"
>
<q-btn
flat
icon=
"delete"
color=
"negative"
class=
"q-mr-xs"
label=
""
...
...
@@ -112,7 +120,7 @@
<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()"
:loading=
"btnloading"
/>
<q-btn
color=
"accent"
class=
"q-mr-md"
label=
"确定"
@
click=
"submit()"
:loading=
"btnloading"
/>
</q-card-actions>
</q-card>
</q-dialog>
...
...
@@ -125,7 +133,7 @@
<q-btn
icon=
"close"
flat
round
dense
v-close-popup
/>
</q-card-section>
<q-separator
/>
<q-card-section
class=
"q-pt-none"
style=
"margin-top: 15px;padding: 20px;"
>
<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=
"eName"
/>
...
...
@@ -136,7 +144,7 @@
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
class=
"q-mr-md"
label=
"取消"
@
click=
"isParent = false"
/>
<q-btn
color=
"accent"
class=
"q-mr-md"
label=
"确定"
@
click=
"submitParent()"
:loading=
"btnloading"
/>
<q-btn
color=
"accent"
class=
"q-mr-md"
label=
"确定"
@
click=
"submitParent()"
:loading=
"btnloading"
/>
</q-card-actions>
</q-card>
</q-dialog>
...
...
@@ -147,14 +155,19 @@
import
{
getWeChatLableList
,
setWeChatLable
,
delWeChatLable
delWeChatLable
,
setSyncWeChatLable
}
from
'../../api/system/wechat'
;
import
{
Loading
,
QSpinnerPie
}
from
'quasar'
const
addobj
=
{
Id
:
0
,
ParentId
:
0
,
Name
:
''
,
Sort
:
1
,
ChildList
:
[{
Name
:
''
,
Sort
:
0
,
}],
ChildList
:
[{
Name
:
''
,
Sort
:
1
,
}],
}
export
default
{
meta
:
{
...
...
@@ -200,7 +213,8 @@
],
addMsg
:
Object
.
assign
({},
addobj
),
edittype
:
1
,
edittype
:
1
,
isalladopt
:
true
,
}
},
...
...
@@ -261,10 +275,10 @@
//新增修改课程系列
EditCategory
()
{
this
.
addMsg
=
Object
.
assign
({},
addobj
)
this
.
addMsg
.
ChildList
=
[{
Name
:
''
,
Sort
:
0
,
}]
this
.
addMsg
.
ChildList
=
[{
Name
:
''
,
Sort
:
1
,
}]
this
.
isShow
=
true
;
},
isChildList
(){
isChildList
()
{
let
isName
=
false
;
let
issort
=
false
;
if
(
this
.
addMsg
.
ChildList
.
length
>
0
)
{
...
...
@@ -274,6 +288,7 @@
return
}
if
(
x
.
Sort
==
''
)
{
console
.
log
(
x
.
Sort
)
issort
=
true
;
return
}
...
...
@@ -285,6 +300,7 @@
message
:
`请填写标签名称`
,
position
:
'top'
})
this
.
isalladopt
=
false
return
}
if
(
issort
==
true
)
{
...
...
@@ -293,45 +309,49 @@
message
:
`请填写标签排序`
,
position
:
'top'
})
this
.
isalladopt
=
false
return
}
},
submit
()
{
this
.
isalladopt
=
true
this
.
$refs
.
Name
.
validate
();
this
.
$refs
.
Sort
.
validate
();
this
.
isChildList
()
if
(
!
this
.
$refs
.
Name
.
hasError
&&
!
this
.
$refs
.
Sort
.
hasError
)
{
this
.
setlable
(
this
.
addMsg
)
if
(
this
.
isalladopt
==
true
)
{
this
.
setlable
(
this
.
addMsg
)
}
}
},
submitParent
(){
this
.
$refs
.
eName
.
validate
();
this
.
$refs
.
eSort
.
validate
();
if
(
!
this
.
$refs
.
eName
.
hasError
&&
!
this
.
$refs
.
eSort
.
hasError
)
{
let
msg
if
(
this
.
edittype
==
1
){
msg
=
{
Id
:
this
.
addMsg
.
Id
,
Name
:
this
.
addMsg
.
Name
,
Sort
:
this
.
addMsg
.
Sort
,
}
}
else
{
msg
=
{
Name
:
this
.
addMsg
.
Name
,
Sort
:
this
.
addMsg
.
Sort
,
Id
:
this
.
addMsg
.
Id
,
ParentId
:
this
.
addMsg
.
ParentId
,
}
}
this
.
setlable
(
msg
)
submitParent
()
{
this
.
$refs
.
eName
.
validate
();
this
.
$refs
.
eSort
.
validate
();
if
(
!
this
.
$refs
.
eName
.
hasError
&&
!
this
.
$refs
.
eSort
.
hasError
)
{
let
msg
if
(
this
.
edittype
==
1
)
{
msg
=
{
Id
:
this
.
addMsg
.
Id
,
Name
:
this
.
addMsg
.
Name
,
Sort
:
this
.
addMsg
.
Sort
,
}
}
else
{
msg
=
{
Name
:
this
.
addMsg
.
Name
,
Sort
:
this
.
addMsg
.
Sort
,
Id
:
this
.
addMsg
.
Id
,
ParentId
:
this
.
addMsg
.
ParentId
,
}
}
this
.
setlable
(
msg
)
}
},
setlable
(
msg
)
{
this
.
btnloading
=
true
...
...
@@ -352,29 +372,51 @@
}
})
},
getParent
(
row
,
type
)
{
if
(
type
==
1
)
{
getParent
(
row
,
type
)
{
if
(
type
==
1
)
{
this
.
addMsg
=
JSON
.
parse
(
JSON
.
stringify
(
row
))
}
else
if
(
type
==
2
)
{
this
.
addMsg
=
{
ParentId
:
row
.
ParentId
,
Name
:
row
.
Name
,
Id
:
row
.
Id
,
Sort
:
row
.
Sort
,
}
else
if
(
type
==
2
)
{
this
.
addMsg
=
{
ParentId
:
row
.
ParentId
,
Name
:
row
.
Name
,
Id
:
row
.
Id
,
Sort
:
row
.
Sort
,
}
}
else
{
this
.
addMsg
=
{
ParentId
:
row
.
Id
,
Name
:
''
,
Id
:
0
,
Sort
:
'0
'
,
}
else
{
this
.
addMsg
=
{
ParentId
:
row
.
Id
,
Name
:
''
,
Id
:
0
,
Sort
:
'1
'
,
}
}
this
.
isParent
=
true
;
this
.
edittype
=
type
this
.
edittype
=
type
},
synchronisation
()
{
//同步
Loading
.
show
({
message
:
'数据正在同步中,请稍后进入企业微信查看'
,
spinner
:
QSpinnerPie
})
setSyncWeChatLable
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
that
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'操作成功'
,
position
:
'top'
})
Loading
.
hide
()
}
})
.
catch
(
err
=>
{
Loading
.
hide
()
})
},
}
}
...
...
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