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
48e5f316
Commit
48e5f316
authored
Aug 10, 2021
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
120d4220
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
402 additions
and
267 deletions
+402
-267
wechat.js
src/api/system/wechat.js
+24
-0
allAddSC.vue
src/components/enterprise/material/allAddSC.vue
+3
-0
allmaterial.vue
src/components/enterprise/material/allmaterial.vue
+44
-40
addWelcome.vue
src/pages/enterprise/addWelcome.vue
+118
-66
welcomeList.vue
src/pages/enterprise/welcomeList.vue
+213
-161
No files found.
src/api/system/wechat.js
View file @
48e5f316
...
@@ -152,4 +152,28 @@ export function SetSynvEduEmployee(data) {
...
@@ -152,4 +152,28 @@ export function SetSynvEduEmployee(data) {
method
:
'post'
,
method
:
'post'
,
data
data
})
})
}
/**
* 获取欢迎语分页列表
*
*/
export
function
getWeChatWelcomesPageList
(
data
)
{
return
request
({
url
:
'/QYWeChat/GetWeChatWelcomesPageList'
,
method
:
'post'
,
data
})
}
/**
* 新增修改欢迎语
*
*/
export
function
setWeChatWelcomesInfo
(
data
)
{
return
request
({
url
:
'/QYWeChat/SetWeChatWelcomesInfo'
,
method
:
'post'
,
data
})
}
}
\ No newline at end of file
src/components/enterprise/material/allAddSC.vue
View file @
48e5f316
...
@@ -345,6 +345,7 @@
...
@@ -345,6 +345,7 @@
addMsg
:
{
addMsg
:
{
Id
:
0
,
Id
:
0
,
Type
:
1
,
Type
:
1
,
Is_Sync
:
1
,
//是否同步 暂时默认为1 同步
MediaGroupId
:
''
,
MediaGroupId
:
''
,
}
}
...
@@ -353,6 +354,7 @@
...
@@ -353,6 +354,7 @@
created
()
{
created
()
{
if
(
this
.
editobj
!=
null
)
{
if
(
this
.
editobj
!=
null
)
{
this
.
addMsg
=
this
.
editobj
this
.
addMsg
=
this
.
editobj
this
.
addMsg
.
Is_Sync
=
1
}
else
{
}
else
{
this
.
gettype
()
this
.
gettype
()
}
}
...
@@ -361,6 +363,7 @@
...
@@ -361,6 +363,7 @@
gettype
()
{
gettype
()
{
this
.
addMsg
.
Id
=
0
;
this
.
addMsg
.
Id
=
0
;
this
.
addMsg
.
Type
=
this
.
type
this
.
addMsg
.
Type
=
this
.
type
this
.
addMsg
.
Is_Sync
=
1
;
this
.
addMsg
.
MediaGroupId
=
''
;
this
.
addMsg
.
MediaGroupId
=
''
;
if
(
this
.
type
==
1
)
{
//文本
if
(
this
.
type
==
1
)
{
//文本
this
.
addMsg
.
TextModel
=
{
this
.
addMsg
.
TextModel
=
{
...
...
src/components/enterprise/material/allmaterial.vue
View file @
48e5f316
...
@@ -6,8 +6,9 @@
...
@@ -6,8 +6,9 @@
</div>
</div>
</div>
-->
</div>
-->
<div
class=
"page-content"
>
<div
class=
"page-content"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table no-bottom-table"
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
separator=
"none"
title=
""
:data=
"dataList"
:columns=
"columns"
row-key=
"name"
>
class=
"sticky-column-table no-bottom-table"
separator=
"none"
title=
""
:data=
"dataList"
:columns=
"columns"
row-key=
"name"
>
<template
v-slot:body-cell-title=
"props"
>
<template
v-slot:body-cell-title=
"props"
>
<q-td
:props=
"props"
>
<q-td
:props=
"props"
>
...
@@ -17,47 +18,50 @@
...
@@ -17,47 +18,50 @@
<
template
v-slot:body-cell-Content=
"props"
>
<
template
v-slot:body-cell-Content=
"props"
>
<q-td
:props=
"props"
>
<q-td
:props=
"props"
>
<span
v-if=
"props.row.Type==1"
>
{{
getType
(
props
.
row
,
'content'
)
}}
</span>
<div
style=
"width: 200px;"
>
<q-img
v-if=
"props.row.Type==2 || props.row.Type==3 || props.row.Type==6"
<span
v-if=
"props.row.Type==1"
>
{{
getType
(
props
.
row
,
'content'
)
}}
</span>
:src=
"getType(props.row,'content')"
style=
"width: 80px;height: 80px;border-radius: 6px;display: flex;"
>
<q-img
v-if=
"props.row.Type==2 || props.row.Type==3 || props.row.Type==6"
</q-img>
:src=
"getType(props.row,'content')"
style=
"width: 80px;height: 80px;border-radius: 6px;display: flex;"
>
<audio
controls=
"controls"
</q-img>
v-if=
'props.row.Type==4 && props.row.AudioModel && props.row.AudioModel.AudioPath'
<audio
controls=
"controls"
style=
"width: 200px;height: 40px;"
>
v-if=
'props.row.Type==4 && props.row.AudioModel && props.row.AudioModel.AudioPath'
<source
:src=
"props.row.AudioModel.AudioPath"
type=
"audio/ogg"
>
style=
"width: 200px;height: 40px;"
>
<source
:src=
"props.row.AudioModel.AudioPath"
type=
"audio/mpeg"
>
<source
:src=
"props.row.AudioModel.AudioPath"
type=
"audio/ogg"
>
</audio>
<source
:src=
"props.row.AudioModel.AudioPath"
type=
"audio/mpeg"
>
<video
width=
"200"
height=
"120"
controls=
"controls"
</audio>
v-if=
"props.row.Type==5 && props.row.VideoModel && props.row.VideoModel.VideoPath"
>
<video
width=
"200"
height=
"120"
controls=
"controls"
<source
:src=
"props.row.VideoModel.VideoPath"
type=
"video/ogg"
/>
v-if=
"props.row.Type==5 && props.row.VideoModel && props.row.VideoModel.VideoPath"
>
<source
:src=
"props.row.VideoModel.VideoPath"
type=
"video/mp4"
/>
<source
:src=
"props.row.VideoModel.VideoPath"
type=
"video/ogg"
/>
<source
:src=
"props.row.VideoModel.VideoPath"
type=
"video/webm"
/>
<source
:src=
"props.row.VideoModel.VideoPath"
type=
"video/mp4"
/>
</video>
<source
:src=
"props.row.VideoModel.VideoPath"
type=
"video/webm"
/>
<div
v-if=
"props.row.Type==7 && props.row.FileModel && props.row.FileModel.FilePath!=''"
</video>
@
click
.
stop=
"showUpLoadFile(props.row.FileModel)"
>
<div
v-if=
"props.row.Type==7 && props.row.FileModel && props.row.FileModel.FilePath!=''"
<i
v-if=
"props.row.FileModel.FilePath.substring(props.row.FileModel.FilePath.lastIndexOf('.')+1,props.row.FileModel.FilePath.length).toUpperCase()=='PDF'"
@
click
.
stop=
"showUpLoadFile(props.row.FileModel)"
>
class=
"iconfont icon-pdf"
></i>
<i
v-if=
"props.row.FileModel.FilePath.substring(props.row.FileModel.FilePath.lastIndexOf('.')+1,props.row.FileModel.FilePath.length).toUpperCase()=='PDF'"
<i
v-else-if=
"props.row.FileModel.FilePath.substring(props.row.FileModel.FilePath.lastIndexOf('.')+1,props.row.FileModel.FilePath.length).toUpperCase()=='TXT'"
class=
"iconfont icon-pdf"
></i>
class=
"iconfont icon-txt"
></i>
<i
v-else-if=
"props.row.FileModel.FilePath.substring(props.row.FileModel.FilePath.lastIndexOf('.')+1,props.row.FileModel.FilePath.length).toUpperCase()=='TXT'"
<i
v-else-if=
"props.row.FileModel.FilePath.substring(props.row.FileModel.FilePath.lastIndexOf('.')+1,props.row.FileModel.FilePath.length).toUpperCase()=='DOCX' ||
class=
"iconfont icon-txt"
></i>
<i
v-else-if=
"props.row.FileModel.FilePath.substring(props.row.FileModel.FilePath.lastIndexOf('.')+1,props.row.FileModel.FilePath.length).toUpperCase()=='DOCX' ||
props.row.FileModel.FilePath.substring(props.row.FileModel.FilePath.lastIndexOf('.')+1,props.row.FileModel.FilePath.length).toUpperCase()=='DOC'
props.row.FileModel.FilePath.substring(props.row.FileModel.FilePath.lastIndexOf('.')+1,props.row.FileModel.FilePath.length).toUpperCase()=='DOC'
"
class=
"iconfont icon-word"
></i>
"
class=
"iconfont icon-word"
></i>
<i
v-else
class=
"iconfont icon-excel"
></i>
<i
v-else
class=
"iconfont icon-excel"
></i>
</div>
</div>
</div>
</q-td>
</q-td>
</
template
>
</
template
>
<
template
v-slot:body-cell-optioned=
"props"
>
<
template
v-slot:body-cell-optioned=
"props"
>
<q-td
:props=
"props"
>
<q-td
:props=
"props"
>
<q-btn
flat
size=
"xs"
icon=
"edit"
style=
"font-weight:400;color: #3FC4FF"
class=
"q-mr-xs"
label=
"编辑"
v-if=
"props.row.Type==1 || props.row.Type==3 || props.row.Type==6 "
<q-btn
flat
size=
"xs"
icon=
"edit"
style=
"font-weight:400;color: #3FC4FF"
class=
"q-mr-xs"
label=
"编辑"
@
click=
"goedit(props.row)"
/>
v-if=
"props.row.Type==1 || props.row.Type==3 || props.row.Type==6 "
@
click=
"goedit(props.row)"
/>
<q-btn
flat
size=
"xs"
icon=
"edit"
style=
"font-weight:400;color: #3FC4FF"
class=
"q-mr-xs"
label=
"移动"
<q-btn
flat
size=
"xs"
icon=
"edit"
style=
"font-weight:400;color: #3FC4FF"
class=
"q-mr-xs"
label=
"移动"
@
click=
"plmove(props)"
/>
@
click=
"plmove(props)"
/>
<q-btn
flat
size=
"xs"
icon=
"delete"
color=
"negative"
class=
"q-mr-xs"
label=
"删除"
<q-btn
flat
size=
"xs"
icon=
"delete"
color=
"negative"
class=
"q-mr-xs"
label=
"删除"
@
click=
"goDetailed(props.row,'0')"
/>
@
click=
"goDetailed(props.row,'0')"
/>
</q-td>
</q-td>
</
template
>
</
template
>
</q-table>
</q-table>
</div>
</div>
<div
v-if=
"Isadd==true"
>
<div
v-if=
"Isadd==true"
>
...
@@ -72,8 +76,8 @@
...
@@ -72,8 +76,8 @@
import
alladdsc
from
'./allAddSC'
import
alladdsc
from
'./allAddSC'
import
{
import
{
delWecharMediumInfo
,
//删除素材
delWecharMediumInfo
,
//删除素材
}
from
'../../../api/system/wechat'
;
}
from
'../../../api/system/wechat'
;
export
default
{
export
default
{
components
:
{
components
:
{
alladdsc
,
alladdsc
,
...
@@ -95,8 +99,8 @@
...
@@ -95,8 +99,8 @@
Isadd
:
false
,
Isadd
:
false
,
ISsystem
:
false
,
ISsystem
:
false
,
editobj
:
null
,
editobj
:
null
,
showtype
:
1
,
showtype
:
1
,
msg
:
{
msg
:
{
pageIndex
:
1
,
pageIndex
:
1
,
pageSize
:
10
,
pageSize
:
10
,
...
@@ -243,20 +247,20 @@
...
@@ -243,20 +247,20 @@
this
.
editobj
.
Id
=
row
.
Id
;
this
.
editobj
.
Id
=
row
.
Id
;
this
.
editobj
.
MediaGroupId
=
row
.
MediaGroupId
;
this
.
editobj
.
MediaGroupId
=
row
.
MediaGroupId
;
this
.
editobj
.
Type
=
row
.
Type
;
this
.
editobj
.
Type
=
row
.
Type
;
if
(
row
.
Type
==
1
)
{
if
(
row
.
Type
==
1
)
{
this
.
editobj
.
TextModel
=
JSON
.
parse
(
JSON
.
stringify
(
row
.
TextModel
));
this
.
editobj
.
TextModel
=
JSON
.
parse
(
JSON
.
stringify
(
row
.
TextModel
));
}
else
if
(
row
.
Type
==
3
)
{
}
else
if
(
row
.
Type
==
3
)
{
this
.
editobj
.
ImgTextModel
=
JSON
.
parse
(
JSON
.
stringify
(
row
.
ImgTextModel
));
this
.
editobj
.
ImgTextModel
=
JSON
.
parse
(
JSON
.
stringify
(
row
.
ImgTextModel
));
}
else
if
(
row
.
Type
==
6
)
{
}
else
if
(
row
.
Type
==
6
)
{
this
.
editobj
.
AppletModel
=
JSON
.
parse
(
JSON
.
stringify
(
row
.
AppletModel
));
this
.
editobj
.
AppletModel
=
JSON
.
parse
(
JSON
.
stringify
(
row
.
AppletModel
));
}
}
this
.
showtype
=
row
.
Type
.
toString
()
this
.
showtype
=
row
.
Type
.
toString
()
this
.
Isadd
=
true
this
.
Isadd
=
true
},
},
getchildren
(){
getchildren
()
{
this
.
$emit
(
'editsuccess'
)
this
.
$emit
(
'editsuccess'
)
this
.
Isadd
=
false
this
.
Isadd
=
false
},
},
}
}
...
...
src/pages/enterprise/addWelcome.vue
View file @
48e5f316
...
@@ -50,8 +50,9 @@
...
@@ -50,8 +50,9 @@
</div>
</div>
<div
style=
"padding: 20px;"
>
<div
style=
"padding: 20px;"
>
<div
style=
"display: flex;align-items: flex-start;"
>
<div
style=
"display: flex;align-items: flex-start;"
>
<i
class=
"el-icon-user"
style=
"margin-right:20px;font-size: 40px;color: #1890ff;"
></i>
<i
class=
"el-icon-user"
style=
"margin-right:20px;font-size: 40px;color: #1890ff;"
></i>
<div
style=
"width: 1px; flex:1;background: #f3f6fb;word-wrap: break-word;padding: 10px;border-radius: 4px;min-height: 40px;"
>
<div
style=
"width: 1px; flex:1;background: #f3f6fb;word-wrap: break-word;padding: 10px;border-radius: 4px;min-height: 40px;"
>
{{
addMsg
.
Content
}}
{{
addMsg
.
Content
}}
</div>
</div>
</div>
</div>
...
@@ -61,14 +62,14 @@
...
@@ -61,14 +62,14 @@
<el-form
ref=
"addMsg"
:model=
"addMsg"
label-width=
"120px"
>
<el-form
ref=
"addMsg"
:model=
"addMsg"
label-width=
"120px"
>
<el-form-item
label=
"企业微信成员:"
>
<el-form-item
label=
"企业微信成员:"
>
<div
class=
"q-gutter-sm"
style=
"align-items: center;display: flex;"
>
<div
class=
"q-gutter-sm"
style=
"align-items: center;display: flex;"
>
<q-radio
v-model=
"
addMsg.
membertype"
val=
"1"
label=
"通用"
/>
<q-radio
v-model=
"membertype"
val=
"1"
label=
"通用"
/>
<q-radio
v-model=
"
addMsg.
membertype"
val=
"2"
label=
"指定企业成员"
/>
<q-radio
v-model=
"membertype"
val=
"2"
label=
"指定企业成员"
/>
<q-btn
color=
"accent"
label=
"选择成员"
size=
'sm'
class=
"q-mr-md"
style=
"margin-left: 20px;"
<q-btn
color=
"accent"
label=
"选择成员"
size=
'sm'
class=
"q-mr-md"
style=
"margin-left: 20px;"
v-if=
"
addMsg.
membertype==2"
@
click=
'getMember'
/>
v-if=
"membertype==2"
@
click=
'getMember'
/>
<div
v-if=
"
addMsg.ryList.length>0 && addMsg.
membertype==2"
style=
"margin-top: 8px;"
>
<div
v-if=
"
ryList.length>0 &&
membertype==2"
style=
"margin-top: 8px;"
>
<span
style=
"margin-left: 15px"
>
已选择
{{
addMsg
.
ryList
.
length
}}
名成员
</span>
<span
style=
"margin-left: 15px"
>
已选择
{{
ryList
.
length
}}
名成员
</span>
<span
style=
"cursor: pointer;color: #1890ff;margin-left: 15px;"
<span
style=
"cursor: pointer;color: #1890ff;margin-left: 15px;"
@
click=
'
addMsg.
ryList =[],showMember=[]'
>
重置
</span>
@
click=
'ryList =[],showMember=[]'
>
重置
</span>
</div>
</div>
</div>
</div>
...
@@ -76,20 +77,22 @@
...
@@ -76,20 +77,22 @@
</el-form-item>
</el-form-item>
<el-form-item
label=
"文本内容:"
>
<el-form-item
label=
"文本内容:"
>
<q-input
v-model=
"addMsg.Content"
filled
clearable
type=
"textarea"
label=
"文本内容"
style=
"width: 60%;"
/>
<q-input
v-model=
"addMsg.Content"
filled
clearable
type=
"textarea"
label=
"文本内容"
style=
"width: 60%;"
/>
<div
style=
"margin-top: 10px;"
>
<div
style=
"margin-top: 10px;"
>
<q-btn
color=
"accent"
label=
"+插入客户名称"
size=
'sm'
class=
"q-mr-md"
@
click=
'insert'
/>
<q-btn
color=
"accent"
label=
"+插入客户名称"
size=
'sm'
class=
"q-mr-md"
@
click=
'insert'
/>
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item
label=
"添加内容:"
>
<el-form-item
label=
"添加内容:"
>
<q-btn
color=
"white"
text-color=
"black"
label=
"+添加图片/图文/小程序"
size=
'md'
v-if=
"JSON.stringify(Selectobj) == '
{}'">
<q-btn
color=
"white"
text-color=
"black"
label=
"+添加图片/图文/小程序"
size=
'md'
v-if=
"JSON.stringify(Selectobj) == '
{}'">
<q-popup-proxy
ref=
'popupproxy'
>
<q-popup-proxy
ref=
'popupproxy'
>
<q-banner>
<q-banner>
<q-btn-group
push
>
<q-btn-group
push
>
<q-btn
label=
"图片"
icon=
"images"
@
click=
"selectimg()"
/>
<q-btn
label=
"图片"
icon=
"images"
@
click=
"selectimg()"
/>
<q-btn
label=
"图文"
icon=
"visibility"
@
click=
"selecttextimg()"
/>
<q-btn
label=
"图文"
icon=
"visibility"
@
click=
"selecttextimg()"
/>
<q-btn
label=
"小程序"
icon=
"update"
@
click=
"selectxcx()"
/>
<q-btn
label=
"小程序"
icon=
"update"
@
click=
"selectxcx()"
/>
</q-btn-group>
</q-btn-group>
</q-banner>
</q-banner>
</q-popup-proxy>
</q-popup-proxy>
...
@@ -102,12 +105,17 @@
...
@@ -102,12 +105,17 @@
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<q-card-actions
align=
"left"
class=
"bg-white"
style=
"margin-top: 15px;"
>
<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;"
/>
</q-card-actions>
</div>
</div>
<!-- 人员选择 -->
<!-- 人员选择 -->
<el-dialog
custom-class=
'w700'
title=
"选择人员"
:visible
.
sync=
"outerVisible"
center
>
<el-dialog
custom-class=
'w700'
title=
"选择人员"
:visible
.
sync=
"outerVisible"
center
>
<div
class=
"fl"
style=
"width: 300px; margin: 0 20px;"
>
<div
class=
"fl"
style=
"width: 300px; margin: 0 20px;"
>
<p
style=
"margin: 0 0 10px 0;"
>
选择:
<el-input
class=
'w200'
placeholder=
"输入关键字进行过滤"
v-model=
"filterText"
@
input=
""
>
<p
style=
"margin: 0 0 10px 0;"
>
选择:
<el-input
class=
'w200'
placeholder=
"输入关键字进行过滤"
v-model=
"filterText"
@
input=
""
>
</el-input>
</el-input>
</p>
</p>
<el-tree
class=
'ApprovalProcessBg'
:data=
"memberList"
show-checkbox
:filter-node-method=
"filterNode"
<el-tree
class=
'ApprovalProcessBg'
:data=
"memberList"
show-checkbox
:filter-node-method=
"filterNode"
...
@@ -129,35 +137,26 @@
...
@@ -129,35 +137,26 @@
</div>
</div>
</el-dialog>
</el-dialog>
<!-- 图片 -->
<!-- 图片 -->
<selectMaterial
v-if=
"isshowselectMaterial"
<selectMaterial
v-if=
"isshowselectMaterial"
:materialType=
"materialType"
:saveobj=
'Selectobj'
:materialType=
"materialType"
@
close=
"getclose()"
@
success=
'getsuccess'
>
:saveobj =
'Selectobj'
@
close =
"getclose()"
@
success=
'getsuccess'
>
</selectMaterial>
</selectMaterial>
<!-- 图文 -->
<!-- 图文 -->
<imagetextform
v-if=
"isshowimagetext"
<imagetextform
v-if=
"isshowimagetext"
:saveobj=
'Selectobj'
@
close=
"gettwclose()"
@
success=
'gettwsuccess'
>
:saveobj =
'Selectobj'
@
close =
"gettwclose()"
@
success=
'gettwsuccess'
>
</imagetextform>
</imagetextform>
<!-- 小程序 -->
<!-- 小程序 -->
<appletform
v-if=
"isshowapplet"
<appletform
v-if=
"isshowapplet"
:saveobj=
'Selectobj'
@
close=
"getxcxclose()"
@
success=
'getxcxsuccess'
>
:saveobj =
'Selectobj'
@
close =
"getxcxclose()"
@
success=
'getxcxsuccess'
>
</appletform>
</appletform>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
selectMaterial
import
{
setWeChatWelcomesInfo
,
}
from
'../../api/system/wechat'
;
import
selectMaterial
from
"../../components/enterprise/selectMaterial"
import
selectMaterial
from
"../../components/enterprise/selectMaterial"
import
imagetextform
from
"../../components/enterprise/imagetext-form"
import
imagetextform
from
"../../components/enterprise/imagetext-form"
import
appletform
from
"../../components/enterprise/applet-form"
import
appletform
from
"../../components/enterprise/applet-form"
import
{
import
{
queryEmployee
queryEmployee
}
from
'../../api/users/user'
}
from
'../../api/users/user'
...
@@ -178,20 +177,24 @@
...
@@ -178,20 +177,24 @@
filterText
:
''
,
//人员选择 帅选
filterText
:
''
,
//人员选择 帅选
memberList
:
[],
//
memberList
:
[],
//
showMember
:
[],
showMember
:
[],
membertype
:
'1'
,
ryList
:
[],
addMsg
:
{
addMsg
:
{
membertype
:
1
,
Id
:
0
,
ryList
:
[],
UserIdList
:
[],
//成员列表
Content
:
""
,
Content
:
""
,
MediumIds
:
''
,
//使用的素材id '1,2,3'格式
Type
:
1
,
//如果MediumIds不为空的情况 type为2
},
},
defaultProps
:
{
defaultProps
:
{
children
:
'ChildList'
,
children
:
'ChildList'
,
label
:
'EmployeeName'
,
label
:
'EmployeeName'
,
},
},
materialType
:
1
,
materialType
:
1
,
isshowselectMaterial
:
false
,
isshowselectMaterial
:
false
,
isshowimagetext
:
false
,
isshowimagetext
:
false
,
isshowapplet
:
false
,
isshowapplet
:
false
,
Selectobj
:{},
//选中对象
Selectobj
:
{},
//选中对象
}
}
},
},
created
()
{
created
()
{
...
@@ -244,55 +247,104 @@
...
@@ -244,55 +247,104 @@
},
},
getmember
()
{
//人员确定选择
getmember
()
{
//人员确定选择
this
.
outerVisible
=
false
;
this
.
outerVisible
=
false
;
this
.
addMsg
.
ryList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
showMember
))
this
.
ryList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
showMember
))
},
},
insert
()
{
insert
()
{
this
.
addMsg
.
Content
=
this
.
addMsg
.
Content
+
'##客户名称##'
this
.
addMsg
.
Content
=
this
.
addMsg
.
Content
+
'##客户名称##'
},
},
selectimg
(){
//素材选择 图片模式
selectimg
()
{
//素材选择 图片模式
this
.
materialType
=
2
;
this
.
materialType
=
2
;
this
.
isshowselectMaterial
=
true
;
this
.
isshowselectMaterial
=
true
;
if
(
this
.
$refs
.
popupproxy
)
{
if
(
this
.
$refs
.
popupproxy
)
{
this
.
$refs
.
popupproxy
.
hide
()
this
.
$refs
.
popupproxy
.
hide
()
}
}
},
},
getclose
(){
//素材关闭
getclose
()
{
//素材关闭
this
.
isshowselectMaterial
=
false
this
.
isshowselectMaterial
=
false
},
},
getsuccess
(
data
){
//选择数据回来
getsuccess
(
data
)
{
//选择数据回来
this
.
Selectobj
=
data
this
.
Selectobj
=
data
this
.
isshowselectMaterial
=
false
this
.
isshowselectMaterial
=
false
},
},
selecttextimg
(){
//图文
selecttextimg
()
{
//图文
this
.
isshowimagetext
=
true
;
this
.
isshowimagetext
=
true
;
if
(
this
.
$refs
.
popupproxy
)
{
if
(
this
.
$refs
.
popupproxy
)
{
this
.
$refs
.
popupproxy
.
hide
()
this
.
$refs
.
popupproxy
.
hide
()
}
}
},
},
gettwclose
(){
//图文
gettwclose
()
{
//图文
this
.
isshowimagetext
=
false
;
this
.
isshowimagetext
=
false
;
},
},
gettwsuccess
(
data
){
//图文返回成功
gettwsuccess
(
data
)
{
//图文返回成功
this
.
Selectobj
=
data
this
.
Selectobj
=
data
this
.
isshowimagetext
=
false
this
.
isshowimagetext
=
false
},
},
selectxcx
(){
//图文
this
.
isshowapplet
=
true
;
selectxcx
()
{
//图文
this
.
isshowapplet
=
true
;
if
(
this
.
$refs
.
popupproxy
){
if
(
this
.
$refs
.
popupproxy
)
{
this
.
$refs
.
popupproxy
.
hide
()
this
.
$refs
.
popupproxy
.
hide
()
}
}
},
},
getxcxclose
(){
//小程序 关闭
getxcxclose
()
{
//小程序 关闭
this
.
isshowapplet
=
false
;
this
.
isshowapplet
=
false
;
},
},
getxcxsuccess
(){
//小程序 关闭
getxcxsuccess
()
{
//小程序 关闭
this
.
Selectobj
=
data
this
.
Selectobj
=
data
this
.
isshowapplet
=
false
this
.
isshowapplet
=
false
},
savemove
()
{
//保存
if
(
this
.
membertype
==
1
)
{
this
.
addMsg
.
UserIdList
=
[
"-1"
];
}
else
{
if
(
this
.
ryList
.
length
>
0
)
{
this
.
addMsg
.
UserIdList
=
[]
this
.
ryList
.
forEach
(
x
=>
{
this
.
addMsg
.
UserIdList
.
push
(
x
.
Id
)
})
}
else
{
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
`请选择人员列表`
,
position
:
'top'
})
return
}
}
if
(
this
.
addMsg
.
MediumIds
==
''
)
{
this
.
addMsg
.
Type
=
1
;
if
(
this
.
addMsg
.
Content
==
''
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
`请输入文本内容`
,
position
:
'top'
})
return
}
}
else
{
this
.
addMsg
.
Type
=
2
;
}
// 调取接口
this
.
loading
=
true
setWeChatWelcomesInfo
(
this
.
addMsg
).
then
(
res
=>
{
this
.
loading
=
false
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
res
.
Message
,
position
:
'top'
})
this
.
goblck
()
})
},
goblck
()
{
//返回上一个页面
this
.
$router
.
go
(
-
1
);
//返回上一层
},
},
...
...
src/pages/enterprise/welcomeList.vue
View file @
48e5f316
<
template
>
<
template
>
<div
class=
"welcomeList page-body"
>
<div
class=
"welcomeList page-body"
>
<!--
<div
class=
"page-search row items-center"
>
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<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>
</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-Type=
"props"
>
<q-td
:props=
"props"
>
<span
v-if=
"props.row.Type==1"
>
图文
</span>
<span
v-if=
"props.row.Type==2"
>
图片
</span>
</q-td>
</
template
>
<
template
v-slot:body-cell-Content=
"props"
>
<q-td
:props=
"props"
>
<div
style=
"max-width: 800px;white-space: normal;"
>
{{
props
.
row
.
Content
}}
</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=
"goDetailed(props.row,'0')"
/>
<q-btn
flat
size=
"xs"
icon=
"delete"
style=
"font-weight:400;color: #3FC4FF"
class=
"q-mr-xs"
label=
"删除"
@
click=
"goDetailed(props.row,'0')"
/>
</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>
</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-Type=
"props"
>
<q-td
:props=
"props"
>
<span
v-if=
"props.row.Type==1"
>
文本
</span>
<span
v-if=
"props.row.Type==2"
>
图片
</span>
<span
v-if=
"props.row.Type==3"
>
图文
</span>
<span
v-if=
"props.row.Type==4"
>
小程序
</span>
</q-td>
</
template
>
<
template
v-slot:body-cell-Content=
"props"
>
<q-td
:props=
"props"
>
<div
style=
"max-width: 800px;white-space: normal;"
>
{{
props
.
row
.
Content
}}
</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>
</div>
</template>
</div>
<
script
>
</template>
<
script
>
export
default
{
import
{
meta
:
{
getWeChatWelcomesPageList
,
title
:
"欢迎语列表"
}
from
'../../api/system/wechat'
;
},
name
:
"welcomeList"
,
export
default
{
data
()
{
meta
:
{
return
{
title
:
"欢迎语列表"
loading
:
false
,
},
ISsystem
:
false
,
name
:
"welcomeList"
,
data
:
[{
Type
:
1
,
Content
:
'文本:您好,##客户名称##!亲~你終於來啦!!我是你的专属顾问,任何有关日语学习问题都可以问我哦!!~~~~~~~~~~ 加入甲鹤大家庭~优惠天天有 第一条~9.9块日语体验课!! 第二条~每周活动免费参加! 第三条~猛戳我,”赞羊”电商优惠券免费送!! 第四条~再戳我,”旅游优惠券”我再送! ~~~~~从现在起”甲鹤日语”就是你学习日语的好帮手!! 现在回复”甲鹤”两个字~看看甲鹤想给你看甚么?~呵呵呵!'
,
applymember
:
'通用'
,
UpdateTime
:
'2021-08-04 15:48'
}],
data
()
{
pageCount
:
0
,
return
{
msg
:
{
loading
:
false
,
pageIndex
:
1
,
ISsystem
:
false
,
pageSize
:
10
,
data
:
[],
rowsPerPage
:
10
,
pageCount
:
0
,
Month
:
''
,
msg
:
{
TeacherId
:
0
,
pageIndex
:
1
,
State
:
0
,
pageSize
:
15
,
},
rowsPerPage
:
15
,
//公告column
Type
:
0
,
columns
:
[{
},
name
:
'Type'
,
typeList
:[
label
:
'欢迎语类型'
,
{
Id
:
0
,
Name
:
'不限'
},
align
:
'left'
{
Id
:
1
,
Name
:
'文本'
},
},
{
Id
:
2
,
Name
:
'图片'
},
{
{
Id
:
3
,
Name
:
'图文'
},
name
:
'Content'
,
{
Id
:
4
,
Name
:
'小程序'
},
field
:
'Content'
,
],
label
:
'欢迎语内容'
,
//公告column
align
:
'left'
,
columns
:
[{
},
name
:
'Type'
,
{
label
:
'欢迎语类型'
,
name
:
'applymember'
,
align
:
'left'
field
:
'applymember'
,
},
label
:
'使用成员'
,
{
align
:
'left'
name
:
'Content'
,
},
field
:
'Content'
,
{
label
:
'欢迎语内容'
,
name
:
'UpdateTime'
,
align
:
'left'
,
field
:
'UpdateTime'
,
},
label
:
'创建时间'
,
{
align
:
'left'
name
:
'UserIdName'
,
},
field
:
'UserIdName'
,
{
label
:
'使用成员'
,
name
:
'optioned'
,
align
:
'left'
label
:
'操作'
,
},
field
:
'DeptId'
{
}
name
:
'UpdateByName'
,
],
field
:
'UpdateByName'
,
label
:
'创建者'
,
align
:
'left'
},
{
name
:
'UpdateTime'
,
field
:
'UpdateTime'
,
label
:
'创建时间'
,
align
:
'left'
},
{
name
:
'optioned'
,
label
:
'操作'
,
field
:
'DeptId'
}
}
],
}
},
created
()
{
this
.
getList
()
},
methods
:
{
changePage
(
e
)
{
this
.
msg
.
pageIndex
=
1
this
.
getList
()
},
},
created
()
{
getList
()
{
this
.
loading
=
true
getWeChatWelcomesPageList
(
this
.
msg
).
then
(
res
=>
{
this
.
loading
=
false
this
.
data
=
res
.
Data
.
PageData
;
this
.
pageCount
=
res
.
Data
.
Count
this
.
data
.
forEach
(
x
=>
{
x
.
UserIdName
=
''
x
.
UserIdList
.
map
((
j
,
i
)
=>
{
if
(
j
==-
1
){
x
.
UserIdName
=
'通用'
return
}
else
{
if
(
i
+
1
!=
x
.
UserIdList
.
length
){
x
.
UserIdName
=
x
.
UserIdName
+
'某某、'
}
else
{
x
.
UserIdName
=
x
.
UserIdName
+
'某某'
}
}
})
})
})
},
},
methods
:
{
goadd
()
{
changePage
(
e
)
{
this
.
$router
.
push
(
{
path
:
'/enterprise/addWelcome'
,
}
,
}
);
goadd
(){
},
this
.
$router
.
push
({
goedit
(){
//编辑
path
:
'/enterprise/addWelcome'
,
});
},
}
goDetailed
(
row
){
//修改
console
.
log
(
row
)
}
}
}
}
}
</
script
>
</
script
>
<
style
>
.welcomeList
.Sysuser_Date
.el-input--prefix
.el-input__inner
{
<
style
>
background-color
:
red
;
.welcomeList
.Sysuser_Date
.el-input--prefix
.el-input__inner
{
border
:
0
;
background-color
:
red
;
}
border
:
0
;
}
.welcomeList
.state-item
{
padding
:
2px
5px
;
.welcomeList
.state-item
{
border-radius
:
3px
;
padding
:
2px
5px
;
text-align
:
center
;
border-radius
:
3px
;
font-size
:
10px
;
text-align
:
center
;
}
font-size
:
10px
;
}
.welcomeList
.frIdlist
{
padding
:
3px
10px
;
.welcomeList
.frIdlist
{
border-radius
:
3px
;
padding
:
3px
10px
;
background
:
#EEEEEF
;
border-radius
:
3px
;
align-items
:
center
;
background
:
#EEEEEF
;
justify-content
:
center
;
align-items
:
center
;
margin-right
:
5px
;
justify-content
:
center
;
margin-bottom
:
5px
;
margin-right
:
5px
;
cursor
:
pointer
;
margin-bottom
:
5px
;
}
cursor
:
pointer
;
}
.class-popover
.q-pr-lg
{
padding-right
:
0
;
.class-popover
.q-pr-lg
{
margin-top
:
20px
;
padding-right
:
0
;
}
margin-top
:
20px
;
}
.welcomeList
.el-date-editor.el-input
{
width
:
100%
;
.welcomeList
.el-date-editor.el-input
{
}
width
:
100%
;
}
.welcomeList
.el-date-editor.el-input
input
{
background-color
:
transparent
!important
;
.welcomeList
.el-date-editor.el-input
input
{
}
background-color
:
transparent
!important
;
}
.welcomeList
.el-range-editor
.el-range-input
{
background
:
none
;
.welcomeList
.el-range-editor
.el-range-input
{
}
background
:
none
;
}
.Sysuser_Date
.el-input__inner
{
background
:
transparent
!important
;
.Sysuser_Date
.el-input__inner
{
border
:
0
!important
;
background
:
transparent
!important
;
}
border
:
0
!important
;
.welcomeList
.el-drawer.rtl
{
}
overflow
:
inherit
;
}
.welcomeList
.el-drawer.rtl
{
</
style
>
overflow
:
inherit
;
}
\ No newline at end of file
</
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