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
699f86e3
Commit
699f86e3
authored
Aug 10, 2021
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
b125b04e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
399 additions
and
269 deletions
+399
-269
wechat.js
src/api/system/wechat.js
+23
-0
allAddSC.vue
src/components/enterprise/material/allAddSC.vue
+8
-8
audiomaterial.vue
src/components/enterprise/material/audiomaterial.vue
+4
-1
selectMaterial.vue
src/components/enterprise/selectMaterial.vue
+245
-223
addWelcome.vue
src/pages/enterprise/addWelcome.vue
+34
-13
welcomeList.vue
src/pages/enterprise/welcomeList.vue
+85
-24
No files found.
src/api/system/wechat.js
View file @
699f86e3
...
...
@@ -176,4 +176,27 @@ export function SetSynvEduEmployee(data) {
method
:
'post'
,
data
})
}
/**
* 删除欢迎语
*
*/
export
function
delWechatWelcomesInfo
(
data
)
{
return
request
({
url
:
'/QYWeChat/DelWechatWelcomesInfo'
,
method
:
'post'
,
data
})
}
/**
* 获取欢迎语详情
*
*/
export
function
getWeChatWelcomesInfo
(
data
)
{
return
request
({
url
:
'/QYWeChat/GetWeChatWelcomesInfo'
,
method
:
'post'
,
data
})
}
\ No newline at end of file
src/components/enterprise/material/allAddSC.vue
View file @
699f86e3
...
...
@@ -126,8 +126,8 @@
<div
style=
"margin-top: 15px;"
>
<div
style=
"width:70px"
>
上传音频:
</div>
<audio
controls=
"controls"
v-if=
'addMsg.AudioModel.AudioPath'
style=
"margin-top: 10px;"
>
<source
:src=
"addMsg.AudioModel.AudioPath"
type=
"audio/ogg"
>
<source
:src=
"addMsg.AudioModel.AudioPath"
type=
"audio/mpeg"
>
<source
:src=
"addMsg.AudioModel.AudioPath"
>
</audio>
<div
style=
"margin-top: 15px;"
>
<el-upload
class=
"avatar-uploader "
action=
""
:before-upload=
"uploadFile"
...
...
@@ -136,7 +136,7 @@
</q-btn>
</el-upload>
<div
style=
"margin-top: 20px;"
>
(音频上传大小不超过2MB,播放长度不超过60s,支持AMR
,MP3
格式。)
(音频上传大小不超过2MB,播放长度不超过60s,支持AMR格式。)
</div>
</div>
...
...
@@ -167,9 +167,7 @@
<div
style=
"width:70px"
>
上传视频:
</div>
<video
width=
"320"
height=
"240"
controls=
"controls"
v-if=
"addMsg.VideoModel.VideoPath!=''"
>
<source
:src=
"addMsg.VideoModel.VideoPath"
type=
"video/ogg"
/>
<source
:src=
"addMsg.VideoModel.VideoPath"
type=
"video/mp4"
/>
<source
:src=
"addMsg.VideoModel.VideoPath"
type=
"video/webm"
/>
</video>
<div
style=
"margin-top: 15px;"
>
<el-upload
class=
"avatar-uploader "
action=
""
:before-upload=
"uploadFile"
...
...
@@ -508,7 +506,9 @@
}
if
(
this
.
type
==
4
)
{
//音频上传
// 文件类型进行判断
const
isAudio
=
files
.
type
===
"audio/mp3"
||
files
.
type
===
"audio/mpeg"
;
console
.
log
(
files
.
type
)
const
isAudio
=
files
.
type
===
"audio/amr"
;
const
isLt2M
=
files
.
size
/
1024
/
1024
<
2
;
const
isTime60S
=
this
.
getTimes
(
files
)
>=
60
?
true
:
false
;
// 获取时长
...
...
@@ -516,7 +516,7 @@
if
(
!
isAudio
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
`上传文件只能是
Mp3
格式!`
,
message
:
`上传文件只能是
AMR
格式!`
,
position
:
'top'
})
}
else
{
...
...
@@ -549,7 +549,7 @@
// 文件类型进行判断
const
isLt10M
=
files
.
size
/
1024
/
1024
<
10
;
if
([
'video/mp4'
,
'video/ogg'
,
'video/flv'
,
'video/avi'
,
'video/wmv'
,
'video/rmvb'
].
indexOf
(
files
.
type
)
==
-
1
)
{
if
([
'video/mp4'
].
indexOf
(
files
.
type
)
==
-
1
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
`请上传正确的视频格式!`
,
...
...
src/components/enterprise/material/audiomaterial.vue
View file @
699f86e3
...
...
@@ -22,9 +22,12 @@
<!--
<i
class=
"el-icon-edit-outline"
style=
"font-size: 20px;color: #1890ff;"
@
click
.
stop=
"goedit(x)"
></i>
-->
</div>
<audio
controls=
"controls"
v-if=
'x.AudioModel && x.AudioModel.AudioPath'
style=
"margin-top: 10px;"
class=
"imgstyle"
>
<
!--
<
audio
controls=
"controls"
v-if=
'x.AudioModel && x.AudioModel.AudioPath'
style=
"margin-top: 10px;"
class=
"imgstyle"
>
<source
:src=
"x.AudioModel.AudioPath"
type=
"audio/ogg"
>
<source
:src=
"x.AudioModel.AudioPath"
type=
"audio/mpeg"
>
</audio>
-->
<audio
controls=
"controls"
v-if=
'x.AudioModel && x.AudioModel.AudioPath'
style=
"margin-top: 10px;"
class=
"imgstyle"
:src=
"x.AudioModel.AudioPath"
>
</audio>
<div
class=
"onetext"
style=
"margin-top: 5px;"
>
上传者:
{{
x
.
UpdateByName
}}
</div>
...
...
src/components/enterprise/selectMaterial.vue
View file @
699f86e3
This diff is collapsed.
Click to expand it.
src/pages/enterprise/addWelcome.vue
View file @
699f86e3
...
...
@@ -65,7 +65,7 @@
<q-radio
v-model=
"membertype"
val=
"1"
label=
"通用"
/>
<q-radio
v-model=
"membertype"
val=
"2"
label=
"指定企业成员"
/>
<q-btn
color=
"accent"
label=
"选择成员"
size=
'sm'
class=
"q-mr-md"
style=
"margin-left: 20px;"
v-if=
"membertype==2"
@
click=
'getMember'
/>
v-if=
"membertype==2"
@
click=
'getMember
2
'
/>
<div
v-if=
"ryList.length>0 && membertype==2"
style=
"margin-top: 8px;"
>
<span
style=
"margin-left: 15px"
>
已选择
{{
ryList
.
length
}}
名成员
</span>
<span
style=
"cursor: pointer;color: #1890ff;margin-left: 15px;"
...
...
@@ -84,9 +84,15 @@
</div>
</el-form-item>
<el-form-item
label=
"添加内容:"
>
<q-btn
color=
"white"
text-color=
"black"
label=
"+添加图片/图文/小程序"
size=
'md'
v-if=
"JSON.stringify(Selectobj) == '
{}'">
<div
v-if=
"MediumModel.length>0"
>
<div
class=
"row items-center"
v-for=
"(x,y) in MediumModel"
:key=
"y"
>
<i
class=
"el-icon-link"
></i>
<span
style=
"margin-left: 10px;cursor: pointer;"
@
click=
"selectimg"
>
{{
Selectobj
.
name
}}
</span>
<i
style=
"margin-left: 10px;cursor: pointer"
class=
"el-icon-close"
@
click=
"Selectobj=
{}">
</i>
</div>
</div>
<q-btn
color=
"white"
text-color=
"black"
label=
"+添加图片/图文/小程序"
size=
'md'
>
<q-popup-proxy
ref=
'popupproxy'
>
<q-banner>
<q-btn-group
push
>
...
...
@@ -97,11 +103,7 @@
</q-banner>
</q-popup-proxy>
</q-btn>
<div
class=
"row items-center"
v-else
>
<i
class=
"el-icon-link"
></i>
<span
style=
"margin-left: 10px;cursor: pointer;"
@
click=
"selectimg"
>
{{
Selectobj
.
name
}}
</span>
<i
style=
"margin-left: 10px;cursor: pointer"
class=
"el-icon-close"
@
click=
"Selectobj=
{}">
</i>
</div>
</el-form-item>
</el-form>
...
...
@@ -115,7 +117,7 @@
<el-dialog
custom-class=
'w700'
title=
"选择人员"
:visible
.
sync=
"outerVisible"
center
>
<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=
""
>
@
input=
"
getmemlist
"
>
</el-input>
</p>
<el-tree
class=
'ApprovalProcessBg'
:data=
"memberList"
show-checkbox
:filter-node-method=
"filterNode"
...
...
@@ -137,7 +139,7 @@
</div>
</el-dialog>
<!-- 图片 -->
<selectMaterial
v-if=
"isshowselectMaterial"
:materialType=
"materialType"
:saveobj=
'Selectobj'
<selectMaterial
v-if=
"isshowselectMaterial"
:materialType=
"materialType"
:saveobj=
'Selectobj'
:classifyList=
'classifyList'
@
close=
"getclose()"
@
success=
'getsuccess'
>
</selectMaterial>
<!-- 图文 -->
...
...
@@ -152,6 +154,7 @@
<
script
>
import
{
setWeChatWelcomesInfo
,
getWeChatMediumGroupList
,
}
from
'../../api/system/wechat'
;
import
selectMaterial
from
"../../components/enterprise/selectMaterial"
import
imagetextform
from
"../../components/enterprise/imagetext-form"
...
...
@@ -176,6 +179,7 @@
outerVisible
:
false
,
//选择人员弹窗
filterText
:
''
,
//人员选择 帅选
memberList
:
[],
//
allmemberList
:[],
showMember
:
[],
membertype
:
'1'
,
ryList
:
[],
...
...
@@ -195,18 +199,27 @@
isshowimagetext
:
false
,
isshowapplet
:
false
,
Selectobj
:
{},
//选中对象
MediumModel
:[],
classifyList
:[],
}
},
created
()
{
this
.
getWeChatMediumGroupList
()
},
methods
:
{
getMember
()
{
getWeChatMediumGroupList
()
{
getWeChatMediumGroupList
({}).
then
(
res
=>
{
this
.
classifyList
=
res
.
Data
})
},
getMember2
()
{
this
.
outerVisible
=
true
;
this
.
dialogTitle
=
this
.
$t
(
'fnc.xzrenyuan'
);
queryEmployee
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
memberList
=
res
.
Data
;
this
.
allmemberList
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
Data
))
;
}
}).
catch
(()
=>
{
...
...
@@ -245,6 +258,14 @@
if
(
!
value
)
return
true
;
return
data
.
DepartmentName
.
indexOf
(
value
)
!==
-
1
;
},
getmemlist
(){
if
(
this
.
filterText
===
''
)
{
this
.
memberList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
allmemberList
))
}
else
{
const
needle
=
this
.
filterText
.
toLowerCase
()
this
.
memberList
=
this
.
allmemberList
.
filter
(
v
=>
v
.
EmployeeName
.
toLowerCase
().
indexOf
(
needle
)
>
-
1
)
}
},
getmember
()
{
//人员确定选择
this
.
outerVisible
=
false
;
this
.
ryList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
showMember
))
...
...
src/pages/enterprise/welcomeList.vue
View file @
699f86e3
...
...
@@ -3,11 +3,10 @@
<div
class=
"page-search row items-center"
>
<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
/>
<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"
>
...
...
@@ -34,14 +33,22 @@
</div>
</q-td>
</
template
>
<
template
v-slot:body-cell-UserIdName=
"props"
>
<q-td
:props=
"props"
>
<div
style=
"max-width: 300px;white-space: normal;"
>
{{
props
.
row
.
UserIdName
}}
</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=
"删除"
<q-btn
flat
size=
"xs"
icon=
"delete"
color=
"negative"
class=
"q-mr-xs"
label=
"删除"
@
click=
"goDetailed(props.row)"
/>
</q-td>
</
template
>
...
...
@@ -58,7 +65,11 @@
<
script
>
import
{
getWeChatWelcomesPageList
,
delWechatWelcomesInfo
}
from
'../../api/system/wechat'
;
import
{
queryEmployee
}
from
'../../api/users/user'
export
default
{
meta
:
{
...
...
@@ -77,12 +88,12 @@
rowsPerPage
:
15
,
Type
:
0
,
},
typeList
:[
{
Id
:
0
,
Name
:
'不限'
},
{
Id
:
1
,
Name
:
'文本'
},
{
Id
:
2
,
Name
:
'图片'
},
{
Id
:
3
,
Name
:
'图文'
},
{
Id
:
4
,
Name
:
'小程序'
},
typeList
:
[
{
Id
:
0
,
Name
:
'不限'
},
{
Id
:
1
,
Name
:
'文本'
},
{
Id
:
2
,
Name
:
'图片'
},
{
Id
:
3
,
Name
:
'图文'
},
{
Id
:
4
,
Name
:
'小程序'
},
],
//公告column
columns
:
[{
...
...
@@ -120,13 +131,27 @@
field
:
'DeptId'
}
],
memberList
:[],
}
},
created
()
{
this
.
getMember
()
//获取人员列表
this
.
getList
()
},
methods
:
{
getMember
()
{
this
.
outerVisible
=
true
;
this
.
dialogTitle
=
this
.
$t
(
'fnc.xzrenyuan'
);
queryEmployee
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
memberList
=
res
.
Data
;
}
}).
catch
(()
=>
{
})
},
changePage
(
e
)
{
this
.
msg
.
pageIndex
=
1
this
.
getList
()
...
...
@@ -137,17 +162,31 @@
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
=
'通用'
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
+
'某某'
}
else
{
if
(
i
+
1
!=
x
.
UserIdList
.
length
)
{
console
.
log
(
1
)
this
.
memberList
.
map
(
z
=>
{
if
(
z
.
Id
==
j
){
x
.
UserIdName
=
x
.
UserIdName
+
z
.
EmployeeName
+
'、'
}
return
})
}
else
{
console
.
log
(
2
)
this
.
memberList
.
map
(
z
=>
{
if
(
z
.
Id
==
j
){
x
.
UserIdName
=
x
.
UserIdName
+
z
.
EmployeeName
}
return
})
}
}
})
...
...
@@ -159,11 +198,33 @@
path
:
'/enterprise/addWelcome'
,
});
},
goedit
(){
//编辑
goedit
()
{
//编辑
},
goDetailed
(
row
)
{
//修改
goDetailed
(
row
)
{
//删除
console
.
log
(
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
(()
=>
{
});
}
}
...
...
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