Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-3
Overview
Overview
Details
Activity
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
office
haoban-3
Commits
3ca7479e
Commit
3ca7479e
authored
Oct 20, 2022
by
Jings
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 欢迎语表情添加修复
parent
4f2fc624
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
20 deletions
+40
-20
salutatorySet.vue
src/views/enterprise/salutatorySet.vue
+40
-20
No files found.
src/views/enterprise/salutatorySet.vue
View file @
3ca7479e
...
...
@@ -7,7 +7,7 @@
<el-input
show-word-limit
placeholder=
"请输入欢迎语标题"
type=
"text"
v-model=
"form.title"
maxlength=
"20"
class=
"w-384"
></el-input>
</el-form-item>
<el-form-item
label=
"欢迎语内容"
prop=
"welcomeContent"
class=
"welcomeContentItem"
>
<el-input
placeholder=
"请输入文本内容"
type=
"textarea"
v-model=
"form.welcomeContent"
class=
"w-384 welcomeContent"
></el-input>
<el-input
id=
"inputContent"
placeholder=
"请输入文本内容"
type=
"textarea"
v-model=
"form.welcomeContent"
class=
"w-384 welcomeContent"
></el-input>
<div
class=
"text-bottom flex w-384"
>
<div
class=
"flex flex-wrap flex-align-center"
>
<div
class=
"put"
@
click=
"putName"
>
插入
<
微信昵称
>
</div>
...
...
@@ -15,12 +15,12 @@
<div
class=
"put"
@
click=
"addLinkDialogShow"
>
插入#公众号
</div>
</div>
<el-popover
placement=
"top"
width=
"388"
trigger=
"click"
>
<ul
class=
"flex flex-wrap"
>
<ul
class=
"flex flex-wrap"
@
show=
"showPopover('inputContent')"
>
<li
v-for=
"(item, index) in emojiList"
:key=
"index + 'emoji'"
>
<img
:src=
"item.gifUrl"
alt=
""
@
click=
"selectEmoji(item)"
/>
<img
:src=
"item.gifUrl"
alt=
""
@
click
.
stop
=
"selectEmoji(item)"
/>
</li>
</ul>
<p
slot=
"reference"
style=
"cursor:
pointer;height:24px;
"
>
<p
slot=
"reference"
style=
"cursor:
pointer; height: 24px
"
>
<svg-icon
iconname=
"iconbiaoqing"
size=
"20"
>
</svg-icon>
</p>
</el-popover>
...
...
@@ -28,12 +28,12 @@
<div
class=
"mediaEcho"
>
<div
class=
"flexBoxContainer"
v-for=
"(item, index) in form.welcomeMediaList"
:key=
"index"
>
<div
class=
"flexBox"
>
<svg-icon
:iconname=
"iconType[item.mediaType]"
size=
"16"
style=
"margin-right: 13px
;
"
>
</svg-icon>
<svg-icon
:iconname=
"iconType[item.mediaType]"
size=
"16"
style=
"margin-right: 13px"
>
</svg-icon>
<span
class=
"popverText"
>
{{
item
.
mediaTitle
}}
<span
v-if=
"item.mediaType == 5"
>
(
{{
item
.
miniProgramPage
}}
)
</span>
</span>
<i
class=
"el-icon-close"
style=
"margin-left: 20px;
cursor: pointer;
"
@
click=
"handleDelMedia(item, index)"
></i>
<i
class=
"el-icon-close"
style=
"margin-left: 20px;
cursor: pointer
"
@
click=
"handleDelMedia(item, index)"
></i>
</div>
</div>
</div>
...
...
@@ -41,23 +41,23 @@
<el-popover
placement=
"top"
trigger=
"click"
>
<ul
class=
"flex flex-wrap"
>
<li
v-for=
"(item, index) in uploadList"
:key=
"index"
:class=
"['uploadListBox', form.welcomeMediaList.length >= 9 || (index == 5 && publicAccountDisabled) ? 'disabled' : '']"
:style=
"index == 5 ? 'width: 118px;' : ''"
@
click=
"handleUploadList(item, index)"
>
<i
:class=
"['iconfont-hb3', item.icon]"
style=
"font-size:20px"
></i>
<i
:class=
"['iconfont-hb3', item.icon]"
style=
"font-size:
20px"
></i>
<p>
{{
item
.
title
}}
</p>
<input
type=
"file"
:accept=
"item.fileType"
@
change=
"e => handkeFileChange(e, item)"
class=
"upload-input"
/>
</li>
</ul>
<div
slot=
"reference"
style=
"cursor: pointer; display: inline-block
;
"
>
<div
slot=
"reference"
style=
"cursor: pointer; display: inline-block"
>
<i
class=
"iconfont-hb3 icontianjiajiahaowubiankuang"
></i>
<p>
添加图片/视频/文件/链接/小程序/带参公众号二维码
</p>
</div>
</el-popover>
<p
style=
"font-size:
12px;color:
#909399"
>
(附件不超过9个,单个大小不超过2M)
</p>
<p
style=
"font-size:
12px; color:
#909399"
>
(附件不超过9个,单个大小不超过2M)
</p>
</div>
</el-form-item>
<el-form-item
label=
"使用范围"
required
v-if=
"form.type == 1"
>
<el-radio
v-model=
"form.defaultWelcomeFlag"
:disabled=
"defaultWelcomeFlag && echoDefaultWelcomeFlag == 0"
:label=
"1"
>
全体成员
</el-radio>
<el-radio
v-model=
"form.defaultWelcomeFlag"
:label=
"0"
>
部分成员
</el-radio>
<span
@
click=
"openScopeDialog"
v-if=
"form.defaultWelcomeFlag == 0"
class=
"color-2f54eb cursor-pointer"
style=
"margin-left:
8px;
"
>
{{
form
.
suitDepartmentAddList
.
length
?
'修改使用范围'
:
'请选择使用范围'
}}
</span>
<span
@
click=
"openScopeDialog"
v-if=
"form.defaultWelcomeFlag == 0"
class=
"color-2f54eb cursor-pointer"
style=
"margin-left:
8px
"
>
{{
form
.
suitDepartmentAddList
.
length
?
'修改使用范围'
:
'请选择使用范围'
}}
</span>
<div
class=
"scopeContainer"
v-if=
"form.defaultWelcomeFlag == 1"
>
<div
class=
"wwTag"
>
<span
class=
"font-14 color-2f54eb opacity80 iconfont-hb3 iconqiye-tianchong"
></span>
...
...
@@ -74,8 +74,8 @@
</div>
</div>
</el-form-item>
<el-button
type=
"primary"
style=
"margin-left:
117px;margin-bottom:
20px"
:loading=
"submitbtnLoading"
@
click=
"submit"
>
保存
</el-button>
<el-button
style=
"margin-bottom:20px"
@
click=
"$router.push('salutatory')"
>
返回
</el-button>
<el-button
type=
"primary"
style=
"margin-left:
117px; margin-bottom:
20px"
:loading=
"submitbtnLoading"
@
click=
"submit"
>
保存
</el-button>
<el-button
style=
"margin-bottom:
20px"
@
click=
"$router.push('salutatory')"
>
返回
</el-button>
</el-form>
<preview
:welcomeContent=
"form.welcomeContent"
:mediaList=
"form.welcomeMediaList"
/>
</div>
...
...
@@ -94,7 +94,7 @@
<el-form
label-position=
"right"
label-width=
"100px"
@
submit
.
native
.
prevent
>
<el-form-item
label=
"链接地址"
>
<el-input
v-model=
"url"
@
keyup
.
enter
.
native=
"addUrl"
></el-input>
<span
style=
"font-size:
12px;color:#909399;
"
>
以http或https开头
</span>
<span
style=
"font-size:
12px; color: #909399
"
>
以http或https开头
</span>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
""
>
...
...
@@ -105,7 +105,7 @@
<el-dialog
title=
"请选择使用范围"
width=
"886px"
class=
"replay-link-dialog"
:visible
.
sync=
"scopeVisible"
>
<div
class=
"scopeBox"
>
<div
class=
"left"
>
<el-input
placeholder=
"请输入部门名称"
maxlength=
"50"
v-model=
"filterText"
style=
"width: 398px
;
"
clearable
@
clear=
"handlefilterTextClear"
@
keyup
.
native=
"value => toInput(value, searchInput)"
>
<i
slot=
"prefix"
class=
"el-input__icon el-icon-search"
></i>
</el-input>
<el-input
placeholder=
"请输入部门名称"
maxlength=
"50"
v-model=
"filterText"
style=
"width: 398px"
clearable
@
clear=
"handlefilterTextClear"
@
keyup
.
native=
"value => toInput(value, searchInput)"
>
<i
slot=
"prefix"
class=
"el-input__icon el-icon-search"
></i>
</el-input>
<el-tree
:key=
"showTree"
v-loading=
"loading"
ref=
"tree"
:data=
"treeData"
:check-on-click-node=
"true"
show-checkbox
node-key=
"departmentId"
:props=
"defaultProps"
:expand-on-click-node=
"false"
class=
"tree"
:render-after-expand=
"true"
@
check-change=
"handleCheckChange"
@
check=
"handleCheck"
>
<span
class=
"custom-tree-node"
slot-scope=
"
{ node }">
<span
class=
"font-14 color-2f54eb opacity80 iconfont-hb3 iconqiye-tianchong"
></span>
...
...
@@ -137,7 +137,7 @@
</el-dialog>
<el-dialog
title=
"添加小程序"
width=
"640px"
:visible
.
sync=
"appletDialogVisible"
@
closed=
"closeAppletDialog"
>
<div
class=
"admin-tip-body"
>
<div
role=
"alert"
class=
"el-alert el-alert--info"
style=
"width: 550px
;
"
>
<div
role=
"alert"
class=
"el-alert el-alert--info"
style=
"width: 550px"
>
<i
class=
"el-alert__icon el-icon-info"
></i>
<div
class=
"el-alert__content"
>
<p
class=
"el-alert__title"
>
...
...
@@ -148,14 +148,14 @@
</div>
</div>
</div>
<el-form
label-position=
"right"
ref=
"appletForm"
:model=
"appletForm"
label-width=
"120px"
style=
"margin-top:20px"
@
submit
.
native
.
prevent
>
<el-form
label-position=
"right"
ref=
"appletForm"
:model=
"appletForm"
label-width=
"120px"
style=
"margin-top:
20px"
@
submit
.
native
.
prevent
>
<el-form-item
label=
"小程序配置"
required
>
<el-select
v-model=
"appletForm.selectedApple"
style=
"width:
458px;
"
>
<el-select
v-model=
"appletForm.selectedApple"
style=
"width:
458px
"
>
<el-option
v-for=
"item in appTableData"
:key=
"item.miniprogramSettingId"
:label=
"item.miniprogramName"
:value=
"item.miniprogramSettingId"
:disabled=
"handleDiabled(item)"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"小程序路径"
required
v-show=
"appletForm.selectedApple != -1"
>
<el-input
v-model=
"appletForm.appletPath"
style=
"width: 458px
;
"
placeholder=
"请输入小程序跳转路径,例如:/page "
/>
<el-input
v-model=
"appletForm.appletPath"
style=
"width: 458px"
placeholder=
"请输入小程序跳转路径,例如:/page "
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
""
>
...
...
@@ -259,7 +259,8 @@ export default {
defaultWelcomeFlag
:
false
,
isNew
:
true
,
echoDefaultWelcomeFlag
:
0
,
iphone2
iphone2
,
ele
:
''
// dom元素id
};
},
watch
:
{
...
...
@@ -299,6 +300,12 @@ export default {
preview
},
methods
:
{
/**
* 获取dom
*/
showPopover
(
id
)
{
this
.
ele
=
id
;
},
getExistDefaultWelcome
(
isNew
)
{
getRequest
(
'/haoban-manage3-web/welcome/exist-default-welcome'
,
{
wxEnterpriseId
:
this
.
wxEnterpriseId
}).
then
(
res
=>
{
let
resData
=
res
.
data
;
...
...
@@ -613,7 +620,20 @@ export default {
},
selectEmoji
(
item
)
{
const
that
=
this
;
const
str
=
that
.
form
.
welcomeContent
+
item
.
key
;
// const str = that.form.welcomeContent + item.key;
let
textArea
=
document
.
getElementById
(
this
.
ele
);
let
startPos
=
textArea
.
selectionStart
;
let
endPos
=
textArea
.
selectionEnd
;
if
(
startPos
===
undefined
||
endPos
===
undefined
)
return
;
let
currentTxt
=
textArea
.
value
;
const
str
=
currentTxt
.
substring
(
0
,
startPos
)
+
item
.
key
+
currentTxt
.
substring
(
endPos
);
textArea
.
value
=
str
;
textArea
.
focus
();
this
.
$nextTick
(()
=>
{
textArea
.
selectionStart
=
startPos
+
item
.
key
.
length
;
textArea
.
selectionEnd
=
endPos
+
item
.
key
.
length
;
});
if
(
str
.
length
>
1000
)
{
this
.
$message
(
'添加该表情后文本内容将超过字数限制,无法添加!'
);
}
else
{
...
...
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