Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d6626035
authored
Oct 09, 2021
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
素材分页问题等
1 parent
b792cebc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
181 deletions
linkwe-ui/src/api/customer/index.js
linkwe-ui/src/views/customerManage/lossRemind.vue
linkwe-ui/src/views/material/components/MaPage.vue
linkwe-ui/src/api/customer/index.js
View file @
d662603
...
...
@@ -12,7 +12,7 @@ const service = window.CONFIG.services.wecom + '/customer'
"tagIds": "标签id,多个标签,id使用逗号隔开",
"beginTime": "开始时间",
"endTime": "结束时间"
status
: 0 客户状态 0正常 1删除
delFlag
: 0 客户状态 0正常 1删除
}
*/
export
function
getListNew
(
params
)
{
...
...
@@ -23,6 +23,20 @@ export function getListNew(params) {
})
}
/**
* 客户列表
* @param {*} params
* {
"pageNum": "当前页",
"pageSize": "每页显示条数",
"name": "客户名称",
"userId": "添加人id",
"tagIds": "标签id,多个标签,id使用逗号隔开",
"beginTime": "开始时间",
"endTime": "结束时间"
status: 0 客户状态 0正常 1删除
}
*/
export
function
getList
(
params
)
{
return
request
({
url
:
service
+
'/list'
,
...
...
linkwe-ui/src/views/customerManage/lossRemind.vue
View file @
d662603
<
script
>
import
{
getList
,
exportCustomer
,
lossRemind
,
getLossRemindStatus
}
from
'@/api/customer'
import
{
getListNew
,
exportCustomer
,
lossRemind
,
getLossRemindStatus
}
from
'@/api/customer'
import
{
getList
as
getListTag
}
from
'@/api/customer/tag'
import
{
getList
as
getListOrganization
}
from
'@/api/organization'
import
SelectUser
from
'@/components/SelectUser'
...
...
@@ -24,7 +19,7 @@ export default {
tagIds
:
''
,
// "标签id,多个标签,id使用逗号隔开",
beginTime
:
''
,
// "开始时间",
endTime
:
''
,
// "结束时间"
status
:
1
delFlag
:
1
},
queryTag
:
[],
// 搜索框选择的标签
queryUser
:
[],
// 搜索框选择的添加人
...
...
@@ -80,7 +75,7 @@ export default {
}
page
&&
(
this
.
query
.
pageNum
=
page
)
this
.
loading
=
true
getList
(
this
.
query
)
getList
New
(
this
.
query
)
.
then
(({
rows
,
total
})
=>
{
this
.
list
=
rows
this
.
total
=
+
total
...
...
@@ -169,14 +164,7 @@ export default {
<
template
>
<div>
<el-form
ref=
"queryForm"
:inline=
"true"
:model=
"query"
label-width=
"100px"
class=
"top-search"
size=
"small"
>
<el-form
ref=
"queryForm"
:inline=
"true"
:model=
"query"
label-width=
"100px"
class=
"top-search"
size=
"small"
>
<el-form-item
label=
"客户名称"
prop=
"name"
>
<el-input
v-model=
"query.name"
placeholder=
"请输入"
></el-input>
</el-form-item>
...
...
@@ -184,12 +172,7 @@ export default {
<div
class=
"tag-input"
@
click=
"dialogVisibleSelectUser = true"
>
<span
class=
"tag-place"
v-if=
"!queryUser.length"
>
请选择
</span>
<template
v-else
>
<el-tag
type=
"info"
v-for=
"(unit, unique) in queryUser"
:key=
"unique"
>
{{
unit
.
name
}}
</el-tag
>
<el-tag
type=
"info"
v-for=
"(unit, unique) in queryUser"
:key=
"unique"
>
{{
unit
.
name
}}
</el-tag>
</
template
>
</div>
</el-form-item>
...
...
@@ -209,32 +192,14 @@ export default {
<div
class=
"tag-input"
@
click=
"showTagDialog"
>
<span
class=
"tag-place"
v-if=
"!queryTag.length"
>
请选择
</span>
<
template
v-else
>
<el-tag
type=
"info"
v-for=
"(unit, unique) in queryTag"
:key=
"unique"
>
{{
unit
.
name
}}
</el-tag
>
<el-tag
type=
"info"
v-for=
"(unit, unique) in queryTag"
:key=
"unique"
>
{{
unit
.
name
}}
</el-tag>
</
template
>
</div>
</el-form-item>
<el-form-item
label=
" "
>
<el-button
v-hasPermi=
"['customerManage:customer:query']"
type=
"primary"
@
click=
"getList(1)"
>
查询
</el-button
>
<el-button
v-hasPermi=
"['customerManage:customer:query']"
type=
"success"
@
click=
"resetForm()"
>
重置
</el-button
>
<el-button
v-hasPermi=
"['customerManage:customer:export']"
type=
"info"
@
click=
"exportCustomer"
<el-button
v-hasPermi=
"['customerManage:customer:query']"
type=
"primary"
@
click=
"getList(1)"
>
查询
</el-button>
<el-button
v-hasPermi=
"['customerManage:customer:query']"
type=
"success"
@
click=
"resetForm()"
>
重置
</el-button>
<el-button
v-hasPermi=
"['customerManage:customer:export']"
type=
"info"
@
click=
"exportCustomer"
>
导出列表
</el-button
>
</el-form-item>
...
...
@@ -264,53 +229,29 @@ export default {
style=
"width: 100%"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
align=
"center"
width=
"55"
></el-table-column>
<el-table-column
type=
"selection"
align=
"center"
width=
"55"
></el-table-column>
<el-table-column
label=
"客户"
prop=
"name"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
name
}}
<span
:style=
"
{ color: scope.row.type === 1 ? '#4bde03' : '#f9a90b' }"
>
{{
{
1
:
'@微信'
,
2
:
'@企业微信'
}
[
scope
.
row
.
type
]
}}
<
/spa
n
>
<
i
:
class
=
"
[
'el-icon-s-custom'
,
{
1
:
'man'
,
2
:
'woman'
}
[
scope
.
row
.
gender
]
]
"
></i>
<span
:style=
"
{ color: scope.row.type === 1 ? '#4bde03' : '#f9a90b' }">
{{
{
1
:
'@微信'
,
2
:
'@企业微信'
}
[
scope
.
row
.
type
]
}}
<
/span
>
<
i
:
class
=
"
[
'el-icon-s-custom'
,
{
1
:
'man'
,
2
:
'woman'
}
[
scope
.
row
.
gender
]]
"></i>
</template>
</el-table-column>
<el-table-column
prop="
corpName
"
label="
公司名称
"
align="
center
"
></el-table-column>
<el-table-column prop="
corpName
" label="
公司名称
" align="
center
"></el-table-column>
<el-table-column prop="
userName
" label="
添加人(首位)
" align="
center
">
<template slot-scope="
scope
"
>
{{
scope
.
row
.
weFlowerCustomerRels
[
0
].
userName
}}
<
/template
>
<template slot-scope="
scope
"
>
{{
scope
.
row
.
weFlowerCustomerRels
[
0
].
userName
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"createTime"
label
=
"添加时间"
align
=
"center"
>
<
template
slot
-
scope
=
"scope"
>
{{
scope
.
row
.
weFlowerCustomerRels
[
0
].
createTime
}}
<
/template
>
<
template
slot
-
scope
=
"scope"
>
{{
scope
.
row
.
weFlowerCustomerRels
[
0
].
createTime
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"address"
label
=
"标签"
align
=
"center"
>
<
template
slot
-
scope
=
"scope"
>
<
div
v
-
for
=
"(item, index) in scope.row.weFlowerCustomerRels"
:
key
=
"index"
>
<
el
-
tag
type
=
"info"
v
-
for
=
"(unit, unique) in item.weFlowerCustomerTagRels"
:
key
=
"unique"
>
{{
unit
.
tagName
}}
<
/el-ta
g
>
<
div
v
-
for
=
"(item, index) in scope.row.weFlowerCustomerRels"
:
key
=
"index"
>
<
el
-
tag
type
=
"info"
v
-
for
=
"(unit, unique) in item.weFlowerCustomerTagRels"
:
key
=
"unique"
>
{{
unit
.
tagName
}}
<
/el-tag
>
<
/div
>
<
/template
>
<
/el-table-column
>
...
...
@@ -352,11 +293,7 @@ export default {
</SelectTag>
<!-- 选择添加人弹窗 -->
<SelectUser
:visible.sync="
dialogVisibleSelectUser
"
title="
选择添加人
"
@success="
selectedUser
"
></SelectUser>
<SelectUser :visible.sync="
dialogVisibleSelectUser
" title="
选择添加人
" @success="
selectedUser
"></SelectUser>
</div>
</template>
...
...
linkwe-ui/src/views/material/components/MaPage.vue
View file @
d662603
...
...
@@ -71,16 +71,10 @@ export default {
dialogVisible
:
false
,
// 素材表格对话框显隐
// 表单校验
rules
:
Object
.
freeze
({
categoryId
:
[
{
required
:
true
,
message
:
'不能为空'
,
trigger
:
'change'
}
],
categoryId
:
[{
required
:
true
,
message
:
'不能为空'
,
trigger
:
'change'
}],
content
:
[{
required
:
true
,
message
:
'不能为空'
,
trigger
:
'blur'
}],
materialUrl
:
[
{
required
:
true
,
message
:
'不能为空'
,
trigger
:
'change'
}
],
materialName
:
[
{
required
:
true
,
message
:
'不能为空'
,
trigger
:
'blur'
}
],
materialUrl
:
[{
required
:
true
,
message
:
'不能为空'
,
trigger
:
'change'
}],
materialName
:
[{
required
:
true
,
message
:
'不能为空'
,
trigger
:
'blur'
}],
digest
:
[{
required
:
true
,
message
:
'不能为空'
,
trigger
:
'blur'
}],
coverUrl
:
[{
required
:
true
,
message
:
'不能为空'
,
trigger
:
'blur'
}]
})
...
...
@@ -112,7 +106,6 @@ export default {
},
// 获取素材列表
getList
(
page
)
{
console
.
log
(
'getList'
,
page
,
JSON
.
stringify
(
this
.
query
))
page
&&
(
this
.
query
.
pageNum
=
page
)
this
.
loading
=
true
getList
(
this
.
query
)
...
...
@@ -138,10 +131,7 @@ export default {
},
// 类目树节点添加/编辑 0: 添加, 1:编辑
treeEdit
(
data
,
type
)
{
this
.
treeForm
=
Object
.
assign
(
{},
type
?
data
:
{
parentId
:
data
.
id
||
'0'
,
mediaType
:
this
.
type
}
)
this
.
treeForm
=
Object
.
assign
({},
type
?
data
:
{
parentId
:
data
.
id
||
'0'
,
mediaType
:
this
.
type
})
this
.
treeDialogVisible
=
true
},
// 类目树节点提交
...
...
@@ -179,10 +169,7 @@ export default {
this
.
$parent
.
dialog
.
edit
=
true
break
default
:
this
.
form
=
Object
.
assign
(
{},
data
||
{
categoryId
:
this
.
query
.
categoryId
}
)
this
.
form
=
Object
.
assign
({},
data
||
{
categoryId
:
this
.
query
.
categoryId
})
this
.
dialogVisible
=
true
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'form'
].
clearValidate
()
...
...
@@ -245,11 +232,7 @@ export default {
<el-row
type=
"flex"
justify=
"space-between"
>
<el-col
:span=
"6"
>
<div>
<el-button
v-hasPermi=
"['wechat:category:add']"
slot=
"reference"
type=
"primary"
@
click=
"treeEdit(
{}, 0)"
<el-button
v-hasPermi=
"['wechat:category:add']"
slot=
"reference"
type=
"primary"
@
click=
"treeEdit(
{}, 0)"
>添加分类
</el-button
>
</div>
...
...
@@ -307,34 +290,18 @@ export default {
prefix-icon=
"el-icon-search"
style=
"width: 300px;"
/>
<el-button
class=
"ml10"
@
click=
"getList(1)"
v-hasPermi=
"['wecom:material:list']"
>
搜索
</el-button
>
<el-button
v-hasPermi=
"['wechat:material:remove']"
@
click=
"remove()"
:disabled=
"selected.length === 0"
<el-button
class=
"ml10"
@
click=
"getList(1)"
v-hasPermi=
"['wecom:material:list']"
>
搜索
</el-button>
<el-button
v-hasPermi=
"['wechat:material:remove']"
@
click=
"remove()"
:disabled=
"selected.length === 0"
>
删除
</el-button
>
<el-popover
placement=
"top"
width=
"260"
v-model=
"groupDialogVisible"
>
<div>
选择分组
</div>
<div
style=
"position: relative; margin: 10px 0;"
>
<el-cascader
v-model=
"group"
:options=
"treeData[0].children"
:props=
"groupProps"
></el-cascader>
<el-cascader
v-model=
"group"
:options=
"treeData[0].children"
:props=
"groupProps"
></el-cascader>
</div>
<div
style=
"text-align: right;"
>
<el-button
size=
"mini"
@
click=
"groupDialogVisible = false"
>
取消
</el-button
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"moveGroup"
>
确定
</el-button
>
<el-button
size=
"mini"
@
click=
"groupDialogVisible = false"
>
取消
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"moveGroup"
>
确定
</el-button>
</div>
<el-button
v-hasPermi=
"['wechat:material:resetCategory']"
...
...
@@ -346,10 +313,7 @@ export default {
</el-popover>
<div
class=
"fr"
>
<el-button
v-hasPermi=
"['wechat:material:add']"
type=
"primary"
@
click=
"edit(1, ~~type)"
<el-button
v-hasPermi=
"['wechat:material:add']"
type=
"primary"
@
click=
"edit(1, ~~type)"
>
添加
{{
typeTitle
[
type
]
}}
</el-button
>
</div>
...
...
@@ -364,17 +328,13 @@ export default {
:total=
"total"
:page
.
sync=
"query.pageNum"
:limit
.
sync=
"query.pageSize"
@
pagination=
"getList(
1
)"
@
pagination=
"getList()"
/>
</el-col>
</el-row>
<!-- 分类树添加/编辑弹窗 -->
<el-dialog
:title=
"(treeForm.id ? '修改' : '添加') + '分类'"
:visible
.
sync=
"treeDialogVisible"
width=
"400px"
>
<el-dialog
:title=
"(treeForm.id ? '修改' : '添加') + '分类'"
:visible
.
sync=
"treeDialogVisible"
width=
"400px"
>
<el-form
ref=
"treeForm"
:model=
"treeForm"
>
<el-form-item>
<el-input
...
...
@@ -404,11 +364,7 @@ export default {
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"分类"
prop=
"categoryId"
>
<el-cascader
v-model=
"form.categoryId"
:options=
"treeData[0].children"
:props=
"groupProps"
></el-cascader>
<el-cascader
v-model=
"form.categoryId"
:options=
"treeData[0].children"
:props=
"groupProps"
></el-cascader>
</el-form-item>
<el-form-item
label=
"文本内容"
prop=
"content"
v-if=
"type === '4'"
>
...
...
@@ -430,61 +386,40 @@ export default {
>
</el-input>
</el-form-item>
<el-form-item
label=
"图片"
prop=
"materialUrl"
>
<upload
:fileUrl
.
sync=
"form.materialUrl"
:fileName
.
sync=
"form.materialName"
:type=
"type"
>
<upload
:fileUrl
.
sync=
"form.materialUrl"
:fileName
.
sync=
"form.materialName"
:type=
"type"
>
<div
slot=
"tip"
>
支持JPG,PNG格式,图片大小不超过2M,建议上传宽高1:1的图片
</div>
</upload>
</el-form-item>
<el-form-item
label=
"名称"
prop=
"materialName"
>
<el-input
v-model=
"form.materialName"
placeholder=
"请输入"
></el-input>
<el-input
v-model=
"form.materialName"
placeholder=
"请输入"
></el-input>
</el-form-item>
</
template
>
<
template
v-else-if=
"type === '1'"
>
<el-form-item
label=
"语音"
prop=
"materialUrl"
>
<upload
:fileUrl
.
sync=
"form.materialUrl"
:fileName
.
sync=
"form.materialName"
:type=
"type"
>
<upload
:fileUrl
.
sync=
"form.materialUrl"
:fileName
.
sync=
"form.materialName"
:type=
"type"
>
<div
slot=
"tip"
>
只能上传amr格式的语音文件。单个文件大小不超过2M,时长不超过1分钟
</div>
</upload>
</el-form-item>
<el-form-item
label=
"名称"
prop=
"materialName"
>
<el-input
v-model=
"form.materialName"
placeholder=
"请输入"
></el-input>
<el-input
v-model=
"form.materialName"
placeholder=
"请输入"
></el-input>
</el-form-item>
</
template
>
<
template
v-else-if=
"type === '2'"
>
<el-form-item
label=
"视频"
prop=
"materialUrl"
>
<upload
:fileUrl
.
sync=
"form.materialUrl"
:fileName
.
sync=
"form.materialName"
:type=
"type"
>
<upload
:fileUrl
.
sync=
"form.materialUrl"
:fileName
.
sync=
"form.materialName"
:type=
"type"
>
<div
slot=
"tip"
>
不超过10M, 文件格式: mp4
</div>
</upload>
</el-form-item>
<el-form-item
label=
"名称"
prop=
"materialName"
>
<el-input
v-model=
"form.materialName"
placeholder=
"请输入"
></el-input>
<el-input
v-model=
"form.materialName"
placeholder=
"请输入"
></el-input>
</el-form-item>
<el-form-item
label=
"封面"
>
<upload
:fileUrl
.
sync=
"form.coverUrl"
type=
"0"
>
...
...
@@ -504,21 +439,14 @@ export default {
<
template
v-else-if=
"type === '3'"
>
<el-form-item
label=
"文件"
prop=
"materialUrl"
>
<upload
:fileUrl
.
sync=
"form.materialUrl"
:fileName
.
sync=
"form.materialName"
:type=
"type"
>
<upload
:fileUrl
.
sync=
"form.materialUrl"
:fileName
.
sync=
"form.materialName"
:type=
"type"
>
<div
slot=
"tip"
>
单个文件大小不超过20M
</div>
</upload>
</el-form-item>
<el-form-item
label=
"名称"
prop=
"materialName"
>
<el-input
v-model=
"form.materialName"
placeholder=
"请输入"
></el-input>
<el-input
v-model=
"form.materialName"
placeholder=
"请输入"
></el-input>
</el-form-item>
</
template
>
</el-form>
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment