Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-drainage
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 5909ebec
authored
Nov 02, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
073c7cef
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
769 additions
and
251 deletions
src/api/modules/businessCard.js
src/components/draggable/vue-draggable-resizable.vue
src/components/empDetail/index.vue
src/components/vue-draggable-resizable.vue
src/config/index.js
src/setup/qiankun.js
src/views/businessCard/components/activityList.vue
src/views/businessCard/components/cardList.vue
src/views/businessCard/components/recordList.vue
src/views/businessCard/index.vue
src/views/square/index.vue
src/api/modules/businessCard.js
View file @
5909ebe
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-10-12 09:30:11
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-10-19 14:07:55
* @FilePath: \scrm-micro-drainage\src\api\modules\businessCard.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
/**
* 新增参数sign 判断接口是否需要sign签名
*/
...
...
@@ -69,6 +77,50 @@ const getaccessToRecordsPage = params => {
sign
:
true
})
}
// 智能名片活动跟进
const
activityFollow
=
params
=>
{
params
.
method
=
'entmicro.api.business.card.activity.follow'
params
.
sessionId
=
session
return
http
({
url
:
'/rop-scrm-entmicro/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
// 分页查询活动申请记录
const
activityRecord
=
params
=>
{
params
.
method
=
'entmicro.api.business.card.activity.record'
params
.
sessionId
=
session
return
http
({
url
:
'/rop-scrm-entmicro/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
// 智能名片活动申请
const
activityApply
=
params
=>
{
params
.
method
=
'entmicro.api.business.card.activity.apply'
params
.
sessionId
=
session
return
http
({
url
:
'/rop-scrm-entmicro/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
// 智能名片活动页面访问记录
const
pagerecord
=
params
=>
{
params
.
method
=
'entmicro.api.business.card.activity.pagerecord'
params
.
sessionId
=
session
return
http
({
url
:
'/rop-scrm-entmicro/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
export
default
{
getBussinessCardListApi
,
...
...
@@ -76,5 +128,9 @@ export default {
getBussinessCardDetail
,
addBussinessCard
,
updateBussinessCard
,
getaccessToRecordsPage
getaccessToRecordsPage
,
activityFollow
,
activityRecord
,
activityApply
,
pagerecord
}
src/components/draggable/vue-draggable-resizable.vue
View file @
5909ebe
<
template
>
<div
:style=
"style"
:class=
"[
{
[classNameActive]: enabled,
[classNameDragging]: dragging,
[classNameResizing]: resizing,
[classNameDraggable]: draggable,
[classNameResizable]: resizable
}, className]"
:class=
"[
{
[classNameActive]: enabled,
[classNameDragging]: dragging,
[classNameResizing]: resizing,
[classNameDraggable]: draggable,
[classNameResizable]: resizable
},
className
]"
@mousedown="elementMouseDown"
@touchstart="elementTouchDown"
>
<div
v-for=
"handle in actualHandles"
:key=
"handle"
:class=
"[classNameHandle, classNameHandle + '-' + handle]"
:style=
"
{display: enabled ? 'block' : 'none'}"
@mousedown.stop.prevent="handleDown(handle, $event)"
@touchstart.stop.prevent="handleTouchDown(handle, $event)"
>
<div
v-for=
"handle in actualHandles"
:key=
"handle"
:class=
"[classNameHandle, classNameHandle + '-' + handle]"
:style=
"
{ display: enabled ? 'block' : 'none' }" @mousedown.stop.prevent="handleDown(handle, $event)" @touchstart.stop.prevent="handleTouchDown(handle, $event)">
<slot
:name=
"handle"
></slot>
</div>
<slot></slot>
...
...
@@ -121,7 +117,7 @@ export default {
w
:
{
type
:
[
Number
,
String
],
default
:
200
,
validator
:
(
val
)
=>
{
validator
:
val
=>
{
if
(
typeof
val
===
'number'
)
{
return
val
>
0
}
...
...
@@ -132,7 +128,7 @@ export default {
h
:
{
type
:
[
Number
,
String
],
default
:
200
,
validator
:
(
val
)
=>
{
validator
:
val
=>
{
if
(
typeof
val
===
'number'
)
{
return
val
>
0
}
...
...
@@ -143,22 +139,22 @@ export default {
minWidth
:
{
type
:
Number
,
default
:
0
,
validator
:
(
val
)
=>
val
>=
0
validator
:
val
=>
val
>=
0
},
minHeight
:
{
type
:
Number
,
default
:
0
,
validator
:
(
val
)
=>
val
>=
0
validator
:
val
=>
val
>=
0
},
maxWidth
:
{
type
:
Number
,
default
:
null
,
validator
:
(
val
)
=>
val
>=
0
validator
:
val
=>
val
>=
0
},
maxHeight
:
{
type
:
Number
,
default
:
null
,
validator
:
(
val
)
=>
val
>=
0
validator
:
val
=>
val
>=
0
},
x
:
{
type
:
Number
,
...
...
@@ -171,12 +167,12 @@ export default {
z
:
{
type
:
[
String
,
Number
],
default
:
'auto'
,
validator
:
(
val
)
=>
(
typeof
val
===
'string'
?
val
===
'auto'
:
val
>=
0
)
validator
:
val
=>
(
typeof
val
===
'string'
?
val
===
'auto'
:
val
>=
0
)
},
handles
:
{
type
:
Array
,
default
:
()
=>
[
'tl'
,
'tm'
,
'tr'
,
'mr'
,
'br'
,
'bm'
,
'bl'
,
'ml'
],
validator
:
(
val
)
=>
{
validator
:
val
=>
{
const
s
=
new
Set
([
'tl'
,
'tm'
,
'tr'
,
'mr'
,
'br'
,
'bm'
,
'bl'
,
'ml'
])
return
new
Set
(
val
.
filter
(
h
=>
s
.
has
(
h
))).
size
===
val
.
length
...
...
@@ -193,14 +189,14 @@ export default {
axis
:
{
type
:
String
,
default
:
'both'
,
validator
:
(
val
)
=>
[
'x'
,
'y'
,
'both'
].
includes
(
val
)
validator
:
val
=>
[
'x'
,
'y'
,
'both'
].
includes
(
val
)
},
grid
:
{
type
:
Array
,
default
:
()
=>
[
1
,
1
]
},
customId
:
{
type
:
[
String
,
Number
],
type
:
[
String
,
Number
],
default
:
''
},
parent
:
{
...
...
@@ -210,7 +206,7 @@ export default {
scale
:
{
type
:
[
Number
,
Array
],
default
:
1
,
validator
:
(
val
)
=>
{
validator
:
val
=>
{
if
(
typeof
val
===
'number'
)
{
return
val
>
0
}
...
...
@@ -236,7 +232,7 @@ export default {
}
},
data
:
function
()
{
data
:
function
()
{
return
{
left
:
this
.
x
,
top
:
this
.
y
,
...
...
@@ -270,7 +266,7 @@ export default {
}
},
created
:
function
()
{
created
:
function
()
{
// eslint-disable-next-line
if
(
this
.
maxWidth
&&
this
.
minWidth
>
this
.
maxWidth
)
console
.
warn
(
'[Vdr warn]: Invalid prop: minWidth cannot be greater than maxWidth'
)
// eslint-disable-next-line
...
...
@@ -278,7 +274,7 @@ export default {
this
.
resetBoundsAndMouseState
()
},
mounted
:
function
()
{
mounted
:
function
()
{
if
(
!
this
.
enableNativeDrag
)
{
this
.
$el
.
ondragstart
=
()
=>
false
}
...
...
@@ -307,7 +303,7 @@ export default {
addEvent
(
window
,
'resize'
,
this
.
checkParentSize
)
},
beforeDestroy
:
function
()
{
beforeDestroy
:
function
()
{
removeEvent
(
document
.
documentElement
,
'mousedown'
,
this
.
deselect
)
removeEvent
(
document
.
documentElement
,
'touchstart'
,
this
.
handleUp
)
removeEvent
(
document
.
documentElement
,
'mousemove'
,
this
.
move
)
...
...
@@ -319,7 +315,7 @@ export default {
},
methods
:
{
resetBoundsAndMouseState
()
{
resetBoundsAndMouseState
()
{
this
.
mouseClickPosition
=
{
mouseX
:
0
,
mouseY
:
0
,
x
:
0
,
y
:
0
,
w
:
0
,
h
:
0
}
this
.
bounds
=
{
...
...
@@ -333,7 +329,7 @@ export default {
maxBottom
:
null
}
},
checkParentSize
()
{
checkParentSize
()
{
if
(
this
.
parent
)
{
const
[
newParentWidth
,
newParentHeight
]
=
this
.
getParentSize
()
...
...
@@ -343,29 +339,26 @@ export default {
this
.
bottom
=
this
.
parentHeight
-
this
.
height
-
this
.
top
}
},
getParentSize
()
{
getParentSize
()
{
if
(
this
.
parent
)
{
const
style
=
window
.
getComputedStyle
(
this
.
$el
.
parentNode
,
null
)
return
[
parseInt
(
style
.
getPropertyValue
(
'width'
),
10
),
parseInt
(
style
.
getPropertyValue
(
'height'
),
10
)
]
return
[
parseInt
(
style
.
getPropertyValue
(
'width'
),
10
),
parseInt
(
style
.
getPropertyValue
(
'height'
),
10
)]
}
return
[
null
,
null
]
},
elementTouchDown
(
e
)
{
elementTouchDown
(
e
)
{
eventsFor
=
events
.
touch
this
.
elementDown
(
e
)
},
elementMouseDown
(
e
)
{
elementMouseDown
(
e
)
{
eventsFor
=
events
.
mouse
this
.
elementDown
(
e
)
},
elementDown
(
e
)
{
elementDown
(
e
)
{
if
(
e
instanceof
MouseEvent
&&
e
.
which
!==
1
)
{
return
}
...
...
@@ -377,10 +370,7 @@ export default {
return
}
if
(
(
this
.
dragHandle
&&
!
matchesSelectorToParentElements
(
target
,
this
.
dragHandle
,
this
.
$el
))
||
(
this
.
dragCancel
&&
matchesSelectorToParentElements
(
target
,
this
.
dragCancel
,
this
.
$el
))
)
{
if
((
this
.
dragHandle
&&
!
matchesSelectorToParentElements
(
target
,
this
.
dragHandle
,
this
.
$el
))
||
(
this
.
dragCancel
&&
matchesSelectorToParentElements
(
target
,
this
.
dragCancel
,
this
.
$el
)))
{
this
.
dragging
=
false
return
...
...
@@ -389,7 +379,7 @@ export default {
if
(
!
this
.
enabled
)
{
this
.
enabled
=
true
this
.
$emit
(
'activated'
,
this
.
customId
)
this
.
$emit
(
'activated'
,
this
.
customId
)
this
.
$emit
(
'update:active'
,
true
)
}
...
...
@@ -413,7 +403,7 @@ export default {
addEvent
(
document
.
documentElement
,
eventsFor
.
stop
,
this
.
handleUp
)
}
},
calcDragLimits
()
{
calcDragLimits
()
{
return
{
minLeft
:
this
.
left
%
this
.
grid
[
0
],
maxLeft
:
Math
.
floor
((
this
.
parentWidth
-
this
.
width
-
this
.
left
)
/
this
.
grid
[
0
])
*
this
.
grid
[
0
]
+
this
.
left
,
...
...
@@ -425,7 +415,7 @@ export default {
maxBottom
:
Math
.
floor
((
this
.
parentHeight
-
this
.
height
-
this
.
bottom
)
/
this
.
grid
[
1
])
*
this
.
grid
[
1
]
+
this
.
bottom
}
},
deselect
(
e
)
{
deselect
(
e
)
{
const
target
=
e
.
target
||
e
.
srcElement
const
regex
=
new
RegExp
(
this
.
className
+
'-([trmbl]{2})'
,
''
)
...
...
@@ -442,12 +432,12 @@ export default {
this
.
resetBoundsAndMouseState
()
},
handleTouchDown
(
handle
,
e
)
{
handleTouchDown
(
handle
,
e
)
{
eventsFor
=
events
.
touch
this
.
handleDown
(
handle
,
e
)
},
handleDown
(
handle
,
e
)
{
handleDown
(
handle
,
e
)
{
if
(
e
instanceof
MouseEvent
&&
e
.
which
!==
1
)
{
return
}
...
...
@@ -480,7 +470,7 @@ export default {
addEvent
(
document
.
documentElement
,
eventsFor
.
move
,
this
.
handleResize
)
addEvent
(
document
.
documentElement
,
eventsFor
.
stop
,
this
.
handleUp
)
},
calcResizeLimits
()
{
calcResizeLimits
()
{
let
minW
=
this
.
minW
let
minH
=
this
.
minH
let
maxW
=
this
.
maxW
...
...
@@ -572,7 +562,7 @@ export default {
limits
.
minBottom
=
-
(
top
+
maxH
)
}
if
(
this
.
lockAspectRatio
&&
(
maxW
&&
maxH
)
)
{
if
(
this
.
lockAspectRatio
&&
maxW
&&
maxH
)
{
limits
.
minLeft
=
Math
.
min
(
limits
.
minLeft
,
-
(
right
+
maxW
))
limits
.
minTop
=
Math
.
min
(
limits
.
minTop
,
-
(
maxH
+
bottom
))
limits
.
minRight
=
Math
.
min
(
limits
.
minRight
,
-
left
-
maxW
)
...
...
@@ -582,14 +572,14 @@ export default {
return
limits
},
move
(
e
)
{
move
(
e
)
{
if
(
this
.
resizing
)
{
this
.
handleResize
(
e
)
}
else
if
(
this
.
dragEnable
)
{
this
.
handleDrag
(
e
)
}
},
handleDrag
(
e
)
{
handleDrag
(
e
)
{
const
axis
=
this
.
axis
const
grid
=
this
.
grid
const
bounds
=
this
.
bounds
...
...
@@ -618,7 +608,7 @@ export default {
this
.
$emit
(
'dragging'
,
this
.
left
,
this
.
top
)
this
.
dragging
=
true
},
moveHorizontally
(
val
)
{
moveHorizontally
(
val
)
{
// should calculate with scale 1.
const
[
deltaX
,
_
]
=
snapToGrid
(
this
.
grid
,
val
,
this
.
top
,
1
)
...
...
@@ -627,7 +617,7 @@ export default {
this
.
left
=
left
this
.
right
=
this
.
parentWidth
-
this
.
width
-
left
},
moveVertically
(
val
)
{
moveVertically
(
val
)
{
// should calculate with scale 1.
const
[
_
,
deltaY
]
=
snapToGrid
(
this
.
grid
,
this
.
left
,
val
,
1
)
...
...
@@ -636,7 +626,7 @@ export default {
this
.
top
=
top
this
.
bottom
=
this
.
parentHeight
-
this
.
height
-
top
},
handleResize
(
e
)
{
handleResize
(
e
)
{
let
left
=
this
.
left
let
top
=
this
.
top
let
right
=
this
.
right
...
...
@@ -660,21 +650,13 @@ export default {
const
[
deltaX
,
deltaY
]
=
snapToGrid
(
this
.
grid
,
tmpDeltaX
,
tmpDeltaY
,
this
.
scale
)
if
(
this
.
handle
.
includes
(
'b'
))
{
bottom
=
restrictToBounds
(
mouseClickPosition
.
bottom
+
deltaY
,
this
.
bounds
.
minBottom
,
this
.
bounds
.
maxBottom
)
bottom
=
restrictToBounds
(
mouseClickPosition
.
bottom
+
deltaY
,
this
.
bounds
.
minBottom
,
this
.
bounds
.
maxBottom
)
if
(
this
.
lockAspectRatio
&&
this
.
resizingOnY
)
{
right
=
this
.
right
-
(
this
.
bottom
-
bottom
)
*
aspectFactor
}
}
else
if
(
this
.
handle
.
includes
(
't'
))
{
top
=
restrictToBounds
(
mouseClickPosition
.
top
-
deltaY
,
this
.
bounds
.
minTop
,
this
.
bounds
.
maxTop
)
top
=
restrictToBounds
(
mouseClickPosition
.
top
-
deltaY
,
this
.
bounds
.
minTop
,
this
.
bounds
.
maxTop
)
if
(
this
.
lockAspectRatio
&&
this
.
resizingOnY
)
{
left
=
this
.
left
-
(
this
.
top
-
top
)
*
aspectFactor
...
...
@@ -682,21 +664,13 @@ export default {
}
if
(
this
.
handle
.
includes
(
'r'
))
{
right
=
restrictToBounds
(
mouseClickPosition
.
right
+
deltaX
,
this
.
bounds
.
minRight
,
this
.
bounds
.
maxRight
)
right
=
restrictToBounds
(
mouseClickPosition
.
right
+
deltaX
,
this
.
bounds
.
minRight
,
this
.
bounds
.
maxRight
)
if
(
this
.
lockAspectRatio
&&
this
.
resizingOnX
)
{
bottom
=
this
.
bottom
-
(
this
.
right
-
right
)
/
aspectFactor
}
}
else
if
(
this
.
handle
.
includes
(
'l'
))
{
left
=
restrictToBounds
(
mouseClickPosition
.
left
-
deltaX
,
this
.
bounds
.
minLeft
,
this
.
bounds
.
maxLeft
)
left
=
restrictToBounds
(
mouseClickPosition
.
left
-
deltaX
,
this
.
bounds
.
minLeft
,
this
.
bounds
.
maxLeft
)
if
(
this
.
lockAspectRatio
&&
this
.
resizingOnX
)
{
top
=
this
.
top
-
(
this
.
left
-
left
)
/
aspectFactor
...
...
@@ -720,15 +694,11 @@ export default {
this
.
$emit
(
'resizing'
,
this
.
left
,
this
.
top
,
this
.
width
,
this
.
height
)
this
.
resizing
=
true
},
changeWidth
(
val
)
{
changeWidth
(
val
)
{
// should calculate with scale 1.
const
[
newWidth
,
_
]
=
snapToGrid
(
this
.
grid
,
val
,
0
,
1
)
let
right
=
restrictToBounds
(
(
this
.
parentWidth
-
newWidth
-
this
.
left
),
this
.
bounds
.
minRight
,
this
.
bounds
.
maxRight
)
let
right
=
restrictToBounds
(
this
.
parentWidth
-
newWidth
-
this
.
left
,
this
.
bounds
.
minRight
,
this
.
bounds
.
maxRight
)
let
bottom
=
this
.
bottom
if
(
this
.
lockAspectRatio
)
{
...
...
@@ -743,15 +713,11 @@ export default {
this
.
width
=
width
this
.
height
=
height
},
changeHeight
(
val
)
{
changeHeight
(
val
)
{
// should calculate with scale 1.
const
[
_
,
newHeight
]
=
snapToGrid
(
this
.
grid
,
0
,
val
,
1
)
let
bottom
=
restrictToBounds
(
(
this
.
parentHeight
-
newHeight
-
this
.
top
),
this
.
bounds
.
minBottom
,
this
.
bounds
.
maxBottom
)
let
bottom
=
restrictToBounds
(
this
.
parentHeight
-
newHeight
-
this
.
top
,
this
.
bounds
.
minBottom
,
this
.
bounds
.
maxBottom
)
let
right
=
this
.
right
if
(
this
.
lockAspectRatio
)
{
...
...
@@ -766,7 +732,7 @@ export default {
this
.
width
=
width
this
.
height
=
height
},
handleUp
(
e
)
{
handleUp
(
e
)
{
this
.
handle
=
null
this
.
resetBoundsAndMouseState
()
...
...
@@ -788,7 +754,7 @@ export default {
}
},
computed
:
{
style
()
{
style
()
{
return
{
transform
:
`translate(
${
this
.
left
}
px,
${
this
.
top
}
px)`
,
width
:
this
.
computedWidth
,
...
...
@@ -797,12 +763,12 @@ export default {
...(
this
.
dragging
&&
this
.
disableUserSelect
?
userSelectNone
:
userSelectAuto
)
}
},
actualHandles
()
{
actualHandles
()
{
if
(
!
this
.
resizable
)
return
[]
return
this
.
handles
},
computedWidth
()
{
computedWidth
()
{
if
(
this
.
w
===
'auto'
)
{
if
(
!
this
.
widthTouched
)
{
return
'auto'
...
...
@@ -811,7 +777,7 @@ export default {
return
this
.
width
+
'px'
},
computedHeight
()
{
computedHeight
()
{
if
(
this
.
h
===
'auto'
)
{
if
(
!
this
.
heightTouched
)
{
return
'auto'
...
...
@@ -820,19 +786,19 @@ export default {
return
this
.
height
+
'px'
},
resizingOnX
()
{
return
(
Boolean
(
this
.
handle
)
&&
(
this
.
handle
.
includes
(
'l'
)
||
this
.
handle
.
includes
(
'r'
)
))
resizingOnX
()
{
return
Boolean
(
this
.
handle
)
&&
(
this
.
handle
.
includes
(
'l'
)
||
this
.
handle
.
includes
(
'r'
))
},
resizingOnY
()
{
return
(
Boolean
(
this
.
handle
)
&&
(
this
.
handle
.
includes
(
't'
)
||
this
.
handle
.
includes
(
'b'
)
))
resizingOnY
()
{
return
Boolean
(
this
.
handle
)
&&
(
this
.
handle
.
includes
(
't'
)
||
this
.
handle
.
includes
(
'b'
))
},
isCornerHandle
()
{
return
(
Boolean
(
this
.
handle
)
&&
[
'tl'
,
'tr'
,
'br'
,
'bl'
].
includes
(
this
.
handle
)
)
isCornerHandle
()
{
return
Boolean
(
this
.
handle
)
&&
[
'tl'
,
'tr'
,
'br'
,
'bl'
].
includes
(
this
.
handle
)
}
},
watch
:
{
active
(
val
)
{
active
(
val
)
{
this
.
enabled
=
val
if
(
val
)
{
...
...
@@ -841,12 +807,12 @@ export default {
this
.
$emit
(
'deactivated'
)
}
},
z
(
val
)
{
z
(
val
)
{
if
(
val
>=
0
||
val
===
'auto'
)
{
this
.
zIndex
=
val
}
},
x
(
val
)
{
x
(
val
)
{
if
(
this
.
resizing
||
this
.
dragging
)
{
return
}
...
...
@@ -857,7 +823,7 @@ export default {
this
.
moveHorizontally
(
val
)
},
y
(
val
)
{
y
(
val
)
{
if
(
this
.
resizing
||
this
.
dragging
)
{
return
}
...
...
@@ -868,30 +834,30 @@ export default {
this
.
moveVertically
(
val
)
},
lockAspectRatio
(
val
)
{
lockAspectRatio
(
val
)
{
if
(
val
)
{
this
.
aspectFactor
=
this
.
width
/
this
.
height
}
else
{
this
.
aspectFactor
=
undefined
}
},
minWidth
(
val
)
{
minWidth
(
val
)
{
if
(
val
>
0
&&
val
<=
this
.
width
)
{
this
.
minW
=
val
}
},
minHeight
(
val
)
{
minHeight
(
val
)
{
if
(
val
>
0
&&
val
<=
this
.
height
)
{
this
.
minH
=
val
}
},
maxWidth
(
val
)
{
maxWidth
(
val
)
{
this
.
maxW
=
val
},
maxHeight
(
val
)
{
maxHeight
(
val
)
{
this
.
maxH
=
val
},
w
(
val
)
{
w
(
val
)
{
if
(
this
.
resizing
||
this
.
dragging
)
{
return
}
...
...
@@ -902,7 +868,7 @@ export default {
this
.
changeWidth
(
val
)
},
h
(
val
)
{
h
(
val
)
{
if
(
this
.
resizing
||
this
.
dragging
)
{
return
}
...
...
src/components/empDetail/index.vue
View file @
5909ebe
...
...
@@ -18,8 +18,9 @@
<el-form-item
size=
"small"
label=
"添加时间"
v-if=
"timeStatus"
>
<el-date-picker
:picker-options=
"pickerOptions"
value-format=
"yyyy-MM-dd"
v-model=
"createTime"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
></el-date-picker>
</el-form-item>
<el-form-item
size=
"small"
style=
"float: right; margin-right: 0px"
>
<el-form-item
size=
"small"
>
<el-button
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"handleReset"
>
重置
</el-button>
</el-form-item>
</el-form>
<!--
<GLCombiForm
ref=
"formSearch"
:formObj=
"tableSearchForm"
:formData=
"searchFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
></GLCombiForm>
-->
...
...
@@ -34,7 +35,7 @@
<
template
slot=
"customerName"
slot-scope=
"scope"
>
<div
class=
"form-row"
>
<img
:src=
"scope.scope.avatar"
v-if=
"scope.scope.avatar"
/>
{{
scope
.
scope
.
customer
Name
}}
{{
scope
.
scope
.
nickNameList
[
0
].
nick
Name
}}
<span
style=
"color: #5850ff"
>
{{
scope
.
scope
.
type
==
1
?
'@微信'
:
'@企微'
}}
</span>
</div>
</
template
>
...
...
@@ -198,7 +199,7 @@ export default {
...
JSON
.
parse
(
JSON
.
stringify
(
this
.
tableSearchForm
)),
pageSize
:
this
.
$refs
.
table
.
page
.
pageSize
,
pageNum
:
this
.
$refs
.
table
.
page
.
pageNum
,
custState
:
this
.
selectRow
.
codeState
,
custState
:
this
.
selectRow
.
codeState
?
this
.
selectRow
.
codeState
:
this
.
selectRow
.
state
,
staffIds
:
this
.
staffId
?
[
this
.
staffId
]
:
null
}
if
(
this
.
createTime
&&
this
.
createTime
.
length
>
0
)
{
...
...
@@ -222,7 +223,7 @@ export default {
var
params
=
{
pageSize
:
1000
,
pageNum
:
1
,
codeState
:
this
.
selectRow
.
codeState
codeState
:
this
.
selectRow
.
codeState
?
this
.
selectRow
.
codeState
:
this
.
selectRow
.
state
}
this
.
$apis
.
channel
.
getChannelCodeStaffList
(
params
).
then
(
res
=>
{
this
.
staffName
=
[{
staffName
:
'全部'
,
staffId
:
null
}].
concat
(
res
.
data
)
...
...
@@ -276,6 +277,10 @@ export default {
handleSearch
()
{
this
.
getFollower
()
},
handleReset
()
{
this
.
tableSearchForm
=
{}
this
.
getFollower
()
},
selectionTable
(
val
)
{
this
.
selectItem
=
val
},
...
...
@@ -304,7 +309,7 @@ export default {
/deep/
{
.el-date-editor,
.el-input
{
width
:
21
5
px
;
width
:
21
2
px
;
}
}
}
...
...
src/components/vue-draggable-resizable.vue
View file @
5909ebe
<
template
>
<div
:style=
"style"
:class=
"[
{
[classNameActive]: enabled,
[classNameDragging]: dragging,
[classNameResizing]: resizing,
[classNameDraggable]: draggable,
[classNameResizable]: resizable
}, className]"
:class=
"[
{
[classNameActive]: enabled,
[classNameDragging]: dragging,
[classNameResizing]: resizing,
[classNameDraggable]: draggable,
[classNameResizable]: resizable
},
className
]"
@mousedown="elementMouseDown"
@touchstart="elementTouchDown"
>
<div
v-for=
"handle in actualHandles"
:key=
"handle"
:class=
"[classNameHandle, classNameHandle + '-' + handle]"
:style=
"
{display: enabled ? 'block' : 'none'}"
@mousedown.stop.prevent="handleDown(handle, $event)"
@touchstart.stop.prevent="handleTouchDown(handle, $event)"
>
<div
v-for=
"handle in actualHandles"
:key=
"handle"
:class=
"[classNameHandle, classNameHandle + '-' + handle]"
:style=
"
{ display: enabled ? 'block' : 'none' }" @mousedown.stop.prevent="handleDown(handle, $event)" @touchstart.stop.prevent="handleTouchDown(handle, $event)">
<slot
:name=
"handle"
></slot>
</div>
<slot></slot>
...
...
@@ -121,7 +117,7 @@ export default {
w
:
{
type
:
[
Number
,
String
],
default
:
200
,
validator
:
(
val
)
=>
{
validator
:
val
=>
{
if
(
typeof
val
===
'number'
)
{
return
val
>
0
}
...
...
@@ -132,7 +128,7 @@ export default {
h
:
{
type
:
[
Number
,
String
],
default
:
200
,
validator
:
(
val
)
=>
{
validator
:
val
=>
{
if
(
typeof
val
===
'number'
)
{
return
val
>
0
}
...
...
@@ -143,22 +139,22 @@ export default {
minWidth
:
{
type
:
Number
,
default
:
0
,
validator
:
(
val
)
=>
val
>=
0
validator
:
val
=>
val
>=
0
},
minHeight
:
{
type
:
Number
,
default
:
0
,
validator
:
(
val
)
=>
val
>=
0
validator
:
val
=>
val
>=
0
},
maxWidth
:
{
type
:
Number
,
default
:
null
,
validator
:
(
val
)
=>
val
>=
0
validator
:
val
=>
val
>=
0
},
maxHeight
:
{
type
:
Number
,
default
:
null
,
validator
:
(
val
)
=>
val
>=
0
validator
:
val
=>
val
>=
0
},
x
:
{
type
:
Number
,
...
...
@@ -171,12 +167,12 @@ export default {
z
:
{
type
:
[
String
,
Number
],
default
:
'auto'
,
validator
:
(
val
)
=>
(
typeof
val
===
'string'
?
val
===
'auto'
:
val
>=
0
)
validator
:
val
=>
(
typeof
val
===
'string'
?
val
===
'auto'
:
val
>=
0
)
},
handles
:
{
type
:
Array
,
default
:
()
=>
[
'tl'
,
'tm'
,
'tr'
,
'mr'
,
'br'
,
'bm'
,
'bl'
,
'ml'
],
validator
:
(
val
)
=>
{
validator
:
val
=>
{
const
s
=
new
Set
([
'tl'
,
'tm'
,
'tr'
,
'mr'
,
'br'
,
'bm'
,
'bl'
,
'ml'
])
return
new
Set
(
val
.
filter
(
h
=>
s
.
has
(
h
))).
size
===
val
.
length
...
...
@@ -193,14 +189,14 @@ export default {
axis
:
{
type
:
String
,
default
:
'both'
,
validator
:
(
val
)
=>
[
'x'
,
'y'
,
'both'
].
includes
(
val
)
validator
:
val
=>
[
'x'
,
'y'
,
'both'
].
includes
(
val
)
},
grid
:
{
type
:
Array
,
default
:
()
=>
[
1
,
1
]
},
customId
:
{
type
:
[
String
,
Number
],
type
:
[
String
,
Number
],
default
:
''
},
parent
:
{
...
...
@@ -210,7 +206,7 @@ export default {
scale
:
{
type
:
[
Number
,
Array
],
default
:
1
,
validator
:
(
val
)
=>
{
validator
:
val
=>
{
if
(
typeof
val
===
'number'
)
{
return
val
>
0
}
...
...
@@ -236,7 +232,7 @@ export default {
}
},
data
:
function
()
{
data
:
function
()
{
return
{
left
:
this
.
x
,
top
:
this
.
y
,
...
...
@@ -270,7 +266,7 @@ export default {
}
},
created
:
function
()
{
created
:
function
()
{
// eslint-disable-next-line
if
(
this
.
maxWidth
&&
this
.
minWidth
>
this
.
maxWidth
)
console
.
warn
(
'[Vdr warn]: Invalid prop: minWidth cannot be greater than maxWidth'
)
// eslint-disable-next-line
...
...
@@ -278,7 +274,7 @@ export default {
this
.
resetBoundsAndMouseState
()
},
mounted
:
function
()
{
mounted
:
function
()
{
if
(
!
this
.
enableNativeDrag
)
{
this
.
$el
.
ondragstart
=
()
=>
false
}
...
...
@@ -307,7 +303,7 @@ export default {
addEvent
(
window
,
'resize'
,
this
.
checkParentSize
)
},
beforeDestroy
:
function
()
{
beforeDestroy
:
function
()
{
removeEvent
(
document
.
documentElement
,
'mousedown'
,
this
.
deselect
)
removeEvent
(
document
.
documentElement
,
'touchstart'
,
this
.
handleUp
)
removeEvent
(
document
.
documentElement
,
'mousemove'
,
this
.
move
)
...
...
@@ -319,7 +315,7 @@ export default {
},
methods
:
{
resetBoundsAndMouseState
()
{
resetBoundsAndMouseState
()
{
this
.
mouseClickPosition
=
{
mouseX
:
0
,
mouseY
:
0
,
x
:
0
,
y
:
0
,
w
:
0
,
h
:
0
}
this
.
bounds
=
{
...
...
@@ -333,7 +329,7 @@ export default {
maxBottom
:
null
}
},
checkParentSize
()
{
checkParentSize
()
{
if
(
this
.
parent
)
{
const
[
newParentWidth
,
newParentHeight
]
=
this
.
getParentSize
()
...
...
@@ -343,29 +339,26 @@ export default {
this
.
bottom
=
this
.
parentHeight
-
this
.
height
-
this
.
top
}
},
getParentSize
()
{
getParentSize
()
{
if
(
this
.
parent
)
{
const
style
=
window
.
getComputedStyle
(
this
.
$el
.
parentNode
,
null
)
return
[
parseInt
(
style
.
getPropertyValue
(
'width'
),
10
),
parseInt
(
style
.
getPropertyValue
(
'height'
),
10
)
]
return
[
parseInt
(
style
.
getPropertyValue
(
'width'
),
10
),
parseInt
(
style
.
getPropertyValue
(
'height'
),
10
)]
}
return
[
null
,
null
]
},
elementTouchDown
(
e
)
{
elementTouchDown
(
e
)
{
eventsFor
=
events
.
touch
this
.
elementDown
(
e
)
},
elementMouseDown
(
e
)
{
elementMouseDown
(
e
)
{
eventsFor
=
events
.
mouse
this
.
elementDown
(
e
)
},
elementDown
(
e
)
{
elementDown
(
e
)
{
if
(
e
instanceof
MouseEvent
&&
e
.
which
!==
1
)
{
return
}
...
...
@@ -377,10 +370,7 @@ export default {
return
}
if
(
(
this
.
dragHandle
&&
!
matchesSelectorToParentElements
(
target
,
this
.
dragHandle
,
this
.
$el
))
||
(
this
.
dragCancel
&&
matchesSelectorToParentElements
(
target
,
this
.
dragCancel
,
this
.
$el
))
)
{
if
((
this
.
dragHandle
&&
!
matchesSelectorToParentElements
(
target
,
this
.
dragHandle
,
this
.
$el
))
||
(
this
.
dragCancel
&&
matchesSelectorToParentElements
(
target
,
this
.
dragCancel
,
this
.
$el
)))
{
this
.
dragging
=
false
return
...
...
@@ -389,7 +379,7 @@ export default {
if
(
!
this
.
enabled
)
{
this
.
enabled
=
true
this
.
$emit
(
'activated'
,
this
.
customId
)
this
.
$emit
(
'activated'
,
this
.
customId
)
this
.
$emit
(
'update:active'
,
true
)
}
...
...
@@ -413,7 +403,7 @@ export default {
addEvent
(
document
.
documentElement
,
eventsFor
.
stop
,
this
.
handleUp
)
}
},
calcDragLimits
()
{
calcDragLimits
()
{
return
{
minLeft
:
this
.
left
%
this
.
grid
[
0
],
maxLeft
:
Math
.
floor
((
this
.
parentWidth
-
this
.
width
-
this
.
left
)
/
this
.
grid
[
0
])
*
this
.
grid
[
0
]
+
this
.
left
,
...
...
@@ -425,7 +415,7 @@ export default {
maxBottom
:
Math
.
floor
((
this
.
parentHeight
-
this
.
height
-
this
.
bottom
)
/
this
.
grid
[
1
])
*
this
.
grid
[
1
]
+
this
.
bottom
}
},
deselect
(
e
)
{
deselect
(
e
)
{
const
target
=
e
.
target
||
e
.
srcElement
const
regex
=
new
RegExp
(
this
.
className
+
'-([trmbl]{2})'
,
''
)
...
...
@@ -442,12 +432,12 @@ export default {
this
.
resetBoundsAndMouseState
()
},
handleTouchDown
(
handle
,
e
)
{
handleTouchDown
(
handle
,
e
)
{
eventsFor
=
events
.
touch
this
.
handleDown
(
handle
,
e
)
},
handleDown
(
handle
,
e
)
{
handleDown
(
handle
,
e
)
{
if
(
e
instanceof
MouseEvent
&&
e
.
which
!==
1
)
{
return
}
...
...
@@ -480,7 +470,7 @@ export default {
addEvent
(
document
.
documentElement
,
eventsFor
.
move
,
this
.
handleResize
)
addEvent
(
document
.
documentElement
,
eventsFor
.
stop
,
this
.
handleUp
)
},
calcResizeLimits
()
{
calcResizeLimits
()
{
let
minW
=
this
.
minW
let
minH
=
this
.
minH
let
maxW
=
this
.
maxW
...
...
@@ -572,7 +562,7 @@ export default {
limits
.
minBottom
=
-
(
top
+
maxH
)
}
if
(
this
.
lockAspectRatio
&&
(
maxW
&&
maxH
)
)
{
if
(
this
.
lockAspectRatio
&&
maxW
&&
maxH
)
{
limits
.
minLeft
=
Math
.
min
(
limits
.
minLeft
,
-
(
right
+
maxW
))
limits
.
minTop
=
Math
.
min
(
limits
.
minTop
,
-
(
maxH
+
bottom
))
limits
.
minRight
=
Math
.
min
(
limits
.
minRight
,
-
left
-
maxW
)
...
...
@@ -582,14 +572,14 @@ export default {
return
limits
},
move
(
e
)
{
move
(
e
)
{
if
(
this
.
resizing
)
{
this
.
handleResize
(
e
)
}
else
if
(
this
.
dragEnable
)
{
this
.
handleDrag
(
e
)
}
},
handleDrag
(
e
)
{
handleDrag
(
e
)
{
const
axis
=
this
.
axis
const
grid
=
this
.
grid
const
bounds
=
this
.
bounds
...
...
@@ -618,7 +608,7 @@ export default {
this
.
$emit
(
'dragging'
,
this
.
left
,
this
.
top
)
this
.
dragging
=
true
},
moveHorizontally
(
val
)
{
moveHorizontally
(
val
)
{
// should calculate with scale 1.
const
[
deltaX
,
_
]
=
snapToGrid
(
this
.
grid
,
val
,
this
.
top
,
1
)
...
...
@@ -627,7 +617,7 @@ export default {
this
.
left
=
left
this
.
right
=
this
.
parentWidth
-
this
.
width
-
left
},
moveVertically
(
val
)
{
moveVertically
(
val
)
{
// should calculate with scale 1.
const
[
_
,
deltaY
]
=
snapToGrid
(
this
.
grid
,
this
.
left
,
val
,
1
)
...
...
@@ -636,7 +626,7 @@ export default {
this
.
top
=
top
this
.
bottom
=
this
.
parentHeight
-
this
.
height
-
top
},
handleResize
(
e
)
{
handleResize
(
e
)
{
let
left
=
this
.
left
let
top
=
this
.
top
let
right
=
this
.
right
...
...
@@ -660,21 +650,13 @@ export default {
const
[
deltaX
,
deltaY
]
=
snapToGrid
(
this
.
grid
,
tmpDeltaX
,
tmpDeltaY
,
this
.
scale
)
if
(
this
.
handle
.
includes
(
'b'
))
{
bottom
=
restrictToBounds
(
mouseClickPosition
.
bottom
+
deltaY
,
this
.
bounds
.
minBottom
,
this
.
bounds
.
maxBottom
)
bottom
=
restrictToBounds
(
mouseClickPosition
.
bottom
+
deltaY
,
this
.
bounds
.
minBottom
,
this
.
bounds
.
maxBottom
)
if
(
this
.
lockAspectRatio
&&
this
.
resizingOnY
)
{
right
=
this
.
right
-
(
this
.
bottom
-
bottom
)
*
aspectFactor
}
}
else
if
(
this
.
handle
.
includes
(
't'
))
{
top
=
restrictToBounds
(
mouseClickPosition
.
top
-
deltaY
,
this
.
bounds
.
minTop
,
this
.
bounds
.
maxTop
)
top
=
restrictToBounds
(
mouseClickPosition
.
top
-
deltaY
,
this
.
bounds
.
minTop
,
this
.
bounds
.
maxTop
)
if
(
this
.
lockAspectRatio
&&
this
.
resizingOnY
)
{
left
=
this
.
left
-
(
this
.
top
-
top
)
*
aspectFactor
...
...
@@ -682,21 +664,13 @@ export default {
}
if
(
this
.
handle
.
includes
(
'r'
))
{
right
=
restrictToBounds
(
mouseClickPosition
.
right
+
deltaX
,
this
.
bounds
.
minRight
,
this
.
bounds
.
maxRight
)
right
=
restrictToBounds
(
mouseClickPosition
.
right
+
deltaX
,
this
.
bounds
.
minRight
,
this
.
bounds
.
maxRight
)
if
(
this
.
lockAspectRatio
&&
this
.
resizingOnX
)
{
bottom
=
this
.
bottom
-
(
this
.
right
-
right
)
/
aspectFactor
}
}
else
if
(
this
.
handle
.
includes
(
'l'
))
{
left
=
restrictToBounds
(
mouseClickPosition
.
left
-
deltaX
,
this
.
bounds
.
minLeft
,
this
.
bounds
.
maxLeft
)
left
=
restrictToBounds
(
mouseClickPosition
.
left
-
deltaX
,
this
.
bounds
.
minLeft
,
this
.
bounds
.
maxLeft
)
if
(
this
.
lockAspectRatio
&&
this
.
resizingOnX
)
{
top
=
this
.
top
-
(
this
.
left
-
left
)
/
aspectFactor
...
...
@@ -717,18 +691,14 @@ export default {
this
.
width
=
width
this
.
height
=
height
this
.
$emit
(
'resizing'
,
this
.
left
,
this
.
top
,
this
.
width
,
this
.
height
)
this
.
$emit
(
'resizing'
,
e
,
this
.
left
,
this
.
top
,
this
.
width
,
this
.
height
)
this
.
resizing
=
true
},
changeWidth
(
val
)
{
changeWidth
(
val
)
{
// should calculate with scale 1.
const
[
newWidth
,
_
]
=
snapToGrid
(
this
.
grid
,
val
,
0
,
1
)
let
right
=
restrictToBounds
(
(
this
.
parentWidth
-
newWidth
-
this
.
left
),
this
.
bounds
.
minRight
,
this
.
bounds
.
maxRight
)
let
right
=
restrictToBounds
(
this
.
parentWidth
-
newWidth
-
this
.
left
,
this
.
bounds
.
minRight
,
this
.
bounds
.
maxRight
)
let
bottom
=
this
.
bottom
if
(
this
.
lockAspectRatio
)
{
...
...
@@ -743,15 +713,11 @@ export default {
this
.
width
=
width
this
.
height
=
height
},
changeHeight
(
val
)
{
changeHeight
(
val
)
{
// should calculate with scale 1.
const
[
_
,
newHeight
]
=
snapToGrid
(
this
.
grid
,
0
,
val
,
1
)
let
bottom
=
restrictToBounds
(
(
this
.
parentHeight
-
newHeight
-
this
.
top
),
this
.
bounds
.
minBottom
,
this
.
bounds
.
maxBottom
)
let
bottom
=
restrictToBounds
(
this
.
parentHeight
-
newHeight
-
this
.
top
,
this
.
bounds
.
minBottom
,
this
.
bounds
.
maxBottom
)
let
right
=
this
.
right
if
(
this
.
lockAspectRatio
)
{
...
...
@@ -766,7 +732,7 @@ export default {
this
.
width
=
width
this
.
height
=
height
},
handleUp
(
e
)
{
handleUp
(
e
)
{
this
.
handle
=
null
this
.
resetBoundsAndMouseState
()
...
...
@@ -788,7 +754,7 @@ export default {
}
},
computed
:
{
style
()
{
style
()
{
return
{
transform
:
`translate(
${
this
.
left
}
px,
${
this
.
top
}
px)`
,
width
:
this
.
computedWidth
,
...
...
@@ -797,12 +763,12 @@ export default {
...(
this
.
dragging
&&
this
.
disableUserSelect
?
userSelectNone
:
userSelectAuto
)
}
},
actualHandles
()
{
actualHandles
()
{
if
(
!
this
.
resizable
)
return
[]
return
this
.
handles
},
computedWidth
()
{
computedWidth
()
{
if
(
this
.
w
===
'auto'
)
{
if
(
!
this
.
widthTouched
)
{
return
'auto'
...
...
@@ -811,7 +777,7 @@ export default {
return
this
.
width
+
'px'
},
computedHeight
()
{
computedHeight
()
{
if
(
this
.
h
===
'auto'
)
{
if
(
!
this
.
heightTouched
)
{
return
'auto'
...
...
@@ -820,19 +786,19 @@ export default {
return
this
.
height
+
'px'
},
resizingOnX
()
{
return
(
Boolean
(
this
.
handle
)
&&
(
this
.
handle
.
includes
(
'l'
)
||
this
.
handle
.
includes
(
'r'
)
))
resizingOnX
()
{
return
Boolean
(
this
.
handle
)
&&
(
this
.
handle
.
includes
(
'l'
)
||
this
.
handle
.
includes
(
'r'
))
},
resizingOnY
()
{
return
(
Boolean
(
this
.
handle
)
&&
(
this
.
handle
.
includes
(
't'
)
||
this
.
handle
.
includes
(
'b'
)
))
resizingOnY
()
{
return
Boolean
(
this
.
handle
)
&&
(
this
.
handle
.
includes
(
't'
)
||
this
.
handle
.
includes
(
'b'
))
},
isCornerHandle
()
{
return
(
Boolean
(
this
.
handle
)
&&
[
'tl'
,
'tr'
,
'br'
,
'bl'
].
includes
(
this
.
handle
)
)
isCornerHandle
()
{
return
Boolean
(
this
.
handle
)
&&
[
'tl'
,
'tr'
,
'br'
,
'bl'
].
includes
(
this
.
handle
)
}
},
watch
:
{
active
(
val
)
{
active
(
val
)
{
this
.
enabled
=
val
if
(
val
)
{
...
...
@@ -841,12 +807,12 @@ export default {
this
.
$emit
(
'deactivated'
)
}
},
z
(
val
)
{
z
(
val
)
{
if
(
val
>=
0
||
val
===
'auto'
)
{
this
.
zIndex
=
val
}
},
x
(
val
)
{
x
(
val
)
{
if
(
this
.
resizing
||
this
.
dragging
)
{
return
}
...
...
@@ -857,7 +823,7 @@ export default {
this
.
moveHorizontally
(
val
)
},
y
(
val
)
{
y
(
val
)
{
if
(
this
.
resizing
||
this
.
dragging
)
{
return
}
...
...
@@ -868,30 +834,30 @@ export default {
this
.
moveVertically
(
val
)
},
lockAspectRatio
(
val
)
{
lockAspectRatio
(
val
)
{
if
(
val
)
{
this
.
aspectFactor
=
this
.
width
/
this
.
height
}
else
{
this
.
aspectFactor
=
undefined
}
},
minWidth
(
val
)
{
minWidth
(
val
)
{
if
(
val
>
0
&&
val
<=
this
.
width
)
{
this
.
minW
=
val
}
},
minHeight
(
val
)
{
minHeight
(
val
)
{
if
(
val
>
0
&&
val
<=
this
.
height
)
{
this
.
minH
=
val
}
},
maxWidth
(
val
)
{
maxWidth
(
val
)
{
this
.
maxW
=
val
},
maxHeight
(
val
)
{
maxHeight
(
val
)
{
this
.
maxH
=
val
},
w
(
val
)
{
w
(
val
)
{
if
(
this
.
resizing
||
this
.
dragging
)
{
return
}
...
...
@@ -902,7 +868,7 @@ export default {
this
.
changeWidth
(
val
)
},
h
(
val
)
{
h
(
val
)
{
if
(
this
.
resizing
||
this
.
dragging
)
{
return
}
...
...
src/config/index.js
View file @
5909ebe
...
...
@@ -3,8 +3,8 @@
* @version:
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors:
limi
n
* @LastEditTime: 202
1-09-07 14:38:52
* @LastEditors:
前端 qianduan01@didihu.com.c
n
* @LastEditTime: 202
2-10-26 15:54:49
*/
// 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js')
...
...
src/setup/qiankun.js
View file @
5909ebe
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-08-30 10:21:19
* @LastEditors:
yangming yangming
@didihu.com.cn
* @LastEditTime: 2022-
08-30 10:32:08
* @LastEditors:
前端 qianduan01
@didihu.com.cn
* @LastEditTime: 2022-
10-28 15:21:03
* @FilePath: \scrm-micro-drainage\src\setup\qiankun.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
src/views/businessCard/components/activityList.vue
0 → 100644
View file @
5909ebe
<
template
>
<div>
<div
class=
"form-panel scrm-box-f"
>
<GLCombiForm
:rowNumber=
"1"
ref=
"formSearch"
:formObj=
"tableSearchForm"
:formData=
"searchFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
></GLCombiForm>
<GLTable
v-loading=
"loading"
ref=
"table"
@
refreshTable=
"handleSearch"
:searchForm=
"tableSearchForm"
:layout=
"layout"
:tableData=
"tableData"
:tableTotal=
"tableTotal"
:pageConf=
"pageConf"
:tableParams=
"tableParams"
>
<div
class=
"table-btns"
slot=
"optionBtns"
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"accessToRecords(scope.scope)"
>
访问记录
</el-button>
</div>
<div
slot=
"visitCont"
slot-scope=
"scope"
>
<div
class=
"visitCont"
@
click=
"visitCisitCont(scope.scope)"
>
{{
scope
.
scope
.
visitCont
||
'--'
}}
</div>
</div>
<div
slot=
"followType"
slot-scope=
"scope"
>
<el-switch
@
change=
"changeType(scope.scope.activityId, scope.scope.followType)"
v-model=
"scope.scope.followType"
:active-value=
"1"
:inactive-value=
"0"
></el-switch>
</div>
<div
slot=
"staffName"
slot-scope=
"scope"
>
<div
class=
"codeName"
>
{{
scope
.
scope
.
staffName
}}
</div>
<div
class=
"codeRemark"
v-if=
"scope.scope.operation"
>
{{
scope
.
scope
.
operation
}}
</div>
</div>
<div
slot=
"productItems"
slot-scope=
"scope"
class=
"product-panel"
>
<el-popover
trigger=
"hover"
placement=
"top"
v-if=
"productItem(scope.scope.productItems).length > 2"
>
<GLFull
:labelWidth=
"110"
:label=
"item"
textType=
"tag"
:identi=
"
`text_$
{Math.random()
.toString()
.replace('.', '')}`
"
v-for="(item, index) in productItem(scope.scope.productItems)"
:key="index"
>
</GLFull>
<div
slot=
"reference"
class=
"name-wrapper"
>
<div
v-for=
"(item, index) in productItem(scope.scope.productItems)"
:key=
"index"
v-show=
"index
< 3
"
>
<template
v-if=
"index == 2 && productItem(scope.scope.productItems).length > 2"
>
<div
class=
"accountType-row"
>
<span>
{{
'...('
+
productItem
(
scope
.
scope
.
productItems
).
length
+
')'
}}
</span>
</div>
</
template
>
<GLFull
:labelWidth=
"110"
:label=
"item"
textType=
"tag"
v-if=
"index < 2"
></GLFull>
</div>
</div>
</el-popover>
<GLFull
:labelWidth=
"110"
:label=
"item"
textType=
"tag"
:identi=
"
`text_${Math.random()
.toString()
.replace('.', '')}`
"
v-for=
"(item, index) in productItem(scope.scope.productItems)"
:key=
"index"
v-else
></GLFull>
<!-- <div class="product-item" v-for="(item, index) in productItem(scope.scope.productItems)" :key="index">{{ item }}</div> -->
</div>
</GLTable>
</div>
<el-dialog
class=
"recordDialog"
title=
"访问记录"
:visible
.
sync=
"dialogTableVisible"
width=
"38%"
:top=
"0"
>
<el-table
:data=
"recordRelationList"
>
<el-table-column
type=
"index"
:index=
"1"
label=
"序号"
width=
"120"
></el-table-column>
<el-table-column
property=
"pageName"
label=
"访问页面"
width=
"220"
></el-table-column>
<el-table-column
property=
"createdTime"
label=
"访问时间"
></el-table-column>
</el-table>
</el-dialog>
</div>
</template>
<
script
>
import
util
from
'@/utils/util'
export
default
{
name
:
'activityList'
,
data
()
{
return
{
dialogTableVisible
:
false
,
dialogVisibleDel
:
false
,
selectItem
:
''
,
loading
:
false
,
tableSearchForm
:
{
staffName
:
''
,
cardName
:
''
,
followType
:
''
},
searchFormData
:
[
{
label
:
'申请时间:'
,
name
:
'createTime'
,
type
:
'datePicker'
,
placeholder
:
''
,
isClear
:
true
,
pickerOptions
:
{
disabledDate
:
time
=>
{
return
time
.
getTime
()
>
Date
.
now
()
}
}
},
{
label
:
'渠道名称'
,
name
:
'cardName'
,
type
:
'input'
},
{
label
:
'名片来源'
,
name
:
'staffName'
,
type
:
'input'
},
{
label
:
'是否跟进'
,
name
:
'followType'
,
type
:
'select'
,
placeholder
:
'请选择'
,
optionId
:
'value'
,
optionLabel
:
'label'
,
optionList
:
[
{
value
:
''
,
label
:
'全部'
},
{
value
:
'1'
,
label
:
'是'
},
{
value
:
'0'
,
label
:
'否'
}
]
}
],
tableData
:
[],
// 表格按钮
tableParams
:
{
listName
:
'data'
,
tableOption
:
false
,
tableColumns
:
[
{
label
:
'门店名称'
,
prop
:
'merchantName'
,
width
:
'210px'
},
{
label
:
'主营车型'
,
prop
:
'carModel'
,
width
:
'140px'
},
{
label
:
'联系人'
,
prop
:
'contactName'
},
{
label
:
'联系电话'
,
prop
:
'contactPhone'
,
width
:
'140px'
},
{
label
:
'渠道'
,
prop
:
'cardName'
,
width
:
'140px'
},
{
label
:
'名片来源'
,
prop
:
'staffName'
,
width
:
'130px'
},
{
label
:
'申请场景'
,
prop
:
'businessScenario'
,
width
:
'190px'
},
{
label
:
'申请活动'
,
prop
:
'productItems'
,
addHtml
:
'productItems'
,
width
:
'300px'
},
{
label
:
'申请时间'
,
prop
:
'createdTime'
,
width
:
'190px'
},
{
label
:
'是否跟进'
,
prop
:
'followType'
,
width
:
'190px'
,
addHtml
:
'followType'
},
{
label
:
'操作'
,
prop
:
'optionBtns'
,
width
:
'120px'
,
addHtml
:
'optionBtns'
,
fixed
:
'right'
}
]
},
layout
:
'sizes, prev, pager, next, jumper, ->, total'
,
tableTotal
:
0
,
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'count'
},
recordRelationList
:
[]
}
},
methods
:
{
productItem
(
row
)
{
return
(
row
&&
row
.
split
(
','
))
||
[]
},
// 查看访问记录弹框
accessToRecords
(
scope
)
{
this
.
dialogTableVisible
=
true
const
{
activityId
,
followType
}
=
scope
this
.
$apis
.
businessCard
.
pagerecord
({
activityId
,
followType
}).
then
(
res
=>
{
this
.
recordRelationList
=
res
})
},
// 跳转访问量
visitCisitCont
(
scope
)
{
const
{
cardName
,
visitCont
,
id
:
cardId
,
staffName
}
=
scope
if
(
!
visitCont
)
return
this
.
$parent
.
query
=
{
cardName
,
cardId
,
staffName
}
this
.
$parent
.
activeName
=
'2'
},
staffNameSplit
(
name
)
{
return
name
?
name
.
split
(
','
)
:
''
},
handleSearch
()
{
this
.
activityRecord
()
},
handleReset
()
{
this
.
tableSearchForm
=
{}
this
.
activityRecord
()
},
handleAddCode
()
{
this
.
$router
.
push
(
'/businessCard/addCode'
)
},
downloadIamge
(
imgsrc
)
{
util
.
downloadIamge
(
imgsrc
)
},
changeType
(
activityId
,
followType
)
{
this
.
$apis
.
businessCard
.
activityFollow
({
activityId
,
followType
})
.
then
(
res
=>
{
if
(
res
)
{
this
.
$message
({
type
:
'success'
,
message
:
'操作成功!'
})
}
this
.
handleSearch
()
})
this
.
dialogVisibleDel
=
false
},
handleDelete
(
scope
)
{
this
.
dialogVisibleDel
=
true
this
.
selectItem
=
scope
},
activityRecord
()
{
if
(
this
.
tableSearchForm
.
createTime
)
{
this
.
tableSearchForm
.
startApplyDate
=
new
Date
(
this
.
tableSearchForm
.
createTime
[
0
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'/'
)
this
.
tableSearchForm
.
endApplyDate
=
new
Date
(
this
.
tableSearchForm
.
createTime
[
1
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'/'
)
}
const
params
=
{
...
JSON
.
parse
(
JSON
.
stringify
(
this
.
tableSearchForm
)),
pageSize
:
this
.
$refs
.
table
.
page
.
pageSize
,
pageNum
:
this
.
$refs
.
table
.
page
.
pageNum
}
delete
params
.
createTime
this
.
loading
=
true
this
.
$apis
.
businessCard
.
activityRecord
(
params
).
then
(
res
=>
{
this
.
loading
=
false
if
(
res
)
{
this
.
tableData
=
res
.
data
this
.
tableTotal
=
res
.
count
}
})
}
},
mounted
()
{
this
.
activityRecord
()
}
}
</
script
>
<
style
>
.el-popover
{
max-width
:
800px
;
}
</
style
>
<
style
lang=
"scss"
scoped
>
.product-item
{
line-height
:
26px
;
padding
:
0
8px
;
height
:
26px
;
background
:
#e9ecf7
;
display
:
inline-block
;
margin-bottom
:
6px
;
}
.product-panel
{
/deep/
{
.name-wrapper
{
display
:
flex
;
>
div
{
display
:
inline-block
;
}
}
}
}
.recordDialog
{
/deep/.el-dialog
{
height
:
100vh
;
overflow
:
auto
;
margin-right
:
0
;
margin-bottom
:
0
;
}
}
.link-dialog
{
text-decoration
:
underline
;
cursor
:
pointer
;
}
.visitCont
{
cursor
:
pointer
;
color
:
#5850ff
;
}
.popover-panel
{
width
:
1000px
;
}
.form-header
{
margin-bottom
:
16px
;
}
.form-panel
{
padding
:
20px
;
/deep/
.el-popover
{
max-width
:
1000px
;
}
}
.qrCode-popover
{
text-align
:
center
;
}
.download-link
{
cursor
:
pointer
;
margin-top
:
6px
;
font-size
:
14px
;
font-weight
:
400
;
color
:
#5850ff
;
line-height
:
20px
;
}
.codeRemark
{
font-size
:
14px
;
font-weight
:
400
;
color
:
#999999
;
line-height
:
20px
;
}
.tag-panel
{
//
margin-bottom
:
-8px
;
.tag-item
{
border-radius
:
4px
;
border
:
1px
solid
#e8e8ea
;
display
:
inline-block
;
padding
:
4px
6px
;
margin-right
:
3px
;
}
}
.allTagsWrap
{
position
:
relative
;
display
:
-webkit-box
;
//
max-height
:
56px
;
overflow
:
hidden
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
padding-bottom
:
-2px
;
box-sizing
:
border-box
;
//
&:hover
{
//
-webkit-line-clamp
:
9999
;
//
//
.tag-box-wrap
{
//
//
margin-bottom
:
10px
;
//
//
}
//
}
.tag-box-wrap
{
display
:
inline-block
;
margin-right
:
10px
;
//
margin-bottom
:
2px
;
padding
:
0
10px
;
box-sizing
:
border-box
;
min-width
:
76px
;
max-width
:
200px
;
height
:
26px
;
line-height
:
26px
;
border-radius
:
4px
;
border
:
1px
solid
#e8e8ea
;
background
:
#fafbfe
;
text-align
:
center
;
font-size
:
14px
;
font-weight
:
400
;
color
:
#666666
;
max-width
:
245px
;
cursor
:
pointer
;
margin-bottom
:
3px
;
//
&:first-child{
//
margin-bottom
:
4px
;
//
}
}
//
.tag-box-wrap
+
.tag-box-wrap
{
//
margin-bottom
:
4px
;
//
}
.expande-button-wrap
{
position
:
absolute
;
right
:
0
;
bottom
:
0
;
.expande-button
{
color
:
#fafbfe
;
cursor
:
pointer
;
i
{
height
:
8px
;
}
span
{
height
:
20px
;
font-size
:
14px
;
font-weight
:
400
;
color
:
#fafbfe
;
line-height
:
20px
;
}
}
}
}
.link-dialog
{
label
{
color
:
#5850ff
;
}
}
.accountType-row
{
text-align
:
left
;
position
:
relative
;
font-size
:
14px
;
line-height
:
14px
;
padding-left
:
15px
;
border-radius
:
4px
;
border
:
1px
solid
#e8e8ea
;
padding
:
6px
;
display
:
inline-block
;
//
margin-bottom
:
5px
;
margin-right
:
5px
;
&-tag
{
display
:
inline-block
;
border
:
1px
solid
#e8e8ea
;
background
:
#fafbfe
;
text-align
:
center
;
font-size
:
14px
;
font-weight
:
400
;
color
:
#666
;
max-width
:
150px
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
overflow
:
hidden
;
}
i
{
color
:
#75acff
;
margin-right
:
3px
;
}
}
</
style
>
src/views/businessCard/components/cardList.vue
View file @
5909ebe
...
...
@@ -12,6 +12,14 @@
<div
class=
"table-btns"
slot=
"optionBtns"
slot-scope=
"scope"
>
<GLTableButton
:buttonList=
"tableButtonList"
:buttonItem=
"scope.scope"
:buttonNum=
"3"
></GLTableButton>
</div>
<div
slot=
"joinEntToday"
slot-scope=
"scope"
>
<div
class=
"link-dialog"
@
click=
"handleEmpDetail(scope.scope, 'day')"
v-if=
"scope.scope.joinEntToday"
>
{{
scope
.
scope
.
joinEntToday
}}
</div>
<div
v-else
>
0
</div>
</div>
<div
slot=
"joinEntTotal"
slot-scope=
"scope"
>
<div
class=
"link-dialog"
@
click=
"handleEmpDetail(scope.scope)"
v-if=
"scope.scope.joinEntTotal"
>
{{
scope
.
scope
.
joinEntTotal
}}
</div>
<div
v-else
>
0
</div>
</div>
<div
slot=
"visitCont"
slot-scope=
"scope"
>
<div
class=
"visitCont"
@
click=
"visitCisitCont(scope.scope)"
>
{{
scope
.
scope
.
visitCont
||
'--'
}}
</div>
</div>
...
...
@@ -54,15 +62,16 @@
</GLTable>
</div>
<GLDialog
title=
"提示"
@
onOk=
"handleSure"
@
onCancel=
"dialogVisibleDel = false"
type=
"error"
content=
"删除该智能名片将失去该名片统计数据,是否删除?"
:visible
.
sync=
"dialogVisibleDel"
mode=
"small"
></GLDialog>
<
!-- <emp-detail ref="empDetailForm"></emp-detail>--
>
<
emp-detail
ref=
"empDetailForm"
></emp-detail
>
</div>
</template>
<
script
>
import
util
from
'@/utils/util'
import
empDetail
from
'@/components/empDetail'
export
default
{
name
:
'cardList'
,
components
:
{
empDetail
},
data
()
{
return
{
dialogVisibleDel
:
false
,
...
...
@@ -142,12 +151,14 @@ export default {
{
label
:
'今日新增客户'
,
prop
:
'joinEntToday'
,
width
:
'140px'
width
:
'140px'
,
addHtml
:
'joinEntToday'
},
{
label
:
'总新增客户'
,
prop
:
'joinEntTotal'
,
width
:
'130px'
width
:
'130px'
,
addHtml
:
'joinEntTotal'
},
{
label
:
'名片地址'
,
...
...
@@ -181,6 +192,10 @@ export default {
}
},
methods
:
{
//员工详情
handleEmpDetail
(
scope
,
status
)
{
this
.
$refs
.
empDetailForm
.
init
(
scope
,
status
)
},
// 跳转访问量
visitCisitCont
(
scope
)
{
const
{
cardName
,
visitCont
,
id
:
cardId
,
staffName
}
=
scope
...
...
@@ -261,6 +276,10 @@ export default {
}
</
style
>
<
style
lang=
"scss"
scoped
>
.link-dialog
{
text-decoration
:
underline
;
cursor
:
pointer
;
}
.visitCont
{
cursor
:
pointer
;
color
:
#5850ff
;
...
...
src/views/businessCard/components/recordList.vue
View file @
5909ebe
<
template
>
<div
class=
"channel-main scrm-box-f"
>
<div
class=
"scrm-flex"
>
<el-form
:inline=
"true"
:model=
"tableSearchForm"
class=
"follow-form-item"
label-width=
"130px"
>
<div
class=
"scrm-GLCombiForm"
>
<GLCombiForm
:rowNumber=
"1"
ref=
"formSearch"
:formObj=
"tableSearchForm"
:formData=
"searchFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
></GLCombiForm>
<!--
<el-form
:inline=
"true"
:model=
"tableSearchForm"
class=
"follow-form-item"
label-width=
"130px"
>
<el-form-item
size=
"small"
label=
"访问时间:"
>
<el-date-picker
:picker-options=
"pickerOptions"
@
change=
"handleTime"
value-format=
"yyyy-MM-dd"
v-model=
"createTime"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
></el-date-picker>
</el-form-item>
...
...
@@ -15,7 +16,7 @@
<el-button
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
<el-button
@
click=
"handleReset"
class=
"resetBtn"
>
重置
</el-button>
</el-form-item>
</el-form>
</el-form>
-->
</div>
<div
class=
"titleAndTime"
>
<div
class=
"listTitle"
>
访问列表
</div>
...
...
@@ -64,8 +65,35 @@ export default {
}
},
channel
:
[],
createTime
:
[],
tableSearchForm
:
{},
tableSearchForm
:
{
createTime
:
''
,
cardName
:
''
,
staffName
:
''
},
searchFormData
:
[
{
label
:
'访问时间'
,
name
:
'createTime'
,
type
:
'datePicker'
,
placeholder
:
''
,
isClear
:
true
,
pickerOptions
:
{
disabledDate
:
time
=>
{
return
time
.
getTime
()
>
Date
.
now
()
}
}
},
{
label
:
'渠道名称'
,
name
:
'cardName'
,
type
:
'input'
},
{
label
:
'名片来源'
,
name
:
'staffName'
,
type
:
'input'
}
],
tableParams
:
{
listName
:
'data'
,
tableOption
:
false
,
...
...
@@ -164,14 +192,17 @@ export default {
this
.
codeSearch
()
},
codeSearch
()
{
if
(
this
.
tableSearchForm
.
createTime
)
{
this
.
tableSearchForm
.
startDate
=
new
Date
(
this
.
tableSearchForm
.
createTime
[
0
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
this
.
tableSearchForm
.
endDate
=
new
Date
(
this
.
tableSearchForm
.
createTime
[
1
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
}
let
params
=
{
...
JSON
.
parse
(
JSON
.
stringify
(
this
.
tableSearchForm
)),
pageSize
:
this
.
$refs
.
table
.
page
.
pageSize
,
pageNum
:
this
.
$refs
.
table
.
page
.
pageNum
,
startDate
:
this
.
startDate
,
endDate
:
this
.
endDate
,
dateInterval
:
this
.
dateInterval
}
delete
params
.
createTime
this
.
sendPageListApi
(
params
)
},
...
...
src/views/businessCard/index.vue
View file @
5909ebe
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-10-12 09:30:11
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-10-18 16:03:33
* @FilePath: \scrm-micro-drainage\src\views\businessCard\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<
template
>
<div
class=
"channel-main"
>
<GLTabs
v-model=
"activeName"
:tabPaneList=
"tabPaneList"
class=
"tabs-panel"
></GLTabs>
...
...
@@ -14,12 +22,12 @@ const tabPaneList = [
{
label
:
'访问记录'
,
name
:
'2'
},
{
label
:
'活动申请'
,
name
:
'3'
}
// {
// label: '体验申请',
// name: '3'
// },
// {
// label: '代理申请',
// name: '4'
// }
...
...
@@ -43,9 +51,9 @@ export default {
case
'2'
:
sname
=
'recordList'
break
//
case '3':
// sname = 'account
List'
//
break
case
'3'
:
sname
=
'activity
List'
break
// case '4':
// sname = 'proxyList'
// break
...
...
src/views/square/index.vue
View file @
5909ebe
...
...
@@ -303,9 +303,9 @@ export default {
jumpDetail
(
status
)
{
let
url
if
(
status
)
{
url
=
`/custom/clientManage/index?isJoin=
${
status
}
&addWay=
企微
魔方`
url
=
`/custom/clientManage/index?isJoin=
${
status
}
&addWay=
数据
魔方`
}
else
{
url
=
`/custom/clientManage/index?addWay=
企微
魔方`
url
=
`/custom/clientManage/index?addWay=
数据
魔方`
}
this
.
$history
.
push
(
url
)
},
...
...
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