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
95bbebf7
Commit
95bbebf7
authored
Feb 14, 2022
by
crushh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: temp
parent
88788c93
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
308 additions
and
165 deletions
+308
-165
index.html
index.html
+2
-2
api.js
src/api/api.js
+1
-2
salutatory.vue
src/views/enterprise/salutatory.vue
+147
-154
salutatorySet.vue
src/views/enterprise/salutatorySet.vue
+158
-7
No files found.
index.html
View file @
95bbebf7
...
@@ -14,8 +14,8 @@
...
@@ -14,8 +14,8 @@
<link
rel=
"shortcut icon"
href=
"./favicon.ico"
/>
<link
rel=
"shortcut icon"
href=
"./favicon.ico"
/>
<title>
好办管理平台
</title>
<title>
好办管理平台
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"//web-1251519181.file.myqcloud.com/custom-element/custom-element.1.0.69.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"//web-1251519181.file.myqcloud.com/custom-element/custom-element.1.0.69.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"//at.alicdn.com/t/font_1628375_
cl07xa4zqij
.css"
/>
<!--好办后台3.0-->
<link
rel=
"stylesheet"
type=
"text/css"
href=
"//at.alicdn.com/t/font_1628375_
b9ejwjvcr7
.css"
/>
<!--好办后台3.0-->
<script
src=
"//at.alicdn.com/t/font_1628375_
cl07xa4zqij
.js"
></script>
<script
src=
"//at.alicdn.com/t/font_1628375_
b9ejwjvcr7
.js"
></script>
</head>
</head>
<body
style=
"min-width: 1400px;"
class=
"damolish"
>
<body
style=
"min-width: 1400px;"
class=
"damolish"
>
...
...
src/api/api.js
View file @
95bbebf7
...
@@ -150,8 +150,7 @@ export const postJsonRequest = (url, params) => {
...
@@ -150,8 +150,7 @@ export const postJsonRequest = (url, params) => {
return
Vue
.
axios
({
return
Vue
.
axios
({
method
:
'post'
,
method
:
'post'
,
url
:
`
${
local
}${
url
}
`
,
url
:
`
${
local
}${
url
}
`
,
data
:
'{}'
,
data
:
params
,
params
:
params
,
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
}
//multipart/form-data{"token": token}
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
}
//multipart/form-data{"token": token}
});
});
};
};
...
...
src/views/enterprise/salutatory.vue
View file @
95bbebf7
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<div>
<div>
<div
class=
"warp"
>
<div
class=
"warp"
>
<h2>
加好友配置
</h2>
<h2>
加好友配置
</h2>
<span
class=
"echoData"
>
发送【好办欢迎语】+【带导购参数的会员小程序卡片】
</span>
<span
class=
"echoData"
v-show=
"friendSettingType"
>
{{
friendSettingTypeOption
[
friendSettingType
]
}}
</span>
<el-button
type=
"text"
style=
"margin-left: 20px;"
@
click=
"openDialog"
>
去配置
</el-button>
<el-button
type=
"text"
style=
"margin-left: 20px;"
@
click=
"openDialog"
>
去配置
</el-button>
</div>
</div>
<div
class=
"daily-set-wrap"
>
<div
class=
"daily-set-wrap"
>
...
@@ -14,35 +14,44 @@
...
@@ -14,35 +14,44 @@
<p
class=
"el-alert__title"
>
<p
class=
"el-alert__title"
>
1. 因企业微信接口限制,若在企微管理端为相关人员配置欢迎语,好办设置欢迎语不会生效;
<br
/>
1. 因企业微信接口限制,若在企微管理端为相关人员配置欢迎语,好办设置欢迎语不会生效;
<br
/>
2. 若使用好办欢迎语,请关闭其他企业自建应用/第三方应用的欢迎语配置;
<br
/>
2. 若使用好办欢迎语,请关闭其他企业自建应用/第三方应用的欢迎语配置;
<br
/>
3. 在此处所自定义配置的欢迎语基础上,系统将默认包含“带参会员小程序卡片”,以便门店员工添加客户好友后,引导客户进入带参会员小程序页面授权微信信息,进而使得系统将企业客户与GIC后台某客户对应起来;
3. 在此处所自定义配置的欢迎语基础上,系统将默认包含“带参会员小程序卡片”,以便门店员工添加客户好友后,引导客户进入带参会员小程序页面授权微信信息,进而使得系统将企业客户与GIC后台某客户对应起来;
<br
/>
4. 如果导购没有绑定导购code,没有主门店信息,则无法发送好办欢迎语;
</p>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"flex flex-space-between m-b-20 m-t-20"
>
<div
class=
"flex flex-space-between m-b-20 m-t-20"
>
<el-input
placeholder=
"请输入标题"
maxlength=
"50"
v-model=
"
searchInput"
class=
"w-264"
style=
"width: 264px;"
clearable
>
<i
slot=
"prefix"
class=
"el-input__icon el-icon-search"
></i>
</el-input>
<el-input
placeholder=
"请输入标题"
maxlength=
"50"
v-model=
"
title"
class=
"w-264"
style=
"width: 264px;"
@
keyup
.
native=
"value => toInput(value, searchInput)"
clearable
@
clear=
"clearSearch"
>
<i
slot=
"prefix"
class=
"el-input__icon el-icon-search"
></i>
</el-input>
<el-button
type=
"primary"
@
click=
"changeRoute"
>
新建欢迎语
</el-button>
<el-button
type=
"primary"
@
click=
"changeRoute"
>
新建欢迎语
</el-button>
</div>
</div>
<el-table
ref=
"multipleTable"
:data=
"tableData"
tooltip-effect=
"dark"
:style=
"
{ width: '100%' }">
<el-table
ref=
"multipleTable"
:data=
"tableData"
tooltip-effect=
"dark"
:style=
"
{ width: '100%' }">
<el-table-column
prop=
"title"
label=
"标题"
width=
"220"
show-overflow-tooltip
>
<el-table-column
prop=
"title"
label=
"标题"
width=
"220"
show-overflow-tooltip
>
<template
slot-scope=
"
scope"
>
{{
scope
.
row
.
title
}}
</
template
>
<template
slot-scope=
"
{ row }">
{{
row
.
title
}}
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"welcomeContent"
label=
"内容"
show-overflow-tooltip
>
<el-table-column
prop=
"welcomeContent"
label=
"内容"
show-overflow-tooltip
>
<
template
slot-scope=
"
scope"
>
{{
scope
.
row
.
welcomeContent
}}
</
template
>
<
template
slot-scope=
"
{ row }"
>
{{
row
.
welcomeContent
}}
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"附件"
>
<el-table-column
label=
"附件"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"{ row }"
>
<el-popover
placement=
"top-start"
title=
"标题"
width=
"200"
trigger=
"hover"
content=
"这是一段内容,这是一段内容,这是一段内容,这是一段内容。"
><i
class=
"iconfont iconwenjianleixingtupian"
/>
{{
scope
.
row
.
c1
}}
</el-popover>
<el-popover
placement=
"top-start"
trigger=
"click"
>
<div
class=
"flexBox"
v-for=
"item in row.welcomeMediaList"
:key=
"item.welcomeMediaId"
>
<svg-icon
:iconname=
"iconType[item.mediaType]"
size=
"16"
style=
"margin-right: 13px;"
>
</svg-icon>
<span
class=
"popverText"
>
{{
item
.
mediaTitle
}}
</span>
</div>
<div
slot=
"reference"
class=
"flexBox"
v-if=
"row.welcomeMediaList && row.welcomeMediaList.length"
>
<svg-icon
:iconname=
"iconType[row.welcomeMediaList[0].mediaType]"
size=
"40"
style=
"margin-right: 10px;"
>
</svg-icon>
<span
class=
"wrapText"
>
{{
row
.
welcomeMediaList
[
0
].
mediaTitle
}}
</span>
</div>
</el-popover>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"updateTime"
label=
"更新时间"
width=
"120"
show-overflow-tooltip
>
<el-table-column
prop=
"updateTime"
label=
"更新时间"
width=
"120"
show-overflow-tooltip
>
<
template
slot-scope=
"
scope"
>
{{
scope
.
row
.
updateTime
}}
</
template
>
<
template
slot-scope=
"
{ row }"
>
{{
row
.
updateTime
}}
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"operatorName"
label=
"操作人"
width=
"120"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"operatorName"
label=
"操作人"
width=
"120"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"suitDepartmentName"
label=
"适用范围"
width=
"120"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"suitDepartmentName"
label=
"适用范围"
width=
"120"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"180"
>
<el-table-column
label=
"操作"
width=
"180"
>
<
template
slot-scope=
"
scope
"
>
<
template
slot-scope=
"
{ row }
"
>
<el-button
type=
"text"
>
编辑
</el-button>
<el-button
type=
"text"
>
编辑
</el-button>
<el-button
type=
"text"
>
删除
</el-button>
<el-button
type=
"text"
>
删除
</el-button>
</
template
>
</
template
>
...
@@ -50,38 +59,71 @@
...
@@ -50,38 +59,71 @@
</el-table>
</el-table>
</div>
</div>
</div>
</div>
<el-dialog
title=
"加好友配置"
:visible
.
sync=
"dialogVisible"
width=
"5
99
px"
:before-close=
"handleClose"
>
<el-dialog
title=
"加好友配置"
:visible
.
sync=
"dialogVisible"
width=
"5
70
px"
:before-close=
"handleClose"
>
<el-form
label-width=
"100px"
>
<el-form
label-width=
"100px"
>
<el-form-item
label=
"加好友配置"
>
<el-form-item
label=
"加好友配置"
>
<el-radio
:label=
"1"
v-model=
"valueVal"
>
发送【好办欢迎语】+【带导购参数的会员小程序卡片】
</el-radio>
<el-radio
:label=
"Number(key)"
v-model=
"type"
v-for=
"(val, key) in friendSettingTypeOption"
:key=
"key"
>
{{ val }}
</el-radio>
<el-radio
:label=
"2"
v-model=
"valueVal"
>
发送【好办欢迎语】+【带导购参数的公众号二维码】
</el-radio>
<el-radio
:label=
"2"
v-model=
"valueVal"
>
不发送【好办欢迎语】
</el-radio>
<el-radio
:label=
"2"
v-model=
"valueVal"
>
发送【好办欢迎语】
</el-radio>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"dialogVisible = false
"
>
确 定
</el-button>
<el-button
type=
"primary"
:loading=
"btnLoading"
@
click=
"saveSetting
"
>
确 定
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
getRequest
}
from
'@/api/api'
;
import
{
postJsonRequest
,
getRequest
}
from
'@/api/api'
;
import
errMsg
from
'@/common/js/error
'
;
import
{
_debounce
}
from
'@/common/js/public
'
;
export
default
{
export
default
{
props
:
{},
props
:
{},
data
()
{
data
()
{
return
{
return
{
form
:
{},
friendSettingTypeOption
:
{
openFlag
:
0
,
1
:
'发送【好办欢迎语】+【带导购参数的会员小程序卡片】'
,
valueVal
:
1
,
2
:
'发送【好办欢迎语】+【带导购参数的公众号二维码】'
,
3
:
'发送【好办欢迎语】'
,
4
:
'不发送【好办欢迎语】,用企微欢迎语'
},
title
:
''
,
wxEnterpriseId
:
localStorage
.
getItem
(
'userInfos'
)
?
JSON
.
parse
(
localStorage
.
getItem
(
'userInfos'
)).
wxEnterpriseId
:
''
,
friendSettingType
:
''
,
type
:
1
,
friendSettingId
:
''
,
btnLoading
:
false
,
dialogVisible
:
false
,
dialogVisible
:
false
,
iconType
:
{
1
:
'iconwenjianleixingtupian'
,
2
:
'iconwenjianleixingshipin'
,
3
:
'iconwenjianleixing-wenjian'
,
4
:
'iconwenjianleixing-lianjie'
},
tableData
:
[
tableData
:
[
{
{
title
:
'华东区欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎语'
,
title
:
'华东区欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎语'
,
welcomeContent
:
'华东区欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎语华东区欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎语'
,
welcomeContent
:
'华东区欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎语华东区欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎欢迎语'
,
c1
:
'图片名称图片名称图片名称图片名称图片名称'
,
welcomeMediaList
:
[
{
welcomeMediaId
:
'121'
,
mediaTitle
:
'图片名称图片名称图片名称图片名称图片名称'
,
mediaType
:
1
},
{
welcomeMediaId
:
'11'
,
mediaTitle
:
'视频名称视频名称视频名称视频名称视频名称视频名称视频名称视频名称视频名称视频名称'
,
mediaType
:
2
},
{
welcomeMediaId
:
'12'
,
mediaTitle
:
'文件名称文件名称文件名称文件名称文件名称文件名称文件名称文件名称文件名称文件名称文件名称'
,
mediaType
:
3
},
{
welcomeMediaId
:
'13'
,
mediaTitle
:
'http://baidusadsssssssssssssssssssssssssssssssasasa.com'
,
mediaType
:
4
}
],
updateTime
:
'2021-12-12 12:11:00'
,
updateTime
:
'2021-12-12 12:11:00'
,
operatorName
:
'稻米'
,
operatorName
:
'稻米'
,
g1
:
'百度一下你就知道'
,
g1
:
'百度一下你就知道'
,
...
@@ -90,11 +132,64 @@ export default {
...
@@ -90,11 +132,64 @@ export default {
]
]
};
};
},
},
filters
:
{},
mounted
()
{
const
that
=
this
;
that
.
$emit
(
'showTab'
,
4
);
document
.
documentElement
.
style
.
backgroundColor
=
'#f0f2f5'
;
that
.
getData
();
this
.
getSetting
();
},
destroyed
()
{
document
.
documentElement
.
style
.
backgroundColor
=
'#fff'
;
},
methods
:
{
methods
:
{
/**
* 输入
*/
toInput
:
_debounce
(
function
(
e
,
value
)
{
this
.
getData
();
},
500
),
/**
* 搜索标签清空
*/
clearSearch
()
{
this
.
getData
();
},
openDialog
()
{
openDialog
()
{
this
.
dialogVisible
=
true
;
this
.
dialogVisible
=
true
;
},
},
getSetting
()
{
getRequest
(
'/haoban-manage3-web/welcome/get/friend-setting'
,
{
wxEnterpriseId
:
this
.
wxEnterpriseId
}).
then
(
res
=>
{
let
resData
=
res
.
data
;
if
(
resData
.
code
==
0
&&
resData
.
result
)
{
const
{
friendSettingId
,
friendSettingType
}
=
resData
.
result
;
this
.
friendSettingId
=
friendSettingId
;
this
.
type
=
friendSettingType
;
this
.
friendSettingType
=
friendSettingType
;
}
});
},
saveSetting
()
{
let
data
=
{
friendSettingId
:
this
.
friendSettingId
,
wxEnterpriseId
:
this
.
wxEnterpriseId
,
friendSettingType
:
this
.
type
};
this
.
btnLoading
=
true
;
postJsonRequest
(
'/haoban-manage3-web/welcome/save/friend-setting'
,
data
)
.
then
(
res
=>
{
console
.
log
(
res
);
let
resData
=
res
.
data
;
if
(
resData
.
code
==
0
&&
resData
.
result
)
{
this
.
$message
.
success
(
resData
.
message
);
this
.
dialogVisible
=
false
;
this
.
getSetting
();
}
})
.
finally
(()
=>
{
this
.
btnLoading
=
false
;
});
},
/**
/**
* 跳转
* 跳转
*/
*/
...
@@ -106,72 +201,27 @@ export default {
...
@@ -106,72 +201,27 @@ export default {
* 获取数据
* 获取数据
*/
*/
getData
()
{
getData
()
{
const
that
=
this
;
postJsonRequest
(
'/haoban-manage3-web/welcome/list'
,
{
title
:
this
.
title
,
wxEnterpriseId
:
this
.
wxEnterpriseId
})
getRequest
(
'/haoban-manage3-web/get-welcome'
,
{})
.
then
(
res
=>
{
.
then
(
res
=>
{
let
resData
=
res
.
data
;
let
resData
=
res
.
data
;
if
(
resData
.
errorCode
==
1
&&
resData
.
result
)
{
if
(
resData
.
code
==
0
&&
resData
.
result
)
{
that
.
form
=
{
...
resData
.
result
};
this
.
tableData
=
resData
.
result
;
that
.
openFlag
=
resData
.
result
.
openFlag
;
}
}
errMsg
.
errorMsg
(
resData
);
})
})
.
catch
(
function
(
error
)
{
.
catch
(
error
=>
{
th
at
.
$message
.
error
({
th
is
.
$message
.
error
({
duration
:
1000
,
duration
:
1000
,
message
:
error
.
message
message
:
error
.
message
});
});
});
});
},
setWelcome
(
val
)
{
const
that
=
this
;
that
.
$refs
.
form
.
validate
(
value
=>
{
if
(
value
)
{
this
.
$confirm
(
'是否确认修改欢迎语启用状态?'
,
'提示'
)
.
then
(()
=>
{
getRequest
(
'/haoban-manage3-web/set-welcome'
,
{
openFlag
:
val
})
.
then
(
res
=>
{
let
resData
=
res
.
data
;
if
(
resData
.
errorCode
==
1
)
{
that
.
$message
.
success
({
duration
:
1000
,
message
:
'设置成功'
});
window
.
location
.
reload
();
}
errMsg
.
errorMsg
(
resData
);
})
.
catch
(
function
(
error
)
{
that
.
$message
.
error
({
duration
:
1000
,
message
:
error
.
message
});
});
})
.
catch
(()
=>
{
that
.
openFlag
=
that
.
openFlag
===
1
?
0
:
1
;
});
}
});
}
}
},
},
watch
:
{},
watch
:
{},
mounted
()
{
const
that
=
this
;
that
.
$emit
(
'showTab'
,
4
);
document
.
documentElement
.
style
.
backgroundColor
=
'#f0f2f5'
;
that
.
getData
();
},
destroyed
()
{
document
.
documentElement
.
style
.
backgroundColor
=
'#fff'
;
},
components
:
{}
components
:
{}
};
};
</
script
>
</
script
>
<
style
type=
"text/scss"
lang=
"scss"
scoped
>
<
style
type=
"text/scss"
lang=
"scss"
scoped
>
.bg-ebecf0
{
background
:
#ebecf0
;
}
.warp
{
.warp
{
background
:
#fff
;
background
:
#fff
;
margin-bottom
:
10px
;
margin-bottom
:
10px
;
...
@@ -190,36 +240,6 @@ export default {
...
@@ -190,36 +240,6 @@ export default {
}
}
}
}
.color-c0c4cc
{
display
:
inline-block
;
line-height
:
34px
;
padding-left
:
10px
;
color
:
#c0c4cc
;
}
.condition-tips
{
display
:
inline-block
;
vertical-align
:
middle
;
line-height
:
32px
;
}
.p-l-30
{
padding-left
:
30px
;
}
.p-l-40
{
padding-left
:
40px
;
}
.p-l-55
{
padding-left
:
55px
;
}
.p-l-85
{
padding-left
:
85px
;
}
.m-l-20
{
margin-left
:
20px
;
}
.line-50
{
height
:
50px
;
line-height
:
50px
;
}
.el-alert--info
{
.el-alert--info
{
align-items
:
flex-start
;
align-items
:
flex-start
;
width
:
700px
;
width
:
700px
;
...
@@ -255,58 +275,31 @@ export default {
...
@@ -255,58 +275,31 @@ export default {
}
}
}
}
}
}
.salutatory-wrap
{
.el-radio
+
.el-radio
{
//
height
:
160px
;
margin-left
:
0
;
background
:
#f5f7fa
;
}
.top
{
.flexBox
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
flex-start
;
align-items
:
center
;
align-items
:
center
;
height
:
47px
;
.wrapText
{
padding
:
0
20px
0
29px
;
width
:
90%
;
.left
{
text-align
:
left
;
font-size
:
14px
;
text-overflow
:
ellipsis
;
font-weight
:
600
;
display
:
-webkit-box
;
color
:
#303133
;
-webkit-line-clamp
:
2
;
line-height
:
20px
;
-webkit-box-orient
:
vertical
;
}
overflow
:
hidden
;
.right
{
.date
{
font-size
:
12px
;
font-weight
:
400
;
color
:
#909399
;
line-height
:
17px
;
margin-right
:
30px
;
}
}
}
.line
{
box-sizing
:
border-box
;
border
:
1px
solid
#e4e7ed
;
border-style
:
none
none
solid
none
;
}
}
.bottom
{
.popverText
{
padding
:
16px
20px
21px
29px
;
font-size
:
12px
;
.el-form-item
{
width
:
90%
;
>>>
.el-form-item__label
{
white-space
:
nowrap
;
padding
:
0
;
overflow
:
hidden
;
}
text-overflow
:
ellipsis
;
>>>
.el-form-item__label
,
>>>
.el-form-item__content
{
line-height
:
20px
;
font-size
:
14px
;
font-weight
:
400
;
color
:
#303133
;
}
}
}
}
}
}
.welcome-text
{
.flexBox
+
.flexBox
{
text-align
:
left
;
margin-top
:
10px
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
overflow
:
hidden
;
}
}
</
style
>
</
style
>
src/views/enterprise/salutatorySet.vue
View file @
95bbebf7
<
template
>
<
template
>
<div
class=
"daily-set-wrap "
>
<div
class=
"daily-set-wrap "
>
<div
class=
"daily-set-content border-box"
>
<div
class=
"daily-set-content border-box"
>
<div
class=
"admin-tip-body"
>
<div
role=
"alert"
class=
"el-alert el-alert--info"
>
<i
class=
"el-alert__icon el-icon-info"
></i>
<div
class=
"el-alert__content"
>
<p
class=
"el-alert__title"
>
由管理员或者业务负责人统一配置后,客户将在添加成员为联系人后收到该欢迎语
<br
/></p>
</div>
</div>
</div>
<div
class=
"salutatory-set-wrap m-t-20"
>
<div
class=
"salutatory-set-wrap m-t-20"
>
<el-form
label-width=
"117px"
ref=
"form"
:model=
"form"
:rules=
"rules"
refs=
"form"
>
<el-form
label-width=
"117px"
ref=
"form"
:model=
"form"
:rules=
"rules"
refs=
"form"
>
<el-form-item
label=
"欢迎语标题"
prop=
"title"
>
<el-form-item
label=
"欢迎语标题"
prop=
"title"
>
...
@@ -25,7 +33,21 @@
...
@@ -25,7 +33,21 @@
</p>
</p>
</el-popover>
</el-popover>
</div>
</div>
<div
class=
"addInfo"
>
<el-popover
placement=
"top"
trigger=
"click"
>
<ul
class=
"flex flex-wrap"
>
<li
v-for=
"(item, index) in uploadList"
:key=
"index + 'emoji'"
class=
"uploadListBox"
@
click=
"handleUploadList(item, index)"
>
<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>
<p
slot=
"reference"
style=
"display: inline-block;cursor: pointer;"
><i
class=
"iconfont-hb3 icontianjiajiahaowubiankuang"
></i>
<span>
添加图片/视频/文件/链接/小程序
</span></p>
</el-popover>
<span
style=
"font-size:12px;color:#909399"
>
(附件不超过9个,单个大小不超过2M)
</span>
</div>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<mult-upload
:limit=
"1"
:imgList
.
sync=
"imglist"
/>
<mult-upload
:limit=
"1"
:imgList
.
sync=
"imglist"
/>
</el-form-item>
</el-form-item>
...
@@ -47,7 +69,7 @@
...
@@ -47,7 +69,7 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getRequest
}
from
'@/api/api'
;
import
{
getRequest
,
postForm
}
from
'@/api/api'
;
// import { _debounce } from '@/common/js/public';
// import { _debounce } from '@/common/js/public';
// import showMsg from '@/common/js/showmsg';
// import showMsg from '@/common/js/showmsg';
import
limitTextarea
from
'@/components/limit-textarea.vue'
;
import
limitTextarea
from
'@/components/limit-textarea.vue'
;
...
@@ -64,6 +86,31 @@ export default {
...
@@ -64,6 +86,31 @@ export default {
welcomeContent
:
'你好,<微信昵称>'
,
welcomeContent
:
'你好,<微信昵称>'
,
welcomeImg
:
''
welcomeImg
:
''
},
},
uploadList
:
[
{
title
:
'图片'
,
icon
:
'icontupian'
,
fileType
:
'*'
},
{
title
:
'视频'
,
icon
:
'iconshipin'
,
fileType
:
'.mp4'
},
{
title
:
'文件'
,
icon
:
'iconwenjian'
,
fileType
:
'*'
},
{
title
:
'链接'
,
icon
:
'iconlianjie'
},
{
title
:
'小程序'
,
icon
:
'iconxiaochengxu'
}
],
imglist
:
[],
imglist
:
[],
url
:
''
,
url
:
''
,
rules
:
{
rules
:
{
...
@@ -71,10 +118,55 @@ export default {
...
@@ -71,10 +118,55 @@ export default {
welcomeContent
:
[{
required
:
true
,
message
:
'请输入欢迎语内容'
,
trigger
:
'blur'
}]
welcomeContent
:
[{
required
:
true
,
message
:
'请输入欢迎语内容'
,
trigger
:
'blur'
}]
},
},
emojiList
:
emojiArr
,
emojiList
:
emojiArr
,
addReplayDialog
:
false
addReplayDialog
:
false
,
upUrl
:
''
};
};
},
},
methods
:
{
methods
:
{
handleUploadList
(
item
,
index
)
{
console
.
log
(
item
);
if
([
'图片'
,
'视频'
,
'文件'
].
includes
(
item
.
title
))
{
document
.
getElementsByClassName
(
'upload-input'
)[
index
].
click
();
}
},
handkeFileChange
(
e
,
item
)
{
console
.
log
(
item
);
const
file
=
e
.
target
.
files
[
0
];
// only use files[0]
console
.
log
(
file
);
let
fileType
=
''
;
if
(
item
.
title
==
'图片'
)
{
const
isJPG
=
file
.
type
===
'image/jpeg'
||
file
.
type
===
'image/jpg'
||
file
.
type
===
'image/png'
;
if
(
!
isJPG
)
{
this
.
$message
.
error
(
'请上传图片'
);
return
false
;
}
fileType
=
'jpg'
;
}
else
if
(
item
.
title
==
'视频'
)
{
const
isVideo
=
file
.
type
==
'video/mp4'
;
if
(
!
isVideo
)
{
this
.
$message
.
error
(
'请上传mp4类型的视频文件'
);
return
false
;
}
fileType
=
'mp4'
;
}
else
if
(
item
.
title
==
'文件'
)
{
fileType
=
'.doc'
;
}
let
reader
=
new
FileReader
();
reader
.
readAsDataURL
(
file
);
reader
.
onload
=
e
=>
{
console
.
log
(
e
);
};
console
.
log
(
fileType
);
this
.
handleRequest
(
file
,
fileType
);
},
handleRequest
(
file
,
fileType
)
{
let
files
=
new
FormData
();
files
.
append
(
'file'
,
file
);
postForm
(
`/haoban-manage3-web/upload-file?fileType=
${
fileType
}
`
,
files
).
then
(
res
=>
{
const
{
data
}
=
res
;
console
.
log
(
data
);
});
},
onClosed
()
{
onClosed
()
{
this
.
url
=
''
;
this
.
url
=
''
;
},
},
...
@@ -189,10 +281,46 @@ export default {
...
@@ -189,10 +281,46 @@ export default {
};
};
</
script
>
</
script
>
<
style
type=
"text/scss"
lang=
"scss"
scoped
>
<
style
type=
"text/scss"
lang=
"scss"
scoped
>
.upload-input
{
display
:
none
;
}
.w-384
{
.w-384
{
width
:
384
px
;
width
:
555
px
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
.addInfo
{
padding
:
10px
20px
;
width
:
555px
;
background
:
#f7f8fa
;
border-radius
:
2px
;
position
:
absolute
;
line-height
:
20px
;
box-sizing
:
border-box
;
span
{
margin-left
:
8px
;
}
p
:hover
{
color
:
#2f54eb
;
}
}
.uploadListBox
{
width
:
72px
;
height
:
60px
;
border-radius
:
2px
;
border
:
1px
solid
#dcdfe6
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
space-around
;
align-items
:
center
;
box-sizing
:
border-box
;
&:hover
{
box-shadow
:
0px
2px
4px
0px
rgba
(
47
,
84
,
235
,
0.16
);
border
:
1px
solid
#2f54eb
;
}
}
.uploadListBox
+
.uploadListBox
{
margin-left
:
20px
;
}
.welcomeContent
{
.welcomeContent
{
height
:
220px
;
height
:
220px
;
border
:
1px
solid
#dcdfe6
;
border
:
1px
solid
#dcdfe6
;
...
@@ -223,7 +351,7 @@ export default {
...
@@ -223,7 +351,7 @@ export default {
}
}
.welcomeContentItem
>>>
.el-form-item__content
{
.welcomeContentItem
>>>
.el-form-item__content
{
position
:
relative
;
position
:
relative
;
width
:
384
px
;
width
:
555
px
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
.text-bottom
{
.text-bottom
{
position
:
absolute
;
position
:
absolute
;
...
@@ -232,11 +360,9 @@ export default {
...
@@ -232,11 +360,9 @@ export default {
justify-content
:
space-between
;
justify-content
:
space-between
;
align-items
:
center
;
align-items
:
center
;
height
:
38px
;
height
:
38px
;
width
:
382
px
;
width
:
555
px
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
padding
:
0
9px
;
padding
:
0
9px
;
//
background
:
#f5f7fa
;
.put
{
.put
{
font-size
:
12px
;
font-size
:
12px
;
font-weight
:
400
;
font-weight
:
400
;
...
@@ -253,4 +379,29 @@ export default {
...
@@ -253,4 +379,29 @@ export default {
}
}
}
}
}
}
.el-alert--info
{
align-items
:
flex-start
;
width
:
700px
;
padding-top
:
5px
;
font-size
:
14px
;
color
:
#606266
;
background
:
#f7f8fa
;
border-radius
:
2px
;
}
.el-icon-info
{
width
:
12px
;
font-size
:
12px
;
color
:
#2f54eb
;
margin-top
:
5px
;
}
.el-alert__content
{
padding-left
:
9px
;
.el-alert__title
{
font-size
:
13px
;
font-weight
:
400
;
color
:
#303133
;
line-height
:
22px
;
}
}
</
style
>
</
style
>
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