Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
horse
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
向伟
horse
Commits
8b1e197e
Commit
8b1e197e
authored
Nov 12, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
92d641f6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
179 additions
and
65 deletions
+179
-65
App.vue
src/App.vue
+1
-1
axios.ts
src/api/axios.ts
+15
-0
MainLayout.vue
src/layouts/MainLayout.vue
+6
-0
clueRule.vue
src/pages/customer/components/clueRule.vue
+108
-29
customerSetup.vue
src/pages/customer/customerSetup.vue
+1
-1
routes.ts
src/router/routes.ts
+48
-34
No files found.
src/App.vue
View file @
8b1e197e
...
...
@@ -10,5 +10,5 @@ export default defineComponent({
</
script
>
<
style
lang=
"sass"
>
@import
url('./css/font.sass')
@import
url('//at.alicdn.com/t/font_2930340_
slk9lu50bhg
.css')
@import
url('//at.alicdn.com/t/font_2930340_
td0kzqw2z1
.css')
</
style
>
src/api/axios.ts
View file @
8b1e197e
...
...
@@ -109,8 +109,23 @@ service.interceptors.response.use(
/** 请求有响应 */
async
(
response
:
AxiosResponse
)
=>
{
if
(
response
.
status
===
200
)
{
if
(
response
.
data
.
Code
===
1
)
{
return
Promise
.
resolve
(
response
)
}
else
{
Notify
.
create
({
message
:
response
.
data
.
Message
,
color
:
'warning'
,
textColor
:
'dark'
,
icon
:
'announcement'
,
position
:
"top"
})
if
(
response
.
data
.
Code
===
10000
||
response
.
data
.
Code
===
10001
)
{
localStorage
.
clear
()
router
.
replace
({
path
:
'/auth/login'
})
}
}
}
else
{
const
__text
=
getErrorCode2text
(
response
)
...
...
src/layouts/MainLayout.vue
View file @
8b1e197e
...
...
@@ -105,6 +105,12 @@ const linksList = [
MenuName
:
'客户'
,
MenuIcon
:
'school'
,
MenuUrl
:
'/customer'
},
{
MenuId
:
11
-
3
,
MenuName
:
'线索'
,
MenuIcon
:
'school'
,
MenuUrl
:
'/clue'
}
]
},
...
...
src/pages/customer/components/clueRule.vue
View file @
8b1e197e
...
...
@@ -5,6 +5,10 @@
<q-radio
v-model=
"ClueType"
:val=
"2"
label=
"手动分配"
></q-radio>
</div>
<div
class=
"q-pa-md"
v-if=
"ClueType === 1"
>
<div
class=
"aoto-matic-header"
>
若客户满足多条规则,会优先按照编号顺序执行规则
<q-btn
color=
"primary"
label=
"+新增规则"
style=
"margin-left: 10px;"
/>
</div>
<table
class=
"payTable"
>
<thead>
<tr>
...
...
@@ -13,16 +17,55 @@
<th>
部门列表
</th>
<th>
人员列表
</th>
<th>
分配方式
</th>
<th>
条件列表
</th>
<th>
条件描述
</th>
<th>
排序
</th>
<th
width=
"4%"
></th>
<th
width=
"10%"
>
编辑
</th>
<th
width=
"5%"
></th>
</tr>
</thead>
<!--
<tr
v-if=
"data && data.length == 0"
>
<td
:colspan=
"8"
align=
"center"
>
暂无数据
</td>
</tr>
-->
<draggable
v-model=
"data"
tag=
"tbody"
item-key=
"Id"
@
update=
"datadragEnd"
>
<tr
v-if=
"data.length == 0&&defaultData.length == 0"
>
<td
:colspan=
"9"
align=
"center"
>
暂无数据
</td>
</tr>
<tr
v-for=
"item in defaultData"
v-if=
"defaultData.length > 0"
>
<td>
<span
v-if=
"item.RuleSelectType === 1"
>
并且
</span>
<span
v-if=
"item.RuleSelectType === 2"
>
或者
</span>
</td>
<td>
<span
v-if=
"item.IsDefault == 1"
>
是
</span>
<span
v-else
>
否
</span>
</td>
<td>
<span>
{{
item
.
DeptList
.
join
(
','
)
}}
</span>
</td>
<td>
<span>
{{
item
.
EmpList
.
join
(
','
)
}}
</span>
</td>
<td>
<span
v-if=
"item.RuleAllotWay === 1"
>
依次轮流
</span>
<span
v-if=
"item.RuleAllotWay === 2"
>
随机分配
</span>
</td>
<td>
<span>
未匹配设定规则的客户
</span>
</td>
<td>
<span>
{{
item
.
Sort
}}
</span>
</td>
<td>
<q-btn
flat
size=
"xs"
icon=
"edit"
style=
"font-weight:400;color: #3FC4FF"
class=
"q-mr-xs"
label=
"编辑"
/>
</td>
<td>
</td>
</tr>
<draggable
v-model=
"data"
tag=
"tbody"
item-key=
"Id"
@
update=
"datadragEnd"
v-if=
"data.length > 0"
>
<template
#
item=
"
{ element }">
<tr>
<td>
...
...
@@ -43,18 +86,35 @@
<span
v-if=
"element.RuleAllotWay === 1"
>
依次轮流
</span>
<span
v-if=
"element.RuleAllotWay === 2"
>
随机分配
</span>
</td>
<td>
<span>
{{
element
.
ConditionList
.
join
(
','
)
}}
</span>
</td>
<td>
<span>
{{
element
.
ConditionStrList
.
join
(
','
)
}}
</span>
</td>
<td>
<span>
{{
element
.
Sort
}}
</span>
</td>
<td>
<i
class=
"iconfont icon-left"
style=
"font-size: 14px;color: #777;"
></i>
<q-btn
flat
size=
"xs"
icon=
"edit"
style=
"font-weight:400;color: #3FC4FF"
class=
"q-mr-xs"
label=
"编辑"
@
click=
"goedit(element)"
/>
<q-btn
v-if=
"element.IsDefault != 1"
flat
size=
"xs"
icon=
"delete"
color=
"negative"
class=
"q-mr-xs"
label=
"删除"
@
click=
"godelete(element, 3, index)"
/>
</td>
<td>
<i
class=
"iconfont icon-drag"
style=
"font-size: 20px;color: #777;"
></i>
</td>
</tr>
</
template
>
...
...
@@ -64,32 +124,42 @@
</div>
</template>
<
script
lang=
"ts"
>
import
{
defineComponent
,
ref
,
onMounted
}
from
'vue'
import
{
defineComponent
,
ref
,
reactive
,
onMounted
}
from
'vue'
import
draggable
from
"vuedraggable"
;
import
customerService
from
'@/api/customer'
;
interface
dataType
{
Id
:
number
,
RuleSelectType
:
number
,
IsDefault
:
number
,
DeptList
:
Array
<
any
>
,
EmpList
:
Array
<
any
>
,
RuleAllotWay
:
number
,
ConditionList
:
Array
<
any
>
,
ConditionStrList
:
Array
<
string
>
,
Sort
:
number
}
export
default
defineComponent
({
component
:
{
component
s
:
{
draggable
},
setup
()
{
let
data
=
ref
([{
Id
:
1
,
RuleSelectType
:
1
,
IsDefault
:
1
,
DeptList
:[],
EmpList
:[],
RuleAllotWay
:
1
,
ConditionList
:[],
ConditionStrList
:[],
Sort
:
1
}])
let
defaultData
:
Array
<
dataType
>=
reactive
([])
let
data
:
Array
<
dataType
>=
reactive
([])
const
datadragEnd
=
(
e
:
any
)
=>
{
console
.
log
(
'拖动结束'
,
e
)
}
const
getClueList
=
()
=>
{
customerService
.
getCustomerClueRuleList
({}).
then
(
res
=>
{
data
.
value
=
res
.
data
.
Data
console
.
log
(
59
,
data
)
customerService
.
getCustomerClueRuleList
({}).
then
(
res
=>
{
res
.
data
.
Data
.
map
((
item
:
dataType
)
=>
{
if
(
item
.
IsDefault
===
1
){
defaultData
.
push
(
item
)
}
else
{
data
.
push
(
item
)
}
})
console
.
log
(
69
,
defaultData
)
console
.
log
(
123
,
data
)
})
}
onMounted
(()
=>
{
...
...
@@ -97,14 +167,14 @@ export default defineComponent({
})
return
{
ClueType
:
ref
(
1
),
defaultData
,
data
,
// columns,
datadragEnd
}
}
})
</
script
>
<
style
>
<
style
lang=
"scss"
scoped
>
.payTable
{
width
:
100%
;
border-collapse
:
collapse
;
...
...
@@ -133,4 +203,13 @@ export default defineComponent({
font-weight
:
bold
;
border-bottom
:
1px
solid
#e5e5e5
;
}
.aoto-matic-header
{
display
:
flex
;
align-items
:
center
;
justify-content
:
flex-end
;
margin-bottom
:
10px
;
margin-left
:
2px
;
color
:
#858598
;
font-size
:
14px
;
}
</
style
>
\ No newline at end of file
src/pages/customer/customerSetup.vue
View file @
8b1e197e
...
...
@@ -37,7 +37,7 @@ export default defineComponent({
},
setup
()
{
return
{
tab
:
ref
(
'
field
'
)
tab
:
ref
(
'
clue
'
)
}
}
...
...
src/router/routes.ts
View file @
8b1e197e
import
{
RouteRecordRaw
}
from
'vue-router'
const
routes
:
RouteRecordRaw
[]
=
[
{
path
:
'/index'
,
component
:
()
=>
import
(
'@/layouts/MainLayout.vue'
),
children
:
[{
path
:
''
,
component
:
()
=>
import
(
'@/pages/Index.vue'
)
}]
},
{
path
:
'/groupingManage'
,
component
:
()
=>
import
(
'@/layouts/MainLayout.vue'
),
children
:
[{
path
:
''
,
component
:
()
=>
import
(
'@/pages/drainage/groupingManage.vue'
)
}]
},
{
//客户管理 客户设置
path
:
'/customerSetup'
,
component
:
()
=>
import
(
'@/layouts/MainLayout.vue'
),
children
:
[{
path
:
''
,
component
:
()
=>
import
(
'@/pages/customer/customerSetup.vue'
)
}]
},
{
path
:
'/customer'
,
component
:
()
=>
import
(
'@/layouts/MainLayout.vue'
),
children
:
[{
path
:
''
,
component
:
()
=>
import
(
'@/pages/customerManage/customer.vue'
)
}]
},
{
path
:
'/auth/login'
,
component
:
()
=>
import
(
'@/pages/auth/login.vue'
)
},
{
path
:
'/auth/regist'
,
component
:
()
=>
import
(
'@/pages/auth/regist.vue'
)
},
// Always leave this as last one,
// but you can also remove it
{
path
:
'/:catchAll(.*)*'
,
component
:
()
=>
import
(
'pages/Error404.vue'
)
}
{
path
:
'/'
,
redirect
:
'/index'
,
component
:
()
=>
import
(
'@/layouts/MainLayout.vue'
),
children
:
[
//首页
{
path
:
'/index'
,
component
:
()
=>
import
(
'@/pages/Index.vue'
)
},
//素材分组
{
path
:
'/groupingManage'
,
component
:
()
=>
import
(
'@/pages/drainage/groupingManage.vue'
)
},
//客户管理--------------------
// 客户设置
{
path
:
'/customerSetup'
,
component
:
()
=>
import
(
'@/pages/customer/customerSetup.vue'
)
},
//客户
{
path
:
'/customer'
,
component
:
()
=>
import
(
'@/pages/customerManage/customer.vue'
)
},
//线索
{
path
:
'/clue'
,
component
:
()
=>
import
(
'@/pages/customerManage/clue.vue'
)
}
]
},
{
path
:
'/auth/login'
,
component
:
()
=>
import
(
'@/pages/auth/login.vue'
)
},
{
path
:
'/auth/regist'
,
component
:
()
=>
import
(
'@/pages/auth/regist.vue'
)
},
// Always leave this as last one,
// but you can also remove it
{
path
:
'/:catchAll(.*)*'
,
component
:
()
=>
import
(
'pages/Error404.vue'
)
}
]
export
default
routes
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