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 75796436
authored
Dec 17, 2021
by
yangming
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1.0.1
1 parent
90a3d1d0
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
1082 additions
and
64 deletions
src/components/draggable/vue-draggable-resizable.css
src/components/draggable/vue-draggable-resizable.vue
src/components/selectTag/index.vue
src/components/welcome/activityModel.vue
src/components/welcome/emotionWords.vue
src/components/welcome/tag-textarea.vue
src/views/channel/addCode.vue
src/views/channel/components/channelList.vue
src/views/channel/poster.vue
src/views/market/config.vue
src/views/market/index.vue
src/views/marketing/config.vue
src/views/marketing/index.vue
src/views/square/importResult.vue
src/views/square/index.vue
src/components/draggable/vue-draggable-resizable.css
0 → 100644
View file @
7579643
.vdr
{
touch-action
:
none
;
position
:
absolute
;
box-sizing
:
border-box
;
border
:
1px
dashed
black
;
}
.handle
{
box-sizing
:
border-box
;
position
:
absolute
;
width
:
10px
;
height
:
10px
;
background
:
#EEE
;
border
:
1px
solid
#333
;
}
.handle-tl
{
top
:
-10px
;
left
:
-10px
;
cursor
:
nw-resize
;
}
.handle-tm
{
top
:
-10px
;
left
:
50%
;
margin-left
:
-5px
;
cursor
:
n-resize
;
}
.handle-tr
{
top
:
-10px
;
right
:
-10px
;
cursor
:
ne-resize
;
}
.handle-ml
{
top
:
50%
;
margin-top
:
-5px
;
left
:
-10px
;
cursor
:
w-resize
;
}
.handle-mr
{
top
:
50%
;
margin-top
:
-5px
;
right
:
-10px
;
cursor
:
e-resize
;
}
.handle-bl
{
bottom
:
-10px
;
left
:
-10px
;
cursor
:
sw-resize
;
}
.handle-bm
{
bottom
:
-10px
;
left
:
50%
;
margin-left
:
-5px
;
cursor
:
s-resize
;
}
.handle-br
{
bottom
:
-10px
;
right
:
-10px
;
cursor
:
se-resize
;
}
@media
only
screen
and
(
max-width
:
768px
)
{
[
class
*=
"handle-"
]
:before
{
content
:
''
;
left
:
-10px
;
right
:
-10px
;
bottom
:
-10px
;
top
:
-10px
;
position
:
absolute
;
}
}
src/components/draggable/vue-draggable-resizable.vue
0 → 100644
View file @
7579643
<
template
>
<div
:style=
"style"
: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)"
>
<slot
:name=
"handle"
></slot>
</div>
<slot></slot>
</div>
</
template
>
<
script
>
import
{
matchesSelectorToParentElements
,
getComputedSize
,
addEvent
,
removeEvent
}
from
'../../utils/dom'
import
{
computeWidth
,
computeHeight
,
restrictToBounds
,
snapToGrid
}
from
'../../utils/fns'
const
events
=
{
mouse
:
{
start
:
'mousedown'
,
move
:
'mousemove'
,
stop
:
'mouseup'
},
touch
:
{
start
:
'touchstart'
,
move
:
'touchmove'
,
stop
:
'touchend'
}
}
const
userSelectNone
=
{
userSelect
:
'none'
,
MozUserSelect
:
'none'
,
WebkitUserSelect
:
'none'
,
MsUserSelect
:
'none'
}
const
userSelectAuto
=
{
userSelect
:
'auto'
,
MozUserSelect
:
'auto'
,
WebkitUserSelect
:
'auto'
,
MsUserSelect
:
'auto'
}
let
eventsFor
=
events
.
mouse
export
default
{
replace
:
true
,
name
:
'vue-draggable-resizable'
,
props
:
{
className
:
{
type
:
String
,
default
:
'vdr'
},
classNameDraggable
:
{
type
:
String
,
default
:
'draggable'
},
classNameResizable
:
{
type
:
String
,
default
:
'resizable'
},
classNameDragging
:
{
type
:
String
,
default
:
'dragging'
},
classNameResizing
:
{
type
:
String
,
default
:
'resizing'
},
classNameActive
:
{
type
:
String
,
default
:
'active'
},
classNameHandle
:
{
type
:
String
,
default
:
'handle'
},
disableUserSelect
:
{
type
:
Boolean
,
default
:
true
},
enableNativeDrag
:
{
type
:
Boolean
,
default
:
false
},
preventDeactivation
:
{
type
:
Boolean
,
default
:
false
},
active
:
{
type
:
Boolean
,
default
:
false
},
draggable
:
{
type
:
Boolean
,
default
:
true
},
resizable
:
{
type
:
Boolean
,
default
:
true
},
lockAspectRatio
:
{
type
:
Boolean
,
default
:
false
},
w
:
{
type
:
[
Number
,
String
],
default
:
200
,
validator
:
(
val
)
=>
{
if
(
typeof
val
===
'number'
)
{
return
val
>
0
}
return
val
===
'auto'
}
},
h
:
{
type
:
[
Number
,
String
],
default
:
200
,
validator
:
(
val
)
=>
{
if
(
typeof
val
===
'number'
)
{
return
val
>
0
}
return
val
===
'auto'
}
},
minWidth
:
{
type
:
Number
,
default
:
0
,
validator
:
(
val
)
=>
val
>=
0
},
minHeight
:
{
type
:
Number
,
default
:
0
,
validator
:
(
val
)
=>
val
>=
0
},
maxWidth
:
{
type
:
Number
,
default
:
null
,
validator
:
(
val
)
=>
val
>=
0
},
maxHeight
:
{
type
:
Number
,
default
:
null
,
validator
:
(
val
)
=>
val
>=
0
},
x
:
{
type
:
Number
,
default
:
0
},
y
:
{
type
:
Number
,
default
:
0
},
z
:
{
type
:
[
String
,
Number
],
default
:
'auto'
,
validator
:
(
val
)
=>
(
typeof
val
===
'string'
?
val
===
'auto'
:
val
>=
0
)
},
handles
:
{
type
:
Array
,
default
:
()
=>
[
'tl'
,
'tm'
,
'tr'
,
'mr'
,
'br'
,
'bm'
,
'bl'
,
'ml'
],
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
}
},
dragHandle
:
{
type
:
String
,
default
:
null
},
dragCancel
:
{
type
:
String
,
default
:
null
},
axis
:
{
type
:
String
,
default
:
'both'
,
validator
:
(
val
)
=>
[
'x'
,
'y'
,
'both'
].
includes
(
val
)
},
grid
:
{
type
:
Array
,
default
:
()
=>
[
1
,
1
]
},
customId
:
{
type
:
[
String
,
Number
],
default
:
''
},
parent
:
{
type
:
Boolean
,
default
:
false
},
scale
:
{
type
:
[
Number
,
Array
],
default
:
1
,
validator
:
(
val
)
=>
{
if
(
typeof
val
===
'number'
)
{
return
val
>
0
}
return
val
.
length
===
2
&&
val
[
0
]
>
0
&&
val
[
1
]
>
0
}
},
onDragStart
:
{
type
:
Function
,
default
:
()
=>
true
},
onDrag
:
{
type
:
Function
,
default
:
()
=>
true
},
onResizeStart
:
{
type
:
Function
,
default
:
()
=>
true
},
onResize
:
{
type
:
Function
,
default
:
()
=>
true
}
},
data
:
function
()
{
return
{
left
:
this
.
x
,
top
:
this
.
y
,
right
:
null
,
bottom
:
null
,
width
:
null
,
height
:
null
,
widthTouched
:
false
,
heightTouched
:
false
,
aspectFactor
:
null
,
parentWidth
:
null
,
parentHeight
:
null
,
minW
:
this
.
minWidth
,
minH
:
this
.
minHeight
,
maxW
:
this
.
maxWidth
,
maxH
:
this
.
maxHeight
,
handle
:
null
,
enabled
:
this
.
active
,
resizing
:
false
,
dragging
:
false
,
dragEnable
:
false
,
resizeEnable
:
false
,
zIndex
:
this
.
z
}
},
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
if
(
this
.
maxWidth
&&
this
.
minHeight
>
this
.
maxHeight
)
console
.
warn
(
'[Vdr warn]: Invalid prop: minHeight cannot be greater than maxHeight'
)
this
.
resetBoundsAndMouseState
()
},
mounted
:
function
()
{
if
(
!
this
.
enableNativeDrag
)
{
this
.
$el
.
ondragstart
=
()
=>
false
}
const
[
parentWidth
,
parentHeight
]
=
this
.
getParentSize
()
this
.
parentWidth
=
parentWidth
this
.
parentHeight
=
parentHeight
const
[
width
,
height
]
=
getComputedSize
(
this
.
$el
)
this
.
aspectFactor
=
(
this
.
w
!==
'auto'
?
this
.
w
:
width
)
/
(
this
.
h
!==
'auto'
?
this
.
h
:
height
)
this
.
width
=
this
.
w
!==
'auto'
?
this
.
w
:
width
this
.
height
=
this
.
h
!==
'auto'
?
this
.
h
:
height
this
.
right
=
this
.
parentWidth
-
this
.
width
-
this
.
left
this
.
bottom
=
this
.
parentHeight
-
this
.
height
-
this
.
top
if
(
this
.
active
)
{
this
.
$emit
(
'activated'
)
}
addEvent
(
document
.
documentElement
,
'mousedown'
,
this
.
deselect
)
addEvent
(
document
.
documentElement
,
'touchend touchcancel'
,
this
.
deselect
)
addEvent
(
window
,
'resize'
,
this
.
checkParentSize
)
},
beforeDestroy
:
function
()
{
removeEvent
(
document
.
documentElement
,
'mousedown'
,
this
.
deselect
)
removeEvent
(
document
.
documentElement
,
'touchstart'
,
this
.
handleUp
)
removeEvent
(
document
.
documentElement
,
'mousemove'
,
this
.
move
)
removeEvent
(
document
.
documentElement
,
'touchmove'
,
this
.
move
)
removeEvent
(
document
.
documentElement
,
'mouseup'
,
this
.
handleUp
)
removeEvent
(
document
.
documentElement
,
'touchend touchcancel'
,
this
.
deselect
)
removeEvent
(
window
,
'resize'
,
this
.
checkParentSize
)
},
methods
:
{
resetBoundsAndMouseState
()
{
this
.
mouseClickPosition
=
{
mouseX
:
0
,
mouseY
:
0
,
x
:
0
,
y
:
0
,
w
:
0
,
h
:
0
}
this
.
bounds
=
{
minLeft
:
null
,
maxLeft
:
null
,
minRight
:
null
,
maxRight
:
null
,
minTop
:
null
,
maxTop
:
null
,
minBottom
:
null
,
maxBottom
:
null
}
},
checkParentSize
()
{
if
(
this
.
parent
)
{
const
[
newParentWidth
,
newParentHeight
]
=
this
.
getParentSize
()
this
.
parentWidth
=
newParentWidth
this
.
parentHeight
=
newParentHeight
this
.
right
=
this
.
parentWidth
-
this
.
width
-
this
.
left
this
.
bottom
=
this
.
parentHeight
-
this
.
height
-
this
.
top
}
},
getParentSize
()
{
if
(
this
.
parent
)
{
const
style
=
window
.
getComputedStyle
(
this
.
$el
.
parentNode
,
null
)
return
[
parseInt
(
style
.
getPropertyValue
(
'width'
),
10
),
parseInt
(
style
.
getPropertyValue
(
'height'
),
10
)
]
}
return
[
null
,
null
]
},
elementTouchDown
(
e
)
{
eventsFor
=
events
.
touch
this
.
elementDown
(
e
)
},
elementMouseDown
(
e
)
{
eventsFor
=
events
.
mouse
this
.
elementDown
(
e
)
},
elementDown
(
e
)
{
if
(
e
instanceof
MouseEvent
&&
e
.
which
!==
1
)
{
return
}
const
target
=
e
.
target
||
e
.
srcElement
if
(
this
.
$el
.
contains
(
target
))
{
if
(
this
.
onDragStart
(
e
)
===
false
)
{
return
}
if
(
(
this
.
dragHandle
&&
!
matchesSelectorToParentElements
(
target
,
this
.
dragHandle
,
this
.
$el
))
||
(
this
.
dragCancel
&&
matchesSelectorToParentElements
(
target
,
this
.
dragCancel
,
this
.
$el
))
)
{
this
.
dragging
=
false
return
}
if
(
!
this
.
enabled
)
{
this
.
enabled
=
true
this
.
$emit
(
'activated'
,
this
.
customId
)
this
.
$emit
(
'update:active'
,
true
)
}
if
(
this
.
draggable
)
{
this
.
dragEnable
=
true
}
this
.
mouseClickPosition
.
mouseX
=
e
.
touches
?
e
.
touches
[
0
].
pageX
:
e
.
pageX
this
.
mouseClickPosition
.
mouseY
=
e
.
touches
?
e
.
touches
[
0
].
pageY
:
e
.
pageY
this
.
mouseClickPosition
.
left
=
this
.
left
this
.
mouseClickPosition
.
right
=
this
.
right
this
.
mouseClickPosition
.
top
=
this
.
top
this
.
mouseClickPosition
.
bottom
=
this
.
bottom
if
(
this
.
parent
)
{
this
.
bounds
=
this
.
calcDragLimits
()
}
addEvent
(
document
.
documentElement
,
eventsFor
.
move
,
this
.
move
)
addEvent
(
document
.
documentElement
,
eventsFor
.
stop
,
this
.
handleUp
)
}
},
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
,
minRight
:
this
.
right
%
this
.
grid
[
0
],
maxRight
:
Math
.
floor
((
this
.
parentWidth
-
this
.
width
-
this
.
right
)
/
this
.
grid
[
0
])
*
this
.
grid
[
0
]
+
this
.
right
,
minTop
:
this
.
top
%
this
.
grid
[
1
],
maxTop
:
Math
.
floor
((
this
.
parentHeight
-
this
.
height
-
this
.
top
)
/
this
.
grid
[
1
])
*
this
.
grid
[
1
]
+
this
.
top
,
minBottom
:
this
.
bottom
%
this
.
grid
[
1
],
maxBottom
:
Math
.
floor
((
this
.
parentHeight
-
this
.
height
-
this
.
bottom
)
/
this
.
grid
[
1
])
*
this
.
grid
[
1
]
+
this
.
bottom
}
},
deselect
(
e
)
{
const
target
=
e
.
target
||
e
.
srcElement
const
regex
=
new
RegExp
(
this
.
className
+
'-([trmbl]{2})'
,
''
)
if
(
!
this
.
$el
.
contains
(
target
)
&&
!
regex
.
test
(
target
.
className
))
{
if
(
this
.
enabled
&&
!
this
.
preventDeactivation
)
{
this
.
enabled
=
false
this
.
$emit
(
'deactivated'
)
this
.
$emit
(
'update:active'
,
false
)
}
removeEvent
(
document
.
documentElement
,
eventsFor
.
move
,
this
.
handleResize
)
}
this
.
resetBoundsAndMouseState
()
},
handleTouchDown
(
handle
,
e
)
{
eventsFor
=
events
.
touch
this
.
handleDown
(
handle
,
e
)
},
handleDown
(
handle
,
e
)
{
if
(
e
instanceof
MouseEvent
&&
e
.
which
!==
1
)
{
return
}
if
(
this
.
onResizeStart
(
handle
,
e
)
===
false
)
{
return
}
if
(
e
.
stopPropagation
)
e
.
stopPropagation
()
// Here we avoid a dangerous recursion by faking
// corner handles as middle handles
if
(
this
.
lockAspectRatio
&&
!
handle
.
includes
(
'm'
))
{
this
.
handle
=
'm'
+
handle
.
substring
(
1
)
}
else
{
this
.
handle
=
handle
}
this
.
resizeEnable
=
true
this
.
mouseClickPosition
.
mouseX
=
e
.
touches
?
e
.
touches
[
0
].
pageX
:
e
.
pageX
this
.
mouseClickPosition
.
mouseY
=
e
.
touches
?
e
.
touches
[
0
].
pageY
:
e
.
pageY
this
.
mouseClickPosition
.
left
=
this
.
left
this
.
mouseClickPosition
.
right
=
this
.
right
this
.
mouseClickPosition
.
top
=
this
.
top
this
.
mouseClickPosition
.
bottom
=
this
.
bottom
this
.
bounds
=
this
.
calcResizeLimits
()
addEvent
(
document
.
documentElement
,
eventsFor
.
move
,
this
.
handleResize
)
addEvent
(
document
.
documentElement
,
eventsFor
.
stop
,
this
.
handleUp
)
},
calcResizeLimits
()
{
let
minW
=
this
.
minW
let
minH
=
this
.
minH
let
maxW
=
this
.
maxW
let
maxH
=
this
.
maxH
const
aspectFactor
=
this
.
aspectFactor
const
[
gridX
,
gridY
]
=
this
.
grid
const
width
=
this
.
width
const
height
=
this
.
height
const
left
=
this
.
left
const
top
=
this
.
top
const
right
=
this
.
right
const
bottom
=
this
.
bottom
if
(
this
.
lockAspectRatio
)
{
if
(
minW
/
minH
>
aspectFactor
)
{
minH
=
minW
/
aspectFactor
}
else
{
minW
=
aspectFactor
*
minH
}
if
(
maxW
&&
maxH
)
{
maxW
=
Math
.
min
(
maxW
,
aspectFactor
*
maxH
)
maxH
=
Math
.
min
(
maxH
,
maxW
/
aspectFactor
)
}
else
if
(
maxW
)
{
maxH
=
maxW
/
aspectFactor
}
else
if
(
maxH
)
{
maxW
=
aspectFactor
*
maxH
}
}
maxW
=
maxW
-
(
maxW
%
gridX
)
maxH
=
maxH
-
(
maxH
%
gridY
)
const
limits
=
{
minLeft
:
null
,
maxLeft
:
null
,
minTop
:
null
,
maxTop
:
null
,
minRight
:
null
,
maxRight
:
null
,
minBottom
:
null
,
maxBottom
:
null
}
if
(
this
.
parent
)
{
limits
.
minLeft
=
left
%
gridX
limits
.
maxLeft
=
left
+
Math
.
floor
((
width
-
minW
)
/
gridX
)
*
gridX
limits
.
minTop
=
top
%
gridY
limits
.
maxTop
=
top
+
Math
.
floor
((
height
-
minH
)
/
gridY
)
*
gridY
limits
.
minRight
=
right
%
gridX
limits
.
maxRight
=
right
+
Math
.
floor
((
width
-
minW
)
/
gridX
)
*
gridX
limits
.
minBottom
=
bottom
%
gridY
limits
.
maxBottom
=
bottom
+
Math
.
floor
((
height
-
minH
)
/
gridY
)
*
gridY
if
(
maxW
)
{
limits
.
minLeft
=
Math
.
max
(
limits
.
minLeft
,
this
.
parentWidth
-
right
-
maxW
)
limits
.
minRight
=
Math
.
max
(
limits
.
minRight
,
this
.
parentWidth
-
left
-
maxW
)
}
if
(
maxH
)
{
limits
.
minTop
=
Math
.
max
(
limits
.
minTop
,
this
.
parentHeight
-
bottom
-
maxH
)
limits
.
minBottom
=
Math
.
max
(
limits
.
minBottom
,
this
.
parentHeight
-
top
-
maxH
)
}
if
(
this
.
lockAspectRatio
)
{
limits
.
minLeft
=
Math
.
max
(
limits
.
minLeft
,
left
-
top
*
aspectFactor
)
limits
.
minTop
=
Math
.
max
(
limits
.
minTop
,
top
-
left
/
aspectFactor
)
limits
.
minRight
=
Math
.
max
(
limits
.
minRight
,
right
-
bottom
*
aspectFactor
)
limits
.
minBottom
=
Math
.
max
(
limits
.
minBottom
,
bottom
-
right
/
aspectFactor
)
}
}
else
{
limits
.
minLeft
=
null
limits
.
maxLeft
=
left
+
Math
.
floor
((
width
-
minW
)
/
gridX
)
*
gridX
limits
.
minTop
=
null
limits
.
maxTop
=
top
+
Math
.
floor
((
height
-
minH
)
/
gridY
)
*
gridY
limits
.
minRight
=
null
limits
.
maxRight
=
right
+
Math
.
floor
((
width
-
minW
)
/
gridX
)
*
gridX
limits
.
minBottom
=
null
limits
.
maxBottom
=
bottom
+
Math
.
floor
((
height
-
minH
)
/
gridY
)
*
gridY
if
(
maxW
)
{
limits
.
minLeft
=
-
(
right
+
maxW
)
limits
.
minRight
=
-
(
left
+
maxW
)
}
if
(
maxH
)
{
limits
.
minTop
=
-
(
bottom
+
maxH
)
limits
.
minBottom
=
-
(
top
+
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
)
limits
.
minBottom
=
Math
.
min
(
limits
.
minBottom
,
-
top
-
maxH
)
}
}
return
limits
},
move
(
e
)
{
if
(
this
.
resizing
)
{
this
.
handleResize
(
e
)
}
else
if
(
this
.
dragEnable
)
{
this
.
handleDrag
(
e
)
}
},
handleDrag
(
e
)
{
const
axis
=
this
.
axis
const
grid
=
this
.
grid
const
bounds
=
this
.
bounds
const
mouseClickPosition
=
this
.
mouseClickPosition
const
tmpDeltaX
=
axis
&&
axis
!==
'y'
?
mouseClickPosition
.
mouseX
-
(
e
.
touches
?
e
.
touches
[
0
].
pageX
:
e
.
pageX
)
:
0
const
tmpDeltaY
=
axis
&&
axis
!==
'x'
?
mouseClickPosition
.
mouseY
-
(
e
.
touches
?
e
.
touches
[
0
].
pageY
:
e
.
pageY
)
:
0
const
[
deltaX
,
deltaY
]
=
snapToGrid
(
grid
,
tmpDeltaX
,
tmpDeltaY
,
this
.
scale
)
const
left
=
restrictToBounds
(
mouseClickPosition
.
left
-
deltaX
,
bounds
.
minLeft
,
bounds
.
maxLeft
)
const
top
=
restrictToBounds
(
mouseClickPosition
.
top
-
deltaY
,
bounds
.
minTop
,
bounds
.
maxTop
)
if
(
this
.
onDrag
(
left
,
top
)
===
false
)
{
return
}
const
right
=
restrictToBounds
(
mouseClickPosition
.
right
+
deltaX
,
bounds
.
minRight
,
bounds
.
maxRight
)
const
bottom
=
restrictToBounds
(
mouseClickPosition
.
bottom
+
deltaY
,
bounds
.
minBottom
,
bounds
.
maxBottom
)
this
.
left
=
left
this
.
top
=
top
this
.
right
=
right
this
.
bottom
=
bottom
this
.
$emit
(
'dragging'
,
this
.
left
,
this
.
top
)
this
.
dragging
=
true
},
moveHorizontally
(
val
)
{
// should calculate with scale 1.
const
[
deltaX
,
_
]
=
snapToGrid
(
this
.
grid
,
val
,
this
.
top
,
1
)
const
left
=
restrictToBounds
(
deltaX
,
this
.
bounds
.
minLeft
,
this
.
bounds
.
maxLeft
)
this
.
left
=
left
this
.
right
=
this
.
parentWidth
-
this
.
width
-
left
},
moveVertically
(
val
)
{
// should calculate with scale 1.
const
[
_
,
deltaY
]
=
snapToGrid
(
this
.
grid
,
this
.
left
,
val
,
1
)
const
top
=
restrictToBounds
(
deltaY
,
this
.
bounds
.
minTop
,
this
.
bounds
.
maxTop
)
this
.
top
=
top
this
.
bottom
=
this
.
parentHeight
-
this
.
height
-
top
},
handleResize
(
e
)
{
let
left
=
this
.
left
let
top
=
this
.
top
let
right
=
this
.
right
let
bottom
=
this
.
bottom
const
mouseClickPosition
=
this
.
mouseClickPosition
const
lockAspectRatio
=
this
.
lockAspectRatio
const
aspectFactor
=
this
.
aspectFactor
const
tmpDeltaX
=
mouseClickPosition
.
mouseX
-
(
e
.
touches
?
e
.
touches
[
0
].
pageX
:
e
.
pageX
)
const
tmpDeltaY
=
mouseClickPosition
.
mouseY
-
(
e
.
touches
?
e
.
touches
[
0
].
pageY
:
e
.
pageY
)
if
(
!
this
.
widthTouched
&&
tmpDeltaX
)
{
this
.
widthTouched
=
true
}
if
(
!
this
.
heightTouched
&&
tmpDeltaY
)
{
this
.
heightTouched
=
true
}
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
)
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
)
if
(
this
.
lockAspectRatio
&&
this
.
resizingOnY
)
{
left
=
this
.
left
-
(
this
.
top
-
top
)
*
aspectFactor
}
}
if
(
this
.
handle
.
includes
(
'r'
))
{
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
)
if
(
this
.
lockAspectRatio
&&
this
.
resizingOnX
)
{
top
=
this
.
top
-
(
this
.
left
-
left
)
/
aspectFactor
}
}
const
width
=
computeWidth
(
this
.
parentWidth
,
left
,
right
)
const
height
=
computeHeight
(
this
.
parentHeight
,
top
,
bottom
)
if
(
this
.
onResize
(
this
.
handle
,
left
,
top
,
width
,
height
)
===
false
)
{
return
}
this
.
left
=
left
this
.
top
=
top
this
.
right
=
right
this
.
bottom
=
bottom
this
.
width
=
width
this
.
height
=
height
this
.
$emit
(
'resizing'
,
this
.
left
,
this
.
top
,
this
.
width
,
this
.
height
)
this
.
resizing
=
true
},
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
bottom
=
this
.
bottom
if
(
this
.
lockAspectRatio
)
{
bottom
=
this
.
bottom
-
(
this
.
right
-
right
)
/
this
.
aspectFactor
}
const
width
=
computeWidth
(
this
.
parentWidth
,
this
.
left
,
right
)
const
height
=
computeHeight
(
this
.
parentHeight
,
this
.
top
,
bottom
)
this
.
right
=
right
this
.
bottom
=
bottom
this
.
width
=
width
this
.
height
=
height
},
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
right
=
this
.
right
if
(
this
.
lockAspectRatio
)
{
right
=
this
.
right
-
(
this
.
bottom
-
bottom
)
*
this
.
aspectFactor
}
const
width
=
computeWidth
(
this
.
parentWidth
,
this
.
left
,
right
)
const
height
=
computeHeight
(
this
.
parentHeight
,
this
.
top
,
bottom
)
this
.
right
=
right
this
.
bottom
=
bottom
this
.
width
=
width
this
.
height
=
height
},
handleUp
(
e
)
{
this
.
handle
=
null
this
.
resetBoundsAndMouseState
()
this
.
dragEnable
=
false
this
.
resizeEnable
=
false
if
(
this
.
resizing
)
{
this
.
resizing
=
false
this
.
$emit
(
'resizestop'
,
this
.
left
,
this
.
top
,
this
.
width
,
this
.
height
)
}
if
(
this
.
dragging
)
{
this
.
dragging
=
false
this
.
$emit
(
'dragstop'
,
this
.
left
,
this
.
top
)
}
removeEvent
(
document
.
documentElement
,
eventsFor
.
move
,
this
.
handleResize
)
}
},
computed
:
{
style
()
{
return
{
transform
:
`translate(
${
this
.
left
}
px,
${
this
.
top
}
px)`
,
width
:
this
.
computedWidth
,
height
:
this
.
computedHeight
,
zIndex
:
this
.
zIndex
,
...(
this
.
dragging
&&
this
.
disableUserSelect
?
userSelectNone
:
userSelectAuto
)
}
},
actualHandles
()
{
if
(
!
this
.
resizable
)
return
[]
return
this
.
handles
},
computedWidth
()
{
if
(
this
.
w
===
'auto'
)
{
if
(
!
this
.
widthTouched
)
{
return
'auto'
}
}
return
this
.
width
+
'px'
},
computedHeight
()
{
if
(
this
.
h
===
'auto'
)
{
if
(
!
this
.
heightTouched
)
{
return
'auto'
}
}
return
this
.
height
+
'px'
},
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'
)))
},
isCornerHandle
()
{
return
(
Boolean
(
this
.
handle
)
&&
[
'tl'
,
'tr'
,
'br'
,
'bl'
].
includes
(
this
.
handle
))
}
},
watch
:
{
active
(
val
)
{
this
.
enabled
=
val
if
(
val
)
{
this
.
$emit
(
'activated'
)
}
else
{
this
.
$emit
(
'deactivated'
)
}
},
z
(
val
)
{
if
(
val
>=
0
||
val
===
'auto'
)
{
this
.
zIndex
=
val
}
},
x
(
val
)
{
if
(
this
.
resizing
||
this
.
dragging
)
{
return
}
if
(
this
.
parent
)
{
this
.
bounds
=
this
.
calcDragLimits
()
}
this
.
moveHorizontally
(
val
)
},
y
(
val
)
{
if
(
this
.
resizing
||
this
.
dragging
)
{
return
}
if
(
this
.
parent
)
{
this
.
bounds
=
this
.
calcDragLimits
()
}
this
.
moveVertically
(
val
)
},
lockAspectRatio
(
val
)
{
if
(
val
)
{
this
.
aspectFactor
=
this
.
width
/
this
.
height
}
else
{
this
.
aspectFactor
=
undefined
}
},
minWidth
(
val
)
{
if
(
val
>
0
&&
val
<=
this
.
width
)
{
this
.
minW
=
val
}
},
minHeight
(
val
)
{
if
(
val
>
0
&&
val
<=
this
.
height
)
{
this
.
minH
=
val
}
},
maxWidth
(
val
)
{
this
.
maxW
=
val
},
maxHeight
(
val
)
{
this
.
maxH
=
val
},
w
(
val
)
{
if
(
this
.
resizing
||
this
.
dragging
)
{
return
}
if
(
this
.
parent
)
{
this
.
bounds
=
this
.
calcResizeLimits
()
}
this
.
changeWidth
(
val
)
},
h
(
val
)
{
if
(
this
.
resizing
||
this
.
dragging
)
{
return
}
if
(
this
.
parent
)
{
this
.
bounds
=
this
.
calcResizeLimits
()
}
this
.
changeHeight
(
val
)
}
}
}
</
script
>
src/components/selectTag/index.vue
View file @
7579643
...
...
@@ -99,7 +99,13 @@ export default {
},
methods
:
{
jumpUrl
()
{
this
.
$history
.
push
(
'/custom/tagsManage/index'
)
const
link
=
document
.
createElement
(
'a'
)
link
.
setAttribute
(
'href'
,
location
.
host
+
'/custom/tagsManage/index'
)
//设置下载文件的url地址
//link.setAttribute('download', 'download'); //用于设置下载文件的文件名
link
.
click
()
// console.log(location.host+'/custom/tagsManage/index')
// this.$history.push('/custom/tagsManage/index')
// window.open(location.host+'/custom/tagsManage/index')
},
init
(
item
)
{
this
.
labelGroupName
=
''
...
...
@@ -118,7 +124,8 @@ export default {
pageSize
:
1000
,
shopId
:
this
.
$globalState
.
session
.
merchantId
,
labelGroupName
:
this
.
labelGroupName
,
labelTypesStr
:
'自店标签,企业标签'
labelTypesStr
:
'自店标签,企业标签'
,
edition
:
this
.
$globalState
.
session
.
merchantModel
}
})
.
then
(
res
=>
{
...
...
src/components/welcome/activityModel.vue
View file @
7579643
<
template
>
<div
class=
"square-main"
>
<el-dialog
title=
"选择活动"
:visible
.
sync=
"dialogVisible"
width=
"
70%
"
:before-close=
"handleClose"
>
<el-dialog
title=
"选择活动"
:visible
.
sync=
"dialogVisible"
width=
"
1088px
"
:before-close=
"handleClose"
>
<div
class=
"model-panel"
>
<div
class=
"model-panel-tab"
>
<label>
活动类型:
</label>
...
...
@@ -18,37 +18,43 @@
<div
class=
"model-item-title"
:title=
"item.couponName"
v-show=
"activeName == 1"
>
{{
item
.
couponName
}}
</div>
<div
class=
"model-item-title"
:title=
"item.packageName"
v-show=
"activeName == 4"
>
{{
item
.
packageName
}}
</div>
<div
class=
"model-item-title"
:title=
"item.activityName"
v-show=
"activeName == 5"
>
{{
item
.
activityName
}}
</div>
<div
class=
"model-item-content"
v-show=
"activeName == 1 || activeName == 4"
></div>
<div
class=
"model-item-content"
v-show=
"activeName == 2"
>
剩余数量:
{{
item
.
residueAmount
}}
</div>
<div
class=
"model-item-content"
v-show=
"activeName == 1"
>
剩余数量:
{{
item
.
remainAmount
}}
</div>
<div
class=
"model-item-content"
v-show=
"activeName == 3"
>
价格:
{{
item
.
goodPrice
}}
元
</div>
<div
class=
"model-item-content"
v-show=
"activeName == 4"
>
价格:
{{
item
.
packagePrice
}}
元
</div>
<div
class=
"model-item-content"
v-show=
"activeName == 5"
></div>
<div
class=
"model-item-content"
v-show=
"activeName == 5"
></div>
<div
class=
"model-item-content"
v-show=
"activeName == 3"
>
领取方式:免费领用
</div>
<div
class=
"model-item-content"
v-show=
"activeName == 4"
>
领取方式:付费购买
</div>
<div
class=
"model-item-content"
v-show=
"activeName == 2 && item.effectiveType == 1"
>
有效期:
{{
item
.
effectiveDays
}}
天
</div>
<div
class=
"model-item-content"
v-show=
"activeName == 2 && item.effectiveType == 3"
>
有效期:无限制
</div>
<div
class=
"model-item-content"
v-show=
"activeName == 2 && item.effectiveType == 2"
>
有效期:
{{
item
.
effectiveStartTime
?
item
.
effectiveStartTime
.
split
(
' '
)[
0
]
:
''
}}
~
{{
item
.
effectiveEndTime
?
item
.
effectiveEndTime
.
split
(
' '
)[
0
]
:
''
}}
</div>
<div
class=
"model-item-content"
v-show=
"activeName == 3"
>
有效期:
{{
item
.
effectivedDay
}}
天
</div>
<div
class=
"model-item-content"
v-show=
"activeName == 3"
></div>
<div
class=
"model-item-content model-item-contents"
v-show=
"activeName == 3"
>
试用天数:
<span>
{{
item
.
freeDay
}}
天
</span>
</div>
<div
class=
"model-item-content"
v-show=
"activeName == 2"
>
类型
:
<span>
{{
item
.
discountType
==
2
?
'折扣券'
:
item
.
discountType
==
3
?
'代金券'
:
item
.
discountType
==
4
?
'兑换券'
:
''
}}
</span>
使用途径
:
{{
item
.
useChannel
==
1
?
'线上商品'
:
'到店核销'
}}
</div>
<div
class=
"model-item-content"
v-show=
"activeName == 1"
>
类型:
<span>
精品券
</span>
</div>
<div
class=
"model-item-content"
v-show=
"activeName == 3"
>
类型:
<span>
权益卡
</span>
<div
class=
"model-item-content"
v-show=
"activeName == 4 || activeName == 5"
></div>
<div
class=
"model-item-content model-item-contents"
v-show=
"activeName == 4"
>
销售价格:
<span>
{{
item
.
packagePrice
}}
元
</span>
</div>
<div
class=
"model-item-content"
v-
show=
"activeName == 4
"
>
类型
:
<span>
权益套餐
</span>
<div
class=
"model-item-content"
v-
if=
"activeName == 5
"
>
开始时间
:
{{
item
.
startTime
}}
</div>
<div
class=
"model-item-content"
v-if=
"activeName == 5"
>
活动时间:
{{
item
.
startTime
.
split
(
' '
)[
0
]
}}
-
{{
item
.
endTime
.
split
(
' '
)[
0
]
}}
结束时间:
{{
item
.
endTime
}}
</div>
<div
class=
"model-item-content model-item-contents"
v-show=
"activeName == 2"
>
数量:
<span>
{{
item
.
residueAmount
}}
</span>
</div>
</div>
</div>
...
...
@@ -86,7 +92,7 @@ export default {
methods
:
{
handleSelectItem
(
item
)
{
this
.
selectItem
=
item
if
(
item
.
equityClassId
)
{
if
(
item
.
equityClassId
)
{
this
.
selectItem
.
id
=
item
.
equityClassId
}
console
.
log
(
this
.
selectItem
)
...
...
@@ -229,27 +235,33 @@ export default {
}
}
.model-item-panel
{
display
:
grid
;
grid-template-columns
:
repeat
(
4
,
25%
);
grid-row-gap
:
10px
;
height
:
38vh
;
padding
:
10px
;
//
display
:
grid
;
//
grid-template-columns
:
repeat
(
4
,
25%
);
//
grid-row-gap
:
10px
;
max-height
:
38vh
;
overflow
:
auto
;
text-align
:
center
;
display
:
flex
;
flex-wrap
:
wrap
;
align-items
:
stretch
;
flex-direction
:
row
;
.model-item
{
width
:
240px
;
margin-right
:
24px
;
margin-bottom
:
24px
;
padding
:
12px
16px
;
position
:
relative
;
height
:
128px
;
background
:
#ffffff
;
border-radius
:
4px
;
border
:
2
px
solid
#e6e6e6
;
border
:
1
px
solid
#e6e6e6
;
padding
:
14px
24px
;
box-sizing
:
border-box
;
margin-right
:
10px
;
&:nth-child(4n)
{
margin-right
:
0px
;
}
&
.checked
{
border
:
2px
solid
#5850ff
;
background
:
rgba
(
88
,
80
,
255
,
0.1
);
border
:
1px
solid
#5850ff
;
}
&
-qrcode
{
position
:
absolute
;
...
...
@@ -273,15 +285,21 @@ export default {
font-size
:
12px
;
font-weight
:
400
;
color
:
#666666
;
line-height
:
17px
;
line-height
:
16px
;
height
:
16px
;
margin-top
:
6px
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
white-space
:
nowrap
;
span
{
color
:
#5850ff
;
font-size
:
20px
;
}
}
&
-contents
{
line-height
:
22px
;
height
:
22px
;
}
}
}
}
...
...
src/components/welcome/emotionWords.vue
View file @
7579643
...
...
@@ -21,7 +21,6 @@ export default {
return
{
list
:
[
[
'微笑'
,
'撇嘴'
,
'色'
,
'发呆'
,
'得意'
,
'流泪'
,
'害羞'
,
'闭嘴'
],
[
'睡'
,
'大哭'
,
'尴尬'
,
'发怒'
,
'调皮'
,
'呲牙'
,
'惊讶'
,
'难过'
][(
'酷'
,
'冷汗'
,
'抓狂'
,
'吐'
,
'偷笑'
,
'可爱'
,
'白眼'
,
'傲慢'
)],
[
'饥饿'
,
'困'
,
'惊恐'
,
'流汗'
,
'憨笑'
,
'大兵'
,
'奋斗'
,
'咒骂'
],
[
'疑问'
,
'嘘'
,
'晕'
,
'折磨'
,
'衰'
,
'骷髅'
,
'敲打'
,
'再见'
],
[
'擦汗'
,
'抠鼻'
,
'鼓掌'
,
'糗大了'
,
'坏笑'
,
'左哼哼'
,
'右哼哼'
,
'哈欠'
],
...
...
src/components/welcome/tag-textarea.vue
View file @
7579643
...
...
@@ -195,7 +195,7 @@ export default {
let
htm
=
target
.
innerHTML
const
list
=
[
'微笑'
,
'撇嘴'
,
'色'
,
'发呆'
,
'得意'
,
'流泪'
,
'害羞'
,
'闭嘴'
,
'睡'
,
'大哭'
,
'尴尬'
,
'发怒'
,
'调皮'
,
'呲牙'
,
'惊讶'
,
'难过'
,
'酷'
,
'冷汗'
,
'抓狂'
,
'吐'
,
'偷笑'
,
'可爱'
,
'白眼'
,
'傲慢'
,
'饥饿'
,
'困'
,
'惊恐'
,
'流汗'
,
'憨笑'
,
'大兵'
,
'奋斗'
,
'咒骂'
,
'疑问'
,
'嘘'
,
'晕'
,
'折磨'
,
'衰'
,
'骷髅'
,
'敲打'
,
'再见'
,
'擦汗'
,
'抠鼻'
,
'鼓掌'
,
'糗大了'
,
'坏笑'
,
'左哼哼'
,
'右哼哼'
,
'哈欠'
,
'鄙视'
,
'委屈'
,
'快哭了'
,
'阴险'
,
'亲亲'
,
'吓'
,
'可怜'
,
'菜刀'
,
'西瓜'
,
'啤酒'
,
'篮球'
,
'乒乓'
,
'咖啡'
,
'饭'
,
'猪头'
,
'玫瑰'
,
'凋谢'
,
'示爱'
,
'爱心'
,
'心碎'
,
'蛋糕'
,
'闪电'
,
'炸弹'
,
'刀'
,
'足球'
,
'瓢虫'
,
'便便'
,
'月亮'
,
'太阳'
,
'礼物'
,
'拥抱'
,
'强'
,
'弱'
,
'握手'
,
'胜利'
,
'抱拳'
,
'勾引'
,
'拳头'
,
'差劲'
,
'爱你'
,
'NO'
,
'OK'
,
'爱情'
,
'飞吻'
,
'跳跳'
,
'发抖'
,
'怄火'
,
'转圈'
,
'磕头'
,
'回头'
,
'跳绳'
,
'挥手'
,
'激动'
,
'街舞'
,
'献吻'
,
'左太极'
,
'右太极'
]
const
cutImg
=
htm
.
replaceAll
(
'<img src="https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/'
,
''
)
const
replaceImg
=
cutImg
.
replace
(
/
(\d)
.gif">/g
,
function
(
str
){
const
replaceImg
=
cutImg
.
replace
(
/
(\d)
{1,2}
.gif">/g
,
function
(
str
){
let
s
=
list
[
str
.
split
(
'.'
)[
0
]]
return
`[
${
s
}
]`
})
...
...
@@ -229,7 +229,7 @@ export default {
const
list
=
[
'微笑'
,
'撇嘴'
,
'色'
,
'发呆'
,
'得意'
,
'流泪'
,
'害羞'
,
'闭嘴'
,
'睡'
,
'大哭'
,
'尴尬'
,
'发怒'
,
'调皮'
,
'呲牙'
,
'惊讶'
,
'难过'
,
'酷'
,
'冷汗'
,
'抓狂'
,
'吐'
,
'偷笑'
,
'可爱'
,
'白眼'
,
'傲慢'
,
'饥饿'
,
'困'
,
'惊恐'
,
'流汗'
,
'憨笑'
,
'大兵'
,
'奋斗'
,
'咒骂'
,
'疑问'
,
'嘘'
,
'晕'
,
'折磨'
,
'衰'
,
'骷髅'
,
'敲打'
,
'再见'
,
'擦汗'
,
'抠鼻'
,
'鼓掌'
,
'糗大了'
,
'坏笑'
,
'左哼哼'
,
'右哼哼'
,
'哈欠'
,
'鄙视'
,
'委屈'
,
'快哭了'
,
'阴险'
,
'亲亲'
,
'吓'
,
'可怜'
,
'菜刀'
,
'西瓜'
,
'啤酒'
,
'篮球'
,
'乒乓'
,
'咖啡'
,
'饭'
,
'猪头'
,
'玫瑰'
,
'凋谢'
,
'示爱'
,
'爱心'
,
'心碎'
,
'蛋糕'
,
'闪电'
,
'炸弹'
,
'刀'
,
'足球'
,
'瓢虫'
,
'便便'
,
'月亮'
,
'太阳'
,
'礼物'
,
'拥抱'
,
'强'
,
'弱'
,
'握手'
,
'胜利'
,
'抱拳'
,
'勾引'
,
'拳头'
,
'差劲'
,
'爱你'
,
'NO'
,
'OK'
,
'爱情'
,
'飞吻'
,
'跳跳'
,
'发抖'
,
'怄火'
,
'转圈'
,
'磕头'
,
'回头'
,
'跳绳'
,
'挥手'
,
'激动'
,
'街舞'
,
'献吻'
,
'左太极'
,
'右太极'
]
const
cutImg
=
htm
.
replaceAll
(
'<img src="https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/'
,
''
)
console
.
log
(
cutImg
)
const
replaceImg
=
cutImg
.
replace
(
/
(\d)
.gif">/g
,
function
(
str
){
const
replaceImg
=
cutImg
.
replace
(
/
(\d)
{1,2}
.gif">/g
,
function
(
str
){
let
s
=
list
[
str
.
split
(
'.'
)[
0
]]
return
`[
${
s
}
]`
})
...
...
src/views/channel/addCode.vue
View file @
7579643
...
...
@@ -256,16 +256,22 @@ export default {
})
this
.
$refs
.
welcome
.
updateList
(
previewList
)
})
},
resize
()
{
this
.
footerLeft
=
document
.
querySelector
(
'.base-container-right'
).
offsetLeft
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
}
},
mounted
()
{
this
.
resize
()
window
.
addEventListener
(
'resize'
,
()
=>
{
this
.
resize
()
})
const
{
id
,
codeUuid
}
=
this
.
$route
.
params
if
(
id
!=
-
1
)
{
if
(
id
)
{
this
.
codeId
=
id
this
.
detailChannelCode
(
id
,
codeUuid
)
}
this
.
footerLeft
=
document
.
querySelector
(
'.base-container-right'
).
offsetLeft
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
}
}
</
script
>
...
...
src/views/channel/components/channelList.vue
View file @
7579643
<
template
>
<div>
<div
class=
"form-header"
>
<
el-button
type=
"primary"
size=
"small"
icon=
"el-icon-add"
@
click=
"handleAddCode"
>
新建渠道活码
</el-b
utton>
<
GLButton
type=
"primary"
size=
"small"
icon=
"el-icon-add"
@
click=
"handleAddCode"
fn=
"新增活码"
>
新建渠道活码
</GLB
utton>
</div>
<div
class=
"form-panel scrm-box-f"
>
<el-form
:inline=
"true"
:model=
"tableSearchForm"
class=
"follow-form-item"
>
...
...
@@ -17,10 +17,10 @@
</el-form>
<GLTable
ref=
"table"
: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=
"handleDetail(scope.scope)"
>
数据
</el-b
utton>
<
el-button
type=
"text"
@
click=
"handleEdit(scope.scope)"
>
修改
</el-b
utton>
<
GLButton
type=
"text"
@
click=
"handleDetail(scope.scope)"
fn=
"到店咨询客户数据"
>
数据
</GLB
utton>
<
GLButton
type=
"text"
@
click=
"handleEdit(scope.scope)"
fn=
"活码编辑"
>
修改
</GLB
utton>
<el-button
type=
"text"
@
click=
"handleDelete(scope.scope)"
>
删除
</el-button>
<
el-button
type=
"text"
@
click=
"handleAddPoster(scope.scope)"
>
活码海报
</el-b
utton>
<
GLButton
type=
"text"
@
click=
"handleAddPoster(scope.scope)"
fn=
"活码海报"
>
活码海报
</GLB
utton>
</div>
<div
slot=
"staffInfo"
slot-scope=
"scope"
>
<el-popover
trigger=
"hover"
placement=
"top"
v-if=
"scope.scope.staffInfo.length > 3"
>
...
...
@@ -154,7 +154,7 @@ export default {
this
.
listChannelCodeByPage
()
},
handleAddCode
()
{
this
.
$router
.
push
(
'/channel/addCode
/-1/-1
'
)
this
.
$router
.
push
(
'/channel/addCode'
)
},
handleAddPoster
(
scope
)
{
this
.
$router
.
push
(
'/channel/poster/'
+
scope
.
id
)
...
...
src/views/channel/poster.vue
View file @
7579643
...
...
@@ -4,7 +4,7 @@
<el-button
type=
"primary"
size=
"small"
@
click=
"goBack"
>
返回
</el-button>
</div>
<div
class=
"poster-body"
>
<div
class=
"poster-item"
@
dbl
click=
"setPoster(item)"
@
mouseenter=
"item.show = true"
@
mouseleave=
"item.show = false"
v-for=
"(item, index) in posterList"
:key=
"index"
>
<div
class=
"poster-item"
@
click=
"setPoster(item)"
@
mouseenter=
"item.show = true"
@
mouseleave=
"item.show = false"
v-for=
"(item, index) in posterList"
:key=
"index"
>
<div
class=
"poster-del"
v-show=
"item.show"
@
click=
"handleDelete(item.id)"
>
<img
src=
"@/assets/img/del.png"
/>
</div>
...
...
@@ -75,8 +75,8 @@
<
script
>
import
util
from
'@/utils/util'
import
VueDraggableResizable
from
'@/components/vue-draggable-resizable'
import
'@/components/vue-draggable-resizable.css'
import
VueDraggableResizable
from
'@/components/
draggable/
vue-draggable-resizable'
import
'@/components/
draggable/
vue-draggable-resizable.css'
export
default
{
name
:
'poster'
,
components
:
{
...
...
src/views/market/config.vue
View file @
7579643
...
...
@@ -485,7 +485,7 @@ export default {
this
.
footerLeft
=
document
.
querySelector
(
'.base-container-right'
).
offsetLeft
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
let
{
id
}
=
this
.
$route
.
params
if
(
id
!=
-
1
)
{
if
(
id
)
{
this
.
editId
=
id
this
.
findById
(
id
)
this
.
editStatus
=
false
...
...
src/views/market/index.vue
View file @
7579643
<
template
>
<div
class=
"square-main"
>
<div
class=
"square-main-header"
>
<
el-button
type=
"primary"
size=
"small"
@
click=
"addConfig
"
>
<
GLButton
type=
"primary"
size=
"small"
@
click=
"addConfig"
fn=
"新增营销
"
>
<i
class=
"el-icon-plus"
></i>
新增营销
</
el-b
utton>
</
GLB
utton>
<!--
<GLButton
type=
"primary"
@
click=
"addConfig"
size=
"small"
fn=
"新增"
mode=
"el-button"
>
新增营销
</GLButton>
-->
<label>
结合门店营销活动,指定客户创建智能营销,提高活动转化率
</label>
...
...
@@ -33,7 +33,7 @@
</el-form>
<GLTable
ref=
"employeeRef"
:getListApi=
"getListApi"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
>
<div
class=
"table-btns"
slot=
"optionBtns"
slot-scope=
"scope"
>
<
el-button
:disabled=
"scope.scope.imStatus!=1"
type=
"text"
@
click=
"handleDetail(scope.scope)"
>
营销配置
</el-b
utton>
<
GLButton
:disabled=
"scope.scope.imStatus!=1"
type=
"text"
@
click=
"handleDetail(scope.scope)"
fn=
"智能营销配置"
>
营销配置
</GLB
utton>
</div>
</GLTable>
</div>
...
...
@@ -134,7 +134,7 @@ export default {
},
handleImport
()
{},
addConfig
()
{
this
.
$router
.
push
(
'/market/config
/-1
'
)
this
.
$router
.
push
(
'/market/config'
)
},
handleDetail
(
scope
)
{
this
.
$router
.
push
(
'/market/config/'
+
scope
.
id
)
...
...
src/views/marketing/config.vue
View file @
7579643
...
...
@@ -321,11 +321,17 @@ export default {
this
.
addForm
.
content
=
res
.
dracImMessageConResponse
.
content
this
.
tagging
=
eval
(
res
.
tagging
)
})
},
resize
()
{
this
.
footerLeft
=
document
.
querySelector
(
'.base-container-right'
).
offsetLeft
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
}
},
mounted
()
{
this
.
footerLeft
=
document
.
querySelector
(
'.base-container-right'
).
offsetLeft
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
this
.
resize
();
window
.
addEventListener
(
'resize'
,
()
=>
{
this
.
resize
()
})
let
{
id
}
=
this
.
$route
.
params
if
(
id
!=
-
1
)
{
this
.
editId
=
id
...
...
src/views/marketing/index.vue
View file @
7579643
...
...
@@ -54,12 +54,8 @@ export default {
label
:
'待处理'
},
{
value
:
'2'
,
label
:
'处理中'
},
{
value
:
'3'
,
label
:
'已
处理
'
label
:
'已
完成
'
}
],
pickerOptions
:
{
...
...
src/views/square/importResult.vue
View file @
7579643
...
...
@@ -69,7 +69,7 @@
</div>
<div
class=
"custom-wrap-item"
>
<div
class=
"custom-wrap-itemBox"
>
<div
class=
"custom-wrap-title"
>
待
定
保客户
</div>
<div
class=
"custom-wrap-title"
>
待
首
保客户
</div>
<div
class=
"custom-wrap-sta"
>
<div
class=
"custom-count-item"
>
<div
class=
"custom-count-title"
>
属于本次导入
</div>
...
...
@@ -80,7 +80,7 @@
<div
class=
"custom-count-num"
>
{{
detailInfo
.
waitRegularMaintainTotal
}}
人
</div>
</div>
</div>
<div
class=
"custom-wrap-content"
>
智能提醒用户
定期保养,推荐保养项目和优惠活动
,提高用户返店率。
</div>
<div
class=
"custom-wrap-content"
>
智能提醒用户
回店首保
,提高用户返店率。
</div>
<div
class=
"custom-wrap-config"
>
敬请期待
</div>
</div>
</div>
...
...
src/views/square/index.vue
View file @
7579643
...
...
@@ -32,7 +32,7 @@
</div>
</div>
<div
class=
"coustom-box-content"
>
当前客户池中,尚未匹配到企微账号的数量。推荐使用以下营销策略,吸引用户添加企微。
</div>
<
div
class=
"coustom-box-config"
@
click=
"jumpDrainage"
>
营销配置
</div
>
<
GLButton
class=
"coustom-box-config"
@
click=
"jumpDrainage"
fn=
"客户引流企微"
mode=
"div"
>
营销配置
</GLButton
>
</div>
<div
class=
"coustom-box-item"
>
<div
class=
"coustom-box-title"
>
信息待完善客户
</div>
...
...
@@ -44,7 +44,7 @@
</div>
</div>
<div
class=
"coustom-box-content"
>
当前客户池中,有企微客户尚未维护手机号码。建议批量通知对应的销售顾问维护此类客户信息。
</div>
<
div
class=
"coustom-box-config"
@
click=
"jumpFriend"
>
营销配置
</div
>
<
GLButton
class=
"coustom-box-config"
@
click=
"jumpFriend"
fn=
"客户资料跟进"
mode=
"div"
>
营销配置
</GLButton
>
</div>
<div
class=
"coustom-box-item"
>
<div
class=
"coustom-box-title"
>
待续保客户
</div>
...
...
@@ -74,10 +74,10 @@
<div
class=
"square-tabel scrm-box-f"
>
<div
class=
"square-tabel-form"
>
<el-form
:inline=
"true"
:model=
"tableSearchForm"
class=
"follow-form-item"
label-width=
"120px"
>
<
el-button
size=
"small"
type=
"primary"
@
click=
"handleImport
"
>
<
GLButton
size=
"small"
type=
"primary"
@
click=
"handleImport"
fn=
"魔方导入
"
>
<i
class=
"el-icon-plus"
></i>
导入魔方
</
el-b
utton>
</
GLB
utton>
<el-form-item
size=
"small"
label=
"导入时间"
>
<el-date-picker
:picker-options=
"pickerOptions"
v-model=
"createTime"
type=
"daterange"
value-format=
"yyyy-MM-dd"
start-placeholder=
"开始时间"
end-placeholder=
"结束时间"
></el-date-picker>
</el-form-item>
...
...
@@ -95,7 +95,7 @@
</div>
</div>
<div
class=
"table-btns"
slot=
"optionBtns"
slot-scope=
"scope"
>
<
el-button
type=
"text"
@
click=
"handleDetail(scope.scope)"
>
详情
</el-b
utton>
<
GLButton
type=
"text"
@
click=
"handleDetail(scope.scope)"
fn=
"魔方导入结果"
>
详情
</GLB
utton>
</div>
</GLTable>
</div>
...
...
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