Commit 32c9596d by 前端

Merge branch 'v3.0.0' into 'master'

fixed

See merge request !39
2 parents 01cee348 4a3f312e
...@@ -31,11 +31,7 @@ const getFollower = params => { ...@@ -31,11 +31,7 @@ const getFollower = params => {
const querylabeltree = params => { const querylabeltree = params => {
params.method = 'scrm.api.datahub.labelgroup.queryLabelTree' params.method = 'scrm.api.datahub.labelgroup.queryLabelTree'
params.sessionId = session params.sessionId = session
<<<<<<< HEAD
return http({
=======
return http_tag({ return http_tag({
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
url: '/rop-scrm-datahub/router', url: '/rop-scrm-datahub/router',
method: 'POST', method: 'POST',
data: params, data: params,
...@@ -44,11 +40,7 @@ const querylabeltree = params => { ...@@ -44,11 +40,7 @@ const querylabeltree = params => {
} }
const queryCrowdtree = params => { const queryCrowdtree = params => {
params.method = 'scrm.api.datahub.user.queryCrowdTree' params.method = 'scrm.api.datahub.user.queryCrowdTree'
<<<<<<< HEAD
return http({
=======
return http_tag({ return http_tag({
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
url: '/rop-scrm-datahub/router', url: '/rop-scrm-datahub/router',
method: 'POST', method: 'POST',
data: params, data: params,
......
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
vertical-align: top; vertical-align: top;
} }
.text-hide { .text-hide {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.text-hide-2 { .text-hide-2 {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
display: -webkit-box; display: -webkit-box;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
} }
.scrm-textRight { .scrm-textRight {
position: relative; position: relative;
text-align: right; text-align: right;
} }
.scrm-textCenter { .scrm-textCenter {
text-align: center; text-align: center;
} }
.scrm-c3 { .scrm-c3 {
color: #333333; color: #333333;
} }
.scrm-f12 { .scrm-f12 {
font-size: 12px; font-size: 12px;
} }
.scrm-f13 { .scrm-f13 {
font-size: 13px; font-size: 13px;
} }
.scrm-f14 { .scrm-f14 {
font-size: 14px; font-size: 14px;
} }
.scrm-f15 { .scrm-f15 {
font-size: 15px; font-size: 15px;
} }
.scrm-f16 { .scrm-f16 {
font-size: 16px; font-size: 16px;
} }
.scrm-f18 { .scrm-f18 {
font-size: 18px; font-size: 18px;
} }
.scrm-f20 { .scrm-f20 {
font-size: 20px; font-size: 20px;
} }
.scrm-f22 { .scrm-f22 {
font-size: 22px; font-size: 22px;
} }
.scrm-f24 { .scrm-f24 {
font-size: 24px; font-size: 24px;
} }
.scrm-m10 { .scrm-m10 {
margin: 10px; margin: 10px;
} }
.scrm-m20 { .scrm-m20 {
margin: 20px; margin: 20px;
} }
.scrm-ml10 { .scrm-ml10 {
margin-left: 10px; margin-left: 10px;
} }
.scrm-ml20 { .scrm-ml20 {
margin-left: 20px; margin-left: 20px;
} }
.scrm-mr10 { .scrm-mr10 {
margin-right: 10px; margin-right: 10px;
} }
.scrm-mr20 { .scrm-mr20 {
margin-right: 20px; margin-right: 20px;
} }
.scrm-p10 { .scrm-p10 {
padding: 10px; padding: 10px;
} }
.scrm-p20 { .scrm-p20 {
padding: 20px; padding: 20px;
} }
.scrm-box-f { .scrm-box-f {
background: #ffffff; background: #ffffff;
// box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1); box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
} }
.scrm-flex { .scrm-flex {
display: flex; display: flex;
}
.task_icon {
position: relative;
&::after {
content: '';
position: absolute;
top: 8px;
left: -10px;
width: 6px;
height: 6px;
border-radius: 4px;
}
}
.green-icon {
&::after {
background: #2cca74;
}
}
.yellow-icon {
&::after {
background: #fdb757;
}
} }
::-webkit-scrollbar { ::-webkit-scrollbar {
/*滚动条整体样式*/ /*滚动条整体样式*/
width: 6px; width: 6px;
height: 4px; height: 4px;
} }
::-webkit-scrollbar-thumb { ::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/ /*滚动条里面小方块*/
border-radius: 4px; border-radius: 4px;
background-color: rgba(144, 147, 153, 0.3); background-color: rgba(144, 147, 153, 0.3);
} }
.glsx-table .line-ellipsis { .glsx-table .line-ellipsis {
display: inline; display: inline;
} }
.el-form--inline .el-form-item { .el-form--inline .el-form-item {
margin-right: 0px; margin-right: 0px;
} }
.el-tag { .el-tag {
color: #666 !important; color: #666 !important;
font-size: 14px !important; font-size: 14px !important;
} }
.el-tag.el-tag--info { .el-tag.el-tag--info {
background: #fafbfe !important; background: #fafbfe !important;
border: 1px solid #e8e8ea !important; border: 1px solid #e8e8ea !important;
border-radius: 4px; border-radius: 4px;
} }
.el-tag.el-tag--info.el-tag--plain { .el-tag.el-tag--info.el-tag--plain {
background: transparent !important; background: transparent !important;
} }
.el-dialog__title { .el-dialog__title {
height: 30px; height: 30px;
display: block; display: block;
} }
.el-table--enable-row-hover .el-table__body tr:hover { .el-table--enable-row-hover .el-table__body tr:hover {
background: #f4f3ff !important; background: #f4f3ff !important;
} }
.el-table tbody tr:hover > td { .el-table tbody tr:hover > td {
background: #f4f3ff !important; background: #f4f3ff !important;
}
.el-message-box .el-message-box__title,
.el-message-box .el-message-box__headerbtn {
// display: none;
}
.el-message-box__content {
text-align: center;
padding: 50px 0px 50px;
}
.el-message-box__status.el-icon-warning {
// display: none;
}
.el-message-box__btns {
text-align: center;
padding: 20px 0px 10px;
border-top: 1px solid #e6e6e6;
}
.el-message-box__btns button:nth-child(2) {
margin-left: 40px;
}
.el-message-box__status + .el-message-box__message {
padding: 0px 10px;
}
.el-message-box--center {
padding: 0px;
}
.el-message--info {
height: 40px;
background: #e6e9ff;
border: 1px solid #5850ff;
border-radius: 4px;
font-size: 14px;
color: rgba(0, 0, 0, 0.65);
}
.el-message .el-icon-info {
color: #5850ff;
font-size: 16px;
}
.el-radio:focus:not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner {
box-shadow: none !important;
} }
.el-message-box .el-message-box__title,.el-message-box .el-message-box__headerbtn { .el-message-box .el-message-box__title,.el-message-box .el-message-box__headerbtn {
display: none; display: none;
......

2.93 KB | W: | H:

1.84 KB | W: | H:

src/assets/img/channel/count1.png
src/assets/img/channel/count1.png
src/assets/img/channel/count1.png
src/assets/img/channel/count1.png
  • 2-up
  • Swipe
  • Onion skin

2.91 KB | W: | H:

1.95 KB | W: | H:

src/assets/img/channel/count2.png
src/assets/img/channel/count2.png
src/assets/img/channel/count2.png
src/assets/img/channel/count2.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -26,10 +26,7 @@ export default { ...@@ -26,10 +26,7 @@ export default {
}, },
filters: { filters: {
ellipsis(value,that) { ellipsis(value,that) {
<<<<<<< HEAD
=======
console.log(value,that) console.log(value,that)
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
if (value.length > that.textLength) { if (value.length > that.textLength) {
that.tooltipStatus = true that.tooltipStatus = true
return value.slice(0, that.textLength) + '...' return value.slice(0, that.textLength) + '...'
......
<template> <template>
<div <div
:style="style" :style="style"
<<<<<<< HEAD
: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)">
=======
:class="[{ :class="[{
[classNameActive]: enabled, [classNameActive]: enabled,
[classNameDragging]: dragging, [classNameDragging]: dragging,
...@@ -35,7 +19,6 @@ ...@@ -35,7 +19,6 @@
@mousedown.stop.prevent="handleDown(handle, $event)" @mousedown.stop.prevent="handleDown(handle, $event)"
@touchstart.stop.prevent="handleTouchDown(handle, $event)" @touchstart.stop.prevent="handleTouchDown(handle, $event)"
> >
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<slot :name="handle"></slot> <slot :name="handle"></slot>
</div> </div>
<slot></slot> <slot></slot>
...@@ -138,11 +121,7 @@ export default { ...@@ -138,11 +121,7 @@ export default {
w: { w: {
type: [Number, String], type: [Number, String],
default: 200, default: 200,
<<<<<<< HEAD
validator: val => {
=======
validator: (val) => { validator: (val) => {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
if (typeof val === 'number') { if (typeof val === 'number') {
return val > 0 return val > 0
} }
...@@ -153,11 +132,7 @@ export default { ...@@ -153,11 +132,7 @@ export default {
h: { h: {
type: [Number, String], type: [Number, String],
default: 200, default: 200,
<<<<<<< HEAD
validator: val => {
=======
validator: (val) => { validator: (val) => {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
if (typeof val === 'number') { if (typeof val === 'number') {
return val > 0 return val > 0
} }
...@@ -168,38 +143,22 @@ export default { ...@@ -168,38 +143,22 @@ export default {
minWidth: { minWidth: {
type: Number, type: Number,
default: 0, default: 0,
<<<<<<< HEAD
validator: val => val >= 0
=======
validator: (val) => val >= 0 validator: (val) => val >= 0
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
}, },
minHeight: { minHeight: {
type: Number, type: Number,
default: 0, default: 0,
<<<<<<< HEAD
validator: val => val >= 0
=======
validator: (val) => val >= 0 validator: (val) => val >= 0
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
}, },
maxWidth: { maxWidth: {
type: Number, type: Number,
default: null, default: null,
<<<<<<< HEAD
validator: val => val >= 0
=======
validator: (val) => val >= 0 validator: (val) => val >= 0
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
}, },
maxHeight: { maxHeight: {
type: Number, type: Number,
default: null, default: null,
<<<<<<< HEAD
validator: val => val >= 0
=======
validator: (val) => val >= 0 validator: (val) => val >= 0
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
}, },
x: { x: {
type: Number, type: Number,
...@@ -212,20 +171,12 @@ export default { ...@@ -212,20 +171,12 @@ export default {
z: { z: {
type: [String, Number], type: [String, Number],
default: 'auto', default: 'auto',
<<<<<<< HEAD
validator: val => (typeof val === 'string' ? val === 'auto' : val >= 0)
=======
validator: (val) => (typeof val === 'string' ? val === 'auto' : val >= 0) validator: (val) => (typeof val === 'string' ? val === 'auto' : val >= 0)
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
}, },
handles: { handles: {
type: Array, type: Array,
default: () => ['tl', 'tm', 'tr', 'mr', 'br', 'bm', 'bl', 'ml'], default: () => ['tl', 'tm', 'tr', 'mr', 'br', 'bm', 'bl', 'ml'],
<<<<<<< HEAD
validator: val => {
=======
validator: (val) => { validator: (val) => {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
const s = new Set(['tl', 'tm', 'tr', 'mr', 'br', 'bm', 'bl', 'ml']) const s = new Set(['tl', 'tm', 'tr', 'mr', 'br', 'bm', 'bl', 'ml'])
return new Set(val.filter(h => s.has(h))).size === val.length return new Set(val.filter(h => s.has(h))).size === val.length
...@@ -242,22 +193,14 @@ export default { ...@@ -242,22 +193,14 @@ export default {
axis: { axis: {
type: String, type: String,
default: 'both', default: 'both',
<<<<<<< HEAD
validator: val => ['x', 'y', 'both'].includes(val)
=======
validator: (val) => ['x', 'y', 'both'].includes(val) validator: (val) => ['x', 'y', 'both'].includes(val)
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
}, },
grid: { grid: {
type: Array, type: Array,
default: () => [1, 1] default: () => [1, 1]
}, },
customId: { customId: {
<<<<<<< HEAD
type: [String, Number],
=======
type: [String,Number], type: [String,Number],
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
default: '' default: ''
}, },
parent: { parent: {
...@@ -267,11 +210,7 @@ export default { ...@@ -267,11 +210,7 @@ export default {
scale: { scale: {
type: [Number, Array], type: [Number, Array],
default: 1, default: 1,
<<<<<<< HEAD
validator: val => {
=======
validator: (val) => { validator: (val) => {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
if (typeof val === 'number') { if (typeof val === 'number') {
return val > 0 return val > 0
} }
...@@ -297,11 +236,7 @@ export default { ...@@ -297,11 +236,7 @@ export default {
} }
}, },
<<<<<<< HEAD
data: function() {
=======
data: function () { data: function () {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
return { return {
left: this.x, left: this.x,
top: this.y, top: this.y,
...@@ -335,11 +270,7 @@ export default { ...@@ -335,11 +270,7 @@ export default {
} }
}, },
<<<<<<< HEAD
created: function() {
=======
created: function () { created: function () {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
// eslint-disable-next-line // eslint-disable-next-line
if (this.maxWidth && this.minWidth > this.maxWidth) console.warn('[Vdr warn]: Invalid prop: minWidth cannot be greater than maxWidth') if (this.maxWidth && this.minWidth > this.maxWidth) console.warn('[Vdr warn]: Invalid prop: minWidth cannot be greater than maxWidth')
// eslint-disable-next-line // eslint-disable-next-line
...@@ -347,11 +278,7 @@ export default { ...@@ -347,11 +278,7 @@ export default {
this.resetBoundsAndMouseState() this.resetBoundsAndMouseState()
}, },
<<<<<<< HEAD
mounted: function() {
=======
mounted: function () { mounted: function () {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
if (!this.enableNativeDrag) { if (!this.enableNativeDrag) {
this.$el.ondragstart = () => false this.$el.ondragstart = () => false
} }
...@@ -380,11 +307,7 @@ export default { ...@@ -380,11 +307,7 @@ export default {
addEvent(window, 'resize', this.checkParentSize) addEvent(window, 'resize', this.checkParentSize)
}, },
<<<<<<< HEAD
beforeDestroy: function() {
=======
beforeDestroy: function () { beforeDestroy: function () {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
removeEvent(document.documentElement, 'mousedown', this.deselect) removeEvent(document.documentElement, 'mousedown', this.deselect)
removeEvent(document.documentElement, 'touchstart', this.handleUp) removeEvent(document.documentElement, 'touchstart', this.handleUp)
removeEvent(document.documentElement, 'mousemove', this.move) removeEvent(document.documentElement, 'mousemove', this.move)
...@@ -396,11 +319,7 @@ export default { ...@@ -396,11 +319,7 @@ export default {
}, },
methods: { methods: {
<<<<<<< HEAD
resetBoundsAndMouseState() {
=======
resetBoundsAndMouseState () { resetBoundsAndMouseState () {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
this.mouseClickPosition = { mouseX: 0, mouseY: 0, x: 0, y: 0, w: 0, h: 0 } this.mouseClickPosition = { mouseX: 0, mouseY: 0, x: 0, y: 0, w: 0, h: 0 }
this.bounds = { this.bounds = {
...@@ -414,11 +333,7 @@ export default { ...@@ -414,11 +333,7 @@ export default {
maxBottom: null maxBottom: null
} }
}, },
<<<<<<< HEAD
checkParentSize() {
=======
checkParentSize () { checkParentSize () {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
if (this.parent) { if (this.parent) {
const [newParentWidth, newParentHeight] = this.getParentSize() const [newParentWidth, newParentHeight] = this.getParentSize()
...@@ -428,13 +343,6 @@ export default { ...@@ -428,13 +343,6 @@ export default {
this.bottom = this.parentHeight - this.height - this.top this.bottom = this.parentHeight - this.height - this.top
} }
}, },
<<<<<<< HEAD
getParentSize() {
if (this.parent) {
const style = window.getComputedStyle(this.$el.parentNode, null)
return [parseInt(style.getPropertyValue('width'), 10), parseInt(style.getPropertyValue('height'), 10)]
=======
getParentSize () { getParentSize () {
if (this.parent) { if (this.parent) {
const style = window.getComputedStyle(this.$el.parentNode, null) const style = window.getComputedStyle(this.$el.parentNode, null)
...@@ -443,34 +351,21 @@ export default { ...@@ -443,34 +351,21 @@ export default {
parseInt(style.getPropertyValue('width'), 10), parseInt(style.getPropertyValue('width'), 10),
parseInt(style.getPropertyValue('height'), 10) parseInt(style.getPropertyValue('height'), 10)
] ]
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
} }
return [null, null] return [null, null]
}, },
<<<<<<< HEAD
elementTouchDown(e) {
=======
elementTouchDown (e) { elementTouchDown (e) {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
eventsFor = events.touch eventsFor = events.touch
this.elementDown(e) this.elementDown(e)
}, },
<<<<<<< HEAD
elementMouseDown(e) {
=======
elementMouseDown (e) { elementMouseDown (e) {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
eventsFor = events.mouse eventsFor = events.mouse
this.elementDown(e) this.elementDown(e)
}, },
<<<<<<< HEAD
elementDown(e) {
=======
elementDown (e) { elementDown (e) {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
if (e instanceof MouseEvent && e.which !== 1) { if (e instanceof MouseEvent && e.which !== 1) {
return return
} }
...@@ -482,14 +377,10 @@ export default { ...@@ -482,14 +377,10 @@ export default {
return return
} }
<<<<<<< HEAD
if ((this.dragHandle && !matchesSelectorToParentElements(target, this.dragHandle, this.$el)) || (this.dragCancel && matchesSelectorToParentElements(target, this.dragCancel, this.$el))) {
=======
if ( if (
(this.dragHandle && !matchesSelectorToParentElements(target, this.dragHandle, this.$el)) || (this.dragHandle && !matchesSelectorToParentElements(target, this.dragHandle, this.$el)) ||
(this.dragCancel && matchesSelectorToParentElements(target, this.dragCancel, this.$el)) (this.dragCancel && matchesSelectorToParentElements(target, this.dragCancel, this.$el))
) { ) {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
this.dragging = false this.dragging = false
return return
...@@ -498,11 +389,7 @@ export default { ...@@ -498,11 +389,7 @@ export default {
if (!this.enabled) { if (!this.enabled) {
this.enabled = true this.enabled = true
<<<<<<< HEAD
this.$emit('activated', this.customId)
=======
this.$emit('activated',this.customId) this.$emit('activated',this.customId)
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
this.$emit('update:active', true) this.$emit('update:active', true)
} }
...@@ -526,11 +413,7 @@ export default { ...@@ -526,11 +413,7 @@ export default {
addEvent(document.documentElement, eventsFor.stop, this.handleUp) addEvent(document.documentElement, eventsFor.stop, this.handleUp)
} }
}, },
<<<<<<< HEAD
calcDragLimits() {
=======
calcDragLimits () { calcDragLimits () {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
return { return {
minLeft: this.left % this.grid[0], minLeft: this.left % this.grid[0],
maxLeft: Math.floor((this.parentWidth - this.width - this.left) / this.grid[0]) * this.grid[0] + this.left, maxLeft: Math.floor((this.parentWidth - this.width - this.left) / this.grid[0]) * this.grid[0] + this.left,
...@@ -542,11 +425,7 @@ export default { ...@@ -542,11 +425,7 @@ export default {
maxBottom: Math.floor((this.parentHeight - this.height - this.bottom) / this.grid[1]) * this.grid[1] + this.bottom maxBottom: Math.floor((this.parentHeight - this.height - this.bottom) / this.grid[1]) * this.grid[1] + this.bottom
} }
}, },
<<<<<<< HEAD
deselect(e) {
=======
deselect (e) { deselect (e) {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
const target = e.target || e.srcElement const target = e.target || e.srcElement
const regex = new RegExp(this.className + '-([trmbl]{2})', '') const regex = new RegExp(this.className + '-([trmbl]{2})', '')
...@@ -563,20 +442,12 @@ export default { ...@@ -563,20 +442,12 @@ export default {
this.resetBoundsAndMouseState() this.resetBoundsAndMouseState()
}, },
<<<<<<< HEAD
handleTouchDown(handle, e) {
=======
handleTouchDown (handle, e) { handleTouchDown (handle, e) {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
eventsFor = events.touch eventsFor = events.touch
this.handleDown(handle, e) this.handleDown(handle, e)
}, },
<<<<<<< HEAD
handleDown(handle, e) {
=======
handleDown (handle, e) { handleDown (handle, e) {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
if (e instanceof MouseEvent && e.which !== 1) { if (e instanceof MouseEvent && e.which !== 1) {
return return
} }
...@@ -609,11 +480,7 @@ export default { ...@@ -609,11 +480,7 @@ export default {
addEvent(document.documentElement, eventsFor.move, this.handleResize) addEvent(document.documentElement, eventsFor.move, this.handleResize)
addEvent(document.documentElement, eventsFor.stop, this.handleUp) addEvent(document.documentElement, eventsFor.stop, this.handleUp)
}, },
<<<<<<< HEAD
calcResizeLimits() {
=======
calcResizeLimits () { calcResizeLimits () {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
let minW = this.minW let minW = this.minW
let minH = this.minH let minH = this.minH
let maxW = this.maxW let maxW = this.maxW
...@@ -705,11 +572,7 @@ export default { ...@@ -705,11 +572,7 @@ export default {
limits.minBottom = -(top + maxH) limits.minBottom = -(top + maxH)
} }
<<<<<<< HEAD
if (this.lockAspectRatio && maxW && maxH) {
=======
if (this.lockAspectRatio && (maxW && maxH)) { if (this.lockAspectRatio && (maxW && maxH)) {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
limits.minLeft = Math.min(limits.minLeft, -(right + maxW)) limits.minLeft = Math.min(limits.minLeft, -(right + maxW))
limits.minTop = Math.min(limits.minTop, -(maxH + bottom)) limits.minTop = Math.min(limits.minTop, -(maxH + bottom))
limits.minRight = Math.min(limits.minRight, -left - maxW) limits.minRight = Math.min(limits.minRight, -left - maxW)
...@@ -719,22 +582,14 @@ export default { ...@@ -719,22 +582,14 @@ export default {
return limits return limits
}, },
<<<<<<< HEAD
move(e) {
=======
move (e) { move (e) {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
if (this.resizing) { if (this.resizing) {
this.handleResize(e) this.handleResize(e)
} else if (this.dragEnable) { } else if (this.dragEnable) {
this.handleDrag(e) this.handleDrag(e)
} }
}, },
<<<<<<< HEAD
handleDrag(e) {
=======
handleDrag (e) { handleDrag (e) {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
const axis = this.axis const axis = this.axis
const grid = this.grid const grid = this.grid
const bounds = this.bounds const bounds = this.bounds
...@@ -763,11 +618,7 @@ export default { ...@@ -763,11 +618,7 @@ export default {
this.$emit('dragging', this.left, this.top) this.$emit('dragging', this.left, this.top)
this.dragging = true this.dragging = true
}, },
<<<<<<< HEAD
moveHorizontally(val) {
=======
moveHorizontally (val) { moveHorizontally (val) {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
// should calculate with scale 1. // should calculate with scale 1.
const [deltaX, _] = snapToGrid(this.grid, val, this.top, 1) const [deltaX, _] = snapToGrid(this.grid, val, this.top, 1)
...@@ -776,11 +627,7 @@ export default { ...@@ -776,11 +627,7 @@ export default {
this.left = left this.left = left
this.right = this.parentWidth - this.width - left this.right = this.parentWidth - this.width - left
}, },
<<<<<<< HEAD
moveVertically(val) {
=======
moveVertically (val) { moveVertically (val) {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
// should calculate with scale 1. // should calculate with scale 1.
const [_, deltaY] = snapToGrid(this.grid, this.left, val, 1) const [_, deltaY] = snapToGrid(this.grid, this.left, val, 1)
...@@ -789,11 +636,7 @@ export default { ...@@ -789,11 +636,7 @@ export default {
this.top = top this.top = top
this.bottom = this.parentHeight - this.height - top this.bottom = this.parentHeight - this.height - top
}, },
<<<<<<< HEAD
handleResize(e) {
=======
handleResize (e) { handleResize (e) {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
let left = this.left let left = this.left
let top = this.top let top = this.top
let right = this.right let right = this.right
...@@ -817,29 +660,21 @@ export default { ...@@ -817,29 +660,21 @@ export default {
const [deltaX, deltaY] = snapToGrid(this.grid, tmpDeltaX, tmpDeltaY, this.scale) const [deltaX, deltaY] = snapToGrid(this.grid, tmpDeltaX, tmpDeltaY, this.scale)
if (this.handle.includes('b')) { if (this.handle.includes('b')) {
<<<<<<< HEAD
bottom = restrictToBounds(mouseClickPosition.bottom + deltaY, this.bounds.minBottom, this.bounds.maxBottom)
=======
bottom = restrictToBounds( bottom = restrictToBounds(
mouseClickPosition.bottom + deltaY, mouseClickPosition.bottom + deltaY,
this.bounds.minBottom, this.bounds.minBottom,
this.bounds.maxBottom this.bounds.maxBottom
) )
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
if (this.lockAspectRatio && this.resizingOnY) { if (this.lockAspectRatio && this.resizingOnY) {
right = this.right - (this.bottom - bottom) * aspectFactor right = this.right - (this.bottom - bottom) * aspectFactor
} }
} else if (this.handle.includes('t')) { } else if (this.handle.includes('t')) {
<<<<<<< HEAD
top = restrictToBounds(mouseClickPosition.top - deltaY, this.bounds.minTop, this.bounds.maxTop)
=======
top = restrictToBounds( top = restrictToBounds(
mouseClickPosition.top - deltaY, mouseClickPosition.top - deltaY,
this.bounds.minTop, this.bounds.minTop,
this.bounds.maxTop this.bounds.maxTop
) )
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
if (this.lockAspectRatio && this.resizingOnY) { if (this.lockAspectRatio && this.resizingOnY) {
left = this.left - (this.top - top) * aspectFactor left = this.left - (this.top - top) * aspectFactor
...@@ -847,29 +682,21 @@ export default { ...@@ -847,29 +682,21 @@ export default {
} }
if (this.handle.includes('r')) { if (this.handle.includes('r')) {
<<<<<<< HEAD
right = restrictToBounds(mouseClickPosition.right + deltaX, this.bounds.minRight, this.bounds.maxRight)
=======
right = restrictToBounds( right = restrictToBounds(
mouseClickPosition.right + deltaX, mouseClickPosition.right + deltaX,
this.bounds.minRight, this.bounds.minRight,
this.bounds.maxRight this.bounds.maxRight
) )
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
if (this.lockAspectRatio && this.resizingOnX) { if (this.lockAspectRatio && this.resizingOnX) {
bottom = this.bottom - (this.right - right) / aspectFactor bottom = this.bottom - (this.right - right) / aspectFactor
} }
} else if (this.handle.includes('l')) { } else if (this.handle.includes('l')) {
<<<<<<< HEAD
left = restrictToBounds(mouseClickPosition.left - deltaX, this.bounds.minLeft, this.bounds.maxLeft)
=======
left = restrictToBounds( left = restrictToBounds(
mouseClickPosition.left - deltaX, mouseClickPosition.left - deltaX,
this.bounds.minLeft, this.bounds.minLeft,
this.bounds.maxLeft this.bounds.maxLeft
) )
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
if (this.lockAspectRatio && this.resizingOnX) { if (this.lockAspectRatio && this.resizingOnX) {
top = this.top - (this.left - left) / aspectFactor top = this.top - (this.left - left) / aspectFactor
...@@ -893,13 +720,6 @@ export default { ...@@ -893,13 +720,6 @@ export default {
this.$emit('resizing', this.left, this.top, this.width, this.height) this.$emit('resizing', this.left, this.top, this.width, this.height)
this.resizing = true this.resizing = true
}, },
<<<<<<< HEAD
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)
=======
changeWidth (val) { changeWidth (val) {
// should calculate with scale 1. // should calculate with scale 1.
const [newWidth, _] = snapToGrid(this.grid, val, 0, 1) const [newWidth, _] = snapToGrid(this.grid, val, 0, 1)
...@@ -909,7 +729,6 @@ export default { ...@@ -909,7 +729,6 @@ export default {
this.bounds.minRight, this.bounds.minRight,
this.bounds.maxRight this.bounds.maxRight
) )
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
let bottom = this.bottom let bottom = this.bottom
if (this.lockAspectRatio) { if (this.lockAspectRatio) {
...@@ -924,13 +743,6 @@ export default { ...@@ -924,13 +743,6 @@ export default {
this.width = width this.width = width
this.height = height this.height = height
}, },
<<<<<<< HEAD
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)
=======
changeHeight (val) { changeHeight (val) {
// should calculate with scale 1. // should calculate with scale 1.
const [_, newHeight] = snapToGrid(this.grid, 0, val, 1) const [_, newHeight] = snapToGrid(this.grid, 0, val, 1)
...@@ -940,7 +752,6 @@ export default { ...@@ -940,7 +752,6 @@ export default {
this.bounds.minBottom, this.bounds.minBottom,
this.bounds.maxBottom this.bounds.maxBottom
) )
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
let right = this.right let right = this.right
if (this.lockAspectRatio) { if (this.lockAspectRatio) {
...@@ -955,11 +766,7 @@ export default { ...@@ -955,11 +766,7 @@ export default {
this.width = width this.width = width
this.height = height this.height = height
}, },
<<<<<<< HEAD
handleUp(e) {
=======
handleUp (e) { handleUp (e) {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
this.handle = null this.handle = null
this.resetBoundsAndMouseState() this.resetBoundsAndMouseState()
...@@ -981,11 +788,7 @@ export default { ...@@ -981,11 +788,7 @@ export default {
} }
}, },
computed: { computed: {
<<<<<<< HEAD
style() {
=======
style () { style () {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
return { return {
transform: `translate(${this.left}px, ${this.top}px)`, transform: `translate(${this.left}px, ${this.top}px)`,
width: this.computedWidth, width: this.computedWidth,
...@@ -994,20 +797,12 @@ export default { ...@@ -994,20 +797,12 @@ export default {
...(this.dragging && this.disableUserSelect ? userSelectNone : userSelectAuto) ...(this.dragging && this.disableUserSelect ? userSelectNone : userSelectAuto)
} }
}, },
<<<<<<< HEAD
actualHandles() {
=======
actualHandles () { actualHandles () {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
if (!this.resizable) return [] if (!this.resizable) return []
return this.handles return this.handles
}, },
<<<<<<< HEAD
computedWidth() {
=======
computedWidth () { computedWidth () {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
if (this.w === 'auto') { if (this.w === 'auto') {
if (!this.widthTouched) { if (!this.widthTouched) {
return 'auto' return 'auto'
...@@ -1016,11 +811,7 @@ export default { ...@@ -1016,11 +811,7 @@ export default {
return this.width + 'px' return this.width + 'px'
}, },
<<<<<<< HEAD
computedHeight() {
=======
computedHeight () { computedHeight () {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
if (this.h === 'auto') { if (this.h === 'auto') {
if (!this.heightTouched) { if (!this.heightTouched) {
return 'auto' return 'auto'
...@@ -1029,16 +820,6 @@ export default { ...@@ -1029,16 +820,6 @@ export default {
return this.height + 'px' return this.height + 'px'
}, },
<<<<<<< HEAD
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)
=======
resizingOnX () { resizingOnX () {
return (Boolean(this.handle) && (this.handle.includes('l') || this.handle.includes('r'))) return (Boolean(this.handle) && (this.handle.includes('l') || this.handle.includes('r')))
}, },
...@@ -1047,16 +828,11 @@ export default { ...@@ -1047,16 +828,11 @@ export default {
}, },
isCornerHandle () { isCornerHandle () {
return (Boolean(this.handle) && ['tl', 'tr', 'br', 'bl'].includes(this.handle)) return (Boolean(this.handle) && ['tl', 'tr', 'br', 'bl'].includes(this.handle))
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
} }
}, },
watch: { watch: {
<<<<<<< HEAD
active(val) {
=======
active (val) { active (val) {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
this.enabled = val this.enabled = val
if (val) { if (val) {
...@@ -1065,20 +841,12 @@ export default { ...@@ -1065,20 +841,12 @@ export default {
this.$emit('deactivated') this.$emit('deactivated')
} }
}, },
<<<<<<< HEAD
z(val) {
=======
z (val) { z (val) {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
if (val >= 0 || val === 'auto') { if (val >= 0 || val === 'auto') {
this.zIndex = val this.zIndex = val
} }
}, },
<<<<<<< HEAD
x(val) {
=======
x (val) { x (val) {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
if (this.resizing || this.dragging) { if (this.resizing || this.dragging) {
return return
} }
...@@ -1089,11 +857,7 @@ export default { ...@@ -1089,11 +857,7 @@ export default {
this.moveHorizontally(val) this.moveHorizontally(val)
}, },
<<<<<<< HEAD
y(val) {
=======
y (val) { y (val) {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
if (this.resizing || this.dragging) { if (this.resizing || this.dragging) {
return return
} }
...@@ -1104,44 +868,23 @@ export default { ...@@ -1104,44 +868,23 @@ export default {
this.moveVertically(val) this.moveVertically(val)
}, },
<<<<<<< HEAD
lockAspectRatio(val) {
=======
lockAspectRatio (val) { lockAspectRatio (val) {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
if (val) { if (val) {
this.aspectFactor = this.width / this.height this.aspectFactor = this.width / this.height
} else { } else {
this.aspectFactor = undefined this.aspectFactor = undefined
} }
}, },
<<<<<<< HEAD
minWidth(val) {
=======
minWidth (val) { minWidth (val) {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
if (val > 0 && val <= this.width) { if (val > 0 && val <= this.width) {
this.minW = val this.minW = val
} }
}, },
<<<<<<< HEAD
minHeight(val) {
=======
minHeight (val) { minHeight (val) {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
if (val > 0 && val <= this.height) { if (val > 0 && val <= this.height) {
this.minH = val this.minH = val
} }
}, },
<<<<<<< HEAD
maxWidth(val) {
this.maxW = val
},
maxHeight(val) {
this.maxH = val
},
w(val) {
=======
maxWidth (val) { maxWidth (val) {
this.maxW = val this.maxW = val
}, },
...@@ -1149,7 +892,6 @@ export default { ...@@ -1149,7 +892,6 @@ export default {
this.maxH = val this.maxH = val
}, },
w (val) { w (val) {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
if (this.resizing || this.dragging) { if (this.resizing || this.dragging) {
return return
} }
...@@ -1160,11 +902,7 @@ export default { ...@@ -1160,11 +902,7 @@ export default {
this.changeWidth(val) this.changeWidth(val)
}, },
<<<<<<< HEAD
h(val) {
=======
h (val) { h (val) {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
if (this.resizing || this.dragging) { if (this.resizing || this.dragging) {
return return
} }
......
<template> <template>
<div class="tag-main"> <div class="tag-main">
<<<<<<< HEAD
<el-dialog bigTitle="选择标签" :visible.sync="dialogVisible" width="50%" :before-close="handleClose">
=======
<el-dialog title="选择标签" :visible.sync="dialogVisible" width="50%" :before-close="handleClose"> <el-dialog title="选择标签" :visible.sync="dialogVisible" width="50%" :before-close="handleClose">
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<div class="tag-panel"> <div class="tag-panel">
<div class="tag-panel-select"> <div class="tag-panel-select">
<div class="tag-title">预选标签</div> <div class="tag-title">预选标签</div>
......
...@@ -7,11 +7,7 @@ ...@@ -7,11 +7,7 @@
--> -->
<template> <template>
<div> <div>
<<<<<<< HEAD
<GLDialog title="人群筛选" :hasFooter="true" :visible.sync="crowdVisible" mode="big">
=======
<el-dialog :title="'人群筛选'" :width="'1080px'" :visible.sync="crowdVisible" v-if="crowdVisible"> <el-dialog :title="'人群筛选'" :width="'1080px'" :visible.sync="crowdVisible" v-if="crowdVisible">
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<div class="member-wrapper"> <div class="member-wrapper">
<div class="member-left"> <div class="member-left">
<div class="member-title"> <div class="member-title">
...@@ -47,11 +43,7 @@ ...@@ -47,11 +43,7 @@
<el-button style="width: 68px;" size="small" @click="crowdVisible = false">取 消</el-button> <el-button style="width: 68px;" size="small" @click="crowdVisible = false">取 消</el-button>
<el-button style="width: 68px;" size="small" type="primary" @click.native="handleConfirm">确 定</el-button> <el-button style="width: 68px;" size="small" type="primary" @click.native="handleConfirm">确 定</el-button>
</span> </span>
<<<<<<< HEAD
</GLDialog>
=======
</el-dialog> </el-dialog>
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
</div> </div>
</template> </template>
...@@ -105,10 +97,7 @@ export default { ...@@ -105,10 +97,7 @@ export default {
}, },
methods: { methods: {
init(val) { init(val) {
<<<<<<< HEAD
=======
// console.log(val) // console.log(val)
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
this.inner = this.$common.utils.deepClone(val) this.inner = this.$common.utils.deepClone(val)
this.innerTags = this.$common.utils.deepClone(val) this.innerTags = this.$common.utils.deepClone(val)
this.crowdVisible = true this.crowdVisible = true
......
<template> <template>
<div class="square-main" v-loading="loading"> <div class="square-main" v-loading="loading">
<GLDialog title="选择跟进专员" :hasFooter="true" :visible.sync="dialogVisible"> <el-dialog title="选择跟进专员" :visible.sync="dialogVisible" width="50%" :before-close="handleClose">
<el-form :inline="true" :model="tableSearchForm"> <el-form :inline="true" :model="tableSearchForm">
<el-form-item size="small" label="员工"> <el-form-item size="small" label="员工">
<el-input v-model="tableSearchForm.staffName" placeholder="请输入员工姓名"></el-input> <el-input v-model="tableSearchForm.staffName" placeholder="请输入员工姓名"></el-input>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<el-button size="small" @click="handleCancel">取 消</el-button> <el-button size="small" @click="handleCancel">取 消</el-button>
<el-button size="small" type="primary" @click.native="handleSelect">确 定</el-button> <el-button size="small" type="primary" @click.native="handleSelect">确 定</el-button>
</span> </span>
</GLDialog> </el-dialog>
</div> </div>
</template> </template>
......
<template> <template>
<div class="tag-main"> <div class="tag-main">
<GLDialog bigTitle="选择标签" :hasFooter="true" :visible.sync="dialogVisible" mode="big"> <el-dialog title="选择标签" :visible.sync="dialogVisible" width="70%" :before-close="handleClose">
<div class="tag-panel"> <div class="tag-panel">
<div class="tag-panel-select"> <div class="tag-panel-select">
<div class="tag-title">预选标签</div> <div class="tag-title">预选标签</div>
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
</el-button> </el-button>
<el-button size="small" type="primary" @click="handleSelect">确 定</el-button> <el-button size="small" type="primary" @click="handleSelect">确 定</el-button>
</span> </span>
</GLDialog> </el-dialog>
</div> </div>
</template> </template>
...@@ -216,6 +216,7 @@ export default { ...@@ -216,6 +216,7 @@ export default {
} }
}) })
.filter(item => item) .filter(item => item)
console.log(labelTreeRets)
this.$emit('tagSelected', labelTreeRets) this.$emit('tagSelected', labelTreeRets)
}, },
//全选 //全选
...@@ -354,6 +355,5 @@ export default { ...@@ -354,6 +355,5 @@ export default {
} }
.tag-selected-box { .tag-selected-box {
min-height: 200px; min-height: 200px;
overflow: auto;
} }
</style> </style>
<template> <template>
<div <div
:style="style" :style="style"
:class="[ :class="[{
{ [classNameActive]: enabled,
[classNameActive]: enabled, [classNameDragging]: dragging,
[classNameDragging]: dragging, [classNameResizing]: resizing,
[classNameResizing]: resizing, [classNameDraggable]: draggable,
[classNameDraggable]: draggable, [classNameResizable]: resizable
[classNameResizable]: resizable }, className]"
},
className
]"
@mousedown="elementMouseDown" @mousedown="elementMouseDown"
@touchstart="elementTouchDown" @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> <slot :name="handle"></slot>
</div> </div>
<slot></slot> <slot></slot>
...@@ -117,7 +121,7 @@ export default { ...@@ -117,7 +121,7 @@ export default {
w: { w: {
type: [Number, String], type: [Number, String],
default: 200, default: 200,
validator: val => { validator: (val) => {
if (typeof val === 'number') { if (typeof val === 'number') {
return val > 0 return val > 0
} }
...@@ -128,7 +132,7 @@ export default { ...@@ -128,7 +132,7 @@ export default {
h: { h: {
type: [Number, String], type: [Number, String],
default: 200, default: 200,
validator: val => { validator: (val) => {
if (typeof val === 'number') { if (typeof val === 'number') {
return val > 0 return val > 0
} }
...@@ -139,22 +143,22 @@ export default { ...@@ -139,22 +143,22 @@ export default {
minWidth: { minWidth: {
type: Number, type: Number,
default: 0, default: 0,
validator: val => val >= 0 validator: (val) => val >= 0
}, },
minHeight: { minHeight: {
type: Number, type: Number,
default: 0, default: 0,
validator: val => val >= 0 validator: (val) => val >= 0
}, },
maxWidth: { maxWidth: {
type: Number, type: Number,
default: null, default: null,
validator: val => val >= 0 validator: (val) => val >= 0
}, },
maxHeight: { maxHeight: {
type: Number, type: Number,
default: null, default: null,
validator: val => val >= 0 validator: (val) => val >= 0
}, },
x: { x: {
type: Number, type: Number,
...@@ -167,12 +171,12 @@ export default { ...@@ -167,12 +171,12 @@ export default {
z: { z: {
type: [String, Number], type: [String, Number],
default: 'auto', default: 'auto',
validator: val => (typeof val === 'string' ? val === 'auto' : val >= 0) validator: (val) => (typeof val === 'string' ? val === 'auto' : val >= 0)
}, },
handles: { handles: {
type: Array, type: Array,
default: () => ['tl', 'tm', 'tr', 'mr', 'br', 'bm', 'bl', 'ml'], 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']) const s = new Set(['tl', 'tm', 'tr', 'mr', 'br', 'bm', 'bl', 'ml'])
return new Set(val.filter(h => s.has(h))).size === val.length return new Set(val.filter(h => s.has(h))).size === val.length
...@@ -189,14 +193,14 @@ export default { ...@@ -189,14 +193,14 @@ export default {
axis: { axis: {
type: String, type: String,
default: 'both', default: 'both',
validator: val => ['x', 'y', 'both'].includes(val) validator: (val) => ['x', 'y', 'both'].includes(val)
}, },
grid: { grid: {
type: Array, type: Array,
default: () => [1, 1] default: () => [1, 1]
}, },
customId: { customId: {
type: [String, Number], type: [String,Number],
default: '' default: ''
}, },
parent: { parent: {
...@@ -206,7 +210,7 @@ export default { ...@@ -206,7 +210,7 @@ export default {
scale: { scale: {
type: [Number, Array], type: [Number, Array],
default: 1, default: 1,
validator: val => { validator: (val) => {
if (typeof val === 'number') { if (typeof val === 'number') {
return val > 0 return val > 0
} }
...@@ -232,7 +236,7 @@ export default { ...@@ -232,7 +236,7 @@ export default {
} }
}, },
data: function() { data: function () {
return { return {
left: this.x, left: this.x,
top: this.y, top: this.y,
...@@ -266,7 +270,7 @@ export default { ...@@ -266,7 +270,7 @@ export default {
} }
}, },
created: function() { created: function () {
// eslint-disable-next-line // eslint-disable-next-line
if (this.maxWidth && this.minWidth > this.maxWidth) console.warn('[Vdr warn]: Invalid prop: minWidth cannot be greater than maxWidth') if (this.maxWidth && this.minWidth > this.maxWidth) console.warn('[Vdr warn]: Invalid prop: minWidth cannot be greater than maxWidth')
// eslint-disable-next-line // eslint-disable-next-line
...@@ -274,7 +278,7 @@ export default { ...@@ -274,7 +278,7 @@ export default {
this.resetBoundsAndMouseState() this.resetBoundsAndMouseState()
}, },
mounted: function() { mounted: function () {
if (!this.enableNativeDrag) { if (!this.enableNativeDrag) {
this.$el.ondragstart = () => false this.$el.ondragstart = () => false
} }
...@@ -303,7 +307,7 @@ export default { ...@@ -303,7 +307,7 @@ export default {
addEvent(window, 'resize', this.checkParentSize) addEvent(window, 'resize', this.checkParentSize)
}, },
beforeDestroy: function() { beforeDestroy: function () {
removeEvent(document.documentElement, 'mousedown', this.deselect) removeEvent(document.documentElement, 'mousedown', this.deselect)
removeEvent(document.documentElement, 'touchstart', this.handleUp) removeEvent(document.documentElement, 'touchstart', this.handleUp)
removeEvent(document.documentElement, 'mousemove', this.move) removeEvent(document.documentElement, 'mousemove', this.move)
...@@ -315,7 +319,7 @@ export default { ...@@ -315,7 +319,7 @@ export default {
}, },
methods: { methods: {
resetBoundsAndMouseState() { resetBoundsAndMouseState () {
this.mouseClickPosition = { mouseX: 0, mouseY: 0, x: 0, y: 0, w: 0, h: 0 } this.mouseClickPosition = { mouseX: 0, mouseY: 0, x: 0, y: 0, w: 0, h: 0 }
this.bounds = { this.bounds = {
...@@ -329,7 +333,7 @@ export default { ...@@ -329,7 +333,7 @@ export default {
maxBottom: null maxBottom: null
} }
}, },
checkParentSize() { checkParentSize () {
if (this.parent) { if (this.parent) {
const [newParentWidth, newParentHeight] = this.getParentSize() const [newParentWidth, newParentHeight] = this.getParentSize()
...@@ -339,26 +343,29 @@ export default { ...@@ -339,26 +343,29 @@ export default {
this.bottom = this.parentHeight - this.height - this.top this.bottom = this.parentHeight - this.height - this.top
} }
}, },
getParentSize() { getParentSize () {
if (this.parent) { if (this.parent) {
const style = window.getComputedStyle(this.$el.parentNode, null) 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] return [null, null]
}, },
elementTouchDown(e) { elementTouchDown (e) {
eventsFor = events.touch eventsFor = events.touch
this.elementDown(e) this.elementDown(e)
}, },
elementMouseDown(e) { elementMouseDown (e) {
eventsFor = events.mouse eventsFor = events.mouse
this.elementDown(e) this.elementDown(e)
}, },
elementDown(e) { elementDown (e) {
if (e instanceof MouseEvent && e.which !== 1) { if (e instanceof MouseEvent && e.which !== 1) {
return return
} }
...@@ -370,7 +377,10 @@ export default { ...@@ -370,7 +377,10 @@ export default {
return 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 this.dragging = false
return return
...@@ -379,7 +389,7 @@ export default { ...@@ -379,7 +389,7 @@ export default {
if (!this.enabled) { if (!this.enabled) {
this.enabled = true this.enabled = true
this.$emit('activated', this.customId) this.$emit('activated',this.customId)
this.$emit('update:active', true) this.$emit('update:active', true)
} }
...@@ -403,7 +413,7 @@ export default { ...@@ -403,7 +413,7 @@ export default {
addEvent(document.documentElement, eventsFor.stop, this.handleUp) addEvent(document.documentElement, eventsFor.stop, this.handleUp)
} }
}, },
calcDragLimits() { calcDragLimits () {
return { return {
minLeft: this.left % this.grid[0], minLeft: this.left % this.grid[0],
maxLeft: Math.floor((this.parentWidth - this.width - this.left) / this.grid[0]) * this.grid[0] + this.left, maxLeft: Math.floor((this.parentWidth - this.width - this.left) / this.grid[0]) * this.grid[0] + this.left,
...@@ -415,7 +425,7 @@ export default { ...@@ -415,7 +425,7 @@ export default {
maxBottom: Math.floor((this.parentHeight - this.height - this.bottom) / this.grid[1]) * this.grid[1] + this.bottom 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 target = e.target || e.srcElement
const regex = new RegExp(this.className + '-([trmbl]{2})', '') const regex = new RegExp(this.className + '-([trmbl]{2})', '')
...@@ -432,12 +442,12 @@ export default { ...@@ -432,12 +442,12 @@ export default {
this.resetBoundsAndMouseState() this.resetBoundsAndMouseState()
}, },
handleTouchDown(handle, e) { handleTouchDown (handle, e) {
eventsFor = events.touch eventsFor = events.touch
this.handleDown(handle, e) this.handleDown(handle, e)
}, },
handleDown(handle, e) { handleDown (handle, e) {
if (e instanceof MouseEvent && e.which !== 1) { if (e instanceof MouseEvent && e.which !== 1) {
return return
} }
...@@ -470,7 +480,7 @@ export default { ...@@ -470,7 +480,7 @@ export default {
addEvent(document.documentElement, eventsFor.move, this.handleResize) addEvent(document.documentElement, eventsFor.move, this.handleResize)
addEvent(document.documentElement, eventsFor.stop, this.handleUp) addEvent(document.documentElement, eventsFor.stop, this.handleUp)
}, },
calcResizeLimits() { calcResizeLimits () {
let minW = this.minW let minW = this.minW
let minH = this.minH let minH = this.minH
let maxW = this.maxW let maxW = this.maxW
...@@ -562,7 +572,7 @@ export default { ...@@ -562,7 +572,7 @@ export default {
limits.minBottom = -(top + maxH) limits.minBottom = -(top + maxH)
} }
if (this.lockAspectRatio && maxW && maxH) { if (this.lockAspectRatio && (maxW && maxH)) {
limits.minLeft = Math.min(limits.minLeft, -(right + maxW)) limits.minLeft = Math.min(limits.minLeft, -(right + maxW))
limits.minTop = Math.min(limits.minTop, -(maxH + bottom)) limits.minTop = Math.min(limits.minTop, -(maxH + bottom))
limits.minRight = Math.min(limits.minRight, -left - maxW) limits.minRight = Math.min(limits.minRight, -left - maxW)
...@@ -572,14 +582,14 @@ export default { ...@@ -572,14 +582,14 @@ export default {
return limits return limits
}, },
move(e) { move (e) {
if (this.resizing) { if (this.resizing) {
this.handleResize(e) this.handleResize(e)
} else if (this.dragEnable) { } else if (this.dragEnable) {
this.handleDrag(e) this.handleDrag(e)
} }
}, },
handleDrag(e) { handleDrag (e) {
const axis = this.axis const axis = this.axis
const grid = this.grid const grid = this.grid
const bounds = this.bounds const bounds = this.bounds
...@@ -608,7 +618,7 @@ export default { ...@@ -608,7 +618,7 @@ export default {
this.$emit('dragging', this.left, this.top) this.$emit('dragging', this.left, this.top)
this.dragging = true this.dragging = true
}, },
moveHorizontally(val) { moveHorizontally (val) {
// should calculate with scale 1. // should calculate with scale 1.
const [deltaX, _] = snapToGrid(this.grid, val, this.top, 1) const [deltaX, _] = snapToGrid(this.grid, val, this.top, 1)
...@@ -617,7 +627,7 @@ export default { ...@@ -617,7 +627,7 @@ export default {
this.left = left this.left = left
this.right = this.parentWidth - this.width - left this.right = this.parentWidth - this.width - left
}, },
moveVertically(val) { moveVertically (val) {
// should calculate with scale 1. // should calculate with scale 1.
const [_, deltaY] = snapToGrid(this.grid, this.left, val, 1) const [_, deltaY] = snapToGrid(this.grid, this.left, val, 1)
...@@ -626,7 +636,7 @@ export default { ...@@ -626,7 +636,7 @@ export default {
this.top = top this.top = top
this.bottom = this.parentHeight - this.height - top this.bottom = this.parentHeight - this.height - top
}, },
handleResize(e) { handleResize (e) {
let left = this.left let left = this.left
let top = this.top let top = this.top
let right = this.right let right = this.right
...@@ -650,13 +660,21 @@ export default { ...@@ -650,13 +660,21 @@ export default {
const [deltaX, deltaY] = snapToGrid(this.grid, tmpDeltaX, tmpDeltaY, this.scale) const [deltaX, deltaY] = snapToGrid(this.grid, tmpDeltaX, tmpDeltaY, this.scale)
if (this.handle.includes('b')) { 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) { if (this.lockAspectRatio && this.resizingOnY) {
right = this.right - (this.bottom - bottom) * aspectFactor right = this.right - (this.bottom - bottom) * aspectFactor
} }
} else if (this.handle.includes('t')) { } 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) { if (this.lockAspectRatio && this.resizingOnY) {
left = this.left - (this.top - top) * aspectFactor left = this.left - (this.top - top) * aspectFactor
...@@ -664,13 +682,21 @@ export default { ...@@ -664,13 +682,21 @@ export default {
} }
if (this.handle.includes('r')) { 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) { if (this.lockAspectRatio && this.resizingOnX) {
bottom = this.bottom - (this.right - right) / aspectFactor bottom = this.bottom - (this.right - right) / aspectFactor
} }
} else if (this.handle.includes('l')) { } 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) { if (this.lockAspectRatio && this.resizingOnX) {
top = this.top - (this.left - left) / aspectFactor top = this.top - (this.left - left) / aspectFactor
...@@ -691,14 +717,18 @@ export default { ...@@ -691,14 +717,18 @@ export default {
this.width = width this.width = width
this.height = height this.height = height
this.$emit('resizing', e, this.left, this.top, this.width, this.height) this.$emit('resizing', this.left, this.top, this.width, this.height)
this.resizing = true this.resizing = true
}, },
changeWidth(val) { changeWidth (val) {
// should calculate with scale 1. // should calculate with scale 1.
const [newWidth, _] = snapToGrid(this.grid, val, 0, 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 let bottom = this.bottom
if (this.lockAspectRatio) { if (this.lockAspectRatio) {
...@@ -713,11 +743,15 @@ export default { ...@@ -713,11 +743,15 @@ export default {
this.width = width this.width = width
this.height = height this.height = height
}, },
changeHeight(val) { changeHeight (val) {
// should calculate with scale 1. // should calculate with scale 1.
const [_, newHeight] = snapToGrid(this.grid, 0, val, 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 let right = this.right
if (this.lockAspectRatio) { if (this.lockAspectRatio) {
...@@ -732,7 +766,7 @@ export default { ...@@ -732,7 +766,7 @@ export default {
this.width = width this.width = width
this.height = height this.height = height
}, },
handleUp(e) { handleUp (e) {
this.handle = null this.handle = null
this.resetBoundsAndMouseState() this.resetBoundsAndMouseState()
...@@ -754,7 +788,7 @@ export default { ...@@ -754,7 +788,7 @@ export default {
} }
}, },
computed: { computed: {
style() { style () {
return { return {
transform: `translate(${this.left}px, ${this.top}px)`, transform: `translate(${this.left}px, ${this.top}px)`,
width: this.computedWidth, width: this.computedWidth,
...@@ -763,12 +797,12 @@ export default { ...@@ -763,12 +797,12 @@ export default {
...(this.dragging && this.disableUserSelect ? userSelectNone : userSelectAuto) ...(this.dragging && this.disableUserSelect ? userSelectNone : userSelectAuto)
} }
}, },
actualHandles() { actualHandles () {
if (!this.resizable) return [] if (!this.resizable) return []
return this.handles return this.handles
}, },
computedWidth() { computedWidth () {
if (this.w === 'auto') { if (this.w === 'auto') {
if (!this.widthTouched) { if (!this.widthTouched) {
return 'auto' return 'auto'
...@@ -777,7 +811,7 @@ export default { ...@@ -777,7 +811,7 @@ export default {
return this.width + 'px' return this.width + 'px'
}, },
computedHeight() { computedHeight () {
if (this.h === 'auto') { if (this.h === 'auto') {
if (!this.heightTouched) { if (!this.heightTouched) {
return 'auto' return 'auto'
...@@ -786,19 +820,19 @@ export default { ...@@ -786,19 +820,19 @@ export default {
return this.height + 'px' return this.height + 'px'
}, },
resizingOnX() { resizingOnX () {
return Boolean(this.handle) && (this.handle.includes('l') || this.handle.includes('r')) return (Boolean(this.handle) && (this.handle.includes('l') || this.handle.includes('r')))
}, },
resizingOnY() { resizingOnY () {
return Boolean(this.handle) && (this.handle.includes('t') || this.handle.includes('b')) return (Boolean(this.handle) && (this.handle.includes('t') || this.handle.includes('b')))
}, },
isCornerHandle() { isCornerHandle () {
return Boolean(this.handle) && ['tl', 'tr', 'br', 'bl'].includes(this.handle) return (Boolean(this.handle) && ['tl', 'tr', 'br', 'bl'].includes(this.handle))
} }
}, },
watch: { watch: {
active(val) { active (val) {
this.enabled = val this.enabled = val
if (val) { if (val) {
...@@ -807,12 +841,12 @@ export default { ...@@ -807,12 +841,12 @@ export default {
this.$emit('deactivated') this.$emit('deactivated')
} }
}, },
z(val) { z (val) {
if (val >= 0 || val === 'auto') { if (val >= 0 || val === 'auto') {
this.zIndex = val this.zIndex = val
} }
}, },
x(val) { x (val) {
if (this.resizing || this.dragging) { if (this.resizing || this.dragging) {
return return
} }
...@@ -823,7 +857,7 @@ export default { ...@@ -823,7 +857,7 @@ export default {
this.moveHorizontally(val) this.moveHorizontally(val)
}, },
y(val) { y (val) {
if (this.resizing || this.dragging) { if (this.resizing || this.dragging) {
return return
} }
...@@ -834,30 +868,30 @@ export default { ...@@ -834,30 +868,30 @@ export default {
this.moveVertically(val) this.moveVertically(val)
}, },
lockAspectRatio(val) { lockAspectRatio (val) {
if (val) { if (val) {
this.aspectFactor = this.width / this.height this.aspectFactor = this.width / this.height
} else { } else {
this.aspectFactor = undefined this.aspectFactor = undefined
} }
}, },
minWidth(val) { minWidth (val) {
if (val > 0 && val <= this.width) { if (val > 0 && val <= this.width) {
this.minW = val this.minW = val
} }
}, },
minHeight(val) { minHeight (val) {
if (val > 0 && val <= this.height) { if (val > 0 && val <= this.height) {
this.minH = val this.minH = val
} }
}, },
maxWidth(val) { maxWidth (val) {
this.maxW = val this.maxW = val
}, },
maxHeight(val) { maxHeight (val) {
this.maxH = val this.maxH = val
}, },
w(val) { w (val) {
if (this.resizing || this.dragging) { if (this.resizing || this.dragging) {
return return
} }
...@@ -868,7 +902,7 @@ export default { ...@@ -868,7 +902,7 @@ export default {
this.changeWidth(val) this.changeWidth(val)
}, },
h(val) { h (val) {
if (this.resizing || this.dragging) { if (this.resizing || this.dragging) {
return return
} }
......
...@@ -264,21 +264,8 @@ export default { ...@@ -264,21 +264,8 @@ export default {
} }
let htm = target.innerHTML let htm = target.innerHTML
const list = emoji.flat(Infinity) const list = emoji.flat(Infinity)
<<<<<<< HEAD
<<<<<<< HEAD
const cutImg = htm
.replace(/<img src="https:\/\/img01.glsx.com.cn\/weapp\/resource\/saas\/scrm\/emoji\//g, '')
.replace(/<wise.+?(?:<\/wise>)/g, '@昵称')
.replace(/<br>/g, '\n')
const replaceImg = cutImg.replace(/(\d){3}.png">/g, function(str) {
=======
const cutImg = htm.replaceAll('<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/', '').replaceAll('<wise id="1">@昵称</wise>', '@昵称').replaceAll('<br>', '\n') const cutImg = htm.replaceAll('<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/', '').replaceAll('<wise id="1">@昵称</wise>', '@昵称').replaceAll('<br>', '\n')
const replaceImg = cutImg.replace(/(\d){3}.png">/g, function (str) { const replaceImg = cutImg.replace(/(\d){3}.png">/g, function (str) {
>>>>>>> fbad4209013d5b97224e1e78016ca7165eb5df09
=======
const cutImg = htm.replaceAll('<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/', '').replaceAll('<wise id="1">@昵称</wise>', '@昵称').replaceAll('<br>', '\n')
const replaceImg = cutImg.replace(/(\d){3}.png">/g, function (str) {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
let s = list[parseInt(str.split('.')[0]) - 1] let s = list[parseInt(str.split('.')[0]) - 1]
return `[${s}]` return `[${s}]`
}) })
...@@ -311,21 +298,8 @@ export default { ...@@ -311,21 +298,8 @@ export default {
let htm = target.innerHTML let htm = target.innerHTML
console.log(htm) console.log(htm)
const list = emoji.flat(Infinity) const list = emoji.flat(Infinity)
<<<<<<< HEAD
<<<<<<< HEAD
const cutImg = htm
.replace(/<img src="https:\/\/img01.glsx.com.cn\/weapp\/resource\/saas\/scrm\/emoji\//g, '')
.replace(/<wise.+?(?:<\/wise>)/g, '@昵称')
.replace(/<br>/g, '\n')
const replaceImg = cutImg.replace(/(\d){3}.png">/g, function(str) {
=======
const cutImg = htm.replaceAll('<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/', '').replaceAll('<wise id="1">@昵称</wise>', '@昵称').replaceAll('<br>', '\n') const cutImg = htm.replaceAll('<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/', '').replaceAll('<wise id="1">@昵称</wise>', '@昵称').replaceAll('<br>', '\n')
const replaceImg = cutImg.replace(/(\d){3}.png">/g, function (str) { const replaceImg = cutImg.replace(/(\d){3}.png">/g, function (str) {
>>>>>>> fbad4209013d5b97224e1e78016ca7165eb5df09
=======
const cutImg = htm.replaceAll('<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/', '').replaceAll('<wise id="1">@昵称</wise>', '@昵称').replaceAll('<br>', '\n')
const replaceImg = cutImg.replace(/(\d){3}.png">/g, function (str) {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
let s = list[parseInt(str.split('.')[0]) - 1] let s = list[parseInt(str.split('.')[0]) - 1]
return `[${s}]` return `[${s}]`
}) })
...@@ -491,4 +465,4 @@ $textColor: #666; ...@@ -491,4 +465,4 @@ $textColor: #666;
} }
} }
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -51,15 +51,7 @@ ...@@ -51,15 +51,7 @@
<span v-else>{{ item.name }}</span> <span v-else>{{ item.name }}</span>
<input v-if="item.type == 'img'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="welcome-input upload-img" :accept="item.accept || 'image/png, image/jpeg, image/jpg'" @change="e => handleImgChange(e, item)" /> <input v-if="item.type == 'img'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="welcome-input upload-img" :accept="item.accept || 'image/png, image/jpeg, image/jpg'" @change="e => handleImgChange(e, item)" />
<input v-else-if="item.type == 'video'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="welcome-input" :accept="item.accept || 'video/*'" @change="e => handleVideoChange(e, item)" /> <input v-else-if="item.type == 'video'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="welcome-input" :accept="item.accept || 'video/*'" @change="e => handleVideoChange(e, item)" />
<<<<<<< HEAD
<<<<<<< HEAD
<el-link v-else-if="item.type == 'nickname' || item.type == 'acivity' || item.type == 'material'" style="opacity: 0" @click="handleFun(item.funName)">{{ item.name }}</el-link>
=======
<el-link v-else-if="item.type == 'nickname' || item.type == 'acivity'" style="opacity: 0" @click="handleFun(item.funName)">{{ item.name }}</el-link> <el-link v-else-if="item.type == 'nickname' || item.type == 'acivity'" style="opacity: 0" @click="handleFun(item.funName)">{{ item.name }}</el-link>
>>>>>>> fbad4209013d5b97224e1e78016ca7165eb5df09
=======
<el-link v-else-if="item.type == 'nickname' || item.type == 'acivity' || item.type == 'material'" style="opacity: 0" @click="handleFun(item.funName)">{{ item.name }}</el-link>
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
</div> </div>
</div> </div>
</div> </div>
...@@ -71,7 +63,6 @@ ...@@ -71,7 +63,6 @@
</div> </div>
</div> </div>
<ActivityModel ref="activity" @selectActivity="selectActivity"></ActivityModel> <ActivityModel ref="activity" @selectActivity="selectActivity"></ActivityModel>
<!-- <material-model v-if="isMaterialVisible" :isMaterialVisible.sync="isMaterialVisible" @handleMaterialConfirm="handleMaterialConfirm" @handleMaterialClose="handleMaterialClose"></material-model> -->
</div> </div>
</template> </template>
<script> <script>
...@@ -86,14 +77,6 @@ const ATT_TYPE = { ...@@ -86,14 +77,6 @@ const ATT_TYPE = {
} }
import emoji from '@/utils/emo' import emoji from '@/utils/emo'
import ActivityModel from './activityModel' import ActivityModel from './activityModel'
<<<<<<< HEAD
<<<<<<< HEAD
// import materialModel from './materialModel'
=======
>>>>>>> fbad4209013d5b97224e1e78016ca7165eb5df09
=======
// import materialModel from './materialModel'
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
import Emotion from './emotionWords' import Emotion from './emotionWords'
import wTextarea from './tag-textarea' import wTextarea from './tag-textarea'
import { utils } from 'glsx-common' import { utils } from 'glsx-common'
...@@ -101,14 +84,6 @@ export default { ...@@ -101,14 +84,6 @@ export default {
name: 'WelcomeWords', name: 'WelcomeWords',
components: { components: {
ActivityModel, ActivityModel,
<<<<<<< HEAD
<<<<<<< HEAD
// materialModel,
=======
>>>>>>> fbad4209013d5b97224e1e78016ca7165eb5df09
=======
// materialModel,
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
Emotion, Emotion,
wTextarea wTextarea
}, },
...@@ -117,14 +92,6 @@ export default { ...@@ -117,14 +92,6 @@ export default {
return { return {
loading: false, loading: false,
emotionStatus: false, emotionStatus: false,
<<<<<<< HEAD
<<<<<<< HEAD
isMaterialVisible: false,
=======
>>>>>>> fbad4209013d5b97224e1e78016ca7165eb5df09
=======
isMaterialVisible: false,
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
btnList: [ btnList: [
{ {
id: 1, id: 1,
...@@ -146,12 +113,6 @@ export default { ...@@ -146,12 +113,6 @@ export default {
type: 'nickname', type: 'nickname',
funName: 'nickname' funName: 'nickname'
}, },
// {
// id: 5,
// name: '素材',
// type: 'material',
// funName: 'material'
// },
{ {
id: 4, id: 4,
name: '活动', name: '活动',
...@@ -268,33 +229,11 @@ export default { ...@@ -268,33 +229,11 @@ export default {
}) })
} }
}, },
// 素材
handleMaterialConfirm(val) {
console.log(val)
// additionalType 附加对象类型(1素材,2活动,3优惠券,4朋友券模板)
// objectType 对象类型(1朋友圈模板-单图文,2朋友圈模板-多图文,3朋友圈模板-文字+视频,4朋友圈模板-文字,5优惠券-商城券,6活动-权益卡使用,7活动-权益套餐,8活动-秒杀活动,10-素材)
this.editForm.object = JSON.parse(JSON.stringify(val))
this.editRule.eventContent[0].required = true
this.editForm.pushChannelType = ''
this.previewList = [
{
attContent: val,
additionalType: val.additionalType
}
]
this.handleMaterialClose()
},
handleMaterialClose() {
this.isMaterialVisible = !this.isMaterialVisible
},
handleFun(name) { handleFun(name) {
if (name == 'nickname') { if (name == 'nickname') {
this.$refs.textContent.addTag('@昵称') this.$refs.textContent.addTag('@昵称')
} else if (name == 'activity') { } else if (name == 'activity') {
this.$refs.activity.init() this.$refs.activity.init()
} else if (name == 'material') {
this.handleMaterialClose()
} }
}, },
close(index) { close(index) {
...@@ -302,7 +241,6 @@ export default { ...@@ -302,7 +241,6 @@ export default {
this.eventBus.$emit('update', this.previewList) this.eventBus.$emit('update', this.previewList)
}, },
textInput(val) { textInput(val) {
val = val.replace(/&nbsp;/g, '')
const hasText = this.previewList.some(item => item.attType == 1) const hasText = this.previewList.some(item => item.attType == 1)
if (hasText) { if (hasText) {
this.$set(this.previewList, 0, { this.$set(this.previewList, 0, {
...@@ -338,8 +276,6 @@ export default { ...@@ -338,8 +276,6 @@ export default {
} }
} }
}, },
<<<<<<< HEAD
=======
insertHtmlAtCaret(html) { insertHtmlAtCaret(html) {
var sel, range, frag var sel, range, frag
if (window.getSelection) { if (window.getSelection) {
...@@ -368,8 +304,7 @@ export default { ...@@ -368,8 +304,7 @@ export default {
} }
} }
}, },
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981 changeInput: utils.debounce(function () {
changeInput: utils.debounce(function() {
console.log(document.getElementById('editor').childNodes) console.log(document.getElementById('editor').childNodes)
var allNodes = document.getElementById('editor').childNodes var allNodes = document.getElementById('editor').childNodes
var str = '' var str = ''
...@@ -388,17 +323,8 @@ export default { ...@@ -388,17 +323,8 @@ export default {
this.previewList = val this.previewList = val
this.eventBus.$emit('update', this.previewList) this.eventBus.$emit('update', this.previewList)
const obj = val.find(item => item.attType == 1) const obj = val.find(item => item.attType == 1)
<<<<<<< HEAD
let attContent = obj.attContent.replace(/\[@昵称\]/g, '<wise id="1" contenteditable="false">@昵称</wise>')
const htm = attContent.replace(/\[[\u4E00-\u9FA56]{1,4}]/gi, function(res) {
=======
let attContent = obj.attContent.replaceAll('[@昵称]', '<wise id="1">@昵称</wise>') let attContent = obj.attContent.replaceAll('[@昵称]', '<wise id="1">@昵称</wise>')
<<<<<<< HEAD
const htm = attContent.replace(/\[[\u4E00-\u9FA56]{1,4}]/gi, function (res) { const htm = attContent.replace(/\[[\u4E00-\u9FA56]{1,4}]/gi, function (res) {
>>>>>>> fbad4209013d5b97224e1e78016ca7165eb5df09
=======
const htm = attContent.replace(/\[[\u4E00-\u9FA56]{1,4}]/gi, function(res) {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
let word = res.replace(/\[|\]/gi, '') let word = res.replace(/\[|\]/gi, '')
const list = emoji.flat(Infinity) const list = emoji.flat(Infinity)
let index = parseInt(list.indexOf(word)) + 1 let index = parseInt(list.indexOf(word)) + 1
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* @version: * @version:
* @Author: limin * @Author: limin
* @Date: 2021-06-07 14:12:32 * @Date: 2021-06-07 14:12:32
* @LastEditors: 前端 qianduan01@didihu.com.cn * @LastEditors: limin
* @LastEditTime: 2022-10-26 15:54:49 * @LastEditTime: 2021-09-07 14:38:52
*/ */
// 根据环境引入不同配置 process.env.VUE_APP_ENV // 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js') // let request = require('@/http/request.js')
...@@ -17,13 +17,8 @@ export const fetchConfig = function(isEnv = true) { ...@@ -17,13 +17,8 @@ export const fetchConfig = function(isEnv = true) {
Object.assign(request, { timeout }) Object.assign(request, { timeout })
return Promise.resolve(cfg) return Promise.resolve(cfg)
} }
<<<<<<< HEAD return new Http({ request: { timeout: 100000 } }).get('https://oss-config.test.glsx.com.cn/mock/618a32851072f92988f05a17/drainage/config')
// return new Http({ request: { timeout: 100000 } }).get('https://oss-config.test.glsx.com.cn/mock/618a32851072f92988f05a17/drainage/config')
return new Http({ request: { timeout: 100000 } }).get('https://oss-config.dev.glsx.com.cn/mock/618a32851072f92988f05a17/drainage/config')
=======
return new Http({ request: { timeout: 100000 } }).get('https://oss-config.dev.glsx.com.cn/mock/618a32851072f92988f05a17/drainage/config')
// return new Http({ request: { timeout: 100000 } }).get('https://oss-config.dev.glsx.com.cn/mock/618a32851072f92988f05a17/drainage/config') // return new Http({ request: { timeout: 100000 } }).get('https://oss-config.dev.glsx.com.cn/mock/618a32851072f92988f05a17/drainage/config')
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
} }
export const config = { export const config = {
install(vue, cfg) { install(vue, cfg) {
......
const staticRoutes = Object.freeze([ const staticRoutes = Object.freeze([{
{
name: 'channel', name: 'channel',
path: '/channel/index', path: '/channel/index',
component: resolve => require([`@/views/channel/index.vue`], resolve), component: resolve => require([`@/views/channel/index.vue`], resolve),
meta: {} meta: {},
}, }, {
{
name: 'channel', name: 'channel',
path: '/channel/store/:id/:codeUuid/:codeState', path: '/channel/store/:id/:codeUuid/:codeState',
component: resolve => require([`@/views/channel/store.vue`], resolve), component: resolve => require([`@/views/channel/store.vue`], resolve),
meta: {} meta: {}
}, }, {
{
name: 'addCode', name: 'addCode',
path: '/channel/addCode/:id/:codeUuid', path: '/channel/addCode/:id/:codeUuid',
component: resolve => require([`@/views/channel/addCode.vue`], resolve), component: resolve => require([`@/views/channel/addCode.vue`], resolve),
meta: {} meta: {}
}, }, {
{
name: 'poster', name: 'poster',
path: '/channel/poster/:id', path: '/channel/poster/:id',
component: resolve => require([`@/views/channel/poster.vue`], resolve), component: resolve => require([`@/views/channel/poster.vue`], resolve),
meta: {} meta: {}
}, }, {
{
name: 'square', name: 'square',
path: '/square/index', path: '/square/index',
component: resolve => require([`@/views/square/index.vue`], resolve), component: resolve => require([`@/views/square/index.vue`], resolve),
meta: {} meta: {}
}, }, {
{
name: 'import', name: 'import',
path: '/square/import', path: '/square/import',
component: resolve => require([`@/views/square/import.vue`], resolve), component: resolve => require([`@/views/square/import.vue`], resolve),
meta: {} meta: {}
<<<<<<< HEAD
},
{
=======
}, { }, {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
name: 'customDetail', name: 'customDetail',
path: '/square/customDetail', path: '/square/customDetail',
component: resolve => require([`@/views/square/customDetail.vue`], resolve), component: resolve => require([`@/views/square/customDetail.vue`], resolve),
meta: {} meta: {}
<<<<<<< HEAD
},
{
=======
}, { }, {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
name: 'importResult', name: 'importResult',
path: '/square/importResult/:id', path: '/square/importResult/:id',
component: resolve => require([`@/views/square/importResult.vue`], resolve), component: resolve => require([`@/views/square/importResult.vue`], resolve),
meta: {} meta: {}
}, }, {
{
name: 'drainage', name: 'drainage',
path: '/square/drainage', path: '/square/drainage',
component: resolve => require([`@/views/square/drainage.vue`], resolve), component: resolve => require([`@/views/square/drainage.vue`], resolve),
meta: {} meta: {}
}, }, {
{
name: 'market', name: 'market',
path: '/market/index', path: '/market/index',
component: resolve => require([`@/views/market/index.vue`], resolve), component: resolve => require([`@/views/market/index.vue`], resolve),
meta: {} meta: {}
}, }, {
{
name: 'config', name: 'config',
path: '/market/config', path: '/market/config',
component: resolve => require([`@/views/market/config.vue`], resolve), component: resolve => require([`@/views/market/config.vue`], resolve),
meta: {} meta: {}
<<<<<<< HEAD
},
{
=======
}, { }, {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
name: 'configDetail', name: 'configDetail',
path: '/market/configDetail/:id?', path: '/market/configDetail/:id?',
component: resolve => require([`@/views/market/configDetail.vue`], resolve), component: resolve => require([`@/views/market/configDetail.vue`], resolve),
meta: {} meta: {}
<<<<<<< HEAD
},
{
=======
}, { }, {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
name: 'effect', name: 'effect',
path: '/market/effect/:id?', path: '/market/effect/:id?',
component: resolve => require([`@/views/market/effect.vue`], resolve), component: resolve => require([`@/views/market/effect.vue`], resolve),
meta: {} meta: {}
<<<<<<< HEAD
},
{
=======
}, { }, {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
name: 'overview', name: 'overview',
path: '/overview/index', path: '/overview/index',
component: resolve => require([`@/views/overview/index.vue`], resolve), component: resolve => require([`@/views/overview/index.vue`], resolve),
meta: {} meta: {}
}, }, {
{
name: 'friends', name: 'friends',
path: '/friends/index/:id', path: '/friends/index/:id',
component: resolve => require([`@/views/friends/index.vue`], resolve), component: resolve => require([`@/views/friends/index.vue`], resolve),
meta: { permissions: ['新增'] } meta: { permissions: ['新增'] }
} }])
]) export default staticRoutes
export default staticRoutes
\ No newline at end of file \ No newline at end of file
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-08-30 10:21:19
* @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
*/
import Vue from 'vue' import Vue from 'vue'
// import { message } from '@/plugins/element.js' // import { message } from '@/plugins/element.js'
import { fetchConfig } from '@/config' import { fetchConfig } from '@/config'
import ElementUI from 'element-ui' import ElementUI from 'element-ui'
<<<<<<< HEAD
import { GLTable, GLButton, GLFooter, GLCombiForm, GLDialog, GLTableButton, GLTabs } from 'glsx-components' //权限按钮 (根据权限动态创建)
import GLEditor from 'glsx-components/src/packages/Editor' //权限按钮 (根据权限动态创建)
=======
import { GLTable, GLButton, GLFooter, GLCombiForm } from 'glsx-components' //权限按钮 (根据权限动态创建) import { GLTable, GLButton, GLFooter, GLCombiForm } from 'glsx-components' //权限按钮 (根据权限动态创建)
import collectForm from '@/components/collectForm'
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
import GLFull from '@/components/GLFull'
import { getRoutes } from '@/router' import { getRoutes } from '@/router'
import render from './render' import render from './render'
Vue.use(ElementUI) Vue.use(ElementUI)
Vue.use(GLTable) Vue.use(GLTable)
Vue.use(GLFooter) Vue.use(GLFooter)
Vue.use(GLCombiForm) Vue.use(GLCombiForm)
<<<<<<< HEAD
Vue.use(GLDialog)
Vue.use(GLTableButton)
// Vue.use(GLFull)
// import GLTable from '@/components/glsx-table/index'
Vue.component('GLEditor', GLEditor)
Vue.component('GLFull', GLFull)
Vue.component('GLTabs', GLTabs)
=======
Vue.component('GLFull', GLFull)
Vue.component(collectForm.name, collectForm)
// import GLTable from '@/components/glsx-table/index' // import GLTable from '@/components/glsx-table/index'
// Vue.component('GLTable', GLTable) // Vue.component('GLTable', GLTable)
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
// import 'glsx-components/src/theme/theme.scss' // import 'glsx-components/src/theme/theme.scss'
import 'glsx-components/dist/glsx-components.css' import 'glsx-components/dist/glsx-components.css'
import '@/assets/css/common.scss' import '@/assets/css/common.scss'
...@@ -51,10 +23,6 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt ...@@ -51,10 +23,6 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState Vue.prototype.$globalState = globalState
Vue.prototype.$common = common Vue.prototype.$common = common
<<<<<<< HEAD
=======
Vue.prototype.$tracker = common.tracker
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_tag = new common.Http({ response, request: request_tag, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http_tag = new common.Http({ response, request: request_tag, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } }) Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
......
...@@ -17,19 +17,6 @@ const render = (base, routes) => { ...@@ -17,19 +17,6 @@ const render = (base, routes) => {
routes, routes,
mode: 'history' mode: 'history'
}) })
<<<<<<< HEAD
=======
// router.beforeEach((to, from, next) => {
// const pageName = to.meta.title
// Vue.prototype.$tracker.track(
// {
// pageName
// },
// 'pv'
// )
// next()
// })
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
router.afterEach(() => { router.afterEach(() => {
document.querySelector('#app').scrollTop = 0 document.querySelector('#app').scrollTop = 0
}) })
......
...@@ -110,10 +110,6 @@ util.downloadIamge = function(imgsrc, name = new Date().getTime()) { ...@@ -110,10 +110,6 @@ util.downloadIamge = function(imgsrc, name = new Date().getTime()) {
a.href = url // 将生成的URL设置为a.href属性 a.href = url // 将生成的URL设置为a.href属性
a.dispatchEvent(event) // 触发a的单击事件 a.dispatchEvent(event) // 触发a的单击事件
} }
<<<<<<< HEAD
image.src = imgsrc.replace(/https?:/, '')
=======
image.src = imgsrc image.src = imgsrc
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
} }
export default util export default util
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!