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
11103e1f
Commit
11103e1f
authored
Aug 18, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/luochao/confucius
parents
31dc42c0
e6f555f0
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1961 additions
and
4 deletions
+1961
-4
wechat.js
src/api/system/wechat.js
+26
-1
chaneelcode-form.vue
src/components/enterprise/chaneelcode-form.vue
+522
-0
choiceapproval.vue
src/components/enterprise/choiceapproval.vue
+210
-0
addchannelcode.vue
src/pages/enterprise/addchannelcode.vue
+867
-0
channelcodeList.vue
src/pages/enterprise/channelcodeList.vue
+324
-0
routes.js
src/router/routes.js
+10
-1
erpindex.js
src/utils/erpindex.js
+2
-2
No files found.
src/api/system/wechat.js
View file @
11103e1f
...
@@ -272,4 +272,29 @@ export function SetSynvEduEmployee(data) {
...
@@ -272,4 +272,29 @@ export function SetSynvEduEmployee(data) {
method
:
'post'
,
method
:
'post'
,
data
data
})
})
}
}
\ No newline at end of file
/**
* 删除分组/标签
*
*/
export
function
getWeChatChannelGroupList
(
data
)
{
return
request
({
url
:
'/QYWeChat/GetWeChatChannelGroupList'
,
method
:
'post'
,
data
})
}
/**
* 删除分组/标签
*
*/
export
function
getWeChatChannelPageList
(
data
)
{
return
request
({
url
:
'/QYWeChat/GetWeChatChannelPageList'
,
method
:
'post'
,
data
})
}
src/components/enterprise/chaneelcode-form.vue
0 → 100644
View file @
11103e1f
<
style
>
.editOrderDrawerTop
{
width
:
100%
;
height
:
50px
;
display
:
flex
;
justify-content
:
space-between
;
background-color
:
#f0f5fb
;
padding
:
5px
10px
;
align-items
:
center
;
}
.disableStatus
{
opacity
:
0.3
!important
;
cursor
:
auto
;
}
.imgstyle
{
width
:
100%
;
height
:
126px
;
border-radius
:
4px
;
}
.addDutyMain
{
display
:
inline-block
;
width
:
118px
;
height
:
118px
;
font-size
:
40px
;
border
:
1px
dashed
#d9d9d9
;
line-height
:
118px
;
}
.up-box
{
width
:
90px
;
height
:
90px
;
border
:
1px
dashed
#ccc
;
text-align
:
center
;
line-height
:
80px
;
font-size
:
50px
;
cursor
:
pointer
;
}
.chaneelcodeform
.el-date-editor.el-input
,
.chaneelcodeform
.el-date-editor.el-input__inner
{
width
:
140px
;
margin-right
:
10px
;
}
.el-popper
{
z-index
:
6001
!important
;
}
.chaneelcodeform
.ant-tag
{
display
:
inline-block
;
height
:
auto
;
margin-right
:
8px
;
padding
:
0
7px
;
font-size
:
12px
;
line-height
:
20px
;
white-space
:
nowrap
;
background
:
#fafafa
;
border
:
1px
solid
#d9d9d9
;
border-radius
:
2px
;
cursor
:
pointer
;
opacity
:
1
;
}
.chaneelcodeform
.ant-tag-has-color
{
color
:
#FFF
;
border
:
1px
solid
#1890ff
;
}
</
style
>
<
template
>
<div>
<q-dialog
v-model=
"IsShow"
persistent
>
<q-card
style=
"width: 800px; max-width: 80vw;"
class=
"chaneelcodeform"
>
<q-card-section
class=
"row items-center q-pb-none "
>
<div
class=
"text-h6"
>
添加企业成员
</div>
<q-space
/>
<q-btn
icon=
"close"
flat
round
dense
@
click=
"closeEditOrder"
/>
</q-card-section>
<q-separator
/>
<q-card-section
class=
"q-pt-none"
>
<div
style=
"width:100%;background: #fffbe6;padding: 20px;margin-top: 20px;"
>
<div>
1、系统默认生成一条每日24小时(00:00~00:00)数据,当时间点不在所新增的时段内,客户扫码后,添加的是“24小时”的企业成员。
</div>
<div>
2、因受官方限制,无法对动态部门的员工设置添加好友上限,只可针对指定活码成员进行设置。
</div>
</div>
<el-form
label-width=
"120px"
>
<el-form-item
label=
"固定时段:"
v-if=
"peopletype==1"
>
<div
v-for=
"(x,y) in addMsg "
:key=
"y"
style=
"display: flex;align-items: center;margin-top: 10px;"
>
<el-time-select
:disabled=
"y==0"
placeholder=
"起始时间"
v-model=
"x.SrartHours"
:picker-options=
"
{ start: '00:00', step: '01:00', end: '23:00', }">
</el-time-select>
<el-time-select
:disabled=
"y==0"
placeholder=
"结束时间"
v-model=
"x.EndHours"
:picker-options=
"
{ start: '00:00', step: '01:00', end: '23:00', minTime: x.SrartHours}">
</el-time-select>
<el-select
v-model=
"x.EmpId"
placeholder=
"请选择"
@
change=
"selectPersonnel(y)"
>
<el-option
filterable
v-for=
"item in Employeelist"
:key=
"item.Id"
:label=
"item.EmployeeName"
:value=
"item.Id"
>
</el-option>
</el-select>
<q-btn
flat
color=
"red"
v-if=
"y>0"
label=
"删除"
@
click=
"addMsg.splice(y,1)"
/>
</div>
<q-btn
flat
color=
"primary"
label=
"添加"
@
click=
"adddata()"
/>
</el-form-item>
<el-form-item
label=
"固定时段:"
v-if=
"peopletype==2"
>
<div
v-for=
"(x,y) in addMsg "
:key=
"y"
>
<div
style=
"display: flex;align-items: flex-start;margin-top: 10px;"
>
<el-time-select
:disabled=
"y==0"
placeholder=
"起始时间"
v-model=
"x.SrartHours"
:picker-options=
"
{ start: '00:00', step: '01:00', end: '23:00', }">
</el-time-select>
<el-time-select
:disabled=
"y==0"
placeholder=
"结束时间"
v-model=
"x.EndHours"
:picker-options=
"
{ start: '00:00', step: '01:00', end: '23:00', minTime: x.SrartHours}">
</el-time-select>
<div
style=
"max-width: 320px;"
>
<div>
<span
v-if=
"x.EmpList.length>0"
v-for=
"(item,index) in x.EmpList "
:key=
"index"
>
{{
item
.
DeptName
}}{{
x
.
EmpList
.
length
-
1
!=
index
?
'、'
:
''
}}
</span>
</div>
<el-button
@
click=
"outerVisible=true,outerindex=y,byval=x.EmpList"
>
选择企业成员
</el-button>
</div>
</div>
<div>
<selectTree
class=
"col-6 q-pb-lg q-pr-lg"
:treeData=
'DeptList'
style=
"margin-top: 10px;"
:defaultArray=
"x.returnString"
nodeKey=
"DeptId"
:multiple=
"true"
:defaultExpandAll=
"true"
labelKey=
"DeptName"
childrenKey=
"ChildList"
tipText=
"选择部门"
@
getChild=
"getChild($event,y)"
classStr=
"col-6 q-pr-lg q-pb-lg"
></selectTree>
</div>
<q-btn
flat
color=
"red"
v-if=
"y>0"
label=
"删除"
@
click=
"addMsg.splice(y,1)"
/>
</div>
<q-btn
flat
color=
"primary"
label=
"添加"
@
click=
"adddata()"
/>
</el-form-item>
<el-form-item
label=
"适用周期:"
>
<span
class=
"ant-tag"
:class=
"
{'ant-tag-has-color':item.chek}"
v-for="(item,index) in weekList" :key='index'
@click=" weekList[index].chek = !weekList[index].chek,$forceUpdate()"
:style="{background:item.chek?'#1890ff':'#FFF'}">
{{
item
.
Name
}}
</span>
</el-form-item>
</el-form>
</q-card-section>
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
class=
"q-mr-md"
label=
"取消"
@
click=
"closeEditOrder"
/>
<q-btn
color=
"accent"
class=
"q-mr-md"
label=
"确定"
@
click=
"saveOrderInfo()"
/>
</q-card-actions>
</q-card>
</q-dialog>
<choiceapproval
v-if=
"outerVisible"
@
close=
"getclose()"
@
success=
"getsuccess"
:byval=
'byval'
></choiceapproval>
</div>
</
template
>
<
script
>
import
{
setWeChatMediumInfo
,
//新增素材
}
from
'../../api/system/wechat'
;
import
selectMaterial
from
"./selectMaterial"
import
{
queryEmployee
}
from
'../../api/users/user'
import
choiceapproval
from
'./choiceapproval'
import
{
getDeptTree
}
from
'../../api/system/dept.js'
import
selectTree
from
'../../components/common/select-tree'
export
default
{
components
:
{
choiceapproval
,
//所有列表
selectTree
},
props
:
{
lsday
:
{
type
:
String
,
default
:
''
,
},
peopletype
:
{
type
:
String
,
default
:
1
,
},
lsweeklist
:
{
type
:
Array
,
default
:
[],
}
},
data
()
{
return
{
IsShow
:
true
,
Employeelist
:
[],
addMsg
:
[],
weekList
:
[{
Id
:
1
,
Name
:
'周一'
,
chek
:
false
},
{
Id
:
2
,
Name
:
'周二'
,
chek
:
false
},
{
Id
:
3
,
Name
:
'周三'
,
chek
:
false
},
{
Id
:
4
,
Name
:
'周四'
,
chek
:
false
},
{
Id
:
5
,
Name
:
'周五'
,
chek
:
false
},
{
Id
:
6
,
Name
:
'周六'
,
chek
:
false
},
{
Id
:
0
,
Name
:
'周日'
,
chek
:
false
}],
outerVisible
:
false
,
outerindex
:
0
,
byval
:[],
DeptList
:
[],
// 部门下拉
}
},
created
()
{
if
(
this
.
peopletype
==
1
)
{
//单人模式
this
.
addMsg
=
[
{
Id
:
0
,
Week
:
''
,
IsDefault
:
1
,
SrartHours
:
'00:00'
,
EndHours
:
"00:00"
,
EmpId
:
''
,
EmpName
:
''
,
}
]
}
else
{
this
.
addMsg
=
[
{
Id
:
0
,
Week
:
''
,
IsDefault
:
1
,
SrartHours
:
'00:00'
,
EndHours
:
"00:00"
,
EmpList
:
[],
DeptList
:
[],
returnString
:[],}
]
}
if
(
this
.
lsday
!=
''
)
{
//修改单独周几
this
.
weekList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
lsweeklist
))
this
.
addMsg
=
[]
this
.
weekList
.
map
(
x
=>
{
if
(
x
.
Id
==
this
.
lsday
)
{
this
.
addMsg
=
[]
this
.
addMsg
=
JSON
.
parse
(
JSON
.
stringify
(
x
.
lsMsg
));
setTimeout
(()
=>
{
if
(
this
.
peopletype
==
2
){
//修改时 处理部门的数据
let
that
=
this
for
(
let
i
=
0
;
i
<
that
.
addMsg
.
length
;
i
++
){
that
.
addMsg
[
i
].
returnString
=
[];
let
dplist
=
[]
that
.
addMsg
[
i
].
DeptList
.
forEach
(
j
=>
{
dplist
.
push
(
j
.
Id
)
})
that
.
addMsg
[
i
].
DeptList
=
dplist
that
.
addMsg
[
i
].
returnString
=
dplist
;
this
.
$forceUpdate
();
}
}
},
500
)
}
else
{
x
.
chek
=
false
}
})
}
this
.
queryEmployee
()
//单选
this
.
getDepartList
()
//部门下拉
},
mounted
()
{
},
watch
:
{
},
methods
:
{
//获取部门下拉数据
getDepartList
(
id
)
{
let
msg
=
{
School_Id
:
0
}
getDeptTree
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
DeptList
=
res
.
Data
;
}
})
},
adddata
()
{
if
(
this
.
peopletype
==
1
)
{
//单人模式
let
obj
=
{
Id
:
0
,
Week
:
''
,
IsDefault
:
2
,
SrartHours
:
''
,
EndHours
:
""
,
EmpId
:
''
,
EmpName
:
''
,
}
this
.
addMsg
.
push
(
obj
)
}
else
{
let
obj
=
{
Id
:
0
,
Week
:
''
,
IsDefault
:
2
,
SrartHours
:
''
,
EndHours
:
""
,
EmpList
:
[],
DeptList
:
[],
returnString
:[],}
this
.
addMsg
.
push
(
obj
)
}
},
//关闭弹窗
closeEditOrder
()
{
this
.
$emit
(
'close'
)
},
queryEmployee
()
{
//下拉人员列表
queryEmployee
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
Employeelist
=
res
.
Data
}
}).
catch
(()
=>
{
})
},
selectPersonnel
(
index
)
{
this
.
Employeelist
.
map
(
x
=>
{
//部门id带过去
if
(
x
.
Id
==
this
.
addMsg
[
index
].
EmpId
)
{
this
.
addMsg
[
index
].
EmpName
=
x
.
EmployeeName
;
return
}
})
},
saveOrderInfo
()
{
if
(
this
.
peopletype
==
1
)
{
let
isEmpId
=
false
;
let
isHours
=
false
;
this
.
addMsg
.
map
((
x
,
i
)
=>
{
if
(
i
>
0
)
{
if
(
x
.
SrartHours
==
''
||
x
.
EndHours
==
''
)
{
isHours
=
true
;
return
}
if
(
x
.
EmpId
==
''
)
{
isEmpId
=
true
;
return
}
}
else
{
if
(
x
.
EmpId
==
''
)
{
isEmpId
=
true
;
return
}
}
})
if
(
isHours
==
true
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
`请选择时间`
,
position
:
'top'
})
return
}
if
(
isEmpId
==
true
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
`请选择成员`
,
position
:
'top'
})
return
}
let
isweek
=
false
;
this
.
weekList
.
map
(
x
=>
{
if
(
x
.
chek
==
true
)
{
isweek
=
true
;
return
}
})
if
(
isweek
==
false
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
`请选择适用周期`
,
position
:
'top'
})
return
}
let
list
=
[];
// if (this.lsday == '') {
this
.
weekList
.
forEach
(
x
=>
{
if
(
x
.
chek
==
true
)
{
x
.
lsMsg
=
this
.
addMsg
}
else
{
this
.
lsweeklist
.
map
(
j
=>
{
if
(
x
.
Id
==
j
.
Id
)
{
x
.
lsMsg
=
j
.
lsMsg
?
JSON
.
parse
(
JSON
.
stringify
(
j
.
lsMsg
))
:
[];
x
.
chek
=
j
.
chek
return
}
})
}
list
.
push
(
x
)
})
// } else {// 只修改某一天的数据
// this.weekList.map(x => {
// if (x.Id == this.lsday) {
// x.lsMsg = this.addMsg
// return
// }
// })
// list = this.weekList
// }
this
.
$emit
(
'success'
,
this
.
addMsg
,
list
)
}
else
{
let
isEmpId
=
false
;
let
isHours
=
false
;
this
.
addMsg
.
map
((
x
,
i
)
=>
{
if
(
i
>
0
)
{
if
(
x
.
SrartHours
==
''
||
x
.
EndHours
==
''
)
{
isHours
=
true
;
return
}
if
(
x
.
EmpList
.
length
==
0
&&
x
.
DeptList
.
length
==
0
)
{
isEmpId
=
true
;
return
}
}
else
{
if
(
x
.
EmpList
.
length
==
0
&&
x
.
DeptList
.
length
==
0
)
{
isEmpId
=
true
;
return
}
}
})
if
(
isHours
==
true
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
`请选择时间`
,
position
:
'top'
})
return
}
if
(
isEmpId
==
true
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
`请选择成员`
,
position
:
'top'
})
return
}
let
isweek
=
false
;
this
.
weekList
.
map
(
x
=>
{
if
(
x
.
chek
==
true
)
{
isweek
=
true
;
return
}
})
if
(
isweek
==
false
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
`请选择适用周期`
,
position
:
'top'
})
return
}
let
list
=
[];
// if (this.lsday == '') {
this
.
weekList
.
forEach
(
x
=>
{
if
(
x
.
chek
==
true
)
{
x
.
lsMsg
=
this
.
addMsg
}
else
{
this
.
lsweeklist
.
map
(
j
=>
{
if
(
x
.
Id
==
j
.
Id
)
{
x
.
lsMsg
=
j
.
lsMsg
?
JSON
.
parse
(
JSON
.
stringify
(
j
.
lsMsg
))
:
[];
x
.
chek
=
j
.
chek
return
}
})
}
list
.
push
(
x
)
})
// } else {// 只修改某一天的数据
// this.weekList.map(x => {
// if (x.Id == this.lsday) {
// x.lsMsg = this.addMsg
// return
// }
// })
// list = this.weekList
// }
if
(
this
.
peopletype
==
2
){
//多人模式下部门数据处理
this
.
addMsg
.
forEach
((
l
,
index
)
=>
{
let
tempStr
=
JSON
.
parse
(
JSON
.
stringify
(
l
.
DeptList
))
l
.
returnString
=
[]
l
.
DeptList
=
[]
tempStr
.
forEach
(
x
=>
{
this
.
DeptList
.
map
(
j
=>
{
if
(
x
==
j
.
DeptId
){
let
obj
=
{
Id
:
j
.
DeptId
,
Name
:
j
.
DeptName
,
}
l
.
DeptList
.
push
(
obj
)
return
}
else
{
if
(
j
.
ChildList
&&
j
.
ChildList
.
length
>
0
){
this
.
ChildList
(
x
,
j
.
ChildList
,
index
)
}
}
})
})
})
}
console
.
log
(
'2323'
)
this
.
$emit
(
'success'
,
this
.
addMsg
,
list
)
}
},
getclose
()
{
// 企业关闭
this
.
outerVisible
=
false
},
getsuccess
(
list
)
{
this
.
addMsg
[
this
.
outerindex
].
EmpList
=
JSON
.
parse
(
JSON
.
stringify
(
list
))
this
.
outerVisible
=
false
},
getChild
(
deptArray
,
index
)
{
var
tempStr
=
[];
if
(
deptArray
&&
deptArray
!=
''
)
{
tempStr
=
deptArray
.
split
(
','
);
}
this
.
addMsg
[
index
].
DeptList
=
tempStr
},
ChildList
(
x
,
list
,
index
){
list
.
map
(
j
=>
{
if
(
x
==
j
.
DeptId
){
let
obj
=
{
Id
:
j
.
DeptId
,
Name
:
j
.
DeptName
,
}
this
.
addMsg
[
index
].
DeptList
.
push
(
obj
)
return
}
else
{
if
(
j
.
ChildList
&&
j
.
ChildList
.
length
>
0
){
this
.
ChildList
(
x
,
j
.
ChildList
,
index
)
}
}
})
}
}
}
</
script
>
\ No newline at end of file
src/components/enterprise/choiceapproval.vue
0 → 100644
View file @
11103e1f
<
style
>
.choiceappoval
.ApprovalProcessBg
{
background
:
#f8f8f8
;
max-height
:
400px
;
overflow-y
:
auto
;
}
.choiceappoval
.Approval_yxList
{
width
:
300px
;
background
:
#f8f8f8
;
min-height
:
400px
;
max-height
:
400px
;
overflow-y
:
auto
;
}
.choiceappoval
.Approval_yxList
li
{
display
:
inline-block
;
width
:
100%
;
line-height
:
40px
;
text-indent
:
15px
;
border-bottom
:
1px
dotted
#eee
;
}
</
style
>
<
template
>
<div>
<q-dialog
v-model=
"IsShow"
persistent
>
<q-card
style=
"width: 700px; max-width: 80vw;"
class=
"choiceappoval"
>
<q-card-section
class=
"row items-center q-pb-none "
>
<div
class=
"text-h6"
>
选择企业成员
</div>
<q-space
/>
<q-btn
icon=
"close"
flat
round
dense
v-close-popup
/>
</q-card-section>
<q-separator
/>
<q-card-section
class=
"q-pt-none"
style=
"padding: 20px 0;"
>
<div
style=
"display: flex;align-items: flex-start;justify-content: space-between;"
>
<div
style=
"width: 300px; margin: 0 20px;"
>
<p
style=
"margin: 0 0 10px 0;display: flex;align-items: center;"
>
选择:
<el-input
style=
"width: 200px;"
placeholder=
"输入关键字进行过滤"
v-model=
"filterText"
>
</el-input>
</p>
<el-tree
class=
'ApprovalProcessBg'
:filter-node-method=
"filterNode"
:data=
"memberList"
show-checkbox
ref=
"treeUser"
:props=
"defaultProps"
:render-after-expand=
"false"
node-key=
"DeptId"
@
check-change=
"handleNodeChange"
>
</el-tree>
</div>
<div
style=
"width: 300px; margin: 0 20px;"
>
<p
style=
"margin: 0 0 20px 0;"
>
已选:
</p>
<div
class=
"Approval_yxList"
>
<li
v-for=
"item in showMember"
>
{{
item
.
DeptName
}}
<i
@
click=
"mySetCheckedKeys(item.DeptId)"
class=
"el-icon-circle-close showMemberIcon"
></i>
</li>
</div>
</div>
</div>
</q-card-section>
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
class=
"q-mr-md"
label=
"取消"
@
click=
"closeEditOrder"
/>
<q-btn
color=
"accent"
class=
"q-mr-md"
label=
"确定"
@
click=
"saveOrderInfo()"
/>
</q-card-actions>
</q-card>
</q-dialog>
</div>
</
template
>
<
script
>
import
{
getEmployeeAddrBook
}
from
'../../api/users/user'
import
selectMaterial
from
"./selectMaterial"
export
default
{
props
:
{
outerindex
:
{
type
:
String
,
default
:
''
,
},
byval
:{
type
:
Array
,
default
:
[],
},
cptype
:{
//1是列表上使用2 新增使用
type
:
String
,
default
:
'1'
,
}
},
data
()
{
return
{
IsShow
:
true
,
memberList
:
[],
filterText
:
""
,
defaultProps
:
{
children
:
'ChildList'
,
label
:
'DeptName'
,
},
userList
:
[],
showMember
:
[],
memberSetCheckedKeys
:
[],
sysUserKeys
:
[],
}
},
created
()
{
if
(
this
.
byval
.
length
>
0
){
this
.
memberSetCheckedKeys
=
[];
this
.
showMember
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
byval
))
this
.
byval
.
forEach
(
x
=>
{
this
.
memberSetCheckedKeys
.
push
(
x
.
DeptId
)
})
}
this
.
getMember
()
//部门下面选择员工
},
mounted
()
{
},
watch
:
{
filterText
(
val
)
{
this
.
$refs
.
treeUser
.
filter
(
val
);
},
},
methods
:
{
getMember
()
{
let
_arr
=
this
.
sysUserKeys
.
concat
(
this
.
memberSetCheckedKeys
)
getEmployeeAddrBook
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
memberList
=
res
.
Data
let
_this
=
this
;
console
.
log
(
_arr
)
_this
.
$refs
.
treeUser
.
setCheckedKeys
(
_arr
);
}
}).
catch
(()
=>
{
})
},
filterNode
(
value
,
data
)
{
if
(
!
value
)
return
true
;
return
data
.
DeptName
.
indexOf
(
value
)
!==
-
1
;
},
handleNodeChange
(
data
,
checked
)
{
data
.
IsCheck
=
checked
;
if
(
data
.
DataType
==
2
&&
data
.
IsCheck
)
{
//是员工且选中
let
isExsit
=
false
this
.
showMember
.
forEach
(
x
=>
{
if
(
x
.
DeptId
==
data
.
DeptId
)
{
isExsit
=
true
return
false
}
})
if
(
!
isExsit
)
{
this
.
showMember
.
push
({
DeptName
:
data
.
DeptName
,
DeptId
:
data
.
DeptId
})
this
.
memberSetCheckedKeys
.
push
(
data
.
DeptId
)
}
}
else
if
(
data
.
DataType
==
2
&&
!
data
.
IsCheck
)
{
if
(
this
.
showMember
.
findIndex
(
item
=>
item
.
DeptId
===
data
.
DeptId
)
!=
-
1
)
{
this
.
showMember
.
splice
(
this
.
showMember
.
findIndex
(
item
=>
item
.
DeptId
===
data
.
DeptId
),
1
)
this
.
memberSetCheckedKeys
.
splice
(
this
.
memberSetCheckedKeys
.
findIndex
(
item
=>
item
===
data
.
DeptId
),
1
)
if
(
this
.
showMember
.
findIndex
(
item
=>
item
.
DeptId
===
data
.
ParentId
)
!=
-
1
)
{
this
.
memberSetCheckedKeys
.
splice
(
this
.
memberSetCheckedKeys
.
findIndex
(
item
=>
item
===
data
.
ParentId
),
1
)
}
}
}
if
(
data
.
DataType
!=
2
&&
data
.
IsCheck
)
{
if
(
this
.
memberSetCheckedKeys
.
findIndex
(
item
=>
item
===
data
.
DeptId
)
==
-
1
)
{
this
.
memberSetCheckedKeys
.
push
(
data
.
DeptId
)
}
}
else
if
(
data
.
DataType
==
2
&&
!
data
.
IsCheck
)
{
if
(
this
.
memberSetCheckedKeys
.
findIndex
(
item
=>
item
===
data
.
DeptId
)
!=
-
1
)
{
this
.
memberSetCheckedKeys
.
splice
(
this
.
memberSetCheckedKeys
.
findIndex
(
item
=>
item
===
data
.
DeptId
),
1
)
if
(
this
.
showMember
.
findIndex
(
item
=>
item
.
DeptId
===
data
.
ParentId
)
!=
-
1
)
{
this
.
memberSetCheckedKeys
.
splice
(
this
.
memberSetCheckedKeys
.
findIndex
(
item
=>
item
===
data
.
ParentId
),
1
)
}
}
}
},
mySetCheckedKeys
(
id
)
{
if
(
this
.
memberSetCheckedKeys
.
length
==
0
)
return
if
(
id
==
-
1
)
{
this
.
$refs
.
treeUser
.
setCheckedKeys
(
this
.
memberSetCheckedKeys
)
return
}
this
.
showMember
.
splice
(
this
.
showMember
.
findIndex
(
item
=>
item
.
DeptId
===
id
),
1
)
this
.
memberSetCheckedKeys
.
splice
(
this
.
memberSetCheckedKeys
.
findIndex
(
item
=>
item
===
id
),
1
)
this
.
$refs
.
treeUser
.
setCheckedKeys
(
this
.
memberSetCheckedKeys
);
},
//关闭弹窗
closeEditOrder
()
{
this
.
$emit
(
'close'
)
},
saveOrderInfo
()
{
this
.
$emit
(
'success'
,
this
.
showMember
,
this
.
cptype
)
}
}
}
</
script
>
\ No newline at end of file
src/pages/enterprise/addchannelcode.vue
0 → 100644
View file @
11103e1f
<
style
>
.addchannelcode
.ant-card-head
{
min-height
:
48px
;
line-height
:
48px
;
margin-bottom
:
-1px
;
/* padding: 0 24px; */
color
:
rgba
(
0
,
0
,
0
,
.85
);
font-weight
:
500
;
font-size
:
16px
;
background
:
transparent
;
border-bottom
:
1px
solid
#e8e8e8
;
border-radius
:
2px
2px
0
0
;
zoom
:
1
;
}
.addchannelcode
.tag-item
{
padding-top
:
10px
;
display
:
-webkit-box
;
display
:
-ms-flexbox
;
display
:
flex
;
-ms-flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
}
.addchannelcode
.tag-content
{
flex
:
1
;
margin-left
:
20px
;
}
.addchannelcode
.tag-content
.ant-tag
{
display
:
inline-block
;
height
:
auto
;
margin-right
:
8px
;
padding
:
0
7px
;
font-size
:
12px
;
line-height
:
20px
;
white-space
:
nowrap
;
background
:
#fafafa
;
border
:
1px
solid
#d9d9d9
;
border-radius
:
2px
;
cursor
:
pointer
;
opacity
:
1
;
}
.addchannelcode
.ant-tag-has-color
{
color
:
#FFF
;
border
:
1px
solid
#1890ff
;
}
.addchannelcode
.ant-alert
{
width
:
100%
;
background-color
:
#fff1f0
;
color
:
#000
;
font-size
:
14px
;
padding
:
10px
24px
;
display
:
flex
;
align-items
:
center
;
margin-top
:
15px
;
}
.addchannelcode
.weekstyle
{
background
:
#fafafa
;
border-bottom
:
1px
solid
#e8e8e8
;
width
:
14.28%
;
height
:
50px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.addchannelcode
.weekstyle2
{
width
:
14.28%
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
}
.addchannelcode
.tsbox
.el-date-editor.el-input
,
.addchannelcode
.tsbox
.el-date-editor.el-input__inner
{
width
:
140px
;
margin-right
:
10px
;
}
</
style
>
<
template
>
<div
class=
"addchannelcode"
>
<div
class=
"page-body"
>
<div
class=
"ant-card-head"
>
基础设置
</div>
<el-form
ref=
"addMsg"
:model=
"addMsg"
label-width=
"120px"
style=
"padding: 15px 0 ;width: 60%;"
>
<el-form-item
label=
"选择分组:"
>
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"Name"
v-model=
"addMsg.ChannelGroupId"
ref=
"Id"
:options=
"GroupList"
label=
"分组"
:dense=
"false"
emit-value
map-options
/>
</el-form-item>
<el-form-item
label=
"活码名称:"
>
<q-input
v-model=
"addMsg.Name"
filled
clearable
label=
"活码名称"
:rules=
"[val => !!val || '请输入活码名称']"
/>
<div
style=
"color: red;"
>
(一旦创建,不可修改)
</div>
</el-form-item>
<el-form-item
label=
"自动添加好友:"
>
<div
class=
"q-gutter-sm"
style=
"align-items: center;display: flex;"
>
<q-radio
v-model=
"addMsg.SkipVerify"
val=
"1"
label=
"需验证"
/>
<q-radio
v-model=
"addMsg.SkipVerify"
val=
"2"
label=
"自动添加"
/>
<span
style=
"color: red;"
>
(开启时,客户添加时无需企业成员确认,自动成为好友)
</span>
</div>
</el-form-item>
<el-form-item
label=
"客户标签:"
>
<div
class=
"q-gutter-sm"
style=
"width: 120%;padding: 15px;border: 1px solid #e8e8e8;"
>
<ul
v-if=
"Lableshow == false"
>
<li
class=
"tag-item"
v-for=
"(x,y) in LableList"
:key=
'y'
>
<el-tag
effect=
"plain"
>
{{
x
.
Name
}}
</el-tag>
<div
class=
"tag-content"
>
<span
class=
"ant-tag"
:class=
"
{'ant-tag-has-color':item.chek}"
v-for="(item,index) in x.ChildList" :key='index'
@click="LableList[y].ChildList[index].chek = !LableList[y].ChildList[index].chek,$forceUpdate()"
:style="{background:item.chek?'#1890ff':'#FFF'}">
{{
item
.
Name
}}
</span>
</div>
</li>
</ul>
<ul
v-if=
"Lableshow == true"
>
<li
class=
"tag-item"
v-for=
"(x,y) in LableList"
:key=
'y'
v-if=
"y
<5
"
>
<el-tag
effect=
"plain"
>
{{
x
.
Name
}}
</el-tag>
<div
class=
"tag-content"
>
<span
class=
"ant-tag"
:class=
"
{'ant-tag-has-color':item.chek}"
v-for="(item,index) in x.ChildList" :key='index'
@click="LableList[y].ChildList[index].chek = !LableList[y].ChildList[index].chek,$forceUpdate()"
:style="{background:item.chek?'#1890ff':'#FFF'}">
{{
item
.
Name
}}
</span>
</div>
</li>
</ul>
<div
v-if=
"LableList.length>5"
>
<q-btn
flat
color=
"primary"
label=
"展开"
v-if=
"Lableshow == true"
@
click=
"Lableshow = !Lableshow"
/>
<q-btn
flat
color=
"primary"
label=
"收起"
v-if=
"Lableshow == false"
@
click=
"Lableshow = !Lableshow"
/>
</div>
</div>
</el-form-item>
</el-form>
</div>
<div
class=
"page-body"
>
<div
class=
"ant-card-head"
>
引流成员设置
</div>
<div
class=
"ant-alert"
>
扫码添加成员规则:在周期和特殊时期共存情况下,扫码优先添加特殊时期的成员
</div>
<el-form
label-width=
"120px"
style=
"padding: 15px 0 ;"
>
<el-form-item
label=
"类型:"
>
<div
class=
"q-gutter-sm"
style=
"align-items: center;display: flex;"
>
<q-radio
v-model=
"addMsg.Type"
val=
"1"
label=
"单人"
@
input=
"btnType"
/>
<q-radio
v-model=
"addMsg.Type"
val=
"2"
label=
"多人"
@
input=
"btnType"
/>
<span
style=
"color: red;"
>
(一旦创建,不可修改)
</span>
</div>
</el-form-item>
<el-form-item
label=
"企业成员:"
>
<q-btn
color=
"white"
text-color=
"black"
icon=
'add'
label=
"添加成员"
@
click=
"addmember"
/>
<div
style=
"width: 80%;display: flex;"
>
<div
v-for=
"(x,y) in lsweeklist"
:key=
'y'
class=
"weekstyle"
>
<div
style=
"display: flex;align-items: center;"
>
{{
x
.
Name
}}
</div>
<div
v-if=
"x.chek == true"
>
<i
class=
"iconfont icon-xiugai1"
style=
"margin-left: 8px;font-size: 14px;color: #3FC4FF;"
@
click=
"goeditry(x)"
></i>
</div>
</div>
</div>
<div
style=
"width: 80%;display: flex;align-items: flex-start;"
v-if=
"addMsg.Type==1"
>
<div
v-for=
"(x,y) in lsweeklist"
:key=
"y+'b'"
class=
"weekstyle2"
>
<div
v-for=
"(item,index) in x.lsMsg"
:key=
"index+'a1'"
style=
"width: 100%;;display: flex;flex-direction: column;align-items: center;border-bottom: 1px solid #e8e8e8;"
>
<div>
{{
item
.
SrartHours
}}
~
{{
item
.
EndHours
}}
</div>
<div>
<q-btn
outline
color=
"primary"
disable
:label=
"item.EmpName"
size=
"sm"
/>
</div>
</div>
</div>
</div>
<div
style=
"width: 80%;display: flex;align-items: flex-start;"
v-if=
"addMsg.Type==2"
>
<div
v-for=
"(x,y) in lsweeklist"
:key=
"y+'b'"
class=
"weekstyle2"
>
<div
v-for=
"(item,index) in x.lsMsg"
:key=
"index+'a1'"
style=
"width: 100%;;display: flex;flex-direction: column;align-items: center;border-bottom: 1px solid #e8e8e8;"
>
<div>
{{
item
.
SrartHours
}}
~
{{
item
.
EndHours
}}
</div>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"item.EmpName"
placement=
"top"
>
<div
style=
"width: 100%; overflow: hidden; white-space: nowrap;text-overflow: ellipsis;cursor: pointer;text-align: center;"
>
<span>
{{
item
.
EmpName
}}
</span>
</div>
</el-tooltip>
<div
v-for=
"(b,m) in item.DeptList"
:key=
"m+'a1'"
>
<q-btn
color=
"primary"
disable
:label=
"b.Name"
size=
"sm"
/>
</div>
</div>
</div>
</div>
</el-form-item>
<el-form-item
label=
"特殊时期:"
>
<div
class=
"q-gutter-sm"
style=
"align-items: center;display: flex;"
>
<q-radio
v-model=
"addMsg.SpecialDateEnable"
val=
"1"
label=
"开启"
/>
<q-radio
v-model=
"addMsg.SpecialDateEnable"
val=
"2"
label=
"关闭"
/>
<span
style=
"color: red;"
>
(如遇到国家节假日或是企业自身重要日子,在特殊时期内,需要更换活码成员)
</span>
</div>
<div
v-if=
"addMsg.SpecialDateEnable==1"
>
<div
style=
"width:70%;background: #f7f5f5;padding: 10px;border-bottom: 1px dashed #e8e8e8;"
v-for=
"(x,y) in spweeklist"
:key=
'y'
>
<el-form
label-width=
"120px"
style=
"padding: 15px 0 ;"
>
<el-form-item
:label=
"'特殊时期'+(y+1)+':'"
>
<el-date-picker
v-model=
"x.value"
type=
"daterange"
value-format=
"yyyy-MM-dd"
@
change=
"getdatepicker(y)"
size=
"small"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
>
</el-date-picker>
<div
class=
"tsbox"
v-for=
"(item,index) in x.list"
:key=
'index'
>
<div
style=
"display: flex;align-items: flex-start;margin-top: 10px;"
>
<el-time-select
:disabled=
"index==0"
placeholder=
"起始时间"
v-model=
"item.SrartHours"
size=
"small"
:picker-options=
"
{ start: '00:00', step: '01:00', end: '23:00', }">
</el-time-select>
<el-time-select
:disabled=
"index==0"
placeholder=
"结束时间"
v-model=
"item.EndHours"
size=
"small"
:picker-options=
"
{ start: '00:00', step: '01:00', end: '23:00', minTime: item.SrartHours}">
</el-time-select>
<el-select
v-model=
"item.EmpList[0].Id"
placeholder=
"请选择"
size=
"small"
v-if=
"addMsg.Type==1"
@
change=
"selectPersonnel(y,index)"
>
<el-option
filterable
v-for=
"item in Employeelist"
:key=
"item.Id"
:label=
"item.EmployeeName"
:value=
"item.Id"
>
</el-option>
</el-select>
<div
style=
"flex:1;width: 1px;margin-top: 3px;"
v-if=
"addMsg.Type==2"
>
<div
v-if=
"item.EmpList.length>0"
>
<span
v-for=
"(c,v) in item.EmpList "
:key=
"v"
>
{{
c
.
DeptName
}}{{
item
.
EmpList
.
length
-
1
!=
v
?
'、'
:
''
}}
</span>
</div>
<div
style=
"display: flex;align-items: center;"
>
<el-button
@
click=
"outerVisible=true,outerindex0=y,outerindex=index,byval=item.EmpList"
size=
"small"
>
选择企业成员
</el-button>
<q-btn
flat
color=
"red"
v-if=
"index>0"
label=
"删除"
@
click=
"spweeklist[y].list.splice(index,1),getalluser()"
/>
</div>
</div>
<q-btn
flat
color=
"red"
v-if=
"index>0 && addMsg.Type==1"
label=
"删除"
@
click=
"spweeklist[y].list.splice(index,1),getalluser()"
/>
</div>
<div
v-if=
"addMsg.Type==2"
>
<selectTree
class=
"q-pb-lg q-pr-lg"
:treeData=
'deptl'
style=
"margin-top: 10px;"
:defaultArray=
"item.returnString"
nodeKey=
"DeptId"
:multiple=
"true"
:defaultExpandAll=
"true"
labelKey=
"DeptName"
childrenKey=
"ChildList"
tipText=
"选择部门"
@
getChild=
"getChild($event,y,index)"
classStr=
" q-pr-lg q-pb-lg"
>
</selectTree>
</div>
</div>
<div
style=
"display: flex;align-items: center;margin-top: 5px;"
>
<q-btn
flat
color=
"primary"
label=
"添加"
@
click=
"adddata(y)"
/>
<q-btn
flat
size=
'sm'
icon=
'delete'
color=
"negative"
label=
""
v-if=
"spweeklist.length>1"
@
click=
"spweeklist.splice(y,1),getalluser()"
/>
</div>
</el-form-item>
</el-form>
</div>
<q-btn
color=
"primary"
label=
"添加时期"
icon=
'add'
size=
'sm'
@
click=
"addalldata()"
/>
</div>
</el-form-item>
<el-form-item
label=
"员工添加上限:"
>
<div
class=
"q-gutter-sm"
style=
"align-items: center;display: flex;"
>
<q-radio
v-model=
"addMsg.EmpAddLimit"
val=
"1"
label=
"开启"
/>
<q-radio
v-model=
"addMsg.EmpAddLimit"
val=
"2"
label=
"关闭"
/>
<span
style=
"color: red;"
>
(因受官方限制,无法对动态部门的员工设置添加好友上限,只可针对指定活码成员进行设置)
</span>
</div>
<div
style=
"width: 70%;"
v-if=
"addMsg.EmpAddLimit==1"
>
<el-table
:data=
"addMsg.LimitList"
stripe
header-align=
'center'
style=
"width: 100%"
>
<el-table-column
prop=
"EmpName"
label=
"名称"
align=
"center"
>
</el-table-column>
<el-table-column
prop=
"LimitNum"
label=
"上限"
align=
"center"
>
<template
slot-scope=
"scope"
>
<el-input
style=
"width: 150px;"
type=
'number'
v-model=
"scope.row.LimitNum"
size=
"mini"
placeholder=
""
/>
</
template
>
</el-table-column>
</el-table>
</div>
</el-form-item>
<el-form-item
label=
"备用员工:"
v-if=
"addMsg.EmpAddLimit==1"
>
<q-select
v-if=
"addMsg.Type==1"
style=
"width: 60%;"
filled
stack-label
option-value=
"Id"
option-label=
"EmployeeName"
v-model=
"addMsg.EmpBackUp"
ref=
"Id"
:options=
"Employeelist"
label=
"备用员工"
:dense=
"false"
emit-value
map-options
/>
<div
style=
"width: 60%;"
>
<div
style=
"width: 100%;display: flex;flex-wrap: wrap;"
v-if=
"EmpBackUpList.length>0"
>
<span
v-for=
"(c,v) in EmpBackUpList "
:key=
"v"
>
{{c.DeptName}}{{EmpBackUpList.length-1
!=v?'、':''}}
</span>
</div>
<q-btn
color=
"white"
v-if=
"addMsg.Type==2"
text-color=
"black"
icon=
'add'
label=
"选择企业成员"
@
click=
"outerVisible=true,byval=EmpBackUpList,choiceapprovaltype='2'"
/>
</div>
</el-form-item>
</el-form>
</div>
<div
class=
"page-body"
>
<div
class=
"ant-card-head"
>
欢迎语设置
</div>
<div
class=
"ant-alert"
>
欢迎语推送规则:在通用、周期及特殊时期欢迎语共存情况下,推送优先顺序为特殊时期的欢迎语 > 按周期的欢迎语 > 通用欢迎语。若企业微信官方后台已配置了欢迎语,则在第三方系统配置的欢迎语均失效,客户收到的依然是官方推送的。
</div>
</div>
<div
class=
"page-body"
>
<q-btn
color=
"accent"
class=
"q-mr-md"
label=
"保存"
@
click=
"savemove()"
style=
"width: 100px;"
:loading=
"loading"
/>
<q-btn
class=
"q-mr-md"
label=
"返回"
@
click=
"goblck()"
style=
"width: 60px;"
/>
</div>
<chaneelcodeform
v-if=
"ismember"
@
close=
"getclose()"
:peopletype=
'addMsg.Type'
:lsday=
"lsday"
:lsweeklist=
"lsweeklist"
@
success=
"getsuccess"
></chaneelcodeform>
<choiceapproval
v-if=
"outerVisible"
@
close=
"getclose()"
@
success=
"getsuccess2"
:byval=
'byval'
:cptype=
"choiceapprovaltype"
></choiceapproval>
</div>
</template>
<
script
>
import
{
getWeChatChannelGroupList
,
getWeChatLableList
,
//获取标签的列表
}
from
'../../api/system/wechat'
;
import
{
getDeptTree
}
from
'../../api/system/dept.js'
import
{
queryEmployee
}
from
'../../api/users/user'
import
chaneelcodeform
from
'../../components/enterprise/chaneelcode-form'
import
choiceapproval
from
'../../components/enterprise/choiceapproval'
import
selectTree
from
'../../components/common/select-tree'
export
default
{
meta
:
{
title
:
"渠道码编辑"
},
components
:
{
chaneelcodeform
,
//所有列表
choiceapproval
,
selectTree
},
name
:
"addchannelcode"
,
data
()
{
return
{
loading
:
false
,
addMsg
:
{
Id
:
0
,
ChannelGroupId
:
''
,
//分组Id
Name
:
''
,
//渠道活码名称
SkipVerify
:
"1"
,
//自动添加好友 1需验证 2自动添加
LabelIdList
:
[],
//标签
Type
:
'1'
,
//类型 1单人 2多人
SpecialDateEnable
:
'2'
,
//特殊时期 1开启 2未开启
EmpAddLimit
:
'2'
,
//员工添加上限 1开启 2未开启
WeekList
:
[],
//人员周期
SpecialWeekList
:
[],
//特殊周期
LimitList
:
[],
//员工添加上限
EmpBackUp
:
''
,
//备用员工 多人的话 英文逗号分隔
WelcomeEnable
:
'1'
,
//是否启用欢迎语 1是
},
GroupList
:
[],
//分组数据
LableList
:
[],
//标签数据
Lableshow
:
false
,
ismember
:
false
,
//成员弹窗
lsMsg
:
[],
//人员临时的msg
lsweeklist
:
[{
Id
:
1
,
Name
:
'周一'
,
chek
:
false
},
{
Id
:
2
,
Name
:
'周二'
,
chek
:
false
},
{
Id
:
3
,
Name
:
'周三'
,
chek
:
false
},
{
Id
:
4
,
Name
:
'周四'
,
chek
:
false
},
{
Id
:
5
,
Name
:
'周五'
,
chek
:
false
},
{
Id
:
6
,
Name
:
'周六'
,
chek
:
false
},
{
Id
:
0
,
Name
:
'周日'
,
chek
:
false
}],
//周末
editType
:
''
,
//选中修改
lsday
:
''
,
//修改的时候记录是哪天的
spweeklist
:
[
{
Id
:
0
,
StartDate
:
''
,
EndDate
:
''
,
value
:
''
,
list
:
[{
IsDefault
:
1
,
SrartHours
:
'00:00'
,
EndHours
:
'00:00'
,
EmpList
:
[{
Id
:
''
,
Name
:
''
}],
DeptList
:
[],
returnString
:
[]
}]
}
],
Employeelist
:
[],
//人员单选数据
deptl
:
[],
//部门下拉
outerVisible
:
false
,
outerindex
:
0
,
outerindex0
:
0
,
byval
:
[],
EmpBackUpList
:[],
//备用员工多人的时候临时数组
choiceapprovaltype
:
'1'
,
}
},
created
()
{
this
.
getChannelGroupList
()
//分租列表
this
.
getLableList
()
//获取标签列表
this
.
queryEmployee
()
//单选
this
.
getDepartList
()
//部门下拉
},
methods
:
{
queryEmployee
()
{
//下拉人员列表
queryEmployee
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
Employeelist
=
res
.
Data
}
}).
catch
(()
=>
{
})
},
//获取部门下拉数据
getDepartList
(
id
)
{
let
msg
=
{
School_Id
:
0
}
getDeptTree
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
deptl
=
res
.
Data
;
}
})
},
getChannelGroupList
()
{
getWeChatChannelGroupList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
GroupList
=
res
.
Data
;
}
}).
catch
(()
=>
{
})
},
getLableList
()
{
getWeChatLableList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
LableList
=
res
.
Data
;
if
(
this
.
LableList
.
length
>
5
)
{
this
.
Lableshow
=
true
}
this
.
LableList
.
forEach
(
x
=>
{
x
.
ChildList
.
forEach
(
j
=>
{
j
.
chek
=
false
})
})
}
}).
catch
(()
=>
{
})
},
addmember
()
{
this
.
ismember
=
true
this
.
lsday
=
''
},
getclose
()
{
// 企业关闭
this
.
ismember
=
false
this
.
outerVisible
=
false
},
getsuccess
(
msg
,
lsweeklist
)
{
//人员选择返回数据
this
.
lsMsg
=
JSON
.
parse
(
JSON
.
stringify
(
msg
))
this
.
lsweeklist
=
lsweeklist
;
if
(
this
.
addMsg
.
Type
==
2
)
{
//如果选择多人的时候
this
.
lsweeklist
.
forEach
(
x
=>
{
if
(
x
.
chek
==
true
)
{
x
.
lsMsg
.
forEach
(
j
=>
{
j
.
EmpName
=
''
;
j
.
EmpList
.
forEach
(
z
=>
{
j
.
EmpName
=
j
.
EmpName
+
z
.
DeptName
+
','
})
})
}
})
}
this
.
getclose
()
this
.
getalluser
()
},
getsuccess2
(
list
,
type
)
{
if
(
type
==
1
){
this
.
spweeklist
[
this
.
outerindex0
].
list
[
this
.
outerindex
].
EmpList
=
JSON
.
parse
(
JSON
.
stringify
(
list
))
this
.
outerVisible
=
false
;
this
.
getalluser
()
}
else
{
console
.
log
(
list
)
this
.
EmpBackUpList
=
list
this
.
outerVisible
=
false
;
}
},
goeditry
(
x
)
{
this
.
lsday
=
(
x
.
Id
).
toString
();
this
.
lsMsg
=
x
.
lsMsg
this
.
ismember
=
true
;
},
btnType
()
{
//人员选择清除数据 //数据的初始值
this
.
lsMsg
=
[];
this
.
lsday
=
''
;
this
.
lsweeklist
=
[{
Id
:
1
,
Name
:
'周一'
,
chek
:
false
},
{
Id
:
2
,
Name
:
'周二'
,
chek
:
false
},
{
Id
:
3
,
Name
:
'周三'
,
chek
:
false
},
{
Id
:
4
,
Name
:
'周四'
,
chek
:
false
},
{
Id
:
5
,
Name
:
'周五'
,
chek
:
false
},
{
Id
:
6
,
Name
:
'周六'
,
chek
:
false
},
{
Id
:
0
,
Name
:
'周日'
,
chek
:
false
}]
if
(
this
.
addMsg
.
Type
==
1
)
{
//单人模式
this
.
spweeklist
=
[{
Id
:
0
,
StartDate
:
''
,
EndDate
:
''
,
value
:
''
,
list
:
[{
IsDefault
:
1
,
SrartHours
:
'00:00'
,
EndHours
:
'00:00'
,
EmpList
:
[{
Id
:
''
,
Name
:
''
}],
DeptList
:
[],
returnString
:
[]
}]
}]
}
else
{
this
.
spweeklist
=
[{
Id
:
0
,
StartDate
:
''
,
EndDate
:
''
,
value
:
''
,
list
:
[{
IsDefault
:
1
,
SrartHours
:
'00:00'
,
EndHours
:
'00:00'
,
EmpList
:
[],
DeptList
:
[],
returnString
:
[]
}]
}]
}
this
.
addMsg
.
LimitList
=
[];
this
.
addMsg
.
EmpBackUp
=
''
;
this
.
EmpBackUpList
=
[];
},
goblck
()
{
//返回上一个页面
this
.
$router
.
go
(
-
1
);
//返回上一层
},
savemove
()
{
this
.
addMsg
.
LabelIdList
=
[]
this
.
LableList
.
forEach
(
x
=>
{
//标签数据处理
x
.
ChildList
.
forEach
(
x
=>
{
if
(
x
.
chek
==
true
)
{
this
.
addMsg
.
LabelIdList
.
push
(
x
.
Id
)
}
})
})
this
.
addMsg
.
WeekList
=
[];
this
.
getWeekListdata
()
//处理企业人员的数据 给予后台
if
(
this
.
addMsg
.
SpecialDateEnable
==
1
)
{
this
.
getSpecialWeekListdata
()
//特殊时期的数据
}
if
(
this
.
addMsg
.
Type
==
2
&&
this
.
addMsg
.
EmpAddLimit
==
1
){
//多人 备用开启 处理备用人员数据
if
(
this
.
EmpBackUpList
.
length
>
0
){
let
data
=
[]
this
.
EmpBackUpList
.
forEach
(
x
=>
{
data
.
push
(
x
.
DeptId
)
})
this
.
addMsg
.
EmpBackUp
=
data
.
join
(
','
)
}
}
console
.
log
(
this
.
addMsg
)
},
getSpecialWeekListdata
()
{
let
isEmpId
=
false
;
let
isHours
=
false
;
let
datevalue
=
false
;
let
datalength
=
this
.
spweeklist
.
length
;
//获取特殊时期的长度
let
spdata
=
[]
this
.
spweeklist
.
map
((
x
,
i
)
=>
{
if
(
!
x
.
value
||
x
.
value
==
[]
||
x
.
value
==
''
)
{
datevalue
=
true
;
return
}
x
.
list
.
map
((
j
,
ji
)
=>
{
if
(
isEmpId
)
return
if
(
ji
>
0
)
{
if
(
j
.
SrartHours
==
''
||
j
.
EndHours
==
''
)
{
isHours
=
true
;
return
}
if
(
this
.
addMsg
.
Type
==
1
)
{
j
.
EmpList
.
map
(
c
=>
{
if
(
c
.
Id
==
''
)
{
isEmpId
=
true
;
return
}
})
}
else
{
if
(
j
.
EmpList
.
length
==
0
&&
j
.
DeptList
.
length
==
0
)
{
isEmpId
=
true
;
return
}
}
}
else
{
if
(
this
.
addMsg
.
Type
==
1
)
{
j
.
EmpList
.
map
(
c
=>
{
if
(
c
.
Id
==
''
)
{
isEmpId
=
true
;
return
}
})
}
else
{
if
(
j
.
EmpList
.
length
==
0
&&
j
.
DeptList
.
length
==
0
)
{
isEmpId
=
true
;
return
}
}
}
if
(
isEmpId
)
return
if
(
isHours
)
return
let
dlist
=
[];
let
eplist
=
j
.
EmpList
if
(
this
.
addMsg
.
Type
==
2
)
{
//保存时部门赋值
dlist
=
j
.
DeptList
;
let
list
=
[]
j
.
EmpList
.
forEach
(
m
=>
{
let
obj
=
{
Id
:
m
.
DeptId
,
Name
:
m
.
DeptName
,
}
list
.
push
(
obj
)
})
eplist
=
list
}
let
obj
=
{
Id
:
0
,
StartDate
:
x
.
value
[
0
],
EndDate
:
x
.
value
[
1
],
IsDefault
:
j
.
IsDefault
,
SrartHours
:
j
.
SrartHours
,
EndHours
:
j
.
EndHours
,
EmpList
:
eplist
,
DeptList
:
dlist
,
}
spdata
.
push
(
obj
)
})
})
if
(
datevalue
==
true
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
`请选择特殊时期时间段`
,
position
:
'top'
})
return
}
if
(
isHours
==
true
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
`请选择特殊时期时间`
,
position
:
'top'
})
return
}
if
(
isEmpId
==
true
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
`请选择特殊时期成员`
,
position
:
'top'
})
return
}
this
.
addMsg
.
SpecialWeekList
=
spdata
},
getWeekListdata
()
{
this
.
lsweeklist
.
forEach
(
x
=>
{
if
(
x
.
chek
==
true
)
{
if
(
this
.
addMsg
.
Type
==
1
)
{
x
.
lsMsg
.
forEach
(
j
=>
{
let
obj
=
{
Id
:
j
.
Id
,
Week
:
x
.
Id
,
IsDefault
:
j
.
IsDefault
,
SrartHours
:
j
.
SrartHours
,
EndHours
:
j
.
EndHours
,
EmpList
:
[
{
Id
:
j
.
EmpId
,
Name
:
j
.
EmpName
}
],
DeptList
:
[],
};
this
.
addMsg
.
WeekList
.
push
(
obj
)
})
}
else
{
x
.
lsMsg
.
forEach
(
j
=>
{
let
obj
=
{
Id
:
j
.
Id
,
Week
:
x
.
Id
,
IsDefault
:
j
.
IsDefault
,
SrartHours
:
j
.
SrartHours
,
EndHours
:
j
.
EndHours
,
EmpList
:
j
.
EmpList
,
DeptList
:
j
.
DeptList
,
};
this
.
addMsg
.
WeekList
.
push
(
obj
)
})
}
}
})
},
adddata
(
y
)
{
//特殊时期的内部添加
let
obj
if
(
this
.
addMsg
.
Type
==
1
)
{
//单人模式
obj
=
{
IsDefault
:
2
,
SrartHours
:
''
,
EndHours
:
''
,
EmpList
:
[{
Id
:
''
,
Name
:
''
}],
DeptList
:
[],
returnString
:
[]
}
}
else
{
obj
=
{
IsDefault
:
2
,
SrartHours
:
''
,
EndHours
:
''
,
EmpList
:
[],
DeptList
:
[],
returnString
:
[]
}
}
this
.
spweeklist
[
y
].
list
.
push
(
obj
)
},
addalldata
()
{
//特殊时期的外部添加
let
obj
if
(
this
.
addMsg
.
Type
==
1
)
{
//单人模式
obj
=
{
Id
:
0
,
StartDate
:
''
,
EndDate
:
''
,
value
:
''
,
list
:
[{
IsDefault
:
1
,
SrartHours
:
'00:00'
,
EndHours
:
'00:00'
,
EmpList
:
[{
Id
:
''
,
Name
:
''
}],
DeptList
:
[],
returnString
:
[]
}]
}
}
else
{
obj
=
{
Id
:
0
,
StartDate
:
''
,
EndDate
:
''
,
value
:
''
,
list
:
[{
IsDefault
:
1
,
SrartHours
:
'00:00'
,
EndHours
:
'00:00'
,
EmpList
:
[],
DeptList
:
[],
returnString
:
[]
}]
}
}
this
.
spweeklist
.
push
(
obj
)
},
selectPersonnel
(
y
,
index
)
{
this
.
Employeelist
.
map
(
x
=>
{
//部门id带过去
if
(
x
.
Id
==
this
.
spweeklist
[
y
].
list
[
index
].
EmpList
[
0
].
Id
)
{
this
.
spweeklist
[
y
].
list
[
index
].
EmpList
[
0
].
Name
=
x
.
EmployeeName
;
return
}
})
this
.
getalluser
()
},
getdatepicker
(
index
)
{
//特殊时期日期范围判断
let
value
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
spweeklist
[
index
].
value
))
let
iscorrect
=
false
if
(
this
.
spweeklist
.
length
>
1
)
{
this
.
spweeklist
.
map
((
x
,
i
)
=>
{
if
(
x
.
value
&&
x
.
value
.
length
==
2
&&
i
!=
index
)
{
if
((
new
Date
(
value
[
0
]).
getTime
()
>=
new
Date
(
x
.
value
[
0
]).
getTime
()
&&
new
Date
(
value
[
0
]).
getTime
()
<=
new
Date
(
x
.
value
[
1
]).
getTime
())
||
(
new
Date
(
value
[
0
]).
getTime
()
>=
new
Date
(
x
.
value
[
0
]).
getTime
()
&&
new
Date
(
value
[
1
]).
getTime
()
<=
new
Date
(
x
.
value
[
1
]).
getTime
())
||
(
new
Date
(
value
[
0
]).
getTime
()
<=
new
Date
(
x
.
value
[
0
]).
getTime
()
&&
new
Date
(
value
[
1
]).
getTime
()
>=
new
Date
(
x
.
value
[
0
]).
getTime
())
||
(
new
Date
(
value
[
0
]).
getTime
()
<=
new
Date
(
x
.
value
[
0
]).
getTime
()
&&
new
Date
(
value
[
1
]).
getTime
()
>=
new
Date
(
x
.
value
[
1
]).
getTime
())
)
{
//开始时间在范围其他时间段内
iscorrect
=
true
;
return
}
}
})
}
if
(
iscorrect
==
true
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
`时间段存在冲突`
,
position
:
'top'
})
this
.
spweeklist
[
index
].
value
=
''
return
}
},
ChildList
(
x
,
list
,
y
,
index
)
{
list
.
map
(
j
=>
{
if
(
x
==
j
.
DeptId
)
{
let
obj
=
{
Id
:
j
.
DeptId
,
Name
:
j
.
DeptName
,
}
this
.
spweeklist
[
y
].
list
[
index
].
DeptList
.
push
(
obj
)
return
}
else
{
if
(
j
.
ChildList
&&
j
.
ChildList
.
length
>
0
)
{
this
.
ChildList
(
x
,
j
.
ChildList
,
y
,
index
)
}
}
})
},
getChild
(
deptArray
,
y
,
index
)
{
//特殊时期选择部门的时候的处理
var
tempStr
=
[];
if
(
deptArray
&&
deptArray
!=
''
)
{
tempStr
=
deptArray
.
split
(
','
);
}
this
.
spweeklist
[
y
].
list
[
index
].
DeptList
=
[]
tempStr
.
forEach
(
x
=>
{
this
.
deptl
.
map
(
j
=>
{
if
(
x
==
j
.
DeptId
)
{
let
obj
=
{
Id
:
j
.
DeptId
,
Name
:
j
.
DeptName
,
}
this
.
spweeklist
[
y
].
list
[
index
].
DeptList
.
push
(
obj
)
return
}
else
{
if
(
j
.
ChildList
&&
j
.
ChildList
.
length
>
0
)
{
this
.
ChildList
(
x
,
j
.
ChildList
,
y
,
index
)
}
}
})
})
this
.
getalluser
()
},
getalluser
()
{
//获取所以选择的成员的 上限处理
this
.
addMsg
.
LimitList
=
[]
this
.
lsweeklist
.
forEach
(
x
=>
{
//企业成员
if
(
x
.
chek
==
true
){
x
.
lsMsg
.
forEach
(
j
=>
{
if
(
this
.
addMsg
.
Type
==
1
){
let
obj
=
{
Id
:
0
,
EmpId
:
j
.
EmpId
,
EmpName
:
j
.
EmpName
,
LimitNum
:
'0'
}
this
.
addMsg
.
LimitList
.
push
(
obj
)
}
else
{
j
.
EmpList
.
forEach
(
z
=>
{
let
obj
=
{
Id
:
0
,
EmpId
:
z
.
DeptId
,
EmpName
:
z
.
DeptName
,
LimitNum
:
'0'
}
this
.
addMsg
.
LimitList
.
push
(
obj
)
})
}
if
(
j
.
DeptList
&&
j
.
DeptList
.
length
>
0
){
j
.
DeptList
.
forEach
(
item
=>
{
this
.
Employeelist
.
map
(
z
=>
{
if
(
item
.
Id
==
z
.
Dept_Id
){
let
obj
=
{
Id
:
0
,
EmpId
:
z
.
Id
,
EmpName
:
z
.
EmployeeName
,
LimitNum
:
'0'
}
this
.
addMsg
.
LimitList
.
push
(
obj
)
}
})
})
}
})
}
})
if
(
this
.
addMsg
.
SpecialDateEnable
==
1
){
this
.
spweeklist
.
forEach
(
x
=>
{
//特殊时期 人员处理
x
.
list
.
forEach
(
j
=>
{
j
.
EmpList
.
forEach
(
item
=>
{
let
obj
if
(
this
.
addMsg
.
Type
==
1
){
if
(
item
.
Id
!=
''
){
obj
=
{
Id
:
0
,
EmpId
:
item
.
Id
,
EmpName
:
item
.
Name
,
LimitNum
:
'0'
}
this
.
addMsg
.
LimitList
.
push
(
obj
)
}
}
else
{
obj
=
{
Id
:
0
,
EmpId
:
item
.
DeptId
,
EmpName
:
item
.
DeptName
,
LimitNum
:
'0'
}
this
.
addMsg
.
LimitList
.
push
(
obj
)
}
})
if
(
j
.
DeptList
.
length
>
0
){
j
.
DeptList
.
forEach
(
item
=>
{
this
.
Employeelist
.
map
(
z
=>
{
if
(
item
.
Id
==
z
.
Dept_Id
){
let
obj
=
{
Id
:
0
,
EmpId
:
z
.
Id
,
EmpName
:
z
.
EmployeeName
,
LimitNum
:
'0'
}
this
.
addMsg
.
LimitList
.
push
(
obj
)
}
})
})
}
})
})
}
this
.
addMsg
.
LimitList
=
this
.
filterArr
(
this
.
addMsg
.
LimitList
,
'EmpId'
)
// console.log(this.addMsg.LimitList)
},
filterArr
(
Arr
,
data
)
{
//根据参数去重
let
newarr
=
{};
return
Arr
.
reduce
((
ok
,
item
)
=>
{
newarr
[
item
[
data
]]
?
''
:
newarr
[
item
[
data
]]
=
true
&&
ok
.
push
(
item
);
return
ok
;
},
[]);
},
}
}
</
script
>
\ No newline at end of file
src/pages/enterprise/channelcodeList.vue
0 → 100644
View file @
11103e1f
<
template
>
<div
class=
"channelcodeList 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=
"changePage(1)"
clearable
standout=
"bg-primary text-white"
v-model=
"msg.Name"
label=
"渠道码名称"
@
clear=
"changePage(1)"
maxlength=
"20"
/>
</div>
<div
class=
"col-3"
>
<q-select
filled
stack-label
@
input=
"changePage(1)"
option-value=
"Id"
option-label=
"Name"
v-model=
"msg.Type"
ref=
"Id"
:options=
"typeList"
label=
"类型"
:dense=
"false"
emit-value
map-options
/>
</div>
<div
class=
"col-3"
>
<q-select
filled
stack-label
@
input=
"changePage(1)"
option-value=
"Id"
option-label=
"Name"
v-model=
"msg.Type"
ref=
"Id"
:options=
"GroupList"
label=
"分组"
:dense=
"false"
emit-value
map-options
/>
</div>
</div>
</div>
<div
class=
"page-content"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table"
separator=
"none"
title=
""
:data=
"data"
:columns=
"columns"
row-key=
"name"
>
<template
v-slot:top=
"props"
>
<div
class=
"col-2 q-table__title"
>
渠道码
</div>
<q-space
/>
<q-btn
color=
"accent"
style=
"float:right;margin-right:0;"
size=
"sm"
class=
"q-mr-md"
icon=
"add"
label=
"新建"
@
click=
"goadd()"
></q-btn>
</
template
>
<
template
v-slot:body-cell-WXQRCode=
"props"
>
<q-td
:props=
"props"
>
<q-img
v-if=
"props.row.WXQRCode && props.row.WXQRCode!=''"
:src=
"props.row.WXQRCode"
style=
"width: 90px;height: 90px;display: flex;"
>
</q-img>
<div>
{{
props
.
row
.
Type
==
1
?
'单人'
:
'多人'
}}
</div>
</q-td>
</
template
>
<
template
v-slot:body-cell-LabelList=
"props"
>
<q-td
:props=
"props"
>
<div
style=
"max-width: 300px;"
v-if=
"props.row.LabelList.length>0"
>
<span
v-for=
"(x,y) in props.row.LabelList"
:key=
'y'
>
{{
x
}}{{
props
.
row
.
LabelList
.
length
!=
y
+
1
?
'、'
:
''
}}
</span>
</div>
</q-td>
</
template
>
<
template
v-slot:body-cell-SkipVerify=
"props"
>
<q-td
:props=
"props"
>
<div>
{{
props
.
row
.
SkipVerify
==
1
?
'需要验证'
:
'自动通过'
}}
</div>
</q-td>
</
template
>
<
template
v-slot:body-cell-UpdateByName=
"props"
>
<q-td
:props=
"props"
>
<div>
{{
props
.
row
.
UpdateByName
}}
</div>
<div>
{{
props
.
row
.
UpdateTime
}}
</div>
</q-td>
</
template
>
<
template
v-slot:body-cell-optioned=
"props"
>
<q-td
:props=
"props"
>
<q-btn
flat
size=
"xs"
icon=
"edit"
style=
"font-weight:400;color: #3FC4FF"
class=
"q-mr-xs"
label=
"编辑"
@
click=
"goedit(props.row)"
/>
<q-btn
flat
size=
"xs"
icon=
"delete"
color=
"negative"
class=
"q-mr-xs"
label=
"删除"
@
click=
"goDetailed(props.row)"
/>
</q-td>
</
template
>
<
template
v-slot:bottom
>
<q-pagination
class=
"full-width justify-end"
v-model=
"msg.pageIndex"
color=
"primary"
:max=
"pageCount"
:input=
"true"
@
input=
"changePage"
/>
</
template
>
</q-table>
</div>
<q-dialog
v-model=
"isDetails"
>
<q-card
style=
"width: 560px;"
>
<q-card-section
class=
"row items-center q-pb-none"
>
<div
class=
"text-h6"
>
欢迎语详情
</div>
<q-space
/>
<q-btn
icon=
"close"
flat
round
dense
v-close-popup
/>
</q-card-section>
<q-card-section
v-if=
'Detailsobj'
class=
"channelcodeList"
>
</q-card-section>
</q-card>
</q-dialog>
</div>
</template>
<
script
>
import
{
getWeChatChannelPageList
,
getWeChatChannelGroupList
}
from
'../../api/system/wechat'
;
import
{
queryEmployee
}
from
'../../api/users/user'
export
default
{
meta
:
{
title
:
"渠道码"
},
name
:
"channelcodeList"
,
data
()
{
return
{
loading
:
false
,
ISsystem
:
false
,
data
:
[],
pageCount
:
0
,
msg
:
{
pageIndex
:
1
,
pageSize
:
15
,
rowsPerPage
:
15
,
ChannelGroupId
:
0
,
Name
:
''
,
Type
:
0
,
},
typeList
:
[
{
Id
:
0
,
Name
:
'不限'
},
{
Id
:
1
,
Name
:
'单人'
},
{
Id
:
2
,
Name
:
'多人'
},
],
//公告column
columns
:
[{
name
:
'二维码'
,
label
:
'二维码'
,
field
:
'二维码'
,
align
:
'left'
},
{
name
:
'Name'
,
field
:
'Name'
,
label
:
'名称'
,
align
:
'left'
,
},
{
name
:
'ChannelGroupName'
,
field
:
'ChannelGroupName'
,
label
:
'分组'
,
align
:
'left'
},
{
name
:
'CustomerNum'
,
field
:
'CustomerNum'
,
label
:
'客户数'
,
align
:
'left'
},
{
name
:
'LabelList'
,
field
:
'LabelList'
,
label
:
'标签'
,
align
:
'left'
},
{
name
:
'SkipVerify'
,
field
:
'SkipVerify'
,
label
:
'自动添加好友'
,
align
:
'left'
},
{
name
:
'UpdateByName'
,
field
:
'UpdateByName'
,
label
:
'操作人'
,
align
:
'left'
},
{
name
:
'optioned'
,
label
:
'操作'
,
field
:
'DeptId'
}
],
GroupList
:
[],
isDetails
:
false
,
Detailsobj
:
null
}
},
created
()
{
this
.
getChannelGroupList
()
//分租列表
this
.
getList
()
},
methods
:
{
getChannelGroupList
()
{
getWeChatChannelGroupList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
GroupList
=
res
.
Data
;
let
obj
=
{
Id
:
0
,
Name
:
'不限'
}
this
.
GroupList
.
unshift
(
obj
)
}
}).
catch
(()
=>
{
})
},
changePage
(
e
)
{
this
.
msg
.
pageIndex
=
1
this
.
getList
()
},
getList
()
{
this
.
loading
=
true
getWeChatChannelPageList
(
this
.
msg
).
then
(
res
=>
{
this
.
loading
=
false
this
.
data
=
res
.
Data
.
PageData
;
this
.
pageCount
=
res
.
Data
.
PageCount
})
},
goadd
()
{
this
.
$router
.
push
({
path
:
'/enterprise/addchannelcode'
,
});
},
goedit
(
row
)
{
//编辑
this
.
$router
.
push
({
path
:
'/enterprise/addWelcome'
,
query
:
{
Id
:
row
.
Id
}
});
},
goDetailed
(
row
)
{
//删除
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
'是否确定删除所此欢迎语?'
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
delWechatWelcomesInfo
({
WelcomesId
:
row
.
Id
}).
then
(
res
=>
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
res
.
Message
,
position
:
'top'
})
this
.
getList
()
})
}).
onCancel
(()
=>
{
});
},
viewDetails
(
row
)
{
this
.
Detailsobj
=
row
this
.
isDetails
=
true
}
}
}
</
script
>
<
style
>
.channelcodeList
.Sysuser_Date
.el-input--prefix
.el-input__inner
{
background-color
:
red
;
border
:
0
;
}
.channelcodeList
.state-item
{
padding
:
2px
5px
;
border-radius
:
3px
;
text-align
:
center
;
font-size
:
10px
;
}
.channelcodeList
.frIdlist
{
padding
:
3px
10px
;
border-radius
:
3px
;
background
:
#EEEEEF
;
align-items
:
center
;
justify-content
:
center
;
margin-right
:
5px
;
margin-bottom
:
5px
;
cursor
:
pointer
;
}
.class-popover
.q-pr-lg
{
padding-right
:
0
;
margin-top
:
20px
;
}
.channelcodeList
.el-date-editor.el-input
{
width
:
100%
;
}
.channelcodeList
.el-date-editor.el-input
input
{
background-color
:
transparent
!important
;
}
.channelcodeList
.el-range-editor
.el-range-input
{
background
:
none
;
}
.Sysuser_Date
.el-input__inner
{
background
:
transparent
!important
;
border
:
0
!important
;
}
.channelcodeList
.el-drawer.rtl
{
overflow
:
inherit
;
}
.channelcodeList
.box_l
{
width
:
400px
;
border-radius
:
6px
;
margin-right
:
15px
;
background
:
#fff
;
margin-top
:
20px
;
margin-left
:
10px
;
box-shadow
:
0px
0px
10px
rgba
(
191
,
191
,
191
,
0.7
);
}
.channelcodeList
.boxl_title
{
width
:
100%
;
height
:
56px
;
display
:
flex
;
align-items
:
center
;
border-bottom
:
1px
solid
#e8e8e8
;
}
</
style
>
\ No newline at end of file
src/router/routes.js
View file @
11103e1f
...
@@ -1190,7 +1190,16 @@ const routes = [{
...
@@ -1190,7 +1190,16 @@ const routes = [{
component
:
()
=>
component
:
()
=>
import
(
"pages/enterprise/customerLabel"
)
import
(
"pages/enterprise/customerLabel"
)
},
},
{
path
:
"/enterprise/channelcodeList"
,
//企微 渠道活码
component
:
()
=>
import
(
"pages/enterprise/channelcodeList"
)
},
{
path
:
"/enterprise/addchannelcode"
,
//企微 新增修改渠道活码
component
:
()
=>
import
(
"pages/enterprise/addchannelcode"
)
},
...
...
src/utils/erpindex.js
View file @
11103e1f
...
@@ -81,9 +81,9 @@ export default {
...
@@ -81,9 +81,9 @@ export default {
//域名管理对象
//域名管理对象
Vue
.
prototype
.
domainManager
=
function
()
{
Vue
.
prototype
.
domainManager
=
function
()
{
// let domainUrl = 'http://192.168.20.24';
// let domainUrl = 'http://192.168.20.24';
let
domainUrl
=
'http://192.168.20.
51:8082
'
;
let
domainUrl
=
'http://192.168.20.
6:8083
'
;
let
viewFileUrl
=
'http://192.168.20.214:8120'
;
let
viewFileUrl
=
'http://192.168.20.214:8120'
;
let
mallUrl
=
"http://192.168.20.
17:8014
"
;
let
mallUrl
=
"http://192.168.20.
6:8088
"
;
// let vtUploadUrl = "http://192.168.20.214:8120";
// let vtUploadUrl = "http://192.168.20.214:8120";
let
vtUploadUrl
=
"http://upload.oytour.com"
;
let
vtUploadUrl
=
"http://upload.oytour.com"
;
let
vtViewUrl
=
"http://192.168.20.214:8130"
;
let
vtViewUrl
=
"http://192.168.20.214:8130"
;
...
...
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