Commit fe774b60 by 前端

Merge branch 'v3.0.0' into 'master'

V3.0.0

See merge request !37
2 parents 396e1482 04d55341
Showing 65 changed files with 5818 additions and 436 deletions
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
"core-js": "^3.4.4", "core-js": "^3.4.4",
"el-tree-transfer": "^2.2.6", "el-tree-transfer": "^2.2.6",
"glsx-common": "^1.4.6", "glsx-common": "^1.4.6",
"glsx-components": "^1.4.2", "glsx-components": "^1.3.7",
"glsx-table": "^1.0.9", "glsx-table": "^1.0.9",
"vue-draggable-resizable": "^2.3.0", "vue-draggable-resizable": "^2.3.0",
"vuedraggable": "^2.24.3", "vuedraggable": "^2.24.3",
......
...@@ -17,6 +17,11 @@ export default { ...@@ -17,6 +17,11 @@ export default {
gs: '' gs: ''
} }
}, },
beforeDestroy() {
document.onkeydown = function() {
return true
}
},
created() { created() {
document.onkeydown = function() { document.onkeydown = function() {
var evt = window.event || arguments[0] var evt = window.event || arguments[0]
......
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-10-12 09:30:11
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-10-19 14:07:55
* @FilePath: \scrm-micro-drainage\src\api\modules\businessCard.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
/**
* 新增参数sign 判断接口是否需要sign签名
*/
/**
* 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
* @param {*} params
* @returns
*/
import { http, http_tag } from '@/main'
let session = 'mini-c38a80dd-cf48-4491-8933-fb2eb57fb4ca-rop'
const getBussinessCardListApi = params => {
params.method = 'entmicro.api.business.card.listpage'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const delBussinessCardApi = params => {
params.method = 'entmicro.api.business.card.delete'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const getBussinessCardDetail = params => {
params.method = 'entmicro.api.business.card.cardDetail'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const addBussinessCard = params => {
params.method = 'entmicro.api.business.card.save'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const updateBussinessCard = params => {
params.method = 'entmicro.api.business.card.update'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
// 访问记录
const getaccessToRecordsPage = params => {
params.method = 'entmicro.api.business.cardRecord.page'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
// 智能名片活动跟进
const activityFollow = params => {
params.method = 'entmicro.api.business.card.activity.follow'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
// 分页查询活动申请记录
const activityRecord = params => {
params.method = 'entmicro.api.business.card.activity.record'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
// 智能名片活动申请
const activityApply = params => {
params.method = 'entmicro.api.business.card.activity.apply'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
// 智能名片活动页面访问记录
const pagerecord = params => {
params.method = 'entmicro.api.business.card.activity.pagerecord'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
getBussinessCardListApi,
delBussinessCardApi,
getBussinessCardDetail,
addBussinessCard,
updateBussinessCard,
getaccessToRecordsPage,
activityFollow,
activityRecord,
activityApply,
pagerecord
}
...@@ -31,7 +31,11 @@ const getFollower = params => { ...@@ -31,7 +31,11 @@ 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,
...@@ -40,7 +44,11 @@ const querylabeltree = params => { ...@@ -40,7 +44,11 @@ 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,
......
import { http } from '@/main'
const path = 'entmicro.api.mass.'
const URL = 'rop-scrm-entmicro/router'
//权益卡
const getCard = params => {
params.method = 'scrm.api.equity.open.card.price.list.by.merchantid'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
//权益卡
const merchant = params => {
params.method = 'scrm.api.equity.open.card.price.list.by.merchantid'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
//是否开通权益
const merchantOpen = params => {
params.method = 'scrm.api.equity.service.merchant.config.get'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
//优惠券
const getCoupon = params => {
params.method = 'scrm.api.boutiquecoupon.coupon.page'
return http({
url: '/rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
//套餐
const getPackage = params => {
params.method = 'scrm.api.equity.package.info.list.with.page'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const getMerchant = params => {
params.method = 'scrm.api.coupon.list.merchant'
return http({
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true
})
}
//秒杀活动
const getActivity = params => {
params.method = 'scrm.api.shopmall.activity.page'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取素材组列表
const getGroupListApi = params => {
params.method = 'marketing.api.material.group.list'
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取素材列表
const getMaterialListApi = params => {
// params.method = 'marketing.api.material.page'
params.method = 'marketing.api.material.sop.page'
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//模板列表
const templatePage = params => {
params.method = `${path}template.page.search`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
//模板保存
const templateSave = params => {
params.method = `${path}template.save`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
//模板更新
const templateUpdate = params => {
params.method = `${path}template.update`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
//模板创建人
const createdNameList = params => {
params.method = `${path}template.created.name.list`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
export default {
getCard,
merchant,
getActivity,
getPackage,
getMerchant,
getCoupon,
merchantOpen,
getGroupListApi,
getMaterialListApi,
templatePage,
createdNameList,
templateUpdate,
templateSave
}
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;
......

1.84 KB | W: | H:

2.93 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

1.95 KB | W: | H:

2.91 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
<template> <template>
<<<<<<< HEAD
<div class="full-container" v-bind="$attrs">
=======
<div class="full-container"> <div class="full-container">
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<el-tooltip placement="top" v-if="hoverStatus"> <el-tooltip placement="top" v-if="hoverStatus">
<div slot="content"> <div slot="content">
<template v-if="$slots.default"><slot></slot></template> <template v-if="$slots.default"><slot></slot></template>
...@@ -7,6 +11,18 @@ ...@@ -7,6 +11,18 @@
{{ label }} {{ label }}
</template> </template>
</div> </div>
<<<<<<< HEAD
<div :class="['full-text', identification]" :style="{ 'max-width': labelWidth + 'px' }" v-if="textType != 'text' && !haveClose">
<el-tag type="info" class="full-text" :disable-transitions="false">
<i class="el-icon-user-solid" v-if="textType == 'user'"></i>
<template v-if="$slots.default"><slot></slot></template>
<template v-else>
{{ label }}
</template>
</el-tag>
</div>
<div v-if="textType != 'text' && haveClose">
=======
<div :class="['full-text', identification]" :style="{ width: labelWidth + 'px' }" @mouseenter="hoverFun" v-if="textType != 'text' && !haveClose"> <div :class="['full-text', identification]" :style="{ width: labelWidth + 'px' }" @mouseenter="hoverFun" v-if="textType != 'text' && !haveClose">
<el-tag type="info" class="full-text" :disable-transitions="false"> <el-tag type="info" class="full-text" :disable-transitions="false">
<i class="el-icon-user-solid" v-if="textType == 'user'"></i> <i class="el-icon-user-solid" v-if="textType == 'user'"></i>
...@@ -14,12 +30,17 @@ ...@@ -14,12 +30,17 @@
</el-tag> </el-tag>
</div> </div>
<div v-if="textType != 'text' && haveClose" @mouseenter="hoverFun"> <div v-if="textType != 'text' && haveClose" @mouseenter="hoverFun">
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<el-tag class="tag-user-closable" :style="{ 'max-width': labelWidth + 'px' }" type="info" :disable-transitions="false" closable @close="handleRemove"> <el-tag class="tag-user-closable" :style="{ 'max-width': labelWidth + 'px' }" type="info" :disable-transitions="false" closable @close="handleRemove">
<i class="el-icon-user-solid" v-if="textType == 'user'"></i> <i class="el-icon-user-solid" v-if="textType == 'user'"></i>
<span :class="['full-text-user', { 'user-icon-checked': textType == 'user' && haveClose }, identification]">{{ label }}</span> <span :class="['full-text-user', { 'user-icon-checked': textType == 'user' && haveClose }, identification]">{{ label }}</span>
</el-tag> </el-tag>
</div> </div>
<<<<<<< HEAD
<div :class="[line ? 'full-text-line' : 'full-text', identification]" :style="{ 'max-width': labelWidth + 'px', '-webkit-line-clamp': line }" v-if="textType == 'text'">
=======
<div :class="[line ? 'full-text-line' : 'full-text', identification]" @mouseenter="hoverFun" :style="{ width: labelWidth + 'px', '-webkit-line-clamp': line }" v-if="textType == 'text'"> <div :class="[line ? 'full-text-line' : 'full-text', identification]" @mouseenter="hoverFun" :style="{ width: labelWidth + 'px', '-webkit-line-clamp': line }" v-if="textType == 'text'">
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<template v-if="$slots.default"><slot></slot></template> <template v-if="$slots.default"><slot></slot></template>
<template v-else> <template v-else>
{{ label }} {{ label }}
...@@ -27,10 +48,20 @@ ...@@ -27,10 +48,20 @@
</div> </div>
</el-tooltip> </el-tooltip>
<template v-else> <template v-else>
<<<<<<< HEAD
<div :class="['full-text', identification]" @mouseenter="hoverFun" :style="{ 'max-width': labelWidth + 'px' }" v-if="textType != 'text' && !haveClose">
<el-tag type="info" class="full-text" :disable-transitions="false">
<i class="el-icon-user-solid" v-if="textType == 'user'"></i>
<template v-if="$slots.default"><slot></slot></template>
<template v-else>
{{ label }}
</template>
=======
<div :class="['full-text', identification]" @mouseenter="hoverFun" :style="{ width: labelWidth + 'px' }" v-if="textType != 'text' && !haveClose"> <div :class="['full-text', identification]" @mouseenter="hoverFun" :style="{ width: labelWidth + 'px' }" v-if="textType != 'text' && !haveClose">
<el-tag type="info" class="full-text" :disable-transitions="false"> <el-tag type="info" class="full-text" :disable-transitions="false">
<i class="el-icon-user-solid" v-if="textType == 'user'"></i> <i class="el-icon-user-solid" v-if="textType == 'user'"></i>
{{ label }} {{ label }}
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
</el-tag> </el-tag>
</div> </div>
<div @mouseenter="hoverFun" v-if="textType != 'text' && haveClose"> <div @mouseenter="hoverFun" v-if="textType != 'text' && haveClose">
...@@ -39,7 +70,11 @@ ...@@ -39,7 +70,11 @@
<span :class="['full-text-user', identification]">{{ label }}</span> <span :class="['full-text-user', identification]">{{ label }}</span>
</el-tag> </el-tag>
</div> </div>
<<<<<<< HEAD
<div :class="[line ? 'full-text-line' : 'full-text', identification]" @mouseenter="hoverFun" :style="{ 'max-width': labelWidth + 'px', '-webkit-line-clamp': line }" v-if="textType == 'text'">
=======
<div :class="[line ? 'full-text-line' : 'full-text', identification]" @mouseenter="hoverFun" :style="{ width: labelWidth + 'px', '-webkit-line-clamp': line }" v-if="textType == 'text'"> <div :class="[line ? 'full-text-line' : 'full-text', identification]" @mouseenter="hoverFun" :style="{ width: labelWidth + 'px', '-webkit-line-clamp': line }" v-if="textType == 'text'">
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<template v-if="$slots.default"><slot></slot></template> <template v-if="$slots.default"><slot></slot></template>
<template v-else> <template v-else>
{{ label }} {{ label }}
...@@ -53,7 +88,12 @@ export default { ...@@ -53,7 +88,12 @@ export default {
name: 'GLFull', name: 'GLFull',
data() { data() {
return { return {
<<<<<<< HEAD
hoverStatus: false,
identification: 'text_' + this.identi
=======
hoverStatus: false hoverStatus: false
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
} }
}, },
props: { props: {
...@@ -90,6 +130,14 @@ export default { ...@@ -90,6 +130,14 @@ export default {
default: false default: false
} }
}, },
<<<<<<< HEAD
methods: {
hoverFun() {
if (this.line > 1) {
this.hoverStatus = document.querySelector(`.${this.identification}`).scrollHeight - 10 > document.querySelector(`.${this.identification}`).offsetHeight
return
}
=======
computed: { computed: {
identification() { identification() {
return 'text_' + this.identi return 'text_' + this.identi
...@@ -97,6 +145,7 @@ export default { ...@@ -97,6 +145,7 @@ export default {
}, },
methods: { methods: {
hoverFun() { hoverFun() {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
if (this.haveClose) { if (this.haveClose) {
//this.hoverStatus = this.identi ? document.querySelector(`.${this.identification}`).scrollWidth > document.querySelector(`.${this.identification}`).offsetWidth : document.querySelector(`.full-text`).scrollWidth > this.labelWidth - 30 //this.hoverStatus = this.identi ? document.querySelector(`.${this.identification}`).scrollWidth > document.querySelector(`.${this.identification}`).offsetWidth : document.querySelector(`.full-text`).scrollWidth > this.labelWidth - 30
this.hoverStatus = document.querySelector(`.${this.identification}`).scrollWidth > document.querySelector(`.${this.identification}`).offsetWidth this.hoverStatus = document.querySelector(`.${this.identification}`).scrollWidth > document.querySelector(`.${this.identification}`).offsetWidth
...@@ -105,10 +154,16 @@ export default { ...@@ -105,10 +154,16 @@ export default {
// this.hoverStatus = this.identi ? document.querySelector(`.${this.identification}`).scrollWidth - widthMuti > this.labelWidth : document.querySelector(`.full-text`).scrollWidth > this.labelWidth // this.hoverStatus = this.identi ? document.querySelector(`.${this.identification}`).scrollWidth - widthMuti > this.labelWidth : document.querySelector(`.full-text`).scrollWidth > this.labelWidth
this.hoverStatus = document.querySelector(`.${this.identification}`).scrollWidth - widthMuti > this.labelWidth this.hoverStatus = document.querySelector(`.${this.identification}`).scrollWidth - widthMuti > this.labelWidth
} }
<<<<<<< HEAD
},
handleRemove() {
this.$emit('handleRemove', this.$attrs)
=======
console.log(this.hoverStatus) console.log(this.hoverStatus)
}, },
handleRemove() { handleRemove() {
this.$emit('handleRemove') this.$emit('handleRemove')
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
} }
} }
} }
...@@ -116,10 +171,19 @@ export default { ...@@ -116,10 +171,19 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.full-container { .full-container {
display: inline-block; display: inline-block;
<<<<<<< HEAD
margin-right: 4px;
/deep/ {
.el-tag {
// margin-right: 10px;
line-height: 26px;
height: 26px;
=======
/deep/ { /deep/ {
.el-tag { .el-tag {
height: 26px; height: 26px;
line-height: 26px; line-height: 26px;
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
} }
} }
} }
......
...@@ -26,7 +26,10 @@ export default { ...@@ -26,7 +26,10 @@ 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,
...@@ -19,6 +35,7 @@ ...@@ -19,6 +35,7 @@
@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>
...@@ -121,7 +138,11 @@ export default { ...@@ -121,7 +138,11 @@ 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
} }
...@@ -132,7 +153,11 @@ export default { ...@@ -132,7 +153,11 @@ 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
} }
...@@ -143,22 +168,38 @@ export default { ...@@ -143,22 +168,38 @@ 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,
...@@ -171,12 +212,20 @@ export default { ...@@ -171,12 +212,20 @@ 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
...@@ -193,14 +242,22 @@ export default { ...@@ -193,14 +242,22 @@ 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: {
...@@ -210,7 +267,11 @@ export default { ...@@ -210,7 +267,11 @@ 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
} }
...@@ -236,7 +297,11 @@ export default { ...@@ -236,7 +297,11 @@ export default {
} }
}, },
<<<<<<< HEAD
data: function() {
=======
data: function () { data: function () {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
return { return {
left: this.x, left: this.x,
top: this.y, top: this.y,
...@@ -270,7 +335,11 @@ export default { ...@@ -270,7 +335,11 @@ 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
...@@ -278,7 +347,11 @@ export default { ...@@ -278,7 +347,11 @@ 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
} }
...@@ -307,7 +380,11 @@ export default { ...@@ -307,7 +380,11 @@ 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)
...@@ -319,7 +396,11 @@ export default { ...@@ -319,7 +396,11 @@ 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 = {
...@@ -333,7 +414,11 @@ export default { ...@@ -333,7 +414,11 @@ 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()
...@@ -343,6 +428,13 @@ export default { ...@@ -343,6 +428,13 @@ 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)
...@@ -351,21 +443,34 @@ export default { ...@@ -351,21 +443,34 @@ 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
} }
...@@ -377,10 +482,14 @@ export default { ...@@ -377,10 +482,14 @@ 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
...@@ -389,7 +498,11 @@ export default { ...@@ -389,7 +498,11 @@ 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)
} }
...@@ -413,7 +526,11 @@ export default { ...@@ -413,7 +526,11 @@ 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,
...@@ -425,7 +542,11 @@ export default { ...@@ -425,7 +542,11 @@ 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})', '')
...@@ -442,12 +563,20 @@ export default { ...@@ -442,12 +563,20 @@ 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
} }
...@@ -480,7 +609,11 @@ export default { ...@@ -480,7 +609,11 @@ 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
...@@ -572,7 +705,11 @@ export default { ...@@ -572,7 +705,11 @@ 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)
...@@ -582,14 +719,22 @@ export default { ...@@ -582,14 +719,22 @@ 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
...@@ -618,7 +763,11 @@ export default { ...@@ -618,7 +763,11 @@ 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)
...@@ -627,7 +776,11 @@ export default { ...@@ -627,7 +776,11 @@ 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)
...@@ -636,7 +789,11 @@ export default { ...@@ -636,7 +789,11 @@ 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
...@@ -660,21 +817,29 @@ export default { ...@@ -660,21 +817,29 @@ 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
...@@ -682,21 +847,29 @@ export default { ...@@ -682,21 +847,29 @@ 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
...@@ -720,6 +893,13 @@ export default { ...@@ -720,6 +893,13 @@ 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)
...@@ -729,6 +909,7 @@ export default { ...@@ -729,6 +909,7 @@ 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) {
...@@ -743,6 +924,13 @@ export default { ...@@ -743,6 +924,13 @@ 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)
...@@ -752,6 +940,7 @@ export default { ...@@ -752,6 +940,7 @@ 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) {
...@@ -766,7 +955,11 @@ export default { ...@@ -766,7 +955,11 @@ 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()
...@@ -788,7 +981,11 @@ export default { ...@@ -788,7 +981,11 @@ 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,
...@@ -797,12 +994,20 @@ export default { ...@@ -797,12 +994,20 @@ 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'
...@@ -811,7 +1016,11 @@ export default { ...@@ -811,7 +1016,11 @@ 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'
...@@ -820,6 +1029,16 @@ export default { ...@@ -820,6 +1029,16 @@ 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')))
}, },
...@@ -828,11 +1047,16 @@ export default { ...@@ -828,11 +1047,16 @@ 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) {
...@@ -841,12 +1065,20 @@ export default { ...@@ -841,12 +1065,20 @@ 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
} }
...@@ -857,7 +1089,11 @@ export default { ...@@ -857,7 +1089,11 @@ 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
} }
...@@ -868,23 +1104,44 @@ export default { ...@@ -868,23 +1104,44 @@ 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
}, },
...@@ -892,6 +1149,7 @@ export default { ...@@ -892,6 +1149,7 @@ 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
} }
...@@ -902,7 +1160,11 @@ export default { ...@@ -902,7 +1160,11 @@ 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>
<div class="square-main" v-loading="loading">
<el-dialog title="选择跟进专员" :visible.sync="dialogVisible" width="50%" :before-close="handleClose">
<el-form :inline="true" :model="tableSearchForm">
<el-form-item size="small" label="员工">
<el-input v-model="tableSearchForm.staffName" placeholder="请输入员工姓名"></el-input>
</el-form-item>
<el-form-item size="small" class="emp-form-btn">
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<GLTable :hasNum="false" v-if="dialogVisible" ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch" @selectionTable="selectionTable">
<div slot="options" slot-scope="scope" @change="changeSelect">
<el-radio :label="scope.scope.id" v-model="selectId"></el-radio>
</div>
</GLTable>
<span slot="footer" class="dialog-footer">
<a class="dialog-jump" @click="jumpUrl">新增专员</a>
<el-button size="small" @click="handleCancel">取 消</el-button>
<el-button size="small" type="primary" @click.native="handleSelect">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { utils } from 'glsx-common'
import util from '@/utils/util'
export default {
name: 'selectEmp',
data() {
return {
selectId: '',
loading: false,
dialogVisible: false,
tableSearchForm: {},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableParams: {
listName: 'data',
tableOption: false,
// 行数据的key
mutiSelectUniqueKey: 'id',
tableColumns: [
{
label: '',
prop: '',
addHtml: 'options',
width: 100
},
{
label: '姓名',
prop: 'staffName'
},
{
label: '部门',
prop: 'departmentName'
},
{
label: '跟进专员类型',
prop: 'followerTypeName'
}
]
},
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [],
tableTotal: 0,
selectItem: [],
selectEmp: []
}
},
methods: {
jumpUrl() {
util.openTab(location.origin + '/settings/followUp/index')
},
getFollower() {
var params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum
}
this.$apis.channel.getFollower(params).then(res => {
this.tableData = res.data
this.tableTotal = res.count
})
},
init(item) {
if (item.length == 0) {
this.selectId = ''
}
this.tableSearchForm = {}
this.dialogVisible = true
this.$nextTick(() => {
this.$refs.table.page.pageNum = 1
this.getFollower()
})
},
handleSearch() {
this.getFollower()
},
selectionTable(val) {
this.selectItem = val
},
handleClose() {
this.handleCancel()
},
handleCancel: utils.debounce(function() {
this.dialogVisible = false
}, 300),
changeSelect() {
let list = this.tableData.filter(item => {
return item['id'] == this.selectId
})
this.selectEmp = {
id: list[0].id,
staffName: list[0].staffName
}
},
handleSelect: utils.debounce(function() {
this.loading = true
const { selectEmp } = this
if (selectEmp.length == 0) {
this.$message.error('请选择员工')
return
}
this.loading = false
this.dialogVisible = false
this.$emit('selectTable', [selectEmp])
}, 300)
}
}
</script>
<style lang="scss" scoped>
.emp-form-btn {
margin-left: 20px;
}
.dialog-jump {
color: #5850ff;
float: left;
line-height: 24px;
text-decoration: underline;
cursor: pointer;
}
.square-main {
/deep/ {
.el-radio__label {
display: none;
}
.el-table {
height: 40vh;
overflow-y: auto;
}
.el-table::before {
left: 0;
bottom: 0;
width: 100%;
height: 0px;
}
}
}
</style>
<template>
<div class="square-main" v-loading="loading">
<el-dialog title="客户列表" :visible.sync="dialogVisible" width="70%" :before-close="handleClose">
<el-form :inline="true" :model="tableSearchForm" class="emp-form">
<el-form-item size="small" label="客户名称">
<el-input v-model="tableSearchForm.customerName" placeholder="请输入客户名称"></el-input>
</el-form-item>
<el-form-item size="small" label="状态" v-if="!pStatus">
<el-select v-model="tableSearchForm.status" placeholder="请选择">
<el-option v-for="item in optionstatus" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item size="small" label="跟进员工" v-if="!staffIds">
<el-select v-model="staffId" placeholder="请选择">
<el-option v-for="item in staffName" :key="item.staffId" :label="item.staffName" :value="item.staffId"></el-option>
</el-select>
</el-form-item>
<el-form-item size="small" label="添加时间" v-if="timeStatus">
<el-date-picker :picker-options="pickerOptions" value-format="yyyy-MM-dd" v-model="createTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</el-form-item>
<el-form-item size="small">
<el-button type="primary" @click="handleSearch">查询</el-button>
<el-button type="primary" @click="handleReset">重置</el-button>
</el-form-item>
</el-form>
<!-- <GLCombiForm ref="formSearch" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> -->
<GLTable v-loading="loading" ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch" @selectionTable="selectionTable">
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">详情</el-button>
</div>
<template slot="status" slot-scope="scope">
<div class="status-form" v-if="scope.scope.status" style="color: #eb4e4e">删除好友</div>
<div class="status-form" v-else style="color: #00a854">正常</div>
</template>
<template slot="customerName" slot-scope="scope">
<div class="form-row">
<img :src="scope.scope.avatar" v-if="scope.scope.avatar" />
{{ scope.scope.nickNameList[0].nickName }}
<span style="color: #5850ff">{{ scope.scope.type == 1 ? '@微信' : '@企微' }}</span>
</div>
</template>
</GLTable>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="handleCancel" type="primary">关闭</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { utils } from 'glsx-common'
import util from '@/utils/util'
export default {
name: 'selectEmp',
data() {
return {
loading: false,
dialogVisible: false,
status: '',
createTime: [],
optionstatus: [
{
value: '',
label: '全部'
},
{
value: '0',
label: '正常'
},
{
value: '-1',
label: '删除好友'
}
],
tableSearchForm: {},
searchFormData: [
{
label: '客户名称',
name: 'codeNameAndRemark',
type: 'input',
placeholder: '请输入客户名称'
},
{
label: '状态',
name: 'imStatus',
type: 'select',
placeholder: '请选择',
optionId: 'value',
optionLabel: 'label',
optionList: [
{
value: '',
label: '全部'
},
{
value: '0',
label: '正常'
},
{
value: '-1',
label: '删除好友'
}
]
},
{
label: '跟进员工',
name: 'imStatus',
type: 'select',
placeholder: '请选择',
optionId: 'value',
optionLabel: 'label',
optionList: [
{
value: '',
label: '全部'
},
{
value: '0',
label: '正常'
},
{
value: '-1',
label: '删除好友'
}
]
},
{
label: '添加时间',
name: 'createTime',
type: 'datePicker',
placeholder: '',
isClear: true,
pickerOptions: {
disabledDate: time => {
return time.getTime() > Date.now()
}
}
}
],
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableParams: {
listName: 'data',
tableOption: false,
tableColumns: [
{
label: '客户名称',
prop: 'customerName',
addHtml: 'customerName',
align: 'left'
},
{
label: '客户性别',
prop: 'customerSex',
formatter: cellValue => {
return cellValue.customerSex == 1 ? '男' : '女'
},
minWidth: 100
},
{
label: '状态',
prop: 'status',
addHtml: 'status',
minWidth: 100
},
{
label: '跟进员工',
prop: 'followStaff',
minWidth: 100
},
{
label: '添加时间',
prop: 'addTime'
},
{
label: '操作',
prop: 'optionBtns',
minWidth: '80px',
addHtml: 'optionBtns'
}
]
},
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [],
staffName: [],
tableTotal: 0,
selectItem: [],
selectEmp: [],
pStatus: null,
staffIds: null,
staffId: null
}
},
methods: {
jumpUrl() {
this.$history.push('/home/followUp/index')
},
getFollower() {
var params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum,
custState: this.selectRow.codeState ? this.selectRow.codeState : this.selectRow.state,
staffIds: this.staffId ? [this.staffId] : null
}
if (this.createTime && this.createTime.length > 0) {
params.beginTime = this.createTime[0]
params.endTime = this.createTime[1]
}
if (this.pStatus) {
params.status = 0
}
if (this.staffIds) {
params.staffIds = this.staffIds
}
this.loading = true
this.$apis.channel.getCustomer(params).then(res => {
this.loading = false
this.tableData = res.data
this.tableTotal = res.count
})
},
getChannelCodeStaffList() {
var params = {
pageSize: 1000,
pageNum: 1,
codeState: this.selectRow.codeState ? this.selectRow.codeState : this.selectRow.state
}
this.$apis.channel.getChannelCodeStaffList(params).then(res => {
this.staffName = [{ staffName: '全部', staffId: null }].concat(res.data)
})
},
init(item, value, day) {
this.createTime = []
this.pStatus = null
this.staffIds = null
this.timeStatus = true
if (value == 'day' && !day) {
this.createTime = [util.getDay(0), util.getDay(0)]
this.timeStatus = false
}
if (value == 'day' && day) {
if (day.indexOf('~') == -1) {
this.createTime = [day, day]
} else {
this.createTime = [day.split('~')[0], day.split('~')[1]]
}
this.timeStatus = false
}
if (value == 'status' && !day) {
this.pStatus = 'status'
}
if (value == 'status' && day) {
this.pStatus = 'status'
if (day.indexOf('~') == -1) {
this.createTime = [day, day]
} else {
this.createTime = [day.split('~')[0], day.split('~')[1]]
}
this.timeStatus = false
}
if (value == 'staffIds') {
this.staffIds = item.staffId
}
if (value == 'statusAndStaffIds') {
this.pStatus = 'status'
this.staffIds = item.staffId
}
this.selectRow = item
this.tableSearchForm = {}
this.dialogVisible = true
this.getChannelCodeStaffList()
this.$nextTick(() => {
this.$refs.table.page.pageNum = 1
this.getFollower()
})
},
handleSearch() {
this.getFollower()
},
handleReset() {
this.tableSearchForm = {}
this.getFollower()
},
selectionTable(val) {
this.selectItem = val
},
handleClose() {
this.handleCancel()
},
handleDetail(scope) {
this.$history.push('/custom/clientManage/clientDetail?id=' + scope.oneId)
},
handleCancel: utils.debounce(function() {
this.dialogVisible = false
}, 300)
}
}
</script>
<style lang="scss" scoped>
.dialog-jump {
color: #5850ff;
float: left;
line-height: 24px;
text-decoration: underline;
cursor: pointer;
}
.emp-form {
/deep/ {
.el-date-editor,
.el-input {
width: 212px;
}
}
}
.square-main {
/deep/ {
.el-table {
height: 35vh;
overflow-y: auto;
}
.el-form-item {
margin-right: 20px;
}
.el-table::before {
left: 0;
bottom: 0;
width: 100%;
height: 0px;
}
}
}
.form-row {
img {
width: 50px;
height: 50px;
vertical-align: middle;
}
}
</style>
<template>
<div>
<div id="channel-main" class="chart-line" ref="line" v-show="lineStatus"></div>
<div class="chart-line-empty" v-show="!lineStatus">
<img src="@/assets/img/empty.png" />
<div class="chart-empty-d">暂无数据</div>
</div>
</div>
</template>
<script>
import * as echarts from 'echarts'
export default {
name: 'line',
data() {
return {
lineStatus: true
}
},
props: {
colorList: {
type: Array
}
},
methods: {
init(chartList, codeName) {
if (chartList.length == 0) {
this.lineStatus = false
return
}
let time = chartList[0].trendItemList.map(item => {
return item.dayTime
})
let seriesList = chartList.map((item, index) => {
let newlyQyCount = []
item.trendItemList.forEach(i => {
newlyQyCount.push(i.newlyQyCount)
})
return {
name: codeName[index],
type: 'line',
data: newlyQyCount,
itemStyle: {
normal: {
color: this.colorList[index],
lineStyle: {
color: this.colorList[index]
}
}
}
}
})
echarts.init(document.getElementById('channel-main')).clear()
let chartDom = document.getElementById('channel-main')
let myChart = echarts.init(chartDom)
let option = {
legend: {
left: 'auto',
icon: 'stack',
itemHeight: 2,
itemWidth: 12,
color: this.colorList
},
tooltip: {
trigger: 'axis'
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'category',
boundaryGap: false,
data: time
},
yAxis: {
type: 'value',
minInterval: 1
},
series: seriesList
}
myChart.setOption(option)
let dataList = []
seriesList.forEach(item => {
dataList = dataList.concat(item.data)
})
if (dataList.every(item => item == 0)) {
this.lineStatus = false
} else {
this.lineStatus = true
}
}
}
}
</script>
<style scoped lang="scss">
.chart-line {
height: 300px;
}
.chart-line-empty {
height: 300px;
text-align: center;
color: #666;
img {
margin-top: 100px;
width: 64px;
height: 32px;
margin-bottom: 12px;
}
}
</style>
<template>
<div class="square-main" v-loading="loading">
<el-dialog title="客户列表" :visible.sync="dialogVisible" :before-close="handleClose">
<!-- <GLCombiForm ref="formSearch" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> -->
<GLTable v-loading="loading" ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch" @selectionTable="selectionTable"></GLTable>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="handleCancel" type="primary">关闭</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { utils } from 'glsx-common'
import util from '@/utils/util'
export default {
name: 'selectEmp',
data() {
return {
loading: false,
dialogVisible: false,
status: '',
createTime: [],
optionstatus: [
{
value: '',
label: '全部'
},
{
value: '0',
label: '正常'
},
{
value: '-1',
label: '删除好友'
}
],
tableSearchForm: {},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableParams: {
listName: 'data',
tableOption: false,
tableColumns: [
{
label: '访问页面',
prop: 'addTime'
},
{
label: '访问时间',
prop: 'addTime'
}
]
},
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [],
staffName: [],
tableTotal: 0,
selectItem: [],
selectEmp: [],
pStatus: null,
staffIds: null,
staffId: null
}
},
methods: {
getFollower() {
var params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum,
custState: this.selectRow.codeState,
staffIds: this.staffId ? [this.staffId] : null
}
if (this.createTime && this.createTime.length > 0) {
params.beginTime = this.createTime[0]
params.endTime = this.createTime[1]
}
if (this.pStatus) {
params.status = 0
}
if (this.staffIds) {
params.staffIds = this.staffIds
}
this.loading = true
this.$apis.channel.getCustomer(params).then(res => {
this.loading = false
this.tableData = res.data
this.tableTotal = res.count
})
},
getChannelCodeStaffList() {
var params = {
pageSize: 1000,
pageNum: 1,
codeState: this.selectRow.codeState
}
this.$apis.channel.getChannelCodeStaffList(params).then(res => {
this.staffName = [{ staffName: '全部', staffId: null }].concat(res.data)
})
},
init(item, value, day) {
this.createTime = []
this.pStatus = null
this.staffIds = null
this.timeStatus = true
if (value == 'day' && !day) {
this.createTime = [util.getDay(0), util.getDay(0)]
this.timeStatus = false
}
if (value == 'day' && day) {
if (day.indexOf('~') == -1) {
this.createTime = [day, day]
} else {
this.createTime = [day.split('~')[0], day.split('~')[1]]
}
this.timeStatus = false
}
if (value == 'status' && !day) {
this.pStatus = 'status'
}
if (value == 'status' && day) {
this.pStatus = 'status'
if (day.indexOf('~') == -1) {
this.createTime = [day, day]
} else {
this.createTime = [day.split('~')[0], day.split('~')[1]]
}
this.timeStatus = false
}
if (value == 'staffIds') {
this.staffIds = item.staffId
}
if (value == 'statusAndStaffIds') {
this.pStatus = 'status'
this.staffIds = item.staffId
}
this.selectRow = item
this.tableSearchForm = {}
this.dialogVisible = true
this.getChannelCodeStaffList()
this.$nextTick(() => {
this.$refs.table.page.pageNum = 1
this.getFollower()
})
},
handleSearch() {
this.getFollower()
},
selectionTable(val) {
this.selectItem = val
},
handleClose() {
this.handleCancel()
},
handleDetail(scope) {
this.$history.push('/custom/clientManage/clientDetail?id=' + scope.oneId)
},
handleCancel: utils.debounce(function() {
this.dialogVisible = false
}, 300)
}
}
</script>
<style lang="scss" scoped>
.dialog-jump {
color: #5850ff;
float: left;
line-height: 24px;
text-decoration: underline;
cursor: pointer;
}
.emp-form {
/deep/ {
.el-date-editor,
.el-input {
width: 215px;
}
}
}
.square-main {
/deep/ {
.el-table {
height: 35vh;
overflow-y: auto;
}
.el-form-item {
margin-right: 20px;
}
.el-table::before {
left: 0;
bottom: 0;
width: 100%;
height: 0px;
}
}
}
.form-row {
img {
width: 50px;
height: 50px;
vertical-align: middle;
}
}
</style>
<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>
......
<template>
<div class="square-main">
<GLDialog title="选择渠道" :visible.sync="dialogVisible" @onOk="handleSelect" @onCancel="handleCancel" mode="big">
<div class="square-tabel">
<div class="square-tabel-select">
<GLTable ref="table" :hasPage="false" :tableData="tableData" :tableTotal="tableTotal" :tableParams="tableParams" @refreshTable="handleSearch" @selectionTable="selectionTable"></GLTable>
</div>
<div class="square-tabel-selected">
<div class="selected-title">已选渠道</div>
<div class="selected-panel">
<div class="selected-item" v-for="(item, index) in selectedList" :key="index">
<div :title="item.codeName">
<span :style="{ background: colorList[index] }"></span>
{{ item.codeName }}
</div>
<img src="@/assets/img/channel/del.png" @click="delTag(item)" />
</div>
</div>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="handleCancel">取 消</el-button>
<el-button size="small" type="primary" @click="handleSelect">确 定</el-button>
</span>
</GLDialog>
</div>
</template>
<script>
import { utils } from 'glsx-common'
export default {
name: 'selectEmp',
data() {
return {
dialogVisible: false,
tableSearchForm: {},
tableParams: {
listName: 'data',
tableOption: false,
// 行数据的key
mutiSelectUniqueKey: 'id',
// 多选ref的名称
mutiSelectName: 'salelist',
tableColumns: [
{
label: '渠道名称',
prop: 'codeName'
},
{
label: '备注',
prop: 'codeRemark'
}
]
},
tableData: [],
tableTotal: 0,
selectItem: [],
selectCode: [],
selectedList: []
}
},
props: {
colorList: {
type: Array
}
},
methods: {
getFollower() {
var params = {
pageSize: 1000,
pageNum: 1
}
this.$apis.channel.listChannelCodeByPage(params).then(res => {
console.log(res)
this.tableData = res.data
this.tableTotal = res.count
this.tableData.forEach(item => {
this.selectCode.forEach((itm, index) => {
if (itm.codeState == item.codeState) {
this.$refs.table.$refs.salelistMutiTable.toggleRowSelection(item)
}
})
})
})
},
init(codeId) {
this.selectCode = JSON.parse(JSON.stringify(codeId))
this.selectedList = []
this.dialogVisible = true
this.$nextTick(() => {
this.getFollower()
})
},
handleSearch() {
this.getFollower()
},
selectionTable(val) {
this.selectedList = val
},
delTag(item) {
this.$refs.table.$refs.salelistMutiTable.toggleRowSelection(item)
},
handleCancel() {
this.dialogVisible = false
this.$refs.table.$refs.salelistMutiTable.clearSelection()
},
handleSelect: utils.debounce(function() {
if (this.selectedList.length == 0) {
this.$message.error('请选择渠道')
return
}
if (this.selectedList.length > 8) {
this.$message.error('最多选择8个渠道数据')
return
}
this.dialogVisible = false
this.$emit('selectTable', this.selectedList)
this.$refs.table.$refs.salelistMutiTable.clearSelection()
}, 300)
}
}
</script>
<style lang="scss" scoped>
.square-main {
.square-tabel {
display: flex;
&-select {
flex: 1;
}
&-selected {
width: 320px;
margin-left: 20px;
.selected-title {
background: #f4f6fc;
color: #333333;
line-height: 20px;
padding: 16px 20px;
font-weight: 600;
}
.selected-panel {
padding: 0px 20px;
.selected-item {
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 30px;
display: flex;
align-items: center;
justify-content: space-between;
div {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
span {
vertical-align: middle;
display: inline-block;
width: 12px;
height: 2px;
margin-right: 10px;
}
img {
width: 16px;
height: 16px;
cursor: pointer;
}
}
}
}
}
/deep/ {
.el-table {
height: 50vh;
overflow-y: auto;
}
.el-table::before {
left: 0;
bottom: 0;
width: 100%;
height: 0px;
}
}
}
</style>
...@@ -7,7 +7,11 @@ ...@@ -7,7 +7,11 @@
--> -->
<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">
...@@ -43,7 +47,11 @@ ...@@ -43,7 +47,11 @@
<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>
...@@ -97,7 +105,10 @@ export default { ...@@ -97,7 +105,10 @@ 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">
<el-dialog title="选择跟进专员" :visible.sync="dialogVisible" width="50%" :before-close="handleClose"> <GLDialog title="选择跟进专员" :hasFooter="true" :visible.sync="dialogVisible">
<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>
</el-dialog> </GLDialog>
</div> </div>
</template> </template>
......
<template>
<div class="square-main" v-loading="loading">
<GLDialog title="选择跟进专员" :hasFooter="true" :visible.sync="dialogVisible">
<el-form :inline="true" :model="tableSearchForm">
<el-form-item size="small" label="员工:">
<el-input v-model="tableSearchForm.staffName" placeholder="请输入员工姓名"></el-input>
</el-form-item>
<el-form-item size="small" class="emp-form-btn">
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<GLTable @selection-change="handleSelectionChange" v-if="dialogVisible" ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch" @selectionTable="selectionTable"></GLTable>
<span slot="footer" class="dialog-footer">
<a class="dialog-jump" @click="jumpUrl">新增专员</a>
<el-button size="small" @click="handleCancel">取 消</el-button>
<el-button size="small" type="primary" @click.native="handleSelect">确 定</el-button>
</span>
</GLDialog>
</div>
</template>
<script>
import { utils } from 'glsx-common'
import util from '@/utils/util'
export default {
name: 'selectEmp',
data() {
return {
rareFollowStaff: false,
loading: false,
dialogVisible: false,
tableSearchForm: {},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableParams: {
listName: 'data',
tableOption: false,
// 行数据的key
mutiSelectUniqueKey: 'id',
// 多选ref的名称
mutiSelectName: 'salelist',
tableColumns: [
{
label: '姓名',
prop: 'staffName'
},
{
label: '部门',
prop: 'departmentName'
},
{
label: '跟进专员类型',
prop: 'followerTypeName'
}
]
},
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [],
tableTotal: 0,
selectItem: [],
selectEmp: []
}
},
methods: {
jumpUrl() {
util.openUrl(location.origin + '/settings/followUp/index')
},
handleSelectionChange(val) {
if (val.length > 1) {
this.$refs.table.$refs.salelistMutiTable.clearSelection()
this.$refs.table.$refs.salelistMutiTable.toggleRowSelection(val.pop())
} else {
this.selectItem = val
}
},
getFollower() {
var params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum,
}
this.$apis.channel.getFollower(params).then(res => {
this.tableData = res.data
this.tableTotal = res.count
this.tableData.forEach(item => {
this.selectEmp.forEach((itm, index) => {
if (itm.staffId == item.relationId) {
this.$refs.table.$refs.salelistMutiTable.toggleRowSelection(item)
this.selectEmp.splice(index, 1)
}
})
})
})
},
init(item) {
this.tableSearchForm = {}
this.selectEmp = JSON.parse(JSON.stringify(item))
this.dialogVisible = true
this.$nextTick(() => {
this.$refs.table.page.pageNum = 1
this.getFollower()
})
},
handleSearch() {
this.getFollower()
},
selectionTable(val) {
this.selectItem = val
},
handleClose() {
this.handleCancel()
},
handleCancel: utils.debounce(function() {
this.dialogVisible = false
this.$refs.table.$refs.salelistMutiTable.clearSelection()
}, 300),
handleSelect: utils.debounce(function() {
this.loading = true
let selectEmp = this.selectEmp.map(item => {
return {
relationId: item.staffId,
staffName: item.staffName
}
})
const selectItem = this.selectItem.concat(selectEmp)
if (selectItem.length == 0) {
this.$message.error('请选择员工')
return
}
this.loading = false
this.dialogVisible = false
this.$emit('selectTable', this.selectItem.concat(selectEmp))
this.$refs.table.$refs.salelistMutiTable.clearSelection()
}, 300)
}
}
</script>
<style lang="scss" scoped>
/deep/ .el-table > .el-table__header-wrapper > .el-table__header > thead > tr > th:nth-child(2) > div {
display: none !important;
}
.rareFollowStaff {
position: absolute;
right: 24px;
bottom: 90px;
}
.emp-form-btn {
margin-left: 20px;
}
.dialog-jump {
color: #5850ff;
float: left;
line-height: 24px;
text-decoration: underline;
cursor: pointer;
}
.square-main {
/deep/ {
.el-table {
height: 40vh;
overflow-y: auto;
}
.el-table::before {
left: 0;
bottom: 0;
width: 100%;
height: 0px;
}
}
}
</style>
<template> <template>
<div class="tag-main"> <div class="tag-main">
<el-dialog title="选择标签" :visible.sync="dialogVisible" width="70%" :before-close="handleClose"> <GLDialog bigTitle="选择标签" :hasFooter="true" :visible.sync="dialogVisible" mode="big">
<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>
</el-dialog> </GLDialog>
</div> </div>
</template> </template>
...@@ -216,7 +216,6 @@ export default { ...@@ -216,7 +216,6 @@ export default {
} }
}) })
.filter(item => item) .filter(item => item)
console.log(labelTreeRets)
this.$emit('tagSelected', labelTreeRets) this.$emit('tagSelected', labelTreeRets)
}, },
//全选 //全选
...@@ -355,5 +354,6 @@ export default { ...@@ -355,5 +354,6 @@ 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, {
[classNameDragging]: dragging, [classNameActive]: enabled,
[classNameResizing]: resizing, [classNameDragging]: dragging,
[classNameDraggable]: draggable, [classNameResizing]: resizing,
[classNameResizable]: resizable [classNameDraggable]: draggable,
}, className]" [classNameResizable]: resizable
},
className
]"
@mousedown="elementMouseDown" @mousedown="elementMouseDown"
@touchstart="elementTouchDown" @touchstart="elementTouchDown"
> >
<div <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)">
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>
...@@ -121,7 +117,7 @@ export default { ...@@ -121,7 +117,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
} }
...@@ -132,7 +128,7 @@ export default { ...@@ -132,7 +128,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
} }
...@@ -143,22 +139,22 @@ export default { ...@@ -143,22 +139,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,
...@@ -171,12 +167,12 @@ export default { ...@@ -171,12 +167,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
...@@ -193,14 +189,14 @@ export default { ...@@ -193,14 +189,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: {
...@@ -210,7 +206,7 @@ export default { ...@@ -210,7 +206,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
} }
...@@ -236,7 +232,7 @@ export default { ...@@ -236,7 +232,7 @@ export default {
} }
}, },
data: function () { data: function() {
return { return {
left: this.x, left: this.x,
top: this.y, top: this.y,
...@@ -270,7 +266,7 @@ export default { ...@@ -270,7 +266,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
...@@ -278,7 +274,7 @@ export default { ...@@ -278,7 +274,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
} }
...@@ -307,7 +303,7 @@ export default { ...@@ -307,7 +303,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)
...@@ -319,7 +315,7 @@ export default { ...@@ -319,7 +315,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 = {
...@@ -333,7 +329,7 @@ export default { ...@@ -333,7 +329,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()
...@@ -343,29 +339,26 @@ export default { ...@@ -343,29 +339,26 @@ 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 [ return [parseInt(style.getPropertyValue('width'), 10), parseInt(style.getPropertyValue('height'), 10)]
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
} }
...@@ -377,10 +370,7 @@ export default { ...@@ -377,10 +370,7 @@ export default {
return return
} }
if ( if ((this.dragHandle && !matchesSelectorToParentElements(target, this.dragHandle, this.$el)) || (this.dragCancel && matchesSelectorToParentElements(target, this.dragCancel, this.$el))) {
(this.dragHandle && !matchesSelectorToParentElements(target, this.dragHandle, this.$el)) ||
(this.dragCancel && matchesSelectorToParentElements(target, this.dragCancel, this.$el))
) {
this.dragging = false this.dragging = false
return return
...@@ -389,7 +379,7 @@ export default { ...@@ -389,7 +379,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)
} }
...@@ -413,7 +403,7 @@ export default { ...@@ -413,7 +403,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,
...@@ -425,7 +415,7 @@ export default { ...@@ -425,7 +415,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})', '')
...@@ -442,12 +432,12 @@ export default { ...@@ -442,12 +432,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
} }
...@@ -480,7 +470,7 @@ export default { ...@@ -480,7 +470,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
...@@ -572,7 +562,7 @@ export default { ...@@ -572,7 +562,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)
...@@ -582,14 +572,14 @@ export default { ...@@ -582,14 +572,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
...@@ -618,7 +608,7 @@ export default { ...@@ -618,7 +608,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)
...@@ -627,7 +617,7 @@ export default { ...@@ -627,7 +617,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)
...@@ -636,7 +626,7 @@ export default { ...@@ -636,7 +626,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
...@@ -660,21 +650,13 @@ export default { ...@@ -660,21 +650,13 @@ 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( bottom = restrictToBounds(mouseClickPosition.bottom + deltaY, this.bounds.minBottom, this.bounds.maxBottom)
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( top = restrictToBounds(mouseClickPosition.top - deltaY, this.bounds.minTop, this.bounds.maxTop)
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
...@@ -682,21 +664,13 @@ export default { ...@@ -682,21 +664,13 @@ export default {
} }
if (this.handle.includes('r')) { if (this.handle.includes('r')) {
right = restrictToBounds( right = restrictToBounds(mouseClickPosition.right + deltaX, this.bounds.minRight, this.bounds.maxRight)
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( left = restrictToBounds(mouseClickPosition.left - deltaX, this.bounds.minLeft, this.bounds.maxLeft)
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
...@@ -717,18 +691,14 @@ export default { ...@@ -717,18 +691,14 @@ export default {
this.width = width this.width = width
this.height = height this.height = height
this.$emit('resizing', this.left, this.top, this.width, this.height) this.$emit('resizing', e, this.left, this.top, this.width, this.height)
this.resizing = true 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( let right = restrictToBounds(this.parentWidth - newWidth - this.left, this.bounds.minRight, this.bounds.maxRight)
(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) {
...@@ -743,15 +713,11 @@ export default { ...@@ -743,15 +713,11 @@ 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( let bottom = restrictToBounds(this.parentHeight - newHeight - this.top, this.bounds.minBottom, this.bounds.maxBottom)
(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) {
...@@ -766,7 +732,7 @@ export default { ...@@ -766,7 +732,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()
...@@ -788,7 +754,7 @@ export default { ...@@ -788,7 +754,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,
...@@ -797,12 +763,12 @@ export default { ...@@ -797,12 +763,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'
...@@ -811,7 +777,7 @@ export default { ...@@ -811,7 +777,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'
...@@ -820,19 +786,19 @@ export default { ...@@ -820,19 +786,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) {
...@@ -841,12 +807,12 @@ export default { ...@@ -841,12 +807,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
} }
...@@ -857,7 +823,7 @@ export default { ...@@ -857,7 +823,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
} }
...@@ -868,30 +834,30 @@ export default { ...@@ -868,30 +834,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
} }
...@@ -902,7 +868,7 @@ export default { ...@@ -902,7 +868,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
} }
......
...@@ -295,9 +295,15 @@ export default { ...@@ -295,9 +295,15 @@ export default {
} }
} }
.model-item-panel { .model-item-panel {
<<<<<<< HEAD
display: grid;
grid-template-columns: repeat(4, 25%);
grid-row-gap: 10px;
=======
// display: grid; // display: grid;
// grid-template-columns: repeat(4, 25%); // grid-template-columns: repeat(4, 25%);
// grid-row-gap: 10px; // grid-row-gap: 10px;
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
max-height: 38vh; max-height: 38vh;
overflow: auto; overflow: auto;
display: flex; display: flex;
...@@ -305,8 +311,13 @@ export default { ...@@ -305,8 +311,13 @@ export default {
align-items: stretch; align-items: stretch;
flex-direction: row; flex-direction: row;
.model-item { .model-item {
<<<<<<< HEAD
width: 100%;
// margin-right: 24px;
=======
width: 240px; width: 240px;
margin-right: 24px; margin-right: 24px;
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
margin-bottom: 24px; margin-bottom: 24px;
padding: 12px 16px; padding: 12px 16px;
position: relative; position: relative;
......
...@@ -264,8 +264,21 @@ export default { ...@@ -264,8 +264,21 @@ 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}]`
}) })
...@@ -298,8 +311,21 @@ export default { ...@@ -298,8 +311,21 @@ 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}]`
}) })
...@@ -465,4 +491,4 @@ $textColor: #666; ...@@ -465,4 +491,4 @@ $textColor: #666;
} }
} }
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
...@@ -51,7 +51,15 @@ ...@@ -51,7 +51,15 @@
<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' || 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>
>>>>>>> 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>
...@@ -78,7 +86,14 @@ const ATT_TYPE = { ...@@ -78,7 +86,14 @@ 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' // 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'
...@@ -86,7 +101,14 @@ export default { ...@@ -86,7 +101,14 @@ export default {
name: 'WelcomeWords', name: 'WelcomeWords',
components: { components: {
ActivityModel, ActivityModel,
<<<<<<< HEAD
<<<<<<< HEAD
// materialModel,
=======
>>>>>>> fbad4209013d5b97224e1e78016ca7165eb5df09
=======
// materialModel, // materialModel,
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
Emotion, Emotion,
wTextarea wTextarea
}, },
...@@ -95,7 +117,14 @@ export default { ...@@ -95,7 +117,14 @@ export default {
return { return {
loading: false, loading: false,
emotionStatus: false, emotionStatus: false,
<<<<<<< HEAD
<<<<<<< HEAD
isMaterialVisible: false, isMaterialVisible: false,
=======
>>>>>>> fbad4209013d5b97224e1e78016ca7165eb5df09
=======
isMaterialVisible: false,
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
btnList: [ btnList: [
{ {
id: 1, id: 1,
...@@ -273,6 +302,7 @@ export default { ...@@ -273,6 +302,7 @@ 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, {
...@@ -308,6 +338,8 @@ export default { ...@@ -308,6 +338,8 @@ export default {
} }
} }
}, },
<<<<<<< HEAD
=======
insertHtmlAtCaret(html) { insertHtmlAtCaret(html) {
var sel, range, frag var sel, range, frag
if (window.getSelection) { if (window.getSelection) {
...@@ -336,6 +368,7 @@ export default { ...@@ -336,6 +368,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
...@@ -355,8 +388,17 @@ export default { ...@@ -355,8 +388,17 @@ 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) {
>>>>>>> fbad4209013d5b97224e1e78016ca7165eb5df09
=======
const htm = attContent.replace(/\[[\u4E00-\u9FA56]{1,4}]/gi, function(res) { 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: limin * @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2021-09-07 14:38:52 * @LastEditTime: 2022-10-26 15:54:49
*/ */
// 根据环境引入不同配置 process.env.VUE_APP_ENV // 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js') // let request = require('@/http/request.js')
...@@ -17,8 +17,13 @@ export const fetchConfig = function(isEnv = true) { ...@@ -17,8 +17,13 @@ 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.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') // 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) {
......
export default {
data() {
return {}
},
methods: {
uploadAvatar(e) {
this.uploadFile(e, 'avatar')
},
uploadQrcode(e) {
this.uploadFile(e, 'qrcode')
},
getUploadName(name) {
let nameArr = name.split('.')
let lastName
while (nameArr.length) {
lastName = [nameArr[0]]
nameArr.unshift()
}
},
uploadFile(e, refName, AllImgExt = '.jpg|.jpeg|.gif|.bmp|.png|.swf') {
const file = e.srcElement.files[0]
let extName = file.name.substring(file.name.lastIndexOf('.')).toLowerCase()
if (AllImgExt.indexOf(extName) === -1) {
this.$message.error('上传格式不正确')
return false
}
const reader = new FileReader()
reader.readAsDataURL(file)
reader.onload = event => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(',')
const splitStr = file.name.split('.')
const fileUrl = splitStr[splitStr.length - 1] + '@' + arrBase64[1]
this.$apis.common.pictureUpload({ file: fileUrl }).then(res => {
if (res) {
if (!this.addCodeForm.headerSrc) {
this.addCodeForm.image = res
this.hasImage = true
} else {
this.addCodeForm.headerSrc = res
}
}
this.$refs[refName].value = ''
})
}
}
}
}
const ATT_TYPE = {
TEXT: 1,
IMAGE: 2,
VEDIO: 3,
URL: 4,
MINIPROGRAM: 5,
FILE: 6,
ACTIVITY: 7,
MATERIAL: 10
}
export default {
data() {
return {
btnList: [
{
name: '表情',
funcName: '',
type: 'expression',
limitSize: 10
},
{
name: '图片',
funcName: '',
type: 'img',
// togetherItem: [ATT_TYPE.TEXT], //只允许文本和图片
// limitSize: 10, //限制图片大小
// limitNum: 2, //限制图片数量
// limitWidth: 10000, //限制单张图片宽度
// limitHeight: 10000,//限制单张图片高度
// Isdraggable: true, //图片拖拽
uploadApi: this.$apis.common.pictureUpload
},
{
name: '昵称',
type: 'nickname',
funName: 'nickname'
},
{
name: '活动',
type: 'activity',
funName: 'activity',
funParams: [
{
itemName: '权益卡试用',
itemValue: 3,
itemType: 'card',
getInterfaceApi: this.$apis.welcomeword.getCard,
params: {
tryAble: 1,
merchantId: this.$globalState.session.merchantId
}
},
{
itemName: '权益套餐',
itemValue: 4,
itemType: 'package',
getInterfaceApi: this.$apis.welcomeword.getPackage,
params: {}
},
{
itemName: '商城券',
itemValue: 2,
itemType: 'coupon',
getInterfaceApi: this.$apis.welcomeword.getMerchant,
params: {
discountTypes: [2, 3, 4],
directionalFlag: 1, // 1所有人可用2定向礼包专用3关联优惠券
validType: 'valid'
}
},
{
itemName: '秒杀活动',
itemValue: 5,
itemType: 'activity',
getInterfaceApi: this.$apis.welcomeword.getActivity,
params: {
activityStatus: 2,
currentPage: 1
}
},
{
itemName: '无忧服务',
itemValue: 6,
itemType: 'merchant',
getInterfaceApi: this.$apis.welcomeword.merchant,
merchantOpen: {
merchantOpenApi: this.$apis.welcomeword.merchantOpen,
params: {
merchantId: this.$globalState.session.merchantId
}
},
params: {
merchantId: this.$globalState.session.merchantId
}
}
]
},
{
name: '素材',
type: 'material',
funName: 'material',
groupListApi: this.$apis.welcomeword.getGroupListApi,
materialListApi: this.$apis.welcomeword.getMaterialListApi
// videoNo: true,
// pdfNo: true
}
// {
// name: '模板',
// type: 'message',
// funName: 'message',
// getSearchApi: this.$apis.welcomeword.createdNameList,
// templateApi: this.$apis.welcomeword.templatePage,
// templateUpdateApi: this.$apis.welcomeword.templateUpdate,
// templateSaveApi: this.$apis.welcomeword.templateSave,
// templateDetailApi: this.$apis.welcomeword.templateDetail
// }
]
}
}
}
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
\ No newline at end of file \ No newline at end of file
}
])
export default staticRoutes
/*
* @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' import collectForm from '@/components/collectForm'
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
import GLFull from '@/components/GLFull' import GLFull from '@/components/GLFull'
import { getRoutes } from '@/router' import { getRoutes } from '@/router'
import render from './render' import render from './render'
...@@ -11,10 +24,21 @@ Vue.use(ElementUI) ...@@ -11,10 +24,21 @@ 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('GLFull', GLFull)
Vue.component(collectForm.name, collectForm) 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'
...@@ -27,7 +51,10 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt ...@@ -27,7 +51,10 @@ 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 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,6 +17,8 @@ const render = (base, routes) => { ...@@ -17,6 +17,8 @@ const render = (base, routes) => {
routes, routes,
mode: 'history' mode: 'history'
}) })
<<<<<<< HEAD
=======
// router.beforeEach((to, from, next) => { // router.beforeEach((to, from, next) => {
// const pageName = to.meta.title // const pageName = to.meta.title
// Vue.prototype.$tracker.track( // Vue.prototype.$tracker.track(
...@@ -27,6 +29,7 @@ const render = (base, routes) => { ...@@ -27,6 +29,7 @@ const render = (base, routes) => {
// ) // )
// next() // next()
// }) // })
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
router.afterEach(() => { router.afterEach(() => {
document.querySelector('#app').scrollTop = 0 document.querySelector('#app').scrollTop = 0
}) })
......
...@@ -110,6 +110,10 @@ util.downloadIamge = function(imgsrc, name = new Date().getTime()) { ...@@ -110,6 +110,10 @@ 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
<template>
<div class="scrm-main">
<div class="channel-main scrm-box-f">
<div class="chanel-form-title">基本信息</div>
<div class="chanel-form-box gl-form-page">
<el-form ref="codeForm" :model="addCodeForm" class="code-body-form" label-width="154px" :rules="codeRules">
<el-form-item label="渠道名称:" prop="cardName">
<el-input size="small" v-model.trim="addCodeForm.cardName" placeholder="请输入渠道名称" maxlength="30"></el-input>
</el-form-item>
<el-form-item label="备注:">
<el-input size="small" v-model.trim="addCodeForm.remark" placeholder="请输入备注" maxlength="30"></el-input>
<div class="form-tips">设置备注,便于后续管理查找</div>
</el-form-item>
<div class="el-form-item is-required">
<label for="cardName" class="el-form-item__label" style="width: 154px">选择专员:</label>
<div class="el-form-item__content" style="margin-left: 154px" v-show="staffInfo.length == 0">
<el-button size="small" @click="handleAddEmp">
<i class="el-icon-plus"></i>
选择专员
</el-button>
<div class="el-form-item__error" v-if="staffStatus">请选择专员</div>
</div>
<div class="el-form-item__content " v-if="staffInfo.length !== 0">
<el-tag effect="plain" type="info" v-for="(tag, idx) in staffInfo" :key="idx" closable :disable-transitions="false" @close="removeStaff(idx)">
<i class="el-icon-user-solid rareFollowStaff"></i>
{{ tag.staffName }}
</el-tag>
</div>
</div>
<div class="el-form-item is-required">
<label for="cardName" class="el-form-item__label" style="width: 154px">上传头像:</label>
<div class="el-form-item__content" style="margin-left: 154px">
<div class="upload-panel " v-if="addCodeForm.image" :style="`background-image: url('${addCodeForm.image}')`">
<div class="upload-view">
<i class="el-icon-view" @click="handleEnlarge(addCodeForm.image)"></i>
<i class="el-icon-delete" @click="addCodeForm.image = ''"></i>
</div>
</div>
<div class="upload-panel" v-else>
<i class="el-icon-plus upload-icon"></i>
<div class="upload-text">上传头像</div>
<input type="file" style="opacity: 0" ref="avatar" accept="*" @change="uploadAvatar" />
</div>
<div class="el-form-item__error" v-if="!hasImage">请上传头像</div>
</div>
</div>
<el-form-item label="对外职务:" prop="operation">
<el-input size="small" v-model.trim="addCodeForm.operation" placeholder="请输入对外职务" maxlength="10"></el-input>
</el-form-item>
<el-form-item label="自动通过验证:">
<el-switch v-model="addCodeForm.skipVerify" active-color="#5850FF" inactive-color="#999999"></el-switch>
<span class="form-tips-btn">开启后,客户添加使用人员无需好友验证</span>
</el-form-item>
<el-form-item label="选择标签:">
<el-button size="small" @click="handleAddTag">
<i class="el-icon-plus"></i>
选择标签
</el-button>
<span class="form-tips-btn">
已选择
<span>{{ tagJsonLength }}</span>
个标签
</span>
<div class="el-input-tag input-tag-wrapper" v-show="tagJsonLength">
<template v-if="tagJson && tagJson.length > 0">
<template v-for="(item, index) in tagJson">
<el-tag type="info" v-for="(tag, idx) in item.labelList" :key="idx" closable :disable-transitions="false" @close="removeTag(item, idx, index)">
{{ tag ? tag.name : '' }}
</el-tag>
</template>
</template>
</div>
</el-form-item>
</el-form>
</div>
</div>
<div class="channel-main-welcome scrm-box-f">
<div class="chanel-form-title">欢迎语</div>
<div class="welcome-panel">
<div class="welcome-switch">
<label>自动发送欢迎语</label>
<el-switch v-model="autoWelcome" active-color="#5850FF" inactive-color="#999999"></el-switch>
</div>
<div class="welcome-box" v-show="autoWelcome">
<!-- <welcome-words :eventBus="eventBus" ref="welcome"></welcome-words> -->
<GLEditor ref="welcome" :form="'customer'" :btnList="btnList" @previewWord="previewForm"></GLEditor>
</div>
</div>
</div>
<GLFooter>
<el-button class="cancelBtn" @click="goback">取消</el-button>
<el-button type="primary" @click="handleSave">提交</el-button>
</GLFooter>
<el-dialog class="image-dialog" :visible.sync="dialogVisibleImg" width="50%">
<img :src="dialogSrc" width="100%" />
</el-dialog>
<GLDialog title="提示" @onOk="handleSure" @onCancel="dialogVisible = false" type="warning" content="当前有内容信息未保存,是否继续返回?" :visible.sync="dialogVisible" mode="small"></GLDialog>
<select-emp-radio @selectTable="selectTable" ref="selectEmpForm"></select-emp-radio>
<select-tag ref="selectTagForm" @tagSelected="tagSelected"></select-tag>
</div>
</template>
<script>
import { utils } from 'glsx-common'
// import selectEmpRadio from '@/components/selectEmpRadio'
import selectEmpRadio from '@/components/emp'
import selectTag from '@/components/selectTag'
import word from '@/mixins/word'
import upload from '@/mixins/upload'
export default {
mixins: [word, upload],
name: 'addCode',
components: { selectEmpRadio, selectTag },
data() {
return {
hasImage:true,
dialogSrc:'',
dialogVisibleImg:false,
dialogVisible: false,
addCodeForm: {
cardName: '',
remark: '',
skipVerify: true,
image: ''
},
staffStatus: false,
staffInfo: [],
tagJson: [],
tagJsonLength: 0,
codeId: null,
autoWelcome: true,
editStatus: false,
previewListStart: [],
codeRules: {
cardName: [{ required: true, message: '请输入渠道名称', trigger: 'blur' }],
image: [{ required: true, message: '请上传头像', trigger: 'change' }],
operation: [{ required: true, message: '请输入对外职务', trigger: 'blur' }]
}
}
},
watch: {
tagJson: {
handler() {
this.tagJsonLength = 0
this.tagJson.forEach(item => {
this.tagJsonLength += item.labelList.length
})
this.editStatus = true
},
deep: true
},
addCodeForm: {
handler() {
this.editStatus = true
},
deep: true
},
staffInfo: {
handler() {
this.editStatus = true
},
deep: true
}
},
methods: {
handleEnlarge(src) {
this.dialogVisibleImg = true
this.dialogSrc = src
},
goback() {
// 判断有无编辑内容 无直接返回 有弹框确认是否返回
this.previewListStart.forEach(item => {
this.$refs.welcome.previewList.forEach(itm => {
if (item.attType == itm.attType) {
if (typeof item.attContent != 'object' && item.attContent != itm.attContent) {
this.editStatus = true
}
if (typeof item.attContent == 'object' && item.attContent.marketingName != itm.attContent.marketingName) {
this.editStatus = true
}
}
})
})
if (this.editStatus || (this.$refs.welcome.previewList.length > 0 && !this.codeId)) {
this.dialogVisible = true
} else {
this.$router.back()
}
},
handleSure() {
this.$router.back()
},
removeTag(item, idx, index) {
item.labelList.splice(idx, 1)
if (item.labelList && item.labelList.length == 0) {
this.tagJson.splice(index, 1)
}
},
removeStaff(index) {
this.$refs.selectEmpForm.selectEmp = []
this.staffInfo.splice(index, 1)
},
handleAddEmp() {
this.staffStatus = false
this.$refs.selectEmpForm.init(this.staffInfo)
},
handleAddTag() {
this.$refs.selectTagForm.init(this.tagJson)
},
selectTable(item) {
this.staffInfo = item.map(item => {
return {
staffId: item.id,
staffName: item.staffName
}
})
},
tagSelected(item) {
this.tagJson = item
},
handleSave: utils.debounce(function() {
// 校验是否选择跟进专员
if (this.staffInfo && this.staffInfo.length == 0) {
this.staffStatus = true
return
}
if (this.addCodeForm && !this.addCodeForm.image) {
this.hasImage = false
return
}
this.$refs['codeForm'].validate(valid => {
if (valid) {
let param = Object.assign({ id: this.codeId }, this.addCodeForm)
let tagJson = this.tagJson.map(item => {
let tagIds = item.labelList.map(tag => {
return tag.id
})
let name = item.labelList.map(tag => {
return tag.name
})
return {
groupId: item.labelGroup.id,
tagIds: tagIds.join(','),
name: name.join(','),
labelType: item.labelGroup.name
}
})
param.tagJson = JSON.stringify(tagJson)
param.autoWelcome = this.autoWelcome ? 0 : -1
let staffId = []
this.staffInfo.forEach(item => {
staffId.push(item.staffId)
})
let chooseApi
if (this.codeId) {
chooseApi = 'updateBussinessCard'
} else {
chooseApi = 'addBussinessCard'
}
delete param.staffInfo
param.staffId = staffId.join(',')
param.skipVerify ? (param.skipVerify = 1) : (param.skipVerify = 0)
const previewList = this.$refs.welcome.previewList ? this.$common.utils.deepClone(this.$refs.welcome.previewList) :[]
const attachmentList = previewList.map(item => {
if (item.attType == 1) {
item.attContent = item.attContent.replaceAll('[@昵称]', '@昵称')
item.attContent = item.attContent.replaceAll('@昵称', '[@昵称]')
} else if (item.attType == 7) {
item.attContent = JSON.stringify(item.attContent)
}
return item
})
param.welcomeInfo = attachmentList
this.$apis.businessCard[chooseApi](param).then(res => {
if (res){
this.$router.back()
}
})
}
})
}, 300),
detailBussinessCard(cardId) {
this.$apis.businessCard.getBussinessCardDetail({ cardId }).then(res => {
this.addCodeForm = Object.assign({}, res)
// 自动通过验证
this.addCodeForm.skipVerify = this.addCodeForm.skipVerify == 1 ? true : false
this.staffInfo = [
{
staffId: res.staffId || null,
staffName: res.staffName || ''
}
]
// 选择标签处理
const tagJson = eval(res.tagJson)
const tagJsonList = tagJson.map(item => {
let name = item.name.split(',')
let ids = item.tagIds.split(',')
let labelList = name.map((tag, index) => {
return { id: ids[index], name: tag }
})
return {
labelGroup: {
id: item.groupId,
name: item.labelType
},
labelList
}
})
this.tagJson = tagJsonList
this.autoWelcome = res.autoWelcome == '0' ? true : false
if (res.welcomeList && res.welcomeList.length != 0) {
const previewList = res.welcomeList.map(item => {
if (item.attType == 7) item.attContent = JSON.parse(item.attContent)
return item
})
this.$refs.welcome.updateList(previewList)
}
this.$nextTick(() => {
this.editStatus = false
this.previewListStart = this.$common.utils.deepClone(this.$refs.welcome.previewList)
})
})
}
},
mounted() {
const { id } = this.$route.query
if (id) {
this.codeId = id
this.detailBussinessCard(id)
}
}
}
</script>
<style lang="scss" scoped>
.cancelBtn{
background:none
}
.image-dialog {
/deep/ {
.el-dialog__header {
border-bottom: 0px;
padding: 0px;
}
}
}
.rareFollowStaff {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
.channel-main {
margin-bottom: 16px;
.upload-panel {
cursor: pointer;
width: 104px;
height: 104px;
background: rgba(0, 0, 0, 0.04);
background-size: 100% 100%;
border: 1px solid rgba(0, 0, 0, 0.15);
border-radius: 4px;
text-align: center;
position: relative;
.upload-view {
width: 100%;
height: 100%;
position: absolute;
top: 0px;
left: 0px;
background: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
opacity: 0;
transition: opacity 0.3s;
&:hover {
opacity: 1;
}
i {
color: rgba(255, 255, 255, 0.8);
font-size: 16px;
&:first-child {
margin-right: 5px;
}
}
}
input {
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
cursor: pointer;
}
.upload-icon {
font-size: 20px;
margin-top: 25px;
color: rgba(0, 0, 0, 0.45);
}
.upload-text {
font-size: 14px;
height: 20px;
line-height: 20px;
color: #666666;
}
}
}
.channel-main-welcome {
.welcome-panel {
margin: 20px 10px 10px 10px;
padding: 0px 20px 20px;
.welcome-switch {
margin-bottom: 20px;
label {
margin-right: 10px;
font-size: 14px;
font-weight: 400;
color: #666666;
}
}
.welcome-box {
margin-left: 48px;
/deep/ .content{
width: 64%;
}
}
}
}
.footer-panel {
display: flex;
align-items: center;
justify-content: center;
position: fixed;
bottom: 0px;
height: 64px;
background: #ffffff;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
}
.chanel-form-title {
padding: 20px;
font-size: 16px;
font-weight: 600;
color: #333333;
line-height: 16px;
border-bottom: 1px solid #d8d8d8;
}
.code-body-form {
padding: 20px;
width: 60%;
.form-tips {
font-size: 12px;
font-weight: 400;
color: #999999;
line-height: 20px;
}
.form-tips-btn {
font-size: 14px;
font-weight: 400;
color: #999999;
line-height: 20px;
margin-left: 10px;
> span {
color: #5850ff;
}
}
.input-tag-wrapper {
position: relative;
font-size: 14px;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
box-sizing: border-box;
color: #666;
display: inline-block;
outline: none;
padding: 5px 5px 0px 5px;
max-height: 68px;
overflow: auto;
flex-wrap: wrap;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 450px;
display: flex;
align-items: center;
margin-top: 6px;
font-size: 14px;
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
}
.el-tag {
margin-right: 4px;
height: 26px;
line-height: 24px;
margin-bottom: 5px;
}
}
.channel-main-guidance {
display: flex;
padding: 20px;
box-sizing: border-box;
align-items: center;
margin-bottom: 20px;
.channel-main-guidance-item {
flex: 1;
height: 142px;
background: url('../../assets/img/channel/bg.png'), no-repeat;
padding: 16px 20px;
box-sizing: border-box;
&-head {
display: flex;
align-items: center;
margin-bottom: 8px;
img {
width: 22px;
height: 22px;
margin-right: 10px;
}
}
&-title {
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 22px;
}
&-info {
font-size: 14px;
font-weight: 400;
color: #999999;
line-height: 20px;
}
}
.channel-arrow {
margin: 0 16px;
width: 20px;
height: 15px;
img {
width: 100%;
}
}
}
</style>
<template>
<div class="channel-main scrm-box-f">
<div class="scrm-flex">
<el-radio-group v-model="timeRadio" size="mini" @change="handleTab">
<el-radio-button label="1">昨天</el-radio-button>
<el-radio-button label="2">近1周</el-radio-button>
<el-radio-button label="3">近2周</el-radio-button>
<el-radio-button label="4">近1个月</el-radio-button>
</el-radio-group>
<el-form :inline="true" :model="tableSearchForm" class="follow-form-item" label-width="80px">
<el-form-item size="small" label="访问时间">
<el-date-picker :picker-options="pickerOptions" @change="handleTime" value-format="yyyy-MM-dd" v-model="createTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</el-form-item>
<el-form-item size="small" style="float: right; margin-left: 40px">
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
</div>
<GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch">
<div slot="newlyCount" slot-scope="scope">
<div class="link-dialog" @click="handleEmpDetail(scope.scope, 'day', scope.scope.timeFrame)" v-if="scope.scope.newlyCount">{{ scope.scope.newlyCount }}</div>
<div v-else>0</div>
</div>
<div slot="newlyKeepCount" slot-scope="scope">
<div class="link-dialog" @click="handleEmpDetail(scope.scope, 'status', scope.scope.timeFrame)" v-if="scope.scope.newlyKeepCount">{{ scope.scope.newlyKeepCount }}</div>
<div v-else>0</div>
</div>
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleEmpDetail(scope.scope)">访问记录</el-button>
</div>
</GLTable>
<page-detail ref="empDetailForm"></page-detail>
</div>
</template>
<script>
import pageDetail from '@/components/pageDetail'
export default {
name: 'accountList',
components: {
pageDetail
},
data() {
return {
timeRadio: 1,
trendType: 1,
pickerOptions: {
disabledDate: time => {
return time.getTime() > Date.now()
}
},
channel: [],
createTime: [],
tableSearchForm: {},
tableParams: {
listName: 'data',
tableOption: false,
tableColumns: [
{
label: '微信名称',
prop: 'codeName'
},
{
label: '手机号码',
prop: 'codeName'
},
{
label: '已加企微',
prop: 'newlyCount',
formatter: value => {
return '是'
}
},
{
label: '渠道名称',
prop: 'codeName'
},
{
label: '名片来源',
prop: 'newlyKeepCount',
addHtml: 'newlyKeepCount'
},
{
label: '日期',
prop: 'timeFrame'
},
{
label: '操作',
prop: 'optionBtns',
width: '80px',
addHtml: 'optionBtns',
fixed: 'right'
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [],
tableTotal: 0,
startTime: '',
endTime: '',
selectItem: [],
codeIds: [],
colorList: ['#5850FF', '#2CCA74', '#EB4E4E', '#FF6D00', '#F8C900', '#2CCAC4', '#E74EEB', '#6F2828']
}
},
// watch: {
// createTime(value) {
// if (value) {
// this.startTime = value[0]
// this.endTime = value[1]
// this.timeRadio = null
// this.trendType = null
// } else {
// this.startTime = ''
// this.endTime = ''
// this.timeRadio = 1
// this.trendType = 1
// }
// this.getFollower()
// this.codeSearch()
// }
// },
methods: {
handleTime() {
const value = this.createTime
if (value && value.length > 0) {
this.startTime = value[0]
this.endTime = value[1]
this.timeRadio = null
this.trendType = null
} else {
this.startTime = ''
this.endTime = ''
this.timeRadio = 1
this.trendType = 1
}
this.getFollower()
this.codeSearch()
},
handleTab() {
this.createTime = []
this.trendType = this.timeRadio
this.createTime = ''
this.endTime = ''
this.codeSearch()
this.getFollower()
},
handleSearch() {
this.codeSearch()
},
handleEmpDetail(scope, value, day) {
this.$refs.empDetailForm.init(scope, value, day)
},
codeSearch() {
var params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum,
startTime: this.startTime,
endTime: this.endTime,
trendType: this.trendType
}
this.$apis.overview.codeSearch(params).then(res => {
this.tableData = res.data
this.tableTotal = res.count
})
},
codeTrend() {
let codeIds = this.codeIds.map(item => {
return item.codeState
})
let codeName = this.codeIds.map(item => {
return item.codeName
})
const { trendType, startTime, endTime } = this
let params = {
codeIds,
trendType: trendType ? trendType : null,
startTime,
endTime
}
this.$apis.overview.codeTrend(params).then(res => {
this.$refs.channelLine.init(res, codeName)
})
},
selectTable(value) {
this.codeIds = value.map(item => {
return {
codeState: item.codeState,
codeName: item.codeName,
totalNum: item.totalNum
}
})
this.getFollower()
},
handleChannel() {
this.$refs.channelForm.init(this.codeIds)
},
getFollowerTotal() {
var params = {
pageSize: 1000,
pageNum: 1
}
this.$apis.channel.listChannelCodeByPage(params).then(res => {
console.log(res)
this.tableData = res.data
this.tableTotal = res.count
this.tableData.forEach(item => {
this.selectCode.forEach((itm, index) => {
if (itm.codeState == item.codeState) {
this.$refs.table.$refs.salelistMutiTable.toggleRowSelection(item)
}
})
})
})
},
getFollower() {
let codeState = this.codeIds.map(item => item.codeState)
var params = {
startTime: this.startTime,
endTime: this.endTime,
trendType: this.trendType,
pageSize: 8,
pageNum: 1,
codeState
}
this.$apis.channel.listChannelCodeByPage(params).then(res => {
this.channel = res.data
this.codeIds = this.channel.map(item => {
return {
codeState: item.codeState,
codeName: item.codeName,
totalNum: item.totalNum
}
})
this.codeTrend()
})
}
},
mounted() {
this.codeSearch()
this.getFollower()
}
}
</script>
<style lang="scss" scoped>
.channel-main {
padding: 20px;
/deep/ {
.el-radio-group {
margin-top: 3px;
}
}
}
.link-dialog {
text-decoration: underline;
cursor: pointer;
}
.channel-chart {
display: flex;
.channel-chart-desc {
width: 300px;
min-height: 310px;
padding: 10px;
display: flex;
flex-direction: column;
justify-content: space-between;
margin-bottom: 30px;
.chart-desc-title {
display: flex;
justify-content: space-between;
font-size: 14px;
font-weight: 600;
color: #333333;
line-height: 20px;
.chart-title-time {
color: #5850ff;
}
}
.chart-desc-item {
display: flex;
justify-content: space-between;
font-size: 12px;
font-weight: 400;
color: #666666;
line-height: 17px;
margin-top: 10px;
.chart-item-title {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
span {
vertical-align: middle;
display: inline-block;
width: 12px;
height: 2px;
margin-right: 10px;
}
}
}
.chart-desc-add {
font-size: 12px;
font-weight: 400;
color: #5850ff;
line-height: 17px;
text-align: center;
}
.chart-desc-addNum {
font-size: 12px;
font-weight: 400;
color: #666666;
line-height: 17px;
text-align: center;
}
}
&-box {
flex: 1;
.channel-chart-title {
font-size: 18px;
font-weight: 600;
color: #333333;
line-height: 25px;
}
.channel-chart-container {
margin-top: 20px;
}
}
}
</style>
<template>
<div>
<div class="form-panel scrm-box-f">
<GLCombiForm :rowNumber="1" ref="formSearch" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLTable v-loading="loading" ref="table" @refreshTable="handleSearch" :searchForm="tableSearchForm" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams">
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="accessToRecords(scope.scope)">访问记录</el-button>
</div>
<div slot="visitCont" slot-scope="scope">
<div class="visitCont" @click="visitCisitCont(scope.scope)">{{ scope.scope.visitCont || '--' }}</div>
</div>
<div slot="followType" slot-scope="scope">
<el-switch @change="changeType(scope.scope.activityId, scope.scope.followType)" v-model="scope.scope.followType" :active-value="1" :inactive-value="0"></el-switch>
</div>
<div slot="staffName" slot-scope="scope">
<div class="codeName">{{ scope.scope.staffName }}</div>
<div class="codeRemark" v-if="scope.scope.operation">{{ scope.scope.operation }}</div>
</div>
<div slot="productItems" slot-scope="scope" class="product-panel">
<el-popover trigger="hover" placement="top" v-if="productItem(scope.scope.productItems).length > 2">
<GLFull
:labelWidth="110"
:label="item"
textType="tag"
:identi="
`text_${Math.random()
.toString()
.replace('.', '')}`
"
v-for="(item, index) in productItem(scope.scope.productItems)"
:key="index"
></GLFull>
<div slot="reference" class="name-wrapper">
<div v-for="(item, index) in productItem(scope.scope.productItems)" :key="index" v-show="index < 3">
<template v-if="index == 2 && productItem(scope.scope.productItems).length > 2">
<div class="accountType-row">
<span>{{ '...(' + productItem(scope.scope.productItems).length + ')' }}</span>
</div>
</template>
<GLFull :labelWidth="110" :label="item" textType="tag" v-if="index < 2"></GLFull>
</div>
</div>
</el-popover>
<GLFull
:labelWidth="110"
:label="item"
textType="tag"
:identi="
`text_${Math.random()
.toString()
.replace('.', '')}`
"
v-for="(item, index) in productItem(scope.scope.productItems)"
:key="index"
v-else
></GLFull>
<!-- <div class="product-item" v-for="(item, index) in productItem(scope.scope.productItems)" :key="index">{{ item }}</div> -->
</div>
</GLTable>
</div>
<el-dialog class="recordDialog" title="访问记录" :visible.sync="dialogTableVisible" width="38%" :top="0">
<el-table :data="recordRelationList">
<el-table-column type="index" :index="1" label="序号" width="120"></el-table-column>
<el-table-column property="pageName" label="访问页面" width="220"></el-table-column>
<el-table-column property="createdTime" label="访问时间"></el-table-column>
</el-table>
</el-dialog>
</div>
</template>
<script>
import util from '@/utils/util'
export default {
name: 'activityList',
data() {
return {
dialogTableVisible: false,
dialogVisibleDel: false,
selectItem: '',
loading: false,
tableSearchForm: {
staffName: '',
cardName: '',
followType: ''
},
searchFormData: [
{
label: '申请时间:',
name: 'createTime',
type: 'datePicker',
placeholder: '',
isClear: true,
pickerOptions: {
disabledDate: time => {
return time.getTime() > Date.now()
}
}
},
{
label: '渠道名称',
name: 'cardName',
type: 'input'
},
{
label: '名片来源',
name: 'staffName',
type: 'input'
},
{
label: '是否跟进',
name: 'followType',
type: 'select',
placeholder: '请选择',
optionId: 'value',
optionLabel: 'label',
optionList: [
{
value: '',
label: '全部'
},
{
value: '1',
label: '是'
},
{
value: '0',
label: '否'
}
]
}
],
tableData: [],
// 表格按钮
tableParams: {
listName: 'data',
tableOption: false,
tableColumns: [
{
label: '门店名称',
prop: 'merchantName',
width: '210px'
},
{
label: '主营车型',
prop: 'carModel',
width: '140px'
},
{
label: '联系人',
prop: 'contactName'
},
{
label: '联系电话',
prop: 'contactPhone',
width: '140px'
},
{
label: '渠道',
prop: 'cardName',
width: '140px'
},
{
label: '名片来源',
prop: 'staffName',
width: '130px'
},
{
label: '申请场景',
prop: 'businessScenario',
width: '190px'
},
{
label: '申请活动',
prop: 'productItems',
addHtml: 'productItems',
width: '300px'
},
{
label: '申请时间',
prop: 'createdTime',
width: '190px'
},
{
label: '是否跟进',
prop: 'followType',
width: '190px',
addHtml: 'followType'
},
{
label: '操作',
prop: 'optionBtns',
width: '120px',
addHtml: 'optionBtns',
fixed: 'right'
}
]
},
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableTotal: 0,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
recordRelationList: []
}
},
methods: {
productItem(row) {
return (row && row.split(',')) || []
},
// 查看访问记录弹框
accessToRecords(scope) {
this.dialogTableVisible = true
const { activityId, followType } = scope
this.$apis.businessCard.pagerecord({ activityId, followType }).then(res => {
this.recordRelationList = res
})
},
// 跳转访问量
visitCisitCont(scope) {
const { cardName, visitCont, id: cardId, staffName } = scope
if (!visitCont) return
this.$parent.query = { cardName, cardId, staffName }
this.$parent.activeName = '2'
},
staffNameSplit(name) {
return name ? name.split(',') : ''
},
handleSearch() {
this.activityRecord()
},
handleReset() {
this.tableSearchForm = {}
this.activityRecord()
},
handleAddCode() {
this.$router.push('/businessCard/addCode')
},
downloadIamge(imgsrc) {
util.downloadIamge(imgsrc)
},
changeType(activityId, followType) {
this.$apis.businessCard
.activityFollow({
activityId,
followType
})
.then(res => {
if (res) {
this.$message({
type: 'success',
message: '操作成功!'
})
}
this.handleSearch()
})
this.dialogVisibleDel = false
},
handleDelete(scope) {
this.dialogVisibleDel = true
this.selectItem = scope
},
activityRecord() {
if (this.tableSearchForm.createTime) {
this.tableSearchForm.startApplyDate = new Date(this.tableSearchForm.createTime[0]).toLocaleDateString().replace(/\//g, '/')
this.tableSearchForm.endApplyDate = new Date(this.tableSearchForm.createTime[1]).toLocaleDateString().replace(/\//g, '/')
}
const params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum
}
delete params.createTime
this.loading = true
this.$apis.businessCard.activityRecord(params).then(res => {
this.loading = false
if (res) {
this.tableData = res.data
this.tableTotal = res.count
}
})
}
},
mounted() {
this.activityRecord()
}
}
</script>
<style>
.el-popover {
max-width: 800px;
}
</style>
<style lang="scss" scoped>
.product-item {
line-height: 26px;
padding: 0 8px;
height: 26px;
background: #e9ecf7;
display: inline-block;
margin-bottom: 6px;
}
.product-panel {
/deep/ {
.name-wrapper {
display: flex;
> div {
display: inline-block;
}
}
}
}
.recordDialog {
/deep/.el-dialog {
height: 100vh;
overflow: auto;
margin-right: 0;
margin-bottom: 0;
}
}
.link-dialog {
text-decoration: underline;
cursor: pointer;
}
.visitCont {
cursor: pointer;
color: #5850ff;
}
.popover-panel {
width: 1000px;
}
.form-header {
margin-bottom: 16px;
}
.form-panel {
padding: 20px;
/deep/ .el-popover {
max-width: 1000px;
}
}
.qrCode-popover {
text-align: center;
}
.download-link {
cursor: pointer;
margin-top: 6px;
font-size: 14px;
font-weight: 400;
color: #5850ff;
line-height: 20px;
}
.codeRemark {
font-size: 14px;
font-weight: 400;
color: #999999;
line-height: 20px;
}
.tag-panel {
//margin-bottom: -8px;
.tag-item {
border-radius: 4px;
border: 1px solid #e8e8ea;
display: inline-block;
padding: 4px 6px;
margin-right: 3px;
}
}
.allTagsWrap {
position: relative;
display: -webkit-box;
// max-height: 56px;
overflow: hidden;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
padding-bottom: -2px;
box-sizing: border-box;
// &:hover {
// -webkit-line-clamp: 9999;
// // .tag-box-wrap {
// // margin-bottom: 10px;
// // }
// }
.tag-box-wrap {
display: inline-block;
margin-right: 10px;
// margin-bottom: 2px;
padding: 0 10px;
box-sizing: border-box;
min-width: 76px;
max-width: 200px;
height: 26px;
line-height: 26px;
border-radius: 4px;
border: 1px solid #e8e8ea;
background: #fafbfe;
text-align: center;
font-size: 14px;
font-weight: 400;
color: #666666;
max-width: 245px;
cursor: pointer;
margin-bottom: 3px;
// &:first-child{
// margin-bottom: 4px;
// }
}
// .tag-box-wrap + .tag-box-wrap {
// margin-bottom: 4px;
// }
.expande-button-wrap {
position: absolute;
right: 0;
bottom: 0;
.expande-button {
color: #fafbfe;
cursor: pointer;
i {
height: 8px;
}
span {
height: 20px;
font-size: 14px;
font-weight: 400;
color: #fafbfe;
line-height: 20px;
}
}
}
}
.link-dialog {
label {
color: #5850ff;
}
}
.accountType-row {
text-align: left;
position: relative;
font-size: 14px;
line-height: 14px;
padding-left: 15px;
border-radius: 4px;
border: 1px solid #e8e8ea;
padding: 6px;
display: inline-block;
//margin-bottom: 5px;
margin-right: 5px;
&-tag {
display: inline-block;
border: 1px solid #e8e8ea;
background: #fafbfe;
text-align: center;
font-size: 14px;
font-weight: 400;
color: #666;
max-width: 150px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
i {
color: #75acff;
margin-right: 3px;
}
}
</style>
<template>
<div>
<div class="form-header">
<GLButton type="primary" size="small" icon="el-icon-add" @click="handleAddCode" fn="新建智能名片">
<i class="el-icon-plus"></i>
新建智能名片
</GLButton>
</div>
<div class="form-panel scrm-box-f">
<GLCombiForm :rowNumber="1" ref="formSearch" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLTable v-loading="loading" ref="table" @refreshTable="handleSearch" :searchForm="tableSearchForm" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams">
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
<div slot="joinEntToday" slot-scope="scope">
<div class="link-dialog" @click="handleEmpDetail(scope.scope, 'day')" v-if="scope.scope.joinEntToday">{{ scope.scope.joinEntToday }}</div>
<div v-else>0</div>
</div>
<div slot="joinEntTotal" slot-scope="scope">
<div class="link-dialog" @click="handleEmpDetail(scope.scope)" v-if="scope.scope.joinEntTotal">{{ scope.scope.joinEntTotal }}</div>
<div v-else>0</div>
</div>
<div slot="visitCont" slot-scope="scope">
<div class="visitCont" @click="visitCisitCont(scope.scope)">{{ scope.scope.visitCont || '--' }}</div>
</div>
<div slot="qrCode" slot-scope="scope">
<el-popover placement="bottom" width="400" trigger="hover">
<div class="qrCode-popover">
<img :src="scope.scope.miniprogramCode" style="width: 360px; height: 360px" />
<div class="download-link" @click="downloadIamge(scope.scope.miniprogramCode)">下载二维码</div>
</div>
<img :src="scope.scope.miniprogramCode" style="width: 36px; height: 36px" slot="reference" />
</el-popover>
</div>
<div slot="tagJson" slot-scope="scope" class="tag-panel">
<el-popover trigger="hover" placement="top" v-if="JSON.parse(scope.scope.tagJson) && JSON.parse(scope.scope.tagJson).length > 3">
<GLTitle :content="item.name" class="accountType-row accountType-row-tag" v-for="(item, index) in JSON.parse(scope.scope.tagJson)" :key="index"></GLTitle>
<div slot="reference" class="name-wrapper" style="display:flex">
<div style="display:flex" v-for="(item, index) in JSON.parse(scope.scope.tagJson)" :key="index" v-show="index < 4">
<div :title="item.name" class="accountType-row accountType-row-tag" v-if="index == 3 && JSON.parse(scope.scope.tagJson).length > 3">{{ '...(' + JSON.parse(scope.scope.tagJson).length + ')' }}</div>
<GLTitle :content="item.name" class="accountType-row accountType-row-tag" v-else></GLTitle>
</div>
</div>
</el-popover>
<div style="display:flex">
<template v-if="JSON.parse(scope.scope.tagJson) && JSON.parse(scope.scope.tagJson).length <= 3 && JSON.parse(scope.scope.tagJson).length > 0">
<div style="display:flex" v-for="(item, index) in JSON.parse(scope.scope.tagJson)" :key="index">
<GLTitle :content="item.name" class="accountType-row accountType-row-tag"></GLTitle>
</div>
</template>
</div>
<div v-if="!JSON.parse(scope.scope.tagJson) || (JSON.parse(scope.scope.tagJson) && JSON.parse(scope.scope.tagJson).length == 0)">--</div>
</div>
<div slot="cardName" slot-scope="scope">
<div class="codeName">{{ scope.scope.cardName }}</div>
<div class="codeRemark" v-if="scope.scope.remark">备注:{{ scope.scope.remark }}</div>
</div>
<div slot="staffName" slot-scope="scope">
<div class="codeName">{{ scope.scope.staffName }}</div>
<div class="codeRemark" v-if="scope.scope.operation">{{ scope.scope.operation }}</div>
</div>
</GLTable>
</div>
<GLDialog title="提示" @onOk="handleSure" @onCancel="dialogVisibleDel = false" type="error" content="删除该智能名片将失去该名片统计数据,是否删除?" :visible.sync="dialogVisibleDel" mode="small"></GLDialog>
<emp-detail ref="empDetailForm"></emp-detail>
</div>
</template>
<script>
import util from '@/utils/util'
import empDetail from '@/components/empDetail'
export default {
name: 'cardList',
components: { empDetail },
data() {
return {
dialogVisibleDel: false,
selectItem: '',
loading: false,
tableSearchForm: {
staffName: '',
cardName: ''
},
searchFormData: [
{
label: '员工',
name: 'staffName',
type: 'input',
placeholder: '请输入员工姓名'
},
{
label: '渠道名称',
name: 'cardName',
type: 'input',
placeholder: '请输入渠道名称'
}
],
tableData: [],
// 表格按钮
tableButtonList: [
{
type: 'GLButton',
name: '编辑',
attrs: {
type: 'text',
fn: '编辑智能名片'
},
listeners: {
click: this.handleEdit
}
},
{
type: 'GLButton',
name: '删除',
attrs: {
type: 'text',
fn: '删除智能名片'
},
listeners: {
click: this.handleDelete
}
}
],
tableParams: {
listName: 'data',
tableOption: false,
tableColumns: [
{
label: '渠道名称',
prop: 'cardName',
width: '210px',
addHtml: 'cardName'
},
{
label: '员工',
prop: 'staffName',
width: '140px',
addHtml: 'staffName'
},
{
label: '手机号',
prop: 'staffPhone',
width: '160px'
},
{
label: '访问量',
prop: 'visitCont',
width: '140px',
addHtml: 'visitCont'
},
{
label: '今日新增客户',
prop: 'joinEntToday',
width: '140px',
addHtml: 'joinEntToday'
},
{
label: '总新增客户',
prop: 'joinEntTotal',
width: '130px',
addHtml: 'joinEntTotal'
},
{
label: '名片地址',
prop: 'miniprogramCode',
addHtml: 'qrCode',
width: '136px'
},
{
label: '标签',
prop: 'tagJson',
addHtml: 'tagJson',
width: '400px'
},
{
label: '创建时间',
prop: 'createdTime',
width: '190px'
},
{
label: '操作',
prop: 'optionBtns',
width: '120px',
addHtml: 'optionBtns',
fixed: 'right'
}
]
},
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableTotal: 0,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' }
}
},
methods: {
//员工详情
handleEmpDetail(scope, status) {
this.$refs.empDetailForm.init(scope, status)
},
// 跳转访问量
visitCisitCont(scope) {
const { cardName, visitCont, id: cardId, staffName } = scope
if (!visitCont) return
this.$parent.query = { cardName, cardId, staffName }
this.$parent.activeName = '2'
},
staffNameSplit(name) {
return name ? name.split(',') : ''
},
handleEdit(scope) {
this.$router.push({
path: '/businessCard/addCode',
query: {
id: scope.id
}
})
},
handleSearch() {
this.listBussinessCardByPage()
},
handleReset() {
this.tableSearchForm = {}
this.listBussinessCardByPage()
},
handleAddCode() {
this.$router.push('/businessCard/addCode')
},
downloadIamge(imgsrc) {
util.downloadIamge(imgsrc)
},
handleSure() {
const { id: cardId } = this.selectItem
this.$apis.businessCard
.delBussinessCardApi({
cardId
})
.then(res => {
if (res) {
this.$message({
type: 'success',
message: '删除成功!'
})
}
this.handleSearch()
})
this.dialogVisibleDel = false
},
handleDelete(scope) {
this.dialogVisibleDel = true
this.selectItem = scope
},
listBussinessCardByPage() {
const params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum
}
this.loading = true
this.$apis.businessCard.getBussinessCardListApi(params).then(res => {
this.loading = false
if (res) {
this.tableData = res.data
this.tableTotal = res.count
}
})
}
},
mounted() {
this.listBussinessCardByPage()
}
}
</script>
<style>
.el-popover {
max-width: 800px;
}
</style>
<style lang="scss" scoped>
.link-dialog {
text-decoration: underline;
cursor: pointer;
}
.visitCont {
cursor: pointer;
color: #5850ff;
}
.popover-panel {
width: 1000px;
}
.form-header {
margin-bottom: 16px;
}
.form-panel {
padding: 20px;
/deep/ .el-popover {
max-width: 1000px;
}
}
.qrCode-popover {
text-align: center;
}
.download-link {
cursor: pointer;
margin-top: 6px;
font-size: 14px;
font-weight: 400;
color: #5850ff;
line-height: 20px;
}
.codeRemark {
font-size: 14px;
font-weight: 400;
color: #999999;
line-height: 20px;
}
.tag-panel {
//margin-bottom: -8px;
.tag-item {
border-radius: 4px;
border: 1px solid #e8e8ea;
display: inline-block;
padding: 4px 6px;
margin-right: 3px;
}
}
.allTagsWrap {
position: relative;
display: -webkit-box;
// max-height: 56px;
overflow: hidden;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
padding-bottom: -2px;
box-sizing: border-box;
// &:hover {
// -webkit-line-clamp: 9999;
// // .tag-box-wrap {
// // margin-bottom: 10px;
// // }
// }
.tag-box-wrap {
display: inline-block;
margin-right: 10px;
// margin-bottom: 2px;
padding: 0 10px;
box-sizing: border-box;
min-width: 76px;
max-width: 200px;
height: 26px;
line-height: 26px;
border-radius: 4px;
border: 1px solid #e8e8ea;
background: #fafbfe;
text-align: center;
font-size: 14px;
font-weight: 400;
color: #666666;
max-width: 245px;
cursor: pointer;
margin-bottom: 3px;
// &:first-child{
// margin-bottom: 4px;
// }
}
// .tag-box-wrap + .tag-box-wrap {
// margin-bottom: 4px;
// }
.expande-button-wrap {
position: absolute;
right: 0;
bottom: 0;
.expande-button {
color: #fafbfe;
cursor: pointer;
i {
height: 8px;
}
span {
height: 20px;
font-size: 14px;
font-weight: 400;
color: #fafbfe;
line-height: 20px;
}
}
}
}
.link-dialog {
label {
color: #5850ff;
}
}
.accountType-row {
text-align: left;
position: relative;
font-size: 14px;
line-height: 14px;
padding-left: 15px;
border-radius: 4px;
border: 1px solid #e8e8ea;
padding: 6px;
display: inline-block;
//margin-bottom: 5px;
margin-right: 5px;
&-tag {
display: inline-block;
border: 1px solid #e8e8ea;
background: #fafbfe;
text-align: center;
font-size: 14px;
font-weight: 400;
color: #666;
max-width: 150px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
i {
color: #75acff;
margin-right: 3px;
}
}
</style>
import Vue from 'vue'
const componentsFiles = require.context(`./`, true, /.vue$/)
componentsFiles.keys().forEach(path => {
const component = componentsFiles(path).default
Vue.component(component.name, component)
})
<template>
<div class="channel-main scrm-box-f">
<div class="scrm-flex">
<el-radio-group v-model="timeRadio" size="mini" @change="handleTab">
<el-radio-button label="1">昨天</el-radio-button>
<el-radio-button label="2">近1周</el-radio-button>
<el-radio-button label="3">近2周</el-radio-button>
<el-radio-button label="4">近1个月</el-radio-button>
</el-radio-group>
<el-form :inline="true" :model="tableSearchForm" class="follow-form-item" label-width="80px">
<el-form-item size="small" label="访问时间">
<el-date-picker :picker-options="pickerOptions" @change="handleTime" value-format="yyyy-MM-dd" v-model="createTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</el-form-item>
<el-form-item size="small" label="渠道名称">
<el-input size="small" v-model="tableSearchForm.keyWord" placeholder="请输入渠道名称"></el-input>
</el-form-item>
<el-form-item size="small" style="float: right; margin-left: 40px">
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
</div>
<GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch">
<div slot="newlyCount" slot-scope="scope">
<div class="link-dialog" @click="handleEmpDetail(scope.scope, 'day', scope.scope.timeFrame)" v-if="scope.scope.newlyCount">{{ scope.scope.newlyCount }}</div>
<div v-else>0</div>
</div>
<div slot="newlyKeepCount" slot-scope="scope">
<div class="link-dialog" @click="handleEmpDetail(scope.scope, 'status', scope.scope.timeFrame)" v-if="scope.scope.newlyKeepCount">{{ scope.scope.newlyKeepCount }}</div>
<div v-else>0</div>
</div>
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleEmpDetail(scope.scope)">访问记录</el-button>
</div>
</GLTable>
<page-detail ref="empDetailForm"></page-detail>
</div>
</template>
<script>
import pageDetail from '@/components/pageDetail'
export default {
name: 'proxyList',
components: {
pageDetail
},
data() {
return {
timeRadio: 1,
trendType: 1,
pickerOptions: {
disabledDate: time => {
return time.getTime() > Date.now()
}
},
channel: [],
createTime: [],
tableSearchForm: {},
tableParams: {
listName: 'data',
tableOption: false,
tableColumns: [
{
label: '微信名称',
prop: 'codeName'
},
{
label: '手机号码',
prop: 'codeName'
},
{
label: '已加企微',
prop: 'newlyCount',
formatter: value => {
return '是'
}
},
{
label: '渠道名称',
prop: 'codeName'
},
{
label: '名片来源',
prop: 'newlyKeepCount',
addHtml: 'newlyKeepCount'
},
{
label: '日期',
prop: 'timeFrame'
},
{
label: '操作',
prop: 'optionBtns',
width: '80px',
addHtml: 'optionBtns',
fixed: 'right'
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [],
tableTotal: 0,
startTime: '',
endTime: '',
selectItem: [],
codeIds: [],
colorList: ['#5850FF', '#2CCA74', '#EB4E4E', '#FF6D00', '#F8C900', '#2CCAC4', '#E74EEB', '#6F2828']
}
},
// watch: {
// createTime(value) {
// if (value) {
// this.startTime = value[0]
// this.endTime = value[1]
// this.timeRadio = null
// this.trendType = null
// } else {
// this.startTime = ''
// this.endTime = ''
// this.timeRadio = 1
// this.trendType = 1
// }
// this.getFollower()
// this.codeSearch()
// }
// },
methods: {
handleTime() {
const value = this.createTime
if (value && value.length > 0) {
this.startTime = value[0]
this.endTime = value[1]
this.timeRadio = null
this.trendType = null
} else {
this.startTime = ''
this.endTime = ''
this.timeRadio = 1
this.trendType = 1
}
this.getFollower()
this.codeSearch()
},
handleTab() {
this.createTime = []
this.trendType = this.timeRadio
this.createTime = ''
this.endTime = ''
this.codeSearch()
this.getFollower()
},
handleSearch() {
this.codeSearch()
},
handleEmpDetail(scope, value, day) {
this.$refs.empDetailForm.init(scope, value, day)
},
codeSearch() {
var params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum,
startTime: this.startTime,
endTime: this.endTime,
trendType: this.trendType
}
this.$apis.overview.codeSearch(params).then(res => {
this.tableData = res.data
this.tableTotal = res.count
})
},
codeTrend() {
let codeIds = this.codeIds.map(item => {
return item.codeState
})
let codeName = this.codeIds.map(item => {
return item.codeName
})
const { trendType, startTime, endTime } = this
let params = {
codeIds,
trendType: trendType ? trendType : null,
startTime,
endTime
}
this.$apis.overview.codeTrend(params).then(res => {
this.$refs.channelLine.init(res, codeName)
})
},
selectTable(value) {
this.codeIds = value.map(item => {
return {
codeState: item.codeState,
codeName: item.codeName,
totalNum: item.totalNum
}
})
this.getFollower()
},
handleChannel() {
this.$refs.channelForm.init(this.codeIds)
},
getFollowerTotal() {
var params = {
pageSize: 1000,
pageNum: 1
}
this.$apis.channel.listChannelCodeByPage(params).then(res => {
console.log(res)
this.tableData = res.data
this.tableTotal = res.count
this.tableData.forEach(item => {
this.selectCode.forEach((itm, index) => {
if (itm.codeState == item.codeState) {
this.$refs.table.$refs.salelistMutiTable.toggleRowSelection(item)
}
})
})
})
},
getFollower() {
let codeState = this.codeIds.map(item => item.codeState)
var params = {
startTime: this.startTime,
endTime: this.endTime,
trendType: this.trendType,
pageSize: 8,
pageNum: 1,
codeState
}
this.$apis.channel.listChannelCodeByPage(params).then(res => {
this.channel = res.data
this.codeIds = this.channel.map(item => {
return {
codeState: item.codeState,
codeName: item.codeName,
totalNum: item.totalNum
}
})
this.codeTrend()
})
}
},
mounted() {
this.codeSearch()
this.getFollower()
}
}
</script>
<style lang="scss" scoped>
.channel-main {
padding: 20px;
/deep/ {
.el-radio-group {
margin-top: 3px;
}
}
}
.link-dialog {
text-decoration: underline;
cursor: pointer;
}
.channel-chart {
display: flex;
.channel-chart-desc {
width: 300px;
min-height: 310px;
padding: 10px;
display: flex;
flex-direction: column;
justify-content: space-between;
margin-bottom: 30px;
.chart-desc-title {
display: flex;
justify-content: space-between;
font-size: 14px;
font-weight: 600;
color: #333333;
line-height: 20px;
.chart-title-time {
color: #5850ff;
}
}
.chart-desc-item {
display: flex;
justify-content: space-between;
font-size: 12px;
font-weight: 400;
color: #666666;
line-height: 17px;
margin-top: 10px;
.chart-item-title {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
span {
vertical-align: middle;
display: inline-block;
width: 12px;
height: 2px;
margin-right: 10px;
}
}
}
.chart-desc-add {
font-size: 12px;
font-weight: 400;
color: #5850ff;
line-height: 17px;
text-align: center;
}
.chart-desc-addNum {
font-size: 12px;
font-weight: 400;
color: #666666;
line-height: 17px;
text-align: center;
}
}
&-box {
flex: 1;
.channel-chart-title {
font-size: 18px;
font-weight: 600;
color: #333333;
line-height: 25px;
}
.channel-chart-container {
margin-top: 20px;
}
}
}
</style>
<template>
<div class="channel-main scrm-box-f">
<div class="scrm-GLCombiForm">
<GLCombiForm :rowNumber="1" ref="formSearch" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<!-- <el-form :inline="true" :model="tableSearchForm" class="follow-form-item" label-width="130px">
<el-form-item size="small" label="访问时间:">
<el-date-picker :picker-options="pickerOptions" @change="handleTime" value-format="yyyy-MM-dd" v-model="createTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</el-form-item>
<el-form-item size="small" label="渠道名称:">
<el-input size="small" v-model="tableSearchForm.cardName" placeholder="请输入渠道名称" :disabled="isShowInput"></el-input>
</el-form-item>
<el-form-item size="small" label="名片来源:">
<el-input size="small" v-model="tableSearchForm.staffName" placeholder="请输入名片来源" :disabled="isShowInput"></el-input>
</el-form-item>
<el-form-item size="small" style="float: right; margin-left: 12px">
<el-button type="primary" @click="handleSearch">查询</el-button>
<el-button @click="handleReset" class="resetBtn">重置</el-button>
</el-form-item>
</el-form> -->
</div>
<div class="titleAndTime">
<div class="listTitle">访问列表</div>
<el-radio-group v-model="timeRadio" size="mini" @change="handleTab">
<el-radio-button label="1">今天</el-radio-button>
<el-radio-button label="2">本周</el-radio-button>
<el-radio-button label="3">本月</el-radio-button>
<el-radio-button label="4">今年</el-radio-button>
</el-radio-group>
</div>
<GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch">
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="accessToRecords(scope)">访问记录</el-button>
</div>
<div class="table-btns" slot="nickName" slot-scope="scope">
{{ scope.scope.nickName }}
<span class="typeInfo">{{ scope.scope.type == '1' ? '@微信' : scope.scope.type == '2' ? '@企微' : '' }}</span>
</div>
<div class="table-btns" slot="isJoin" slot-scope="scope">
{{ scope.scope.isJoin == '0' ? '否' : scope.scope.isJoin == '1' ? '是' : '--' }}
</div>
</GLTable>
<el-dialog class="recordDialog" title="访问记录" :visible.sync="dialogTableVisible" width="38%" :top="0">
<el-table :data="recordRelationList">
<el-table-column type="index" :index="1" label="序号" width="120"></el-table-column>
<el-table-column property="pageName" label="访问页面" width="220"></el-table-column>
<el-table-column property="createdTime" label="访问时间"></el-table-column>
</el-table>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'recordList',
data() {
return {
isShowInput: false,
recordRelationList: [],
dialogTableVisible: false,
timeRadio: 1,
dateInterval: 1,
pickerOptions: {
disabledDate: time => {
return time.getTime() > Date.now()
}
},
channel: [],
tableSearchForm: {
createTime: '',
cardName: '',
staffName: ''
},
searchFormData: [
{
label: '访问时间',
name: 'createTime',
type: 'datePicker',
placeholder: '',
isClear: true,
pickerOptions: {
disabledDate: time => {
return time.getTime() > Date.now()
}
}
},
{
label: '渠道名称',
name: 'cardName',
type: 'input'
},
{
label: '名片来源',
name: 'staffName',
type: 'input'
}
],
tableParams: {
listName: 'data',
tableOption: false,
tableColumns: [
{
label: '访客',
prop: 'nickName',
addHtml: 'nickName'
},
{
label: '手机号码',
prop: 'phone'
},
{
label: '已加企微',
prop: 'isJoin',
addHtml: 'isJoin'
},
{
label: '渠道名称',
prop: 'cardName'
},
{
label: '名片来源',
prop: 'staffName'
},
{
label: '最后访问日期',
prop: 'lastTime'
},
{
label: '访问时间',
prop: 'optionBtns',
width: '100px',
addHtml: 'optionBtns',
fixed: 'right'
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [],
tableTotal: 0,
startDate: '',
endDate: '',
colorList: ['#5850FF', '#2CCA74', '#EB4E4E', '#FF6D00', '#F8C900', '#2CCAC4', '#E74EEB', '#6F2828']
}
},
methods: {
// 查看访问记录弹框
accessToRecords(scope) {
this.dialogTableVisible = true
this.$nextTick(() => {
this.recordRelationList = scope.scope.recordRelationList
})
},
handleTime() {
const value = this.createTime
if (value && value.length > 0) {
this.startDate = value[0]
this.endDate = value[1]
this.timeRadio = null
this.dateInterval = null
} else {
this.startDate = ''
this.endDate = ''
this.timeRadio = 1
this.dateInterval = 1
}
this.codeSearch()
},
handleTab() {
this.createTime = []
this.dateInterval = this.timeRadio
this.startDate = ''
this.endDate = ''
this.codeSearch()
},
handleReset() {
this.isShowInput = false
Object.keys(this.tableSearchForm).forEach(key => {
this.tableSearchForm[key] = ''
})
this.createTime = []
this.timeRadio = 1
let params = {
...this.tableSearchForm,
pageSize: 10,
pageNum: 1,
dateInterval: 1
}
this.sendPageListApi(params)
},
handleSearch() {
this.codeSearch()
},
codeSearch() {
if (this.tableSearchForm.createTime) {
this.tableSearchForm.startDate = new Date(this.tableSearchForm.createTime[0]).toLocaleDateString().replace(/\//g, '-')
this.tableSearchForm.endDate = new Date(this.tableSearchForm.createTime[1]).toLocaleDateString().replace(/\//g, '-')
}
let params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum,
dateInterval: this.dateInterval
}
delete params.createTime
this.sendPageListApi(params)
},
sendPageListApi(params) {
this.$apis.businessCard.getaccessToRecordsPage(params).then(res => {
this.tableData = res.data
this.tableTotal = res.count
})
}
},
mounted() {
if (this.$parent.query && this.$parent.query.cardName) {
let { cardName, cardId, staffName } = this.$parent.query
this.timeRadio = this.dateInterval = 4
this.$set(this.tableSearchForm, 'cardName', cardName)
this.$set(this.tableSearchForm, 'staffName', staffName)
this.$set(this.tableSearchForm, 'cardId', cardId)
this.isShowInput = true
}
this.codeSearch()
},
beforeDestroy() {
this.$parent.query = {}
}
}
</script>
<style lang="scss" scoped>
.resetBtn {
margin-left: 8px;
}
.titleAndTime {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12px;
.listTitle {
font-size: 16px;
font-weight: 600;
color: #333;
}
}
.typeInfo {
font-size: 12px;
color: #2cca74;
}
/deep/.recordDialog {
.el-dialog {
height: 100vh;
overflow: auto;
margin-right: 0;
margin-bottom: 0;
}
}
.channel-main {
padding: 20px;
/deep/ {
.el-radio-group {
margin-top: 3px;
}
}
}
.link-dialog {
text-decoration: underline;
cursor: pointer;
}
.channel-chart {
display: flex;
.channel-chart-desc {
width: 300px;
min-height: 310px;
padding: 10px;
display: flex;
flex-direction: column;
justify-content: space-between;
margin-bottom: 30px;
.chart-desc-title {
display: flex;
justify-content: space-between;
font-size: 14px;
font-weight: 600;
color: #333333;
line-height: 20px;
.chart-title-time {
color: #5850ff;
}
}
.chart-desc-item {
display: flex;
justify-content: space-between;
font-size: 12px;
font-weight: 400;
color: #666666;
line-height: 17px;
margin-top: 10px;
.chart-item-title {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
span {
vertical-align: middle;
display: inline-block;
width: 12px;
height: 2px;
margin-right: 10px;
}
}
}
.chart-desc-add {
font-size: 12px;
font-weight: 400;
color: #5850ff;
line-height: 17px;
text-align: center;
}
.chart-desc-addNum {
font-size: 12px;
font-weight: 400;
color: #666666;
line-height: 17px;
text-align: center;
}
}
&-box {
flex: 1;
.channel-chart-title {
font-size: 18px;
font-weight: 600;
color: #333333;
line-height: 25px;
}
.channel-chart-container {
margin-top: 20px;
}
}
}
</style>
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-10-12 09:30:11
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-10-18 16:03:33
* @FilePath: \scrm-micro-drainage\src\views\businessCard\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="channel-main">
<GLTabs v-model="activeName" :tabPaneList="tabPaneList" class="tabs-panel"></GLTabs>
<components :is="tabName"></components>
</div>
</template>
<script>
const tabPaneList = [
{
label: '智能名片',
name: '1'
},
{
label: '访问记录',
name: '2'
},
{
label: '活动申请',
name: '3'
}
// {
// label: '代理申请',
// name: '4'
// }
]
import './components'
export default {
name: 'businessCard',
data() {
return {
activeName: '1',
tabPaneList
}
},
computed: {
tabName() {
let sname
switch (this.activeName) {
case '1':
sname = 'cardList'
break
case '2':
sname = 'recordList'
break
case '3':
sname = 'activityList'
break
// case '4':
// sname = 'proxyList'
// break
}
return sname
}
}
}
</script>
<style lang="scss" scoped>
.channel-main {
.tabs-panel {
margin-bottom: 10px;
}
}
</style>
<template> <template>
<div class="scrm-main"> <div class="scrm-main">
<div class="channel-main-guidance scrm-box-f">
<div class="channel-main-guidance-item">
<div class="channel-main-guidance-item-head">
<img src="@/assets/img/channel/staff.png" />
<div class="channel-main-guidance-item-title">配置名片关联的员工</div>
</div>
<div class="channel-main-guidance-item-info">名片可关联一个或多个员工。配置多名员工时,客户扫码后仅会添加随机的某个员工。</div>
</div>
<div class="channel-arrow">
<img src="@/assets/img/channel/channel-arrow.png" />
</div>
<div class="channel-main-guidance-item">
<div class="channel-main-guidance-item-head">
<img src="@/assets/img/channel/equity.png" />
<div class="channel-main-guidance-item-title">配置客户领取的权益</div>
</div>
<div class="channel-main-guidance-item-info">客户添加员工为好友后,系统将通过欢迎语发送相关的权益礼包。 礼包内容可结合互联网权益、自店权益。由于企微官方限制,使用前请先确认已取消统一的欢迎语。</div>
</div>
<div class="channel-arrow">
<img src="@/assets/img/channel/channel-arrow.png" />
</div>
<div class="channel-main-guidance-item">
<div class="channel-main-guidance-item-head">
<img src="@/assets/img/channel/card.png" />
<div class="channel-main-guidance-item-title">生成智能员工名片</div>
</div>
<div class="channel-main-guidance-item-info">名片生成后长期有效,可结合门店业务需要,添加到门店活动易拉宝、员工卡座立牌、活动海报,实现灵活的集客。</div>
</div>
</div>
<div class="channel-main scrm-box-f"> <div class="channel-main scrm-box-f">
<div class="chanel-form-title">基本信息</div> <div class="chanel-form-title">基本信息</div>
<div class="chanel-form-box"> <div class="chanel-form-box gl-form-page">
<el-form ref="codeForm" :model="addCodeForm" class="code-body-form" label-width="120px" :rules="codeRules"> <el-form ref="codeForm" :model="addCodeForm" class="code-body-form" label-width="154px" :rules="codeRules">
<el-row> <!-- <el-row> -->
<el-form-item label="渠道名称" prop="codeName"> <el-form-item label="渠道名称:" prop="codeName">
<el-input size="small" v-model.trim="addCodeForm.codeName" placeholder="请输入渠道名称" maxlength="30"></el-input> <el-input size="small" v-model.trim="addCodeForm.codeName" placeholder="请输入渠道名称" maxlength="30"></el-input>
</el-form-item> </el-form-item>
</el-row> <!-- </el-row>
<el-row> <el-row> -->
<el-form-item label="备注"> <el-form-item label="备注:">
<el-input size="small" v-model.trim="addCodeForm.codeRemark" placeholder="请输入备注" maxlength="30"></el-input> <el-input size="small" v-model.trim="addCodeForm.codeRemark" placeholder="请输入备注" maxlength="30"></el-input>
<div class="form-tips">设置备注,便于后续管理查找</div> <div class="form-tips">设置备注,便于后续管理查找</div>
</el-form-item> </el-form-item>
</el-row> <!-- </el-row>
<el-row> <el-row> -->
<el-form-item label="自动通过验证"> <el-form-item label="自动通过验证:">
<el-switch v-model="addCodeForm.autoAdd" active-color="#5850FF" inactive-color="#999999"></el-switch> <el-switch v-model="addCodeForm.autoAdd" active-color="#5850FF" inactive-color="#999999"></el-switch>
<span class="form-tips-btn">开启后,客户添加使用人员无需好友验证</span> <span class="form-tips-btn">开启后,客户添加使用人员无需好友验证</span>
</el-form-item> </el-form-item>
</el-row> <!-- </el-row>
<el-row> <el-row> -->
<el-form-item label="选择标签"> <el-form-item label="选择标签:">
<el-button size="small" @click="handleAddTag"> <el-button size="small" @click="handleAddTag">
<i class="el-icon-plus"></i>
选择标签
</el-button>
<span class="form-tips-btn">
已选择
<span>{{ taggingLength }}</span>
个标签
</span>
<div class="form-tips">自动为通过该活码添加的客户打上所选标签</div>
<div class="el-input-tag input-tag-wrapper" v-show="taggingLength">
<template v-if="tagging && tagging.length > 0">
<template v-for="(item, index) in tagging">
<el-tag type="info" v-for="(tag, idx) in item.labelList" :key="idx" closable :disable-transitions="false" @close="removeTag(item, idx, index)">
{{ tag ? tag.name : '' }}
</el-tag>
</template>
</template>
</div>
</el-form-item>
<!-- </el-row>
<el-row> -->
<div class="el-form-item is-required">
<label for="codeName" class="el-form-item__label" style="width: 154px">选择专员:</label>
<div class="el-form-item__content" style="margin-left: 154px">
<el-button size="small" @click="handleAddEmp">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
选择标签 选择专员
</el-button> </el-button>
<span class="form-tips-btn"> <span class="form-tips-btn">
已选择 已选择
<span>{{ taggingLength }}</span> <span>{{ staffInfo.length }}</span>
个标签 人
</span> </span>
<<<<<<< HEAD
<div class="form-tips">客户扫码后将添加所选专员为好友,选择多名专员则按ABAB的顺序添加客户</div>
<div class="el-input-tag input-tag-wrapper" v-show="staffInfo.length">
<el-tag effect="plain" type="info" v-for="(tag, idx) in staffInfo" :key="idx" closable :disable-transitions="false" @close="removeStaff(idx)">
<i class="el-icon-user-solid"></i>
{{ tag.staffName }}
</el-tag>
=======
<div class="form-tips">自动为通过该活码添加的客户打上所选标签</div> <div class="form-tips">自动为通过该活码添加的客户打上所选标签</div>
<div class="el-input-tag input-tag-wrapper" v-show="taggingLength"> <div class="el-input-tag input-tag-wrapper" v-show="taggingLength">
<template v-if="tagging && tagging.length > 0"> <template v-if="tagging && tagging.length > 0">
...@@ -73,9 +135,12 @@ ...@@ -73,9 +135,12 @@
</div> </div>
</div> </div>
<div class="el-form-item__error" v-if="staffStatus">请选择专员</div> <div class="el-form-item__error" v-if="staffStatus">请选择专员</div>
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
</div> </div>
<div class="el-form-item__error" v-if="staffStatus">请选择专员</div>
</div> </div>
</el-row> </div>
<!-- </el-row> -->
</el-form> </el-form>
</div> </div>
</div> </div>
...@@ -83,11 +148,11 @@ ...@@ -83,11 +148,11 @@
<div class="chanel-form-title">欢迎语</div> <div class="chanel-form-title">欢迎语</div>
<div class="welcome-panel"> <div class="welcome-panel">
<div class="welcome-switch"> <div class="welcome-switch">
<label>自动发送欢迎语</label> <label>自动发送欢迎语:</label>
<el-switch v-model="autoWelcome" active-color="#5850FF" inactive-color="#999999"></el-switch> <el-switch v-model="autoWelcome" active-color="#5850FF" inactive-color="#999999"></el-switch>
</div> </div>
<div class="welcome-box" v-show="autoWelcome"> <div class="welcome-box" v-show="autoWelcome">
<welcome-words :eventBus="eventBus" ref="welcome"></welcome-words> <GLEditor ref="welcome" :form="'customer'" :btnList="btnList" @previewWord="previewForm"></GLEditor>
</div> </div>
</div> </div>
</div> </div>
...@@ -95,6 +160,10 @@ ...@@ -95,6 +160,10 @@
<el-button type="primary" @click="handleSave">提交</el-button> <el-button type="primary" @click="handleSave">提交</el-button>
<el-button @click="goback">取消</el-button> <el-button @click="goback">取消</el-button>
</GLFooter> </GLFooter>
<<<<<<< HEAD
<GLDialog title="提示" @onOk="handleSure" @onCancel="dialogVisible = false" type="warning" content="当前有内容信息未保存,是否继续返回?" :visible.sync="dialogVisible" mode="small"></GLDialog>
=======
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<select-emp @selectTable="selectTable" ref="selectEmpForm"></select-emp> <select-emp @selectTable="selectTable" ref="selectEmpForm"></select-emp>
<select-tag ref="selectTagForm" @tagSelected="tagSelected"></select-tag> <select-tag ref="selectTagForm" @tagSelected="tagSelected"></select-tag>
</div> </div>
...@@ -102,16 +171,16 @@ ...@@ -102,16 +171,16 @@
<script> <script>
import { utils } from 'glsx-common' import { utils } from 'glsx-common'
import Vue from 'vue'
import selectEmp from '@/components/selectEmp' import selectEmp from '@/components/selectEmp'
import selectTag from '@/components/selectTag' import selectTag from '@/components/selectTag'
import welcomeWords from '@/components/welcome/welcomeWords.vue' import word from '@/mixins/word'
export default { export default {
mixins: [word],
name: 'addCode', name: 'addCode',
components: { welcomeWords, selectEmp, selectTag }, components: { selectEmp, selectTag },
data() { data() {
return { return {
eventBus: new Vue(), dialogVisible: false,
addCodeForm: { addCodeForm: {
codeName: '', codeName: '',
codeRemark: '', codeRemark: '',
...@@ -171,6 +240,20 @@ export default { ...@@ -171,6 +240,20 @@ export default {
}) })
}) })
if (this.editStatus || (this.$refs.welcome.previewList.length > 0 && !this.codeId)) { if (this.editStatus || (this.$refs.welcome.previewList.length > 0 && !this.codeId)) {
<<<<<<< HEAD
this.dialogVisible = true
} else {
this.$router.push('/channel/index')
}
},
handleSure() {
this.$router.push('/channel/index')
},
removeTag(item, idx, index) {
item.labelList.splice(idx, 1)
if (item.labelList.length == 0) {
this.tagging.splice(index, 1)
=======
this.$confirm('当前有内容信息未保存,是否继续返回?', '提示', { this.$confirm('当前有内容信息未保存,是否继续返回?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
...@@ -180,6 +263,7 @@ export default { ...@@ -180,6 +263,7 @@ export default {
}) })
} else { } else {
this.$router.push('/channel/index') this.$router.push('/channel/index')
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
} }
}, },
removeTag(item, idx, index) { removeTag(item, idx, index) {
...@@ -217,21 +301,23 @@ export default { ...@@ -217,21 +301,23 @@ export default {
this.$refs['codeForm'].validate(valid => { this.$refs['codeForm'].validate(valid => {
if (valid) { if (valid) {
let param = Object.assign({ id: this.codeId }, this.addCodeForm) let param = Object.assign({ id: this.codeId }, this.addCodeForm)
let tagging = this.tagging.map(item => { if (this.tagging && this.tagging.length) {
let tagIds = item.labelList.map(tag => { let tagging = this.tagging.map(item => {
return tag.id let tagIds = item.labelList.map(tag => {
return tag.id
})
let name = item.labelList.map(tag => {
return tag.name
})
return {
groupId: item.labelGroup.id,
tagIds: tagIds.join(','),
name: name.join(','),
labelType: item.labelGroup.name
}
}) })
let name = item.labelList.map(tag => { param.tagging = JSON.stringify(tagging)
return tag.name }
})
return {
groupId: item.labelGroup.id,
tagIds: tagIds.join(','),
name: name.join(','),
labelType: item.labelGroup.name
}
})
param.tagging = JSON.stringify(tagging)
param.autoWelcome = this.autoWelcome ? 1 : 0 param.autoWelcome = this.autoWelcome ? 1 : 0
param.codeSystem = 0 param.codeSystem = 0
let staffId = [] let staffId = []
...@@ -281,22 +367,25 @@ export default { ...@@ -281,22 +367,25 @@ export default {
this.addCodeForm.autoAdd = this.addCodeForm.autoAdd == 1 ? true : false this.addCodeForm.autoAdd = this.addCodeForm.autoAdd == 1 ? true : false
this.staffInfo = res.staffInfo this.staffInfo = res.staffInfo
const tagging = eval(res.tagging) const tagging = eval(res.tagging)
const taggingList = tagging.map(item => { if (tagging && tagging.length) {
let name = item.name.split(',') const taggingList = tagging.map(item => {
let ids = item.tagIds.split(',') let name = item.name.split(',')
console.log(ids) let ids = item.tagIds.split(',')
let labelList = name.map((tag, index) => { console.log(ids)
return { id: ids[index], name: tag } let labelList = name.map((tag, index) => {
return { id: ids[index], name: tag }
})
return {
labelGroup: {
id: item.groupId,
name: item.labelType
},
labelList
}
}) })
return { this.tagging = taggingList
labelGroup: { }
id: item.groupId,
name: item.labelType
},
labelList
}
})
this.tagging = taggingList
this.autoWelcome = res.autoWelcome ? true : false this.autoWelcome = res.autoWelcome ? true : false
if (res.welcomeInfo.length != 0) { if (res.welcomeInfo.length != 0) {
const previewList = res.welcomeInfo.map(item => { const previewList = res.welcomeInfo.map(item => {
...@@ -331,7 +420,7 @@ export default { ...@@ -331,7 +420,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.channel-main-welcome { .channel-main-welcome {
margin: 20px 0px 60px; margin: 20px 0px 16px;
.welcome-panel { .welcome-panel {
margin: 10px; margin: 10px;
padding: 0px 20px 20px; padding: 0px 20px 20px;
...@@ -345,7 +434,7 @@ export default { ...@@ -345,7 +434,7 @@ export default {
} }
} }
.welcome-box { .welcome-box {
margin-left: 48px; margin-left: 62px;
} }
} }
} }
...@@ -426,4 +515,51 @@ export default { ...@@ -426,4 +515,51 @@ export default {
margin-bottom: 5px; margin-bottom: 5px;
} }
} }
<<<<<<< HEAD
.channel-main-guidance {
display: flex;
padding: 20px;
box-sizing: border-box;
align-items: center;
margin-bottom: 20px;
.channel-main-guidance-item {
flex: 1;
height: 142px;
background: url('../../assets/img/channel/bg.png'), no-repeat;
padding: 16px 20px;
box-sizing: border-box;
&-head {
display: flex;
align-items: center;
margin-bottom: 8px;
img {
width: 22px;
height: 22px;
margin-right: 10px;
}
}
&-title {
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 22px;
}
&-info {
font-size: 14px;
font-weight: 400;
color: #999999;
line-height: 20px;
}
}
.channel-arrow {
margin: 0 16px;
width: 20px;
height: 15px;
img {
width: 100%;
}
}
}
=======
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
</style> </style>
...@@ -4,6 +4,16 @@ ...@@ -4,6 +4,16 @@
<GLButton type="primary" size="small" icon="el-icon-add" @click="handleAddCode" fn="新增活码">新建渠道活码</GLButton> <GLButton type="primary" size="small" icon="el-icon-add" @click="handleAddCode" fn="新增活码">新建渠道活码</GLButton>
</div> </div>
<div class="form-panel scrm-box-f"> <div class="form-panel scrm-box-f">
<<<<<<< HEAD
<GLCombiForm :rowNumber="1" ref="formSearch" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLTable v-loading="loading" ref="table" @refreshTable="handleSearch" :searchForm="tableSearchForm" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams">
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
<!-- <GLButton type="text" @click="handleDetail(scope.scope)" fn="到店咨询客户数据">数据</GLButton>
<GLButton type="text" @click="handleEdit(scope.scope)" fn="活码编辑">修改</GLButton>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button>
<GLButton type="text" @click="handleAddPoster(scope.scope)" fn="活码海报">活码海报</GLButton> -->
=======
<GLCombiForm ref="formSearch" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm ref="formSearch" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLTable v-loading="loading" ref="table" @refreshTable="handleSearch" :searchForm="tableSearchForm" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams"> <GLTable v-loading="loading" ref="table" @refreshTable="handleSearch" :searchForm="tableSearchForm" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams">
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
...@@ -11,6 +21,7 @@ ...@@ -11,6 +21,7 @@
<collect-form :dataAnalyics="{ pageName: '渠道活码', codeId: scope.scope.id, name: '修改' }"><GLButton type="text" @click="handleEdit(scope.scope)" fn="活码编辑">修改</GLButton></collect-form> <collect-form :dataAnalyics="{ pageName: '渠道活码', codeId: scope.scope.id, name: '修改' }"><GLButton type="text" @click="handleEdit(scope.scope)" fn="活码编辑">修改</GLButton></collect-form>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button> <el-button type="text" @click="handleDelete(scope.scope)">删除</el-button>
<collect-form :dataAnalyics="{ pageName: '渠道活码', codeId: scope.scope.id, name: '活码海报' }"><GLButton type="text" @click="handleAddPoster(scope.scope)" fn="活码海报">活码海报</GLButton></collect-form> <collect-form :dataAnalyics="{ pageName: '渠道活码', codeId: scope.scope.id, name: '活码海报' }"><GLButton type="text" @click="handleAddPoster(scope.scope)" fn="活码海报">活码海报</GLButton></collect-form>
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
</div> </div>
<div slot="yesterdayNum" slot-scope="scope"> <div slot="yesterdayNum" slot-scope="scope">
<div class="link-dialog" @click="handleEmpDetail(scope.scope, 'day')" v-if="scope.scope.yesterdayNum">{{ scope.scope.yesterdayNum }}</div> <div class="link-dialog" @click="handleEmpDetail(scope.scope, 'day')" v-if="scope.scope.yesterdayNum">{{ scope.scope.yesterdayNum }}</div>
...@@ -22,6 +33,23 @@ ...@@ -22,6 +33,23 @@
</div> </div>
<div slot="staffInfo" slot-scope="scope"> <div slot="staffInfo" slot-scope="scope">
<el-popover trigger="hover" placement="top" v-if="staffNameSplit(scope.scope.staffName).length > 3"> <el-popover trigger="hover" placement="top" v-if="staffNameSplit(scope.scope.staffName).length > 3">
<<<<<<< HEAD
<GLFull :labelWidth="110" :label="item" textType="user" :identi="`text_${Math.random().toString().replace('.', '')}`" v-for="(item, index) in staffNameSplit(scope.scope.staffName)" :key="index"></GLFull>
<div slot="reference" class="name-wrapper">
<div style="display: inline-block" v-for="(item, index) in staffNameSplit(scope.scope.staffName)" :key="index" v-show="index < 4">
<template v-if="index == 3 && staffNameSplit(scope.scope.staffName).length > 3">
<div class="accountType-row">
<i class="el-icon-user-solid"></i>
<span>{{ '...(' + staffNameSplit(scope.scope.staffName).length + ')' }}</span>
</div>
</template>
<GLFull :labelWidth="110" :label="item" textType="user" v-if="index < 3"></GLFull>
</div>
</div>
</el-popover>
<GLFull :labelWidth="110" :label="item" textType="user" :identi="`text_${Math.random().toString().replace('.', '')}`" v-for="(item, index) in staffNameSplit(scope.scope.staffName)" :key="index" v-else></GLFull>
<!-- <div v-for="(item, index) in staffNameSplit(scope.scope.staffName)" :key="index" v-else>
=======
<div class="accountType-row" v-for="(item, index) in staffNameSplit(scope.scope.staffName)" :key="index"> <div class="accountType-row" v-for="(item, index) in staffNameSplit(scope.scope.staffName)" :key="index">
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid"></i>
<GLTitle :content="item" textLength="4"></GLTitle> <GLTitle :content="item" textLength="4"></GLTitle>
...@@ -37,10 +65,23 @@ ...@@ -37,10 +65,23 @@
</div> </div>
</el-popover> </el-popover>
<div v-for="(item, index) in staffNameSplit(scope.scope.staffName)" :key="index" v-else> <div v-for="(item, index) in staffNameSplit(scope.scope.staffName)" :key="index" v-else>
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<div class="accountType-row"> <div class="accountType-row">
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid"></i>
<GLTitle :content="item" textLength="4"></GLTitle> <GLTitle :content="item" textLength="4"></GLTitle>
</div> </div>
<<<<<<< HEAD
</div> -->
</div>
<div slot="qrCode" slot-scope="scope">
<el-popover placement="bottom" trigger="click">
<div>
<img :src="scope.scope.qrCode" style="width: 140px; height: 140px" />
<div class="download-link" @click="downloadIamge(scope.scope.qrCode)">下载二维码</div>
</div>
<img :src="scope.scope.qrCode" style="width: 36px; height: 36px" slot="reference" />
</el-popover>
=======
</div> </div>
</div> </div>
<div slot="qrCode" slot-scope="scope"> <div slot="qrCode" slot-scope="scope">
...@@ -51,6 +92,7 @@ ...@@ -51,6 +92,7 @@
<collect-form :dataAnalyics="{ qrCode: scope.scope.qrCode }" display="block"> <collect-form :dataAnalyics="{ qrCode: scope.scope.qrCode }" display="block">
<div class="download-link" @click="downloadIamge(scope.scope.qrCode)">下载二维码</div> <div class="download-link" @click="downloadIamge(scope.scope.qrCode)">下载二维码</div>
</collect-form> </collect-form>
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
</div> </div>
<div slot="tagging" slot-scope="scope" class="tag-panel"> <div slot="tagging" slot-scope="scope" class="tag-panel">
<el-popover trigger="hover" placement="top" v-if="scope.scope.taggingList && scope.scope.taggingList.length > 3"> <el-popover trigger="hover" placement="top" v-if="scope.scope.taggingList && scope.scope.taggingList.length > 3">
...@@ -79,18 +121,31 @@ ...@@ -79,18 +121,31 @@
</div> </div>
</GLTable> </GLTable>
</div> </div>
<<<<<<< HEAD
<GLDialog title="提示" @onOk="handleSure" @onCancel="dialogVisibleDel = false" type="error" content="是否删除?" :visible.sync="dialogVisibleDel" mode="small"></GLDialog>
=======
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<emp-detail ref="empDetailForm"></emp-detail> <emp-detail ref="empDetailForm"></emp-detail>
</div> </div>
</template> </template>
<script> <script>
import util from '@/utils/util' import util from '@/utils/util'
<<<<<<< HEAD
import empDetail from '@/components/empDetail'
=======
import empDetail from './empDetail.vue' import empDetail from './empDetail.vue'
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
export default { export default {
components: { empDetail }, components: { empDetail },
name: 'channelList', name: 'channelList',
data() { data() {
return { return {
<<<<<<< HEAD
dialogVisibleDel: false,
selectItem: '',
=======
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
loading: false, loading: false,
tableSearchForm: { tableSearchForm: {
staffName: '', staffName: '',
...@@ -111,6 +166,52 @@ export default { ...@@ -111,6 +166,52 @@ export default {
} }
], ],
tableData: [], tableData: [],
// 表格按钮
tableButtonList: [
{
type: 'GLButton',
name: '数据',
attrs: {
type: 'text',
fn: '到店咨询客户数据'
},
listeners: {
click: this.handleDetail
}
},
{
type: 'GLButton',
name: '活码海报',
attrs: {
type: 'text',
fn: '活码海报'
},
listeners: {
click: this.handleAddPoster
}
},
{
type: 'GLButton',
name: '修改',
attrs: {
type: 'text',
fn: '活码编辑'
},
listeners: {
click: this.handleEdit
}
},
{
type: 'el-button',
name: '删除',
attrs: {
type: 'text'
},
listeners: {
click: this.handleDelete
}
}
],
tableParams: { tableParams: {
listName: 'data', listName: 'data',
tableOption: false, tableOption: false,
...@@ -118,24 +219,33 @@ export default { ...@@ -118,24 +219,33 @@ export default {
{ {
label: '渠道名称', label: '渠道名称',
prop: 'codeRemark', prop: 'codeRemark',
minWidth: 200,
addHtml: 'codeRemark' addHtml: 'codeRemark'
}, },
{ {
label: '今日新增客户数', label: '今日新增客户数',
prop: 'yesterdayNum', prop: 'yesterdayNum',
<<<<<<< HEAD
width: 130,
=======
width: '130px', width: '130px',
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
addHtml: 'yesterdayNum' addHtml: 'yesterdayNum'
}, },
{ {
label: '总新增客户数', label: '总新增客户数',
prop: 'totalNum', prop: 'totalNum',
<<<<<<< HEAD
width: 120,
=======
width: '120px', width: '120px',
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
addHtml: 'totalNum' addHtml: 'totalNum'
}, },
{ {
label: '使用专员', label: '使用专员',
prop: 'staffInfo', prop: 'staffInfo',
width: '130px', minWidth: 400,
addHtml: 'staffInfo', addHtml: 'staffInfo',
align: 'left' align: 'left'
}, },
...@@ -143,23 +253,35 @@ export default { ...@@ -143,23 +253,35 @@ export default {
label: '活码', label: '活码',
prop: 'qrCode', prop: 'qrCode',
addHtml: 'qrCode', addHtml: 'qrCode',
<<<<<<< HEAD
width: '100px'
=======
width: '120px' width: '120px'
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
}, },
{ {
label: '标签', label: '标签',
prop: 'tagging', prop: 'tagging',
addHtml: 'tagging', addHtml: 'tagging',
width: '150px' minWidth: 200
}, },
{ {
label: '创建时间', label: '创建时间',
prop: 'createdTime', prop: 'createdTime',
<<<<<<< HEAD
minWidth: 180
=======
width: '180px' width: '180px'
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
}, },
{ {
label: '操作', label: '操作',
prop: 'optionBtns', prop: 'optionBtns',
<<<<<<< HEAD
width: '170px',
=======
width: '220px', width: '220px',
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
addHtml: 'optionBtns', addHtml: 'optionBtns',
fixed: 'right' fixed: 'right'
} }
...@@ -218,30 +340,28 @@ export default { ...@@ -218,30 +340,28 @@ export default {
}) })
.catch(() => {}) .catch(() => {})
}, },
handleDelete(scope) { handleSure() {
this.$confirm('是否删除?', '提示', { const { id, codeUuid, configId } = this.selectItem
confirmButtonText: '确定', this.$apis.channel
cancelButtonText: '取消', .deleteChannelCode({
type: 'warning' id,
}) codeUuid,
.then(() => { configId
this.$apis.channel })
.deleteChannelCode({ .then(res => {
id: scope.id, if (res) {
codeUuid: scope.codeUuid, this.$message({
configId: scope.configId type: 'success',
}) message: '删除成功!'
.then(res => {
if (res) {
this.$message({
type: 'success',
message: '删除成功!'
})
}
this.handleSearch()
}) })
}
this.handleSearch()
}) })
.catch(() => {}) this.dialogVisibleDel = false
},
handleDelete(scope) {
this.dialogVisibleDel = true
this.selectItem = scope
}, },
listChannelCodeByPage() { listChannelCodeByPage() {
const params = { const params = {
...@@ -293,14 +413,19 @@ export default { ...@@ -293,14 +413,19 @@ export default {
/deep/ .el-popover { /deep/ .el-popover {
max-width: 1000px; max-width: 1000px;
} }
.name-wrapper {
display: flex;
}
} }
.download-link { .download-link {
cursor: pointer; cursor: pointer;
margin-top: 6px; margin-top: 4px;
font-size: 14px; font-size: 14px;
font-weight: 400; color: #5850ff;
color: #666666; font-weight: 600;
color: #5850ff;
line-height: 20px; line-height: 20px;
text-align: center;
} }
.codeRemark { .codeRemark {
font-size: 14px; font-size: 14px;
...@@ -396,7 +521,7 @@ export default { ...@@ -396,7 +521,7 @@ export default {
padding: 6px; padding: 6px;
display: inline-block; display: inline-block;
margin-bottom: 5px; margin-bottom: 5px;
margin-right: 5px; margin-right: 4px;
&-tag { &-tag {
display: inline-block; display: inline-block;
border: 1px solid #e8e8ea; border: 1px solid #e8e8ea;
......
...@@ -64,9 +64,15 @@ ...@@ -64,9 +64,15 @@
<script> <script>
import utils from '@/utils/util' import utils from '@/utils/util'
<<<<<<< HEAD
import linechart from '@/components/linechart'
import selectChannel from '@/components/selectChannel'
import empDetail from '@/components/empDetail'
=======
import linechart from './linechart' import linechart from './linechart'
import selectChannel from './selectChannel' import selectChannel from './selectChannel'
import empDetail from './empDetail.vue' import empDetail from './empDetail.vue'
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
export default { export default {
name: 'channelStatistics', name: 'channelStatistics',
components: { components: {
......
...@@ -151,21 +151,35 @@ export default { ...@@ -151,21 +151,35 @@ export default {
label: '客户性别', label: '客户性别',
prop: 'customerSex', prop: 'customerSex',
formatter: cellValue => { formatter: cellValue => {
<<<<<<< HEAD
return cellValue.customerSex == 1 ? '男' : '女'
},
minWidth: 100
=======
console.log(cellValue) console.log(cellValue)
return cellValue.customerSex == 1 ? '男' : '女' return cellValue.customerSex == 1 ? '男' : '女'
}, },
width: '80px' width: '80px'
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
}, },
{ {
label: '状态', label: '状态',
prop: 'status', prop: 'status',
addHtml: 'status', addHtml: 'status',
<<<<<<< HEAD
minWidth: 100
=======
width: '80px' width: '80px'
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
}, },
{ {
label: '跟进员工', label: '跟进员工',
prop: 'followStaff', prop: 'followStaff',
<<<<<<< HEAD
minWidth: 100
=======
width: '80px' width: '80px'
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
}, },
{ {
label: '添加时间', label: '添加时间',
...@@ -174,7 +188,11 @@ export default { ...@@ -174,7 +188,11 @@ export default {
{ {
label: '操作', label: '操作',
prop: 'optionBtns', prop: 'optionBtns',
<<<<<<< HEAD
minWidth: '80px',
=======
width: '80px', width: '80px',
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
addHtml: 'optionBtns' addHtml: 'optionBtns'
} }
] ]
...@@ -230,6 +248,10 @@ export default { ...@@ -230,6 +248,10 @@ export default {
}) })
}, },
init(item, value, day) { init(item, value, day) {
<<<<<<< HEAD
=======
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
this.createTime = [] this.createTime = []
this.pStatus = null this.pStatus = null
this.staffIds = null this.staffIds = null
......
<template> <template>
<div class="square-main"> <div class="square-main">
<el-dialog title="选择渠道" :visible.sync="dialogVisible" width="70%" :before-close="handleCancel"> <GLDialog title="选择渠道" :visible.sync="dialogVisible" @onOk="handleSelect" @onCancel="handleCancel" mode="big">
<div class="square-tabel"> <div class="square-tabel">
<div class="square-tabel-select"> <div class="square-tabel-select">
<GLTable ref="table" :hasPage="false" :tableData="tableData" :tableTotal="tableTotal" :tableParams="tableParams" @refreshTable="handleSearch" @selectionTable="selectionTable"></GLTable> <GLTable ref="table" :hasPage="false" :tableData="tableData" :tableTotal="tableTotal" :tableParams="tableParams" @refreshTable="handleSearch" @selectionTable="selectionTable"></GLTable>
...@@ -10,7 +10,11 @@ ...@@ -10,7 +10,11 @@
<div class="selected-panel"> <div class="selected-panel">
<div class="selected-item" v-for="(item, index) in selectedList" :key="index"> <div class="selected-item" v-for="(item, index) in selectedList" :key="index">
<div :title="item.codeName"> <div :title="item.codeName">
<<<<<<< HEAD
<span :style="{ background: colorList[index] }"></span>
=======
<span :style="{ background: colorList[index]}"></span> <span :style="{ background: colorList[index]}"></span>
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
{{ item.codeName }} {{ item.codeName }}
</div> </div>
<img src="@/assets/img/channel/del.png" @click="delTag(item)" /> <img src="@/assets/img/channel/del.png" @click="delTag(item)" />
...@@ -22,7 +26,7 @@ ...@@ -22,7 +26,7 @@
<el-button size="small" @click="handleCancel">取 消</el-button> <el-button size="small" @click="handleCancel">取 消</el-button>
<el-button size="small" type="primary" @click="handleSelect">确 定</el-button> <el-button size="small" type="primary" @click="handleSelect">确 定</el-button>
</span> </span>
</el-dialog> </GLDialog>
</div> </div>
</template> </template>
...@@ -104,7 +108,7 @@ export default { ...@@ -104,7 +108,7 @@ export default {
this.dialogVisible = false this.dialogVisible = false
this.$refs.table.$refs.salelistMutiTable.clearSelection() this.$refs.table.$refs.salelistMutiTable.clearSelection()
}, },
handleSelect: utils.debounce(function () { handleSelect: utils.debounce(function() {
if (this.selectedList.length == 0) { if (this.selectedList.length == 0) {
this.$message.error('请选择渠道') this.$message.error('请选择渠道')
return return
...@@ -119,7 +123,7 @@ export default { ...@@ -119,7 +123,7 @@ export default {
}, 300) }, 300)
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.square-main { .square-main {
...@@ -154,11 +158,11 @@ export default { ...@@ -154,11 +158,11 @@ export default {
white-space: nowrap; white-space: nowrap;
} }
span { span {
vertical-align: middle; vertical-align: middle;
display: inline-block; display: inline-block;
width: 12px; width: 12px;
height: 2px; height: 2px;
margin-right: 10px; margin-right: 10px;
} }
img { img {
width: 16px; width: 16px;
...@@ -182,4 +186,4 @@ export default { ...@@ -182,4 +186,4 @@ export default {
} }
} }
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
<template> <template>
<div class="channel-main"> <div class="channel-main">
<el-tabs v-model="activeName" @tab-click="handleClick"> <GLTabs v-model="activeName" :tabPaneList="tabPaneList" class="tabs-panel"></GLTabs>
<el-tab-pane label="渠道码列表" name="first"></el-tab-pane>
<el-tab-pane label="数据统计" name="second"></el-tab-pane>
</el-tabs>
<channel-list v-if="activeName == 'first'"></channel-list> <channel-list v-if="activeName == 'first'"></channel-list>
<channel-statistics v-if="activeName == 'second'"></channel-statistics> <channel-statistics v-if="activeName == 'second'"></channel-statistics>
</div> </div>
...@@ -20,10 +17,38 @@ export default { ...@@ -20,10 +17,38 @@ export default {
}, },
data() { data() {
return { return {
<<<<<<< HEAD
activeName: 'first',
tabPaneList: [
{
label: '渠道码列表',
name: 'first'
},
{
label: '数据统计',
name: 'second'
}
]
}
},
methods: {
render(createElement){
createElement('div',{
class:{
'channel-main':true
}
},[
createElement('el-tabs',{
})
])
},
=======
activeName: 'first' activeName: 'first'
} }
}, },
methods: { methods: {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
jumpWx() { jumpWx() {
this.$history.push('/settings/enterpriseWechat/index') this.$history.push('/settings/enterpriseWechat/index')
}, },
...@@ -62,10 +87,8 @@ export default { ...@@ -62,10 +87,8 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.channel-main { .channel-main {
/deep/ { .tabs-panel {
.el-tabs__nav-wrap::after { margin-bottom: 10px;
height: 0px;
}
} }
} }
</style> </style>
<template> <template>
<div class="channel-main scrm-box-f" v-loading="loading"> <div class="channel-main scrm-box-f" v-loading="loading">
<div class="channel-header">
<el-button type="primary" size="small" @click="goBack">返回</el-button>
</div>
<div class="poster-body"> <div class="poster-body">
<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-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.stop="handleDelete(item.id)"> <div class="poster-del" v-show="item.show" @click.stop="handleDelete(item.id)">
...@@ -36,9 +33,9 @@ ...@@ -36,9 +33,9 @@
</div> </div>
</div> </div>
</div> </div>
<el-dialog v-loading="loadingDrag" title="创建活码海报" :visible.sync="dialogVisible" width="50%" :before-close="handleClose"> <el-dialog title="创建活码海报" :visible.sync="dialogVisible">
<div class="poster-draggable-title">拖动活码可调整活码位置</div> <div class="poster-draggable-title">拖动活码可调整活码位置</div>
<div class="poster-draggable"> <div class="poster-draggable" v-loading="loadingDrag">
<div <div
class="poster-image" class="poster-image"
v-if="dragHeight" v-if="dragHeight"
...@@ -58,7 +55,7 @@ ...@@ -58,7 +55,7 @@
:style="{ :style="{
'background-image': 'url(' + codeUrl + ')' 'background-image': 'url(' + codeUrl + ')'
}" }"
:parent="true" parent=".poster-image"
@dragging="onDrag" @dragging="onDrag"
@resizing="onResize" @resizing="onResize"
:customId="index" :customId="index"
...@@ -255,11 +252,18 @@ export default { ...@@ -255,11 +252,18 @@ export default {
getDraggable(img_url) { getDraggable(img_url) {
let img = new Image() let img = new Image()
img.src = img_url img.src = img_url
<<<<<<< HEAD
img.onload = () => {
this.dragHeight = (img.height * 375) / img.width
this.dialogVisible = true
this.loading = false
=======
let self = this let self = this
img.onload = function() { img.onload = function() {
self.dragHeight = (img.height * 375) / img.width self.dragHeight = (img.height * 375) / img.width
self.dialogVisible = true self.dialogVisible = true
self.loading = false self.loading = false
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
} }
} }
}, },
...@@ -303,6 +307,8 @@ export default { ...@@ -303,6 +307,8 @@ export default {
.poster-draggable { .poster-draggable {
display: flex; display: flex;
justify-content: center; justify-content: center;
// height: 500px;
// overflow: auto;
.poster-image { .poster-image {
background-size: 100% 100%; background-size: 100% 100%;
width: 375px; width: 375px;
......
<template> <template>
<div class="channel-main scrm-box-f"> <div class="channel-main scrm-box-f">
<div><el-button type="primary" size="small" @click="goback">返回</el-button></div>
<div class="detail-form"> <div class="detail-form">
<el-form :model="detailCodeForm" label-width="120px"> <el-form :model="detailCodeForm" label-width="120px">
<el-row> <el-row>
...@@ -12,20 +11,43 @@ ...@@ -12,20 +11,43 @@
<el-row> <el-row>
<el-form-item size="small" label="使用员工:"> <el-form-item size="small" label="使用员工:">
<div class="form-row"> <div class="form-row">
<div class="emp-item" v-for="(item, index) in detailCodeForm.staffInfo" :key="index"> <template v-for="(item, index) in detailCodeForm.staffInfo">
<i class="el-icon-user-solid"></i> <div class="emp-item" :key="index" v-if="index < 10">
{{ item.staffName }} <i class="el-icon-user-solid"></i>
</div> {{ item.staffName }}
</div>
<template v-if="detailCodeForm.staffInfo.length > 10 && index == 10">
<el-popover placement="top" width="600" trigger="hover" :key="index">
<span slot="reference" class="emp-item">...({{ detailCodeForm.staffInfo.length }})</span>
<div class="form-row">
<div class="emp-item" :key="index1" v-for="(item, index1) in detailCodeForm.staffInfo">
<i class="el-icon-user-solid"></i>
{{ item.staffName }}
</div>
</div>
</el-popover>
</template>
</template>
</div> </div>
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-row> <el-row>
<el-form-item size="small" label="标签:"> <el-form-item size="small" label="标签:">
<div class="form-row"> <div class="form-row">
<template v-for="item in tagging"> <template v-for="(tag, idx) in tagging">
<div class="tag-item" v-for="(tag, idx) in item.labelList" :key="idx"> <div class="tag-item" :key="idx" v-if="idx < 10">
{{ tag.name }} {{ tag }}
</div> </div>
<template v-if="tagging.length > 10 && idx == 10">
<el-popover placement="top" width="600" trigger="hover" :key="idx">
<span slot="reference" class="emp-item">...({{ tagging.length }})</span>
<div class="form-row">
<div class="tag-item" v-for="(tag, idx1) in tagging" :key="idx1">
{{ tag }}
</div>
</div>
</el-popover>
</template>
</template> </template>
</div> </div>
</el-form-item> </el-form-item>
...@@ -34,14 +56,22 @@ ...@@ -34,14 +56,22 @@
<div class="count-panel"> <div class="count-panel">
<div class="count-panel-item"> <div class="count-panel-item">
<div class="count-item-title">今日新增客户</div> <div class="count-item-title">今日新增客户</div>
<<<<<<< HEAD
<div class="count-item-num" @click="handleEmpDetail(detailCodeForm, 'day')" v-if="detailCodeForm.yesTodayAddCount">{{ detailCodeForm.yesTodayAddCount }}人</div>
=======
<div class="count-item-num" @click="handleEmpDetail(detailCodeForm,'day')" v-if="detailCodeForm.yesTodayAddCount">{{ detailCodeForm.yesTodayAddCount }}人</div> <div class="count-item-num" @click="handleEmpDetail(detailCodeForm,'day')" v-if="detailCodeForm.yesTodayAddCount">{{ detailCodeForm.yesTodayAddCount }}人</div>
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<div class="count-item-num2" v-else>0人</div> <div class="count-item-num2" v-else>0人</div>
<img src="@/assets/img/channel/count3.png" class="count-item-icon" /> <img src="@/assets/img/channel/count3.png" class="count-item-icon" />
</div> </div>
<div class="count-panel-item"> <div class="count-panel-item">
<div class="count-item-title">总新增客户</div> <div class="count-item-title">总新增客户</div>
<div class="count-item-num" @click="handleEmpDetail(detailCodeForm)" v-if="detailCodeForm.newlyCount">{{ detailCodeForm.newlyCount }}人</div> <div class="count-item-num" @click="handleEmpDetail(detailCodeForm)" v-if="detailCodeForm.newlyCount">{{ detailCodeForm.newlyCount }}人</div>
<<<<<<< HEAD
<div class="count-item-num2" v-else>0人</div>
=======
<div class="count-item-num2" v-else>0人</div> <div class="count-item-num2" v-else>0人</div>
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<img src="@/assets/img/channel/count2.png" class="count-item-icon" /> <img src="@/assets/img/channel/count2.png" class="count-item-icon" />
</div> </div>
<div class="count-panel-item"> <div class="count-panel-item">
...@@ -51,8 +81,13 @@ ...@@ -51,8 +81,13 @@
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" /> <img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover> </el-popover>
</div> </div>
<<<<<<< HEAD
<div class="count-item-num" @click="handleEmpDetail(detailCodeForm, 'status')" v-if="detailCodeForm.newlyKeepCount">{{ detailCodeForm.newlyKeepCount }}人</div>
<div class="count-item-num2" v-else>0人</div>
=======
<div class="count-item-num" @click="handleEmpDetail(detailCodeForm,'status')" v-if="detailCodeForm.newlyKeepCount">{{ detailCodeForm.newlyKeepCount }}人</div> <div class="count-item-num" @click="handleEmpDetail(detailCodeForm,'status')" v-if="detailCodeForm.newlyKeepCount">{{ detailCodeForm.newlyKeepCount }}人</div>
<div class="count-item-num2" v-else>0人</div> <div class="count-item-num2" v-else>0人</div>
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<img src="@/assets/img/channel/count1.png" class="count-item-icon" /> <img src="@/assets/img/channel/count1.png" class="count-item-icon" />
</div> </div>
</div> </div>
...@@ -68,17 +103,30 @@ ...@@ -68,17 +103,30 @@
</div> </div>
<div slot="newlyKeepCount" slot-scope="scope"> <div slot="newlyKeepCount" slot-scope="scope">
<div class="link-dialog" @click="handleEmpDetail(scope.scope, 'status', scope.scope.dayTime)" v-if="scope.scope.newlyKeepCount">{{ scope.scope.newlyKeepCount }}</div> <div class="link-dialog" @click="handleEmpDetail(scope.scope, 'status', scope.scope.dayTime)" v-if="scope.scope.newlyKeepCount">{{ scope.scope.newlyKeepCount }}</div>
<<<<<<< HEAD
<div v-else>0</div>
=======
<div v-else>0</div> <div v-else>0</div>
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
</div> </div>
</GLTable> </GLTable>
<GLTable v-show="activeName == 2" @refreshTable="listStaff" :layout="layout" :tableTotal="tableTotal" ref="memberTabel" :tableData="getMemberApi" :tableParams="tableMemberParams" :pageConf="pageMemberConf" :hasNum="false"> <GLTable v-show="activeName == 2" @refreshTable="listStaff" :layout="layout" :tableTotal="tableTotal" ref="memberTabel" :tableData="getMemberApi" :tableParams="tableMemberParams" :pageConf="pageMemberConf" :hasNum="false">
<div slot="newlyCount" slot-scope="scope"> <div slot="newlyCount" slot-scope="scope">
<<<<<<< HEAD
<div class="link-dialog" @click="handleEmpDetail(scope.scope, 'staffIds')" v-if="scope.scope.newlyCount">{{ scope.scope.newlyCount }}</div>
<div v-else>0</div>
</div>
<div slot="newlyKeepCount" slot-scope="scope">
<div class="link-dialog" @click="handleEmpDetail(scope.scope, 'statusAndStaffIds')" v-if="scope.scope.newlyKeepCount">{{ scope.scope.newlyKeepCount }}</div>
<div v-else>0</div>
=======
<div class="link-dialog" @click="handleEmpDetail(scope.scope,'staffIds')" v-if="scope.scope.newlyCount">{{ scope.scope.newlyCount }}</div> <div class="link-dialog" @click="handleEmpDetail(scope.scope,'staffIds')" v-if="scope.scope.newlyCount">{{ scope.scope.newlyCount }}</div>
<div v-else>0</div> <div v-else>0</div>
</div> </div>
<div slot="newlyKeepCount" slot-scope="scope"> <div slot="newlyKeepCount" slot-scope="scope">
<div class="link-dialog" @click="handleEmpDetail(scope.scope,'statusAndStaffIds')" v-if="scope.scope.newlyKeepCount">{{ scope.scope.newlyKeepCount }}</div> <div class="link-dialog" @click="handleEmpDetail(scope.scope,'statusAndStaffIds')" v-if="scope.scope.newlyKeepCount">{{ scope.scope.newlyKeepCount }}</div>
<div v-else>0</div> <div v-else>0</div>
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
</div> </div>
</GLTable> </GLTable>
<emp-detail ref="empDetailForm"></emp-detail> <emp-detail ref="empDetailForm"></emp-detail>
...@@ -155,8 +203,13 @@ export default { ...@@ -155,8 +203,13 @@ export default {
goback() { goback() {
this.$router.push('/channel/index') this.$router.push('/channel/index')
}, },
<<<<<<< HEAD
handleEmpDetail(scope, status, day) {
this.$refs.empDetailForm.init(scope, status, day)
=======
handleEmpDetail(scope,status,day) { handleEmpDetail(scope,status,day) {
this.$refs.empDetailForm.init(scope,status,day) this.$refs.empDetailForm.init(scope,status,day)
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
}, },
detailChannelCode(id, codeUuid) { detailChannelCode(id, codeUuid) {
let param = { let param = {
...@@ -181,7 +234,14 @@ export default { ...@@ -181,7 +234,14 @@ export default {
labelList labelList
} }
}) })
this.tagging = taggingList this.tagging = []
for (let i = 0; i < taggingList.length; i++) {
for (let j = 0; j < taggingList[i].labelList.length; j++) {
this.tagging.push(taggingList[i].labelList[j].name)
}
}
// this.tagging = taggingList
// console.log(this.tagging, '00000000000')
this.welcomeInfo = res.welcomeInfo.map(item => { this.welcomeInfo = res.welcomeInfo.map(item => {
let attContent let attContent
if (item.attType == 7) { if (item.attType == 7) {
...@@ -227,7 +287,7 @@ export default { ...@@ -227,7 +287,7 @@ export default {
this.listStaff() this.listStaff()
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.link-dialog { .link-dialog {
...@@ -241,45 +301,6 @@ export default { ...@@ -241,45 +301,6 @@ export default {
} }
.detail-form { .detail-form {
margin-top: 10px; margin-top: 10px;
.form-row {
display: flex;
flex-wrap: wrap;
margin-top: 5px;
.tag-item {
display: inline-block;
text-align: center;
min-width: 76px;
background: #fafbfe;
border: 1px solid #e8e8ea;
line-height: 14px;
box-sizing: border-box;
padding: 6px 6px;
font-size: 14px;
border-radius: 4px;
line-height: 14px;
font-weight: 400;
color: #666;
margin-right: 5px;
margin-bottom: 5px;
}
.emp-item {
text-align: left;
position: relative;
font-size: 14px;
line-height: 14px;
padding-left: 15px;
-webkit-border-radius: 4px;
border-radius: 4px;
border: 1px solid #e8e8ea;
padding: 6px;
display: inline-block;
margin-bottom: 5px;
margin-right: 5px;
i {
color: #75acff;
}
}
}
.welcome-panel { .welcome-panel {
.welcome-title { .welcome-title {
font-size: 16px; font-size: 16px;
...@@ -370,35 +391,68 @@ export default { ...@@ -370,35 +391,68 @@ export default {
} }
} }
} }
.form-row {
display: flex;
flex-wrap: wrap;
margin-top: 5px;
.tag-item {
display: inline-block;
text-align: center;
min-width: 76px;
background: #fafbfe;
border: 1px solid #e8e8ea;
line-height: 14px;
box-sizing: border-box;
padding: 3px 6px;
font-size: 14px;
border-radius: 4px;
line-height: 20px;
font-weight: 400;
color: #666;
margin-right: 4px;
margin-bottom: 5px;
box-sizing: border-box;
}
.emp-item {
text-align: left;
position: relative;
font-size: 14px;
line-height: 14px;
padding-left: 15px;
-webkit-border-radius: 4px;
border-radius: 4px;
border: 1px solid #e8e8ea;
padding: 6px;
display: inline-block;
margin-bottom: 5px;
margin-right: 5px;
i {
color: #75acff;
}
}
}
.tab-panel { .tab-panel {
margin-top: 20px;
margin-bottom: 10px;
display: inline-block;
/deep/ { /deep/ {
.el-checkbox:last-of-type {
margin-right: 8px;
}
.el-tabs__nav { .el-tabs__nav {
border: 0; border: none;
} }
.el-tabs__header { .el-tabs__header {
border: 0;
background-color: #f4f6fc;
margin: 0px; margin: 0px;
} }
.el-tabs__item {
border: none;
width: 180px;
height: 32px;
line-height: 32px;
margin: 2px;
text-align: center;
}
.el-tabs__item.is-active { .el-tabs__item.is-active {
background-color: #fff; background: #fff;
border-radius: 4px; border-bottom: none !important;
font-weight: 600; }
.el-tabs__item {
border: 1px solid #e5e5e5 !important;
border-bottom: none;
border-radius: 4px 4px 0px 0px;
background: #fafafa;
&:first-child {
margin-right: 5px;
}
} }
} }
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
...@@ -164,18 +164,11 @@ ...@@ -164,18 +164,11 @@
</div> </div>
</div> </div>
</div> </div>
<div <GLFooter v-if="(editStatus && !configType) || configType">
v-if="(editStatus && !configType) || configType"
class="footer-panel"
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px'
}"
>
<el-button type="primary" @click="handleSave" v-if="!configType">确定</el-button> <el-button type="primary" @click="handleSave" v-if="!configType">确定</el-button>
<el-button type="primary" @click="goback" v-if="configType">返回</el-button> <el-button type="primary" @click="goback" v-if="configType">返回</el-button>
<el-button @click="handleCancel" v-if="!configType">取消</el-button> <el-button @click="handleCancel" v-if="!configType">取消</el-button>
</div> </GLFooter>
<select-emp @selectTable="selectTable" ref="selectEmpForm"></select-emp> <select-emp @selectTable="selectTable" ref="selectEmpForm"></select-emp>
</div> </div>
</template> </template>
...@@ -351,7 +344,10 @@ export default { ...@@ -351,7 +344,10 @@ export default {
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1); box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
} }
.drainage-wrap { .drainage-wrap {
margin-bottom: 20px; margin-bottom: 16px;
&:nth-child(2) {
min-height: calc(100vh - 490px);
}
.drainage-title { .drainage-title {
padding-left: 20px; padding-left: 20px;
font-size: 16px; font-size: 16px;
......
...@@ -4,12 +4,31 @@ ...@@ -4,12 +4,31 @@
<div class="drainage-title">营销配置</div> <div class="drainage-title">营销配置</div>
<div class="form-main"> <div class="form-main">
<div class="drainage-form"> <div class="drainage-form">
<<<<<<< HEAD
<!-- <div class="drainage-form-item">
=======
<div class="drainage-form-item"> <div class="drainage-form-item">
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<label class="is-require" style="line-height: 32px">营销名称</label> <label class="is-require" style="line-height: 32px">营销名称</label>
<div style="position: relative"> <div style="position: relative">
<el-input @focus="imNameStatus = false" type="type" size="small" placeholder="请输入营销名称" v-model.trim="imName" :disabled="!editStatus" maxlength="30"></el-input> <el-input @focus="imNameStatus = false" type="type" size="small" placeholder="请输入营销名称" v-model.trim="imName" :disabled="!editStatus" maxlength="30"></el-input>
<div class="el-form-item__error" v-if="imNameStatus">请输入营销名称</div> <div class="el-form-item__error" v-if="imNameStatus">请输入营销名称</div>
</div> </div>
<<<<<<< HEAD
</div> -->
<div class="drainage-form-item">
<!-- <label>群发短信</label> -->
<div class="gl-form-page">
<el-form ref="configForm" label-width="154px" :model="addForm" :rules="addRules" class="code-body-form">
<el-form-item label="营销名称:" prop="imName">
<el-input @focus="imNameStatus = false" type="type" size="small" placeholder="请输入营销名称" v-model.trim="imName" :disabled="!editStatus" maxlength="30"></el-input>
</el-form-item>
<el-form-item label="推送规则:"><div class="configForm-desc">系统将在「开始营销时间」之后启动短信营销,并在「截止营销时间」之后停止短信下放。由于相关管控限制,营销类短信无法实时触达用户,若短信时效要求很高,请谨慎使用。</div></el-form-item>
<el-form-item size="small" label="营销时间:" prop="time">
<el-time-picker is-range :disabled="!editStatus" value-format="HH:mm" format="HH:mm" v-model="addForm.time" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围"></el-time-picker>
</el-form-item>
<el-form-item label="短信内容:" prop="content">
=======
</div> </div>
<div class="drainage-form-item"> <div class="drainage-form-item">
<label>群发短信</label> <label>群发短信</label>
...@@ -20,13 +39,19 @@ ...@@ -20,13 +39,19 @@
<el-time-picker is-range :disabled="!editStatus" value-format="HH:mm" format="HH:mm" v-model="addForm.time" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围"></el-time-picker> <el-time-picker is-range :disabled="!editStatus" value-format="HH:mm" format="HH:mm" v-model="addForm.time" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围"></el-time-picker>
</el-form-item> </el-form-item>
<el-form-item label="短信内容" prop="content"> <el-form-item label="短信内容" prop="content">
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<el-input type="textarea" v-model="addForm.content" rows="5" :disabled="!editStatus" maxlength="280" show-word-limit></el-input> <el-input type="textarea" v-model="addForm.content" rows="5" :disabled="!editStatus" maxlength="280" show-word-limit></el-input>
<div class="form-tips">70字內(含70字)计一条,超过70字,按70字/条计费。</div> <div class="form-tips">70字內(含70字)计一条,超过70字,按70字/条计费。</div>
<div class="form-tips">提示:当前短信已有{{ addForm.content.length }}字,按{{ content.length }}条短信发送且计费。</div> <div class="form-tips">提示:当前短信已有{{ addForm.content.length }}字,按{{ content.length }}条短信发送且计费。</div>
</el-form-item> </el-form-item>
<div class="drainage-form-item"> <div class="drainage-form-item">
<<<<<<< HEAD
<label>
自动打标签:
=======
<label style="width: 100px; text-align: left; color: #666"> <label style="width: 100px; text-align: left; color: #666">
自动打标签 自动打标签
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<el-popover placement="top" width="400" trigger="hover" content="提示:通过该营销活动添加员工企微的客户,将自动使用以下标签进行标记。"> <el-popover placement="top" width="400" trigger="hover" content="提示:通过该营销活动添加员工企微的客户,将自动使用以下标签进行标记。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" /> <img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover> </el-popover>
...@@ -43,8 +68,13 @@ ...@@ -43,8 +68,13 @@
</div> </div>
</div> </div>
<div class="drainage-form-item"> <div class="drainage-form-item">
<<<<<<< HEAD
<label style="margin-left: 20px">
跟进员工:
=======
<label> <label>
跟进员工 跟进员工
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<el-popover placement="top" width="400" trigger="hover" content="用户点击短信中的链接后,将自动分配以下某位员工的企微名片,客户添加好友将自动回复后台所配置的欢迎语。"> <el-popover placement="top" width="400" trigger="hover" content="用户点击短信中的链接后,将自动分配以下某位员工的企微名片,客户添加好友将自动回复后台所配置的欢迎语。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" /> <img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover> </el-popover>
...@@ -71,7 +101,11 @@ ...@@ -71,7 +101,11 @@
<div class="chanel-form-title">欢迎语</div> <div class="chanel-form-title">欢迎语</div>
<div class="welcome-panel"> <div class="welcome-panel">
<div class="welcome-switch"> <div class="welcome-switch">
<<<<<<< HEAD
<label>自动发送欢迎语:</label>
=======
<label>自动发送欢迎语</label> <label>自动发送欢迎语</label>
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<el-switch v-model="autoWelcome" :disabled="!editStatus" active-color="#5850FF" inactive-color="#999999"></el-switch> <el-switch v-model="autoWelcome" :disabled="!editStatus" active-color="#5850FF" inactive-color="#999999"></el-switch>
</div> </div>
<div class="welcome-box" v-show="!editStatus && autoWelcome"> <div class="welcome-box" v-show="!editStatus && autoWelcome">
...@@ -96,6 +130,13 @@ ...@@ -96,6 +130,13 @@
<img src="@/assets/img/guestCustom/icon-applet.png" alt="" /> <img src="@/assets/img/guestCustom/icon-applet.png" alt="" />
<span>{{ item.attContent }}</span> <span>{{ item.attContent }}</span>
</div> </div>
<<<<<<< HEAD
<div v-else-if="item.attType == 6">
<img src="@/assets/img/guestCustom/icon-applet.png" alt="" />
<span>{{ JSON.parse(item.attContent).fileName }}</span>
</div>
=======
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<div v-else-if="item.attType == 7"> <div v-else-if="item.attType == 7">
<img src="@/assets/img/guestCustom/icon-applet.png" alt="" /> <img src="@/assets/img/guestCustom/icon-applet.png" alt="" />
<span>{{ item.attContent.marketingName }}</span> <span>{{ item.attContent.marketingName }}</span>
...@@ -149,7 +190,11 @@ export default { ...@@ -149,7 +190,11 @@ export default {
}, },
watch: { watch: {
'addForm.content': { 'addForm.content': {
<<<<<<< HEAD
handler: function() {
=======
handler: function () { handler: function () {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
this.content = [] this.content = []
let str = this.addForm.content let str = this.addForm.content
let num = 70 let num = 70
...@@ -185,7 +230,11 @@ export default { ...@@ -185,7 +230,11 @@ export default {
deep: true deep: true
}, },
tagging: { tagging: {
<<<<<<< HEAD
handler: function() {
=======
handler: function () { handler: function () {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
this.taggingLength = 0 this.taggingLength = 0
this.tagging.forEach(item => { this.tagging.forEach(item => {
this.taggingLength += item.labelList.length this.taggingLength += item.labelList.length
...@@ -215,13 +264,41 @@ export default { ...@@ -215,13 +264,41 @@ export default {
this.addForm.content = res.dracImMessageConResponse.content this.addForm.content = res.dracImMessageConResponse.content
this.imName = res.imName this.imName = res.imName
this.autoWelcome = res.autoWelcome ? true : false this.autoWelcome = res.autoWelcome ? true : false
<<<<<<< HEAD
const dracScrmWelcomeConfigDTOS = res.dracScrmWelcomeConfigDTOS ? res.dracScrmWelcomeConfigDTOS : []
const previewList = dracScrmWelcomeConfigDTOS.map(item => {
if (item.attType == 7) item.attContent = JSON.parse(item.attContent)
if (item.attType == 1) item.attContent = item.attContent.replaceAll('[@昵称]', '<span style="color:#5850FF">@昵称</span>').replaceAll(/\n/g, '<br>')
=======
const previewList = res.dracScrmWelcomeConfigDTOS.map(item => { const previewList = res.dracScrmWelcomeConfigDTOS.map(item => {
if (item.attType == 7) item.attContent = JSON.parse(item.attContent) if (item.attType == 7) item.attContent = JSON.parse(item.attContent)
if (item.attType == 1) item.attContent = item.attContent.replaceAll('[@昵称]', '<span style="color:#5850FF">@昵称</span>') if (item.attType == 1) item.attContent = item.attContent.replaceAll('[@昵称]', '<span style="color:#5850FF">@昵称</span>')
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
return item return item
}) })
this.welcomeInfo = previewList this.welcomeInfo = previewList
const tagging = eval(res.tagging) const tagging = eval(res.tagging)
<<<<<<< HEAD
if (tagging && tagging.length) {
const taggingList = tagging.map(item => {
let name = item.name.split(',')
let ids = item.tagIds.split(',')
console.log(ids)
let labelList = name.map((tag, index) => {
return { id: ids[index], name: tag }
})
return {
labelGroup: {
id: item.groupId,
name: item.labelType
},
labelList
}
})
this.tagging = taggingList
}
=======
const taggingList = tagging.map(item => { const taggingList = tagging.map(item => {
let name = item.name.split(',') let name = item.name.split(',')
let ids = item.tagIds.split(',') let ids = item.tagIds.split(',')
...@@ -238,6 +315,7 @@ export default { ...@@ -238,6 +315,7 @@ export default {
} }
}) })
this.tagging = taggingList this.tagging = taggingList
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
this.$nextTick(() => { this.$nextTick(() => {
this.saveStatus = false this.saveStatus = false
}) })
...@@ -250,11 +328,19 @@ export default { ...@@ -250,11 +328,19 @@ export default {
this.findById(id) this.findById(id)
} }
} }
<<<<<<< HEAD
</script>
<style lang="scss" scoped>
.channel-main-welcome {
margin: 20px 0px 16px;
=======
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.channel-main-welcome { .channel-main-welcome {
margin: 20px 0px 60px; margin: 20px 0px 60px;
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
.chanel-form-title { .chanel-form-title {
padding-left: 20px; padding-left: 20px;
font-size: 16px; font-size: 16px;
...@@ -277,7 +363,11 @@ export default { ...@@ -277,7 +363,11 @@ export default {
} }
} }
.welcome-box { .welcome-box {
<<<<<<< HEAD
margin-left: 70px;
=======
margin-left: 48px; margin-left: 48px;
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
&-contaner { &-contaner {
margin: 20px; margin: 20px;
background: rgba(247, 247, 247, 0.52); background: rgba(247, 247, 247, 0.52);
...@@ -444,9 +534,17 @@ export default { ...@@ -444,9 +534,17 @@ export default {
} }
} }
label { label {
<<<<<<< HEAD
font-size: 14px;
text-align: right;
color: #666;
width: 140px;
margin-right: 12px;
=======
width: 120px; width: 120px;
text-align: right; text-align: right;
margin-right: 20px; margin-right: 20px;
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
height: 36px; height: 36px;
line-height: 36px; line-height: 36px;
img { img {
...@@ -699,4 +797,8 @@ export default { ...@@ -699,4 +797,8 @@ export default {
} }
} }
} }
</style>
\ No newline at end of file \ No newline at end of file
<<<<<<< HEAD
</style>
=======
</style>
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
...@@ -21,10 +21,24 @@ ...@@ -21,10 +21,24 @@
</el-row> </el-row>
</el-form> </el-form>
<GLTable v-loading="loading" ref="table" @refreshTable="handleSearch" :searchForm="tableSearchForm" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams"> <GLTable v-loading="loading" ref="table" @refreshTable="handleSearch" :searchForm="tableSearchForm" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams">
<<<<<<< HEAD
<div slot="status" slot-scope="scope">
<span :class="['task_icon',scope.scope.status==1?'green-icon':'yellow-icon']">{{ scope.scope.statusName }}</span>
</div>
=======
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">短信内容</el-button> <el-button type="text" @click="handleDetail(scope.scope)">短信内容</el-button>
</div> </div>
</GLTable> </GLTable>
<<<<<<< HEAD
<GLDialog title="短信内容" :hasFooter="true" :content="messageContent" :visible.sync="dialogVisible" mode="small">
<span slot="footer" class="dialog-footer">
<el-button size="small" type="primary" @click="dialogVisible = false">确定</el-button>
</span>
</GLDialog>
=======
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
</div> </div>
</div> </div>
</template> </template>
...@@ -36,7 +50,13 @@ export default { ...@@ -36,7 +50,13 @@ export default {
data() { data() {
return { return {
loading: false, loading: false,
<<<<<<< HEAD
messageContent: '',
tableSearchForm: {},
dialogVisible: false,
=======
tableSearchForm: {}, tableSearchForm: {},
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
tableData: [], tableData: [],
optionstatus: [ optionstatus: [
{ {
...@@ -66,7 +86,12 @@ export default { ...@@ -66,7 +86,12 @@ export default {
}, },
{ {
label: '发送状态', label: '发送状态',
<<<<<<< HEAD
prop: 'statusName',
addHtml: 'status'
=======
prop: 'statusName' prop: 'statusName'
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
}, },
{ {
label: '发送时间', label: '发送时间',
...@@ -88,7 +113,12 @@ export default { ...@@ -88,7 +113,12 @@ export default {
}, },
methods: { methods: {
handleDetail(scope) { handleDetail(scope) {
<<<<<<< HEAD
this.dialogVisible = true
this.messageContent = scope.content
=======
this.$alert(scope.content, { center: true }) this.$alert(scope.content, { center: true })
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
}, },
handleSearch() { handleSearch() {
this.listChannelCodeByPage() this.listChannelCodeByPage()
...@@ -131,7 +161,11 @@ export default { ...@@ -131,7 +161,11 @@ export default {
this.listChannelCodeByPage() this.listChannelCodeByPage()
} }
} }
<<<<<<< HEAD
</script>
=======
</script> </script>
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<style> <style>
.el-popover { .el-popover {
max-width: 800px; max-width: 800px;
...@@ -282,4 +316,8 @@ export default { ...@@ -282,4 +316,8 @@ export default {
// top: 7px; // top: 7px;
// } // }
} }
</style>
\ No newline at end of file \ No newline at end of file
<<<<<<< HEAD
</style>
=======
</style>
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
...@@ -4,7 +4,11 @@ ...@@ -4,7 +4,11 @@
<div class="drainage-title">指定客户</div> <div class="drainage-title">指定客户</div>
<div class="drainage-form"> <div class="drainage-form">
<div class="drainage-form-item"> <div class="drainage-form-item">
<<<<<<< HEAD
<label style="margin: 0 0 0 32px">指定方式:</label>
=======
<label>指定方式</label> <label>指定方式</label>
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<div class="upload-box drainage-type"> <div class="upload-box drainage-type">
<el-radio-group v-model="selectType"> <el-radio-group v-model="selectType">
<el-radio :label="1">通过标签筛选</el-radio> <el-radio :label="1">通过标签筛选</el-radio>
...@@ -14,7 +18,11 @@ ...@@ -14,7 +18,11 @@
</div> </div>
</div> </div>
<div class="drainage-form-item" v-if="selectType == 1"> <div class="drainage-form-item" v-if="selectType == 1">
<<<<<<< HEAD
<label style="margin: 0 0 0 32px">客户信息:</label>
=======
<label>客户信息</label> <label>客户信息</label>
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<div class="upload-box"> <div class="upload-box">
<el-button size="small" @click="handleScreenTag"> <el-button size="small" @click="handleScreenTag">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
...@@ -36,7 +44,11 @@ ...@@ -36,7 +44,11 @@
</div> </div>
</div> </div>
<div class="drainage-form-item" v-if="selectType == 3"> <div class="drainage-form-item" v-if="selectType == 3">
<<<<<<< HEAD
<label style="margin: 0 0 0 32px">客户信息:</label>
=======
<label>客户信息</label> <label>客户信息</label>
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<div class="upload-box"> <div class="upload-box">
<el-button size="small" @click="handleCrowd"> <el-button size="small" @click="handleCrowd">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
...@@ -58,7 +70,11 @@ ...@@ -58,7 +70,11 @@
</div> </div>
</div> </div>
<div class="drainage-form-item" v-if="selectType == 2"> <div class="drainage-form-item" v-if="selectType == 2">
<<<<<<< HEAD
<label style="margin: 0 0 0 32px">客户信息:</label>
=======
<label>客户信息</label> <label>客户信息</label>
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<div class="upload-box"> <div class="upload-box">
<div class="upload-file-panel"> <div class="upload-file-panel">
<div class="image-uploader"> <div class="image-uploader">
...@@ -83,22 +99,25 @@ ...@@ -83,22 +99,25 @@
<div class="drainage-title">营销配置</div> <div class="drainage-title">营销配置</div>
<div class="form-main"> <div class="form-main">
<div class="drainage-form"> <div class="drainage-form">
<div class="drainage-form-item"> <!-- <div class="drainage-form-item">
<label class="is-require" style="line-height: 32px">营销名称</label> <label class="is-require" style="line-height: 32px">营销名称</label>
<div style="position: relative"> <div style="position: relative">
<el-input @focus="imNameStatus = false" type="type" size="small" placeholder="请输入营销名称" v-model.trim="imName" :disabled="!editStatus" maxlength="30"></el-input> <el-input @focus="imNameStatus = false" type="type" size="small" placeholder="请输入营销名称" v-model.trim="imName" :disabled="!editStatus" maxlength="30"></el-input>
<div class="el-form-item__error" v-if="imNameStatus">请输入营销名称</div> <div class="el-form-item__error" v-if="imNameStatus">请输入营销名称</div>
</div> </div>
</div> </div> -->
<div class="drainage-form-item"> <div class="drainage-form-item">
<label>群发短信</label> <!-- <label>群发短信</label> -->
<div class="message-panel"> <div class="gl-form-page">
<el-form ref="configForm" label-position="left" label-width="100px" :model="addForm" :rules="addRules" class="code-body-form"> <el-form ref="configForm" label-width="154px" :model="addForm" :rules="addRules" class="code-body-form">
<el-form-item label="推送规则:"><div class="configForm-desc">系统将在「开始营销时间」之后启动短信营销,并在「截止营销时间」之后停止短信下放。由于相关管控限制,营销类短信无法实时触达用户,若短信时效要求很高,请谨慎使用。</div></el-form-item> <el-form-item label="营销名称:" prop="imName">
<el-form-item size="small" label="营销时间" prop="time"> <el-input @focus="imNameStatus = false" type="type" size="small" placeholder="请输入营销名称" v-model.trim="addForm.imName" :disabled="!editStatus" maxlength="30"></el-input>
</el-form-item>
<el-form-item label="推送时间:">系统将在「开始营销时间」之后启动智系统将在「开始营销时间」之后启动短信营销,并在「截止营销时间」之后停止短信发送。由于相关管控限制,营销类短信无法实时触达用户,若短信时效要求很高,请谨慎使用。</el-form-item>
<el-form-item size="small" label="营销时间:" prop="time">
<el-time-picker is-range :disabled="!editStatus" value-format="HH:mm" format="HH:mm" v-model="addForm.time" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围"></el-time-picker> <el-time-picker is-range :disabled="!editStatus" value-format="HH:mm" format="HH:mm" v-model="addForm.time" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围"></el-time-picker>
</el-form-item> </el-form-item>
<el-form-item label="短信内容" prop="content"> <el-form-item label="短信内容:" prop="content">
<el-input type="textarea" v-model="addForm.content" rows="5" :disabled="!editStatus" maxlength="280" show-word-limit></el-input> <el-input type="textarea" v-model="addForm.content" rows="5" :disabled="!editStatus" maxlength="280" show-word-limit></el-input>
<div class="select-panel" v-if="editStatus"> <div class="select-panel" v-if="editStatus">
<div @click="handleSelectMessage"> <div @click="handleSelectMessage">
...@@ -109,8 +128,13 @@ ...@@ -109,8 +128,13 @@
<div class="form-tips">提示:当前短信已有{{ addForm.content.length }}字,按{{ content.length }}条短信发送且计费。</div> <div class="form-tips">提示:当前短信已有{{ addForm.content.length }}字,按{{ content.length }}条短信发送且计费。</div>
</el-form-item> </el-form-item>
<div class="drainage-form-item"> <div class="drainage-form-item">
<<<<<<< HEAD
<label>
自动打标签:
=======
<label style="width: 100px; text-align: left; color: #666"> <label style="width: 100px; text-align: left; color: #666">
自动打标签 自动打标签
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<el-popover placement="top" width="400" trigger="hover" content="提示:通过该营销活动添加员工企微的客户,将自动使用以下标签进行标记。"> <el-popover placement="top" width="400" trigger="hover" content="提示:通过该营销活动添加员工企微的客户,将自动使用以下标签进行标记。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" /> <img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover> </el-popover>
...@@ -139,8 +163,13 @@ ...@@ -139,8 +163,13 @@
</div> </div>
</div> </div>
<div class="drainage-form-item" v-if="editStatus"> <div class="drainage-form-item" v-if="editStatus">
<<<<<<< HEAD
<label class="is-require" style="margin-left: 20px">
跟进员工:
=======
<label class="is-require"> <label class="is-require">
跟进员工 跟进员工
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<el-popover placement="top" width="400" trigger="hover" content="用户点击短信中的链接后,将自动分配以下某位员工的企微名片,客户添加好友将自动回复后台所配置的欢迎语。"> <el-popover placement="top" width="400" trigger="hover" content="用户点击短信中的链接后,将自动分配以下某位员工的企微名片,客户添加好友将自动回复后台所配置的欢迎语。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" /> <img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover> </el-popover>
...@@ -161,8 +190,13 @@ ...@@ -161,8 +190,13 @@
</div> </div>
</div> </div>
<div class="drainage-form-item" v-else> <div class="drainage-form-item" v-else>
<<<<<<< HEAD
<label style="margin-left: 20px">
跟进员工:
=======
<label> <label>
跟进员工 跟进员工
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<el-popover placement="top" width="400" trigger="hover" content="用户点击短信中的链接后,将自动分配以下某位员工的企微名片,客户添加好友将自动回复后台所配置的欢迎语。"> <el-popover placement="top" width="400" trigger="hover" content="用户点击短信中的链接后,将自动分配以下某位员工的企微名片,客户添加好友将自动回复后台所配置的欢迎语。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" /> <img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover> </el-popover>
...@@ -189,11 +223,11 @@ ...@@ -189,11 +223,11 @@
<div class="chanel-form-title">欢迎语</div> <div class="chanel-form-title">欢迎语</div>
<div class="welcome-panel"> <div class="welcome-panel">
<div class="welcome-switch"> <div class="welcome-switch">
<label>自动发送欢迎语</label> <label>自动发送欢迎语:</label>
<el-switch v-model="autoWelcome" :disabled="!editStatus" active-color="#5850FF" inactive-color="#999999"></el-switch> <el-switch v-model="autoWelcome" :disabled="!editStatus" active-color="#5850FF" inactive-color="#999999"></el-switch>
</div> </div>
<div class="welcome-box" v-show="editStatus && autoWelcome"> <div class="welcome-box" v-show="editStatus && autoWelcome">
<welcome-words :eventBus="eventBus" ref="welcome"></welcome-words> <GLEditor ref="welcome" :form="'customer'" :btnList="btnList" @previewWord="previewForm"></GLEditor>
</div> </div>
<div class="welcome-box" v-show="!editStatus && autoWelcome"> <div class="welcome-box" v-show="!editStatus && autoWelcome">
<div class="welcome-box-contaner"> <div class="welcome-box-contaner">
...@@ -226,16 +260,10 @@ ...@@ -226,16 +260,10 @@
</div> </div>
</div> </div>
</div> </div>
<div <GLFooter>
class="footer-panel"
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px'
}"
>
<el-button type="primary" @click="handleSave">提交</el-button>
<el-button @click="handleCancel">取消</el-button> <el-button @click="handleCancel">取消</el-button>
</div> <el-button type="primary" @click="handleSave">提交</el-button>
</GLFooter>
<div class="import-panel" v-if="importStatus"> <div class="import-panel" v-if="importStatus">
<div class="import-panel-box"> <div class="import-panel-box">
<div class="import-title">操作结果</div> <div class="import-title">操作结果</div>
...@@ -255,6 +283,7 @@ ...@@ -255,6 +283,7 @@
</div> </div>
</div> </div>
</div> </div>
<GLDialog title="提示" @onOk="handleSure" @onCancel="dialogVisible = false" type="warning" content="当前有内容信息未保存,是否继续返回?" :visible.sync="dialogVisible" mode="small"></GLDialog>
<select-emp ref="selectEmpForm" @selectTable="selectTable"></select-emp> <select-emp ref="selectEmpForm" @selectTable="selectTable"></select-emp>
<select-tag ref="selectTagForm" @tagSelected="tagSelected"></select-tag> <select-tag ref="selectTagForm" @tagSelected="tagSelected"></select-tag>
<screen-tag ref="screenTagForm" @tagScreened="tagScreened"></screen-tag> <screen-tag ref="screenTagForm" @tagScreened="tagScreened"></screen-tag>
...@@ -266,7 +295,7 @@ ...@@ -266,7 +295,7 @@
<script> <script>
import Vue from 'vue' import Vue from 'vue'
import welcomeWords from '@/components/welcome/welcomeWords.vue' import word from '@/mixins/word'
import selectEmp from '@/components/selectEmp' import selectEmp from '@/components/selectEmp'
import selectTag from '@/components/selectTag' import selectTag from '@/components/selectTag'
import screenTag from '@/components/screenTag' import screenTag from '@/components/screenTag'
...@@ -289,14 +318,19 @@ const validateContent = (rule, value, callback) => { ...@@ -289,14 +318,19 @@ const validateContent = (rule, value, callback) => {
} }
} }
export default { export default {
mixins: [word],
name: 'config', name: 'config',
components: { components: {
selectEmp, selectEmp,
selectTag, selectTag,
screenTag, screenTag,
selectCrowd, selectCrowd,
<<<<<<< HEAD
messageModel
=======
messageModel, messageModel,
welcomeWords welcomeWords
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
}, },
data() { data() {
return { return {
...@@ -304,7 +338,6 @@ export default { ...@@ -304,7 +338,6 @@ export default {
selectType: 1, selectType: 1,
loading: false, loading: false,
welcomeInfo: [], welcomeInfo: [],
eventBus: new Vue(),
taggingLength: 0, taggingLength: 0,
autoWelcome: true, autoWelcome: true,
imName: '', imName: '',
...@@ -319,6 +352,7 @@ export default { ...@@ -319,6 +352,7 @@ export default {
footerLeft: 0, footerLeft: 0,
footerWidth: 0, footerWidth: 0,
addForm: { addForm: {
imName: '',
desc: '', desc: '',
content: `【${this.$globalState.session.merchantName}】`, content: `【${this.$globalState.session.merchantName}】`,
time: ['9:00:00', '18:00:00'] time: ['9:00:00', '18:00:00']
...@@ -329,7 +363,7 @@ export default { ...@@ -329,7 +363,7 @@ export default {
labeling: [], labeling: [],
crowding: [], crowding: [],
messageItem: {}, messageItem: {},
dialogVisible: true, dialogVisible: false,
value: false, value: false,
value1: false, value1: false,
dracImFollowStaffResponses: [], dracImFollowStaffResponses: [],
...@@ -337,6 +371,10 @@ export default { ...@@ -337,6 +371,10 @@ export default {
ModelItem: {}, ModelItem: {},
merchantName: this.$globalState.session.merchantName, merchantName: this.$globalState.session.merchantName,
addRules: { addRules: {
<<<<<<< HEAD
imName: [{ required: true, message: '请输入营销名称', trigger: 'blur' }],
=======
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
time: [ time: [
{ required: true, message: '请选择营销时间', trigger: 'change' }, { required: true, message: '请选择营销时间', trigger: 'change' },
{ validator: validateTime, trigger: 'change' } { validator: validateTime, trigger: 'change' }
...@@ -478,6 +516,10 @@ export default { ...@@ -478,6 +516,10 @@ export default {
goback() { goback() {
this.importStatus = false this.importStatus = false
}, },
<<<<<<< HEAD
handleSure() {
this.$router.push('/market/index')
=======
handleCancel() { handleCancel() {
console.log(this.saveStatus) console.log(this.saveStatus)
if (this.saveStatus || (this.$refs.welcome && this.$refs.welcome.previewList.length > 0 && this.editStatus)) { if (this.saveStatus || (this.$refs.welcome && this.$refs.welcome.previewList.length > 0 && this.editStatus)) {
...@@ -491,6 +533,15 @@ export default { ...@@ -491,6 +533,15 @@ export default {
} else { } else {
this.$router.push('/market/index') this.$router.push('/market/index')
} }
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
},
handleCancel() {
console.log(this.saveStatus)
if (this.saveStatus || (this.$refs.welcome && this.$refs.welcome.previewList.length > 0 && this.editStatus)) {
this.dialogVisible = true
} else {
this.$router.push('/market/index')
}
}, },
selectItem(item) { selectItem(item) {
this.messageItem = item this.messageItem = item
...@@ -640,7 +691,11 @@ export default { ...@@ -640,7 +691,11 @@ export default {
const groupIds = this.crowding.map(item => item.crowdId) const groupIds = this.crowding.map(item => item.crowdId)
let params = { let params = {
autoWelcome: this.autoWelcome ? 1 : 0, autoWelcome: this.autoWelcome ? 1 : 0,
<<<<<<< HEAD
imName: this.addForm.imName,
=======
imName: this.imName, imName: this.imName,
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
imType: 2, imType: 2,
tagging: JSON.stringify(tagging), tagging: JSON.stringify(tagging),
filterTagging: JSON.stringify(this.filterTagging), filterTagging: JSON.stringify(this.filterTagging),
...@@ -670,6 +725,8 @@ export default { ...@@ -670,6 +725,8 @@ export default {
} }
return item return item
}) })
<<<<<<< HEAD
=======
this.$tracker.track({ this.$tracker.track({
selectType: this.selectType == 1 ? '通过标签筛选' : this.selectType == 2 ? '通过Excel导入' : '通过人群筛选', selectType: this.selectType == 1 ? '通过标签筛选' : this.selectType == 2 ? '通过Excel导入' : '通过人群筛选',
marketInfo: `短信内容:${this.addForm.content},营销时间:${this.addForm.time},营销名称:${this.imName}`, marketInfo: `短信内容:${this.addForm.content},营销时间:${this.addForm.time},营销名称:${this.imName}`,
...@@ -677,6 +734,7 @@ export default { ...@@ -677,6 +734,7 @@ export default {
pageName: '新增营销', pageName: '新增营销',
name: '提交' name: '提交'
}) })
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
params.welcomeInfo = attachmentList params.welcomeInfo = attachmentList
this.loading = true this.loading = true
this.$apis.marketing.exportAdd(params).then(res => { this.$apis.marketing.exportAdd(params).then(res => {
...@@ -723,7 +781,7 @@ export default { ...@@ -723,7 +781,7 @@ export default {
this.dracImFollowStaffResponses = res.dracImFollowStaffResponses this.dracImFollowStaffResponses = res.dracImFollowStaffResponses
this.addForm.time = [res.dracImMessageConResponse.startTime, res.dracImMessageConResponse.endTime] this.addForm.time = [res.dracImMessageConResponse.startTime, res.dracImMessageConResponse.endTime]
this.addForm.content = res.dracImMessageConResponse.content this.addForm.content = res.dracImMessageConResponse.content
this.imName = res.imName this.addForm.imName = res.imName
this.autoWelcome = res.autoWelcome ? true : false this.autoWelcome = res.autoWelcome ? true : false
const previewList = res.dracScrmWelcomeConfigDTOS.map(item => { const previewList = res.dracScrmWelcomeConfigDTOS.map(item => {
if (item.attType == 7) item.attContent = JSON.parse(item.attContent) if (item.attType == 7) item.attContent = JSON.parse(item.attContent)
...@@ -792,7 +850,7 @@ export default { ...@@ -792,7 +850,7 @@ export default {
} }
} }
.welcome-box { .welcome-box {
margin-left: 48px; margin-left: 61px;
&-contaner { &-contaner {
margin: 20px; margin: 20px;
background: rgba(247, 247, 247, 0.52); background: rgba(247, 247, 247, 0.52);
...@@ -894,13 +952,21 @@ export default { ...@@ -894,13 +952,21 @@ export default {
} }
} }
.drainage-wrap { .drainage-wrap {
<<<<<<< HEAD
margin-bottom: 16px;
=======
margin-bottom: 20px; margin-bottom: 20px;
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
&:nth-child(2) { &:nth-child(2) {
margin-bottom: 20px; margin-bottom: 20px;
} }
&.drainage-bottom { &.drainage-bottom {
<<<<<<< HEAD
margin-bottom: 16px;
=======
margin-bottom: 60px; margin-bottom: 60px;
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
} }
.drainage-title { .drainage-title {
padding-left: 20px; padding-left: 20px;
...@@ -963,9 +1029,11 @@ export default { ...@@ -963,9 +1029,11 @@ export default {
} }
} }
label { label {
width: 120px; font-size: 14px;
text-align: right; text-align: right;
margin-right: 20px; color: #666;
width: 140px;
margin-right: 12px;
height: 36px; height: 36px;
line-height: 36px; line-height: 36px;
img { img {
...@@ -998,7 +1066,9 @@ export default { ...@@ -998,7 +1066,9 @@ export default {
color: #717171; color: #717171;
line-height: 30px; line-height: 30px;
border: 1px solid #dcdfe6; border: 1px solid #dcdfe6;
width: 580px !important;
border-top: 0px; border-top: 0px;
box-sizing: border-box;
> div { > div {
cursor: pointer; cursor: pointer;
margin-right: 10px; margin-right: 10px;
...@@ -1011,7 +1081,11 @@ export default { ...@@ -1011,7 +1081,11 @@ export default {
.upload-box { .upload-box {
margin-bottom: 10px; margin-bottom: 10px;
&.drainage-type { &.drainage-type {
<<<<<<< HEAD
margin-left: -28px;
=======
margin-left: -10px; margin-left: -10px;
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
} }
.tag-count { .tag-count {
color: #666666; color: #666666;
......
...@@ -5,9 +5,15 @@ ...@@ -5,9 +5,15 @@
<el-tab-pane label="客户列表" name="second"></el-tab-pane> <el-tab-pane label="客户列表" name="second"></el-tab-pane>
</el-tabs> </el-tabs>
<component :is="activeName == 'first' ? configInfo : customList"></component> <component :is="activeName == 'first' ? configInfo : customList"></component>
<<<<<<< HEAD
<!-- <GLFooter>
<el-button type="primary" @click="goback">返回</el-button>
</GLFooter> -->
=======
<GLFooter> <GLFooter>
<el-button type="primary" @click="goback">返回</el-button> <el-button type="primary" @click="goback">返回</el-button>
</GLFooter> </GLFooter>
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
</div> </div>
</template> </template>
......
...@@ -14,8 +14,15 @@ ...@@ -14,8 +14,15 @@
</div> </div>
<div class="square-tabel scrm-box-f"> <div class="square-tabel scrm-box-f">
<div class="square-tabel-form"> <div class="square-tabel-form">
<<<<<<< HEAD
<GLCombiForm :rowNumber="1" ref="formSearch" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
=======
<GLCombiForm ref="formSearch" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm ref="formSearch" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<GLTable ref="employeeRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="employeeRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div slot="imStatus" slot-scope="scope">
<span :class="['task_icon',scope.scope.imStatus==3?'green-icon':'yellow-icon']">{{ scope.scope.imStatusName }}</span>
</div>
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<GLButton type="text" @click="handleDetail(scope.scope)" fn="智能营销配置">查看配置</GLButton> <GLButton type="text" @click="handleDetail(scope.scope)" fn="智能营销配置">查看配置</GLButton>
<!-- <GLButton :disabled="scope.scope.imStatus!=1" type="text" @click="handleStatistics(scope.scope)" fn="营销统计">营销统计</GLButton> --> <!-- <GLButton :disabled="scope.scope.imStatus!=1" type="text" @click="handleStatistics(scope.scope)" fn="营销统计">营销统计</GLButton> -->
...@@ -92,26 +99,32 @@ export default { ...@@ -92,26 +99,32 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '营销名称', label: '营销名称',
prop: 'imName' prop: 'imName',
minWidth: '150px'
}, },
{ {
label: '营销客户数', label: '营销客户数',
prop: 'customerCount', prop: 'customerCount',
width: '120px' minWidth: '120px'
}, },
{ {
label: '状态', label: '状态',
prop: 'imStatusName' prop: 'imStatusName',
addHtml:'imStatus'
}, },
{ {
label: '创建时间', label: '创建时间',
prop: 'createdTime', prop: 'createdTime',
width: '180px' minWidth: '180px'
}, },
{ {
label: '创建人', label: '创建人',
prop: 'createdName', prop: 'createdName',
<<<<<<< HEAD
minWidth: '220px'
=======
width: '220px' width: '220px'
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
}, },
{ {
label: '操作', label: '操作',
......
...@@ -24,6 +24,13 @@ ...@@ -24,6 +24,13 @@
<el-button type="text" @click="handleDetail(scope.scope)">短信内容</el-button> <el-button type="text" @click="handleDetail(scope.scope)">短信内容</el-button>
</div> </div>
</GLTable> </GLTable>
<GLDialog title="提示" :hasFooter="true" :content="messageContent" :visible.sync="dialogVisible" mode="small">
<span slot="footer" class="dialog-footer">
<el-button size="small" type="primary" @click="dialogVisible = false">
确定
</el-button>
</span>
</GLDialog>
</div> </div>
</template> </template>
...@@ -36,8 +43,10 @@ export default { ...@@ -36,8 +43,10 @@ export default {
}, },
data() { data() {
return { return {
messageContent: '',
totalCount: 0, totalCount: 0,
percentage: 0, percentage: 0,
dialogVisible: false,
optionstatus: [ optionstatus: [
{ {
value: '', value: '',
...@@ -138,7 +147,8 @@ export default { ...@@ -138,7 +147,8 @@ export default {
this.$refs.employeeRef.refreshTable() this.$refs.employeeRef.refreshTable()
}, },
handleDetail(scope) { handleDetail(scope) {
this.$alert(scope.content, { center: true }) this.dialogVisible = true
this.messageContent = scope.content
} }
}, },
mounted() { mounted() {
......
...@@ -155,7 +155,7 @@ export default { ...@@ -155,7 +155,7 @@ export default {
} }
} }
.store-panel { .store-panel {
margin: 20px auto; margin: 16px auto;
padding: 20px; padding: 20px;
display: flex; display: flex;
.store-panel-item { .store-panel-item {
...@@ -258,7 +258,7 @@ export default { ...@@ -258,7 +258,7 @@ export default {
} }
} }
.statistics-main { .statistics-main {
margin-top: 20px; margin-top: 16px;
.statistics-title { .statistics-title {
font-size: 20px; font-size: 20px;
font-weight: 500; font-weight: 500;
......
...@@ -27,7 +27,11 @@ ...@@ -27,7 +27,11 @@
</div> </div>
</div> </div>
</div> </div>
<<<<<<< HEAD
<GLDialog @onOk="handleSure" @onCancel="handleCancel" title="提示" :visible.sync="dialogVisible" mode="small">
=======
<el-dialog title="提示" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" top="30vh"> <el-dialog title="提示" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" top="30vh">
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<div class="dialog-body"> <div class="dialog-body">
<div class="dialog-tips-icon"><i class="el-icon-warning"></i></div> <div class="dialog-tips-icon"><i class="el-icon-warning"></i></div>
<div class="dialog-tips-text">点击继续将开始上传数据文件</div> <div class="dialog-tips-text">点击继续将开始上传数据文件</div>
...@@ -36,13 +40,22 @@ ...@@ -36,13 +40,22 @@
,是否继续吗? ,是否继续吗?
</div> </div>
</div> </div>
<<<<<<< HEAD
<!-- <div slot="footer" class="dialog-footer">
=======
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<el-button size="small" @click="handleCancel"> <el-button size="small" @click="handleCancel">
取 消 取 消
</el-button> </el-button>
<el-button size="small" type="primary" @click="handleSure">确 定</el-button> <el-button size="small" type="primary" @click="handleSure">确 定</el-button>
<<<<<<< HEAD
</div> -->
</GLDialog>
=======
</div> </div>
</el-dialog> </el-dialog>
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<div class="loading-containner" v-if="processLoading"></div> <div class="loading-containner" v-if="processLoading"></div>
</div> </div>
</template> </template>
......
...@@ -71,14 +71,18 @@ ...@@ -71,14 +71,18 @@
<div class="form-main"> <div class="form-main">
<div class="drainage-form"> <div class="drainage-form">
<div class="drainage-form-item"> <div class="drainage-form-item">
<label>群发短信</label> <!-- <label>群发短信</label> -->
<div class="message-panel"> <div class="gl-form-page">
<el-form ref="configForm" label-position="left" label-width="100px" :model="addForm" :rules="addRules" class="code-body-form"> <el-form ref="configForm" label-width="154px" :model="addForm" :rules="addRules" class="code-body-form">
<el-form-item label="推送时间:">系统将在「开始营销时间」之后启动智系统将在「开始营销时间」之后启动短信营销,并在「截止营销时间」之后停止短信发送。由于相关管控限制,营销类短信无法实时触达用户,若短信时效要求很高,请谨慎使用。</el-form-item> <el-form-item label="推送时间:">系统将在「开始营销时间」之后启动智系统将在「开始营销时间」之后启动短信营销,并在「截止营销时间」之后停止短信发送。由于相关管控限制,营销类短信无法实时触达用户,若短信时效要求很高,请谨慎使用。</el-form-item>
<<<<<<< HEAD
<el-form-item size="small" label="营销时间:" prop="time">
=======
<el-form-item size="small" label="营销时间" prop="time"> <el-form-item size="small" label="营销时间" prop="time">
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<el-time-picker is-range :disabled="!editStatus" value-format="HH:mm" format="HH:mm" v-model="addForm.time" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围"></el-time-picker> <el-time-picker is-range :disabled="!editStatus" value-format="HH:mm" format="HH:mm" v-model="addForm.time" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围"></el-time-picker>
</el-form-item> </el-form-item>
<el-form-item label="短信内容" prop="content"> <el-form-item label="短信内容:" prop="content">
<el-input :disabled="!editStatus" type="textarea" v-model="addForm.content" rows="5" maxlength="280" show-word-limit></el-input> <el-input :disabled="!editStatus" type="textarea" v-model="addForm.content" rows="5" maxlength="280" show-word-limit></el-input>
<div class="select-panel" v-if="editStatus"> <div class="select-panel" v-if="editStatus">
<div @click="handleSelectMessage"> <div @click="handleSelectMessage">
...@@ -89,8 +93,13 @@ ...@@ -89,8 +93,13 @@
<div class="form-tips">提示:当前短信已有{{ addForm.content.length }}字,按{{ content.length }}条短信发送且计费。</div> <div class="form-tips">提示:当前短信已有{{ addForm.content.length }}字,按{{ content.length }}条短信发送且计费。</div>
</el-form-item> </el-form-item>
<div class="drainage-form-item"> <div class="drainage-form-item">
<<<<<<< HEAD
<label style="width: 140px;font-size:14px; text-align: right; color: #666">
自动打标签:
=======
<label style="width: 100px; text-align: left; color: #666"> <label style="width: 100px; text-align: left; color: #666">
自动打标签 自动打标签
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<el-popover placement="top" width="400" trigger="hover" content="提示:通过该营销活动添加员工企微的客户,将自动使用以下标签进行标记。"> <el-popover placement="top" width="400" trigger="hover" content="提示:通过该营销活动添加员工企微的客户,将自动使用以下标签进行标记。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" /> <img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover> </el-popover>
...@@ -120,8 +129,13 @@ ...@@ -120,8 +129,13 @@
</div> </div>
</div> </div>
<div class="drainage-form-item" v-if="editStatus"> <div class="drainage-form-item" v-if="editStatus">
<<<<<<< HEAD
<label class="is-require" style="width: 140px;font-size:14px; text-align: right; color: #666">
跟进员工:
=======
<label class="is-require"> <label class="is-require">
跟进员工 跟进员工
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<el-popover placement="top" width="400" trigger="hover" content="用户点击短信中的链接后,将自动分配以下某位员工的企微名片,客户添加好友将自动回复后台所配置的欢迎语。"> <el-popover placement="top" width="400" trigger="hover" content="用户点击短信中的链接后,将自动分配以下某位员工的企微名片,客户添加好友将自动回复后台所配置的欢迎语。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" /> <img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover> </el-popover>
...@@ -142,8 +156,13 @@ ...@@ -142,8 +156,13 @@
</div> </div>
</div> </div>
<div class="drainage-form-item" v-else> <div class="drainage-form-item" v-else>
<<<<<<< HEAD
<label style="width: 140px;font-size:14px; text-align: right; color: #666;margin-left:20px;">
跟进员工:
=======
<label> <label>
跟进员工 跟进员工
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<el-popover placement="top" width="400" trigger="hover" content="用户点击短信中的链接后,将自动分配以下某位员工的企微名片,客户添加好友将自动回复后台所配置的欢迎语。"> <el-popover placement="top" width="400" trigger="hover" content="用户点击短信中的链接后,将自动分配以下某位员工的企微名片,客户添加好友将自动回复后台所配置的欢迎语。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" /> <img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover> </el-popover>
...@@ -170,11 +189,11 @@ ...@@ -170,11 +189,11 @@
<div class="chanel-form-title">欢迎语</div> <div class="chanel-form-title">欢迎语</div>
<div class="welcome-panel"> <div class="welcome-panel">
<div class="welcome-switch"> <div class="welcome-switch">
<label>自动发送欢迎语</label> <label>自动发送欢迎语:</label>
<el-switch :disabled="!editStatus" v-model="autoWelcome" active-color="#5850FF" inactive-color="#999999"></el-switch> <el-switch :disabled="!editStatus" v-model="autoWelcome" active-color="#5850FF" inactive-color="#999999"></el-switch>
</div> </div>
<div class="welcome-box" v-show="editStatus && autoWelcome"> <div class="welcome-box" v-show="editStatus && autoWelcome">
<welcome-words :eventBus="eventBus" ref="welcome"></welcome-words> <GLEditor ref="welcome" :form="'customer'" :btnList="btnList" @previewWord="previewForm"></GLEditor>
</div> </div>
<div class="welcome-box" v-show="!editStatus && autoWelcome"> <div class="welcome-box" v-show="!editStatus && autoWelcome">
<div class="welcome-box-contaner"> <div class="welcome-box-contaner">
...@@ -275,13 +294,14 @@ ...@@ -275,13 +294,14 @@
</div> </div>
</div> </div>
</div> </div>
<GLDialog title="提示" @onOk="handleSure" @onCancel="dialogVisibleTips = false" type="warning" content="当前有内容信息未保存,是否继续返回?" :visible.sync="dialogVisibleTips" mode="small"></GLDialog>
</div> </div>
</template> </template>
<script> <script>
import Vue from 'vue' import Vue from 'vue'
import word from '@/mixins/word'
import { utils } from 'glsx-common' import { utils } from 'glsx-common'
import welcomeWords from '@/components/welcome/welcomeWords.vue'
import selectEmp from '@/components/selectEmp' import selectEmp from '@/components/selectEmp'
import selectTag from '@/components/selectTag' import selectTag from '@/components/selectTag'
import messageModel from '../market/components/messageModel' import messageModel from '../market/components/messageModel'
...@@ -293,16 +313,17 @@ const validateTime = (rule, value, callback) => { ...@@ -293,16 +313,17 @@ const validateTime = (rule, value, callback) => {
} }
} }
export default { export default {
mixins: [word],
name: 'drainage', name: 'drainage',
components: { components: {
selectEmp, selectEmp,
selectTag, selectTag,
messageModel, messageModel
welcomeWords
}, },
data() { data() {
return { return {
welcomeInfo: [], welcomeInfo: [],
dialogVisibleTips: false,
eventBus: new Vue(), eventBus: new Vue(),
autoWelcome: true, autoWelcome: true,
editStatus: false, editStatus: false,
...@@ -441,6 +462,15 @@ export default { ...@@ -441,6 +462,15 @@ export default {
this.saveStatus = true this.saveStatus = true
} }
if (this.saveStatus) { if (this.saveStatus) {
<<<<<<< HEAD
this.dialogVisibleTips = true
} else {
this.$router.go(-1)
}
},
handleSure() {
this.$router.go(-1)
=======
this.$confirm('当前有内容信息未保存,是否继续返回?', '提示', { this.$confirm('当前有内容信息未保存,是否继续返回?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
...@@ -451,6 +481,7 @@ export default { ...@@ -451,6 +481,7 @@ export default {
} else { } else {
this.$router.go(-1) this.$router.go(-1)
} }
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
}, },
//开关 //开关
handleSwitch() { handleSwitch() {
...@@ -598,7 +629,7 @@ export default { ...@@ -598,7 +629,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.channel-main-welcome { .channel-main-welcome {
margin: 20px 0px 60px; margin: 20px 0px 16px;
.chanel-form-title { .chanel-form-title {
padding-left: 20px; padding-left: 20px;
font-size: 16px; font-size: 16px;
...@@ -621,7 +652,7 @@ export default { ...@@ -621,7 +652,7 @@ export default {
} }
} }
.welcome-box { .welcome-box {
margin-left: 48px; margin-left: 60px;
&-contaner { &-contaner {
margin: 20px; margin: 20px;
background: rgba(247, 247, 247, 0.52); background: rgba(247, 247, 247, 0.52);
...@@ -818,9 +849,9 @@ export default { ...@@ -818,9 +849,9 @@ export default {
display: flex; display: flex;
margin-top: 20px; margin-top: 20px;
label { label {
width: 120px; width: 140px;
text-align: right; text-align: right;
margin-right: 20px; margin-right: 12px;
height: 36px; height: 36px;
line-height: 36px; line-height: 36px;
img { img {
...@@ -829,6 +860,7 @@ export default { ...@@ -829,6 +860,7 @@ export default {
vertical-align: middle; vertical-align: middle;
} }
&.is-require { &.is-require {
padding-left: 20px;
&::before { &::before {
content: '*'; content: '*';
color: #f56c6c; color: #f56c6c;
...@@ -856,6 +888,8 @@ export default { ...@@ -856,6 +888,8 @@ export default {
line-height: 30px; line-height: 30px;
border: 1px solid #dcdfe6; border: 1px solid #dcdfe6;
border-top: 0px; border-top: 0px;
width: 580px!important;
box-sizing: border-box;
> div { > div {
cursor: pointer; cursor: pointer;
margin-right: 10px; margin-right: 10px;
...@@ -899,8 +933,8 @@ export default { ...@@ -899,8 +933,8 @@ export default {
} }
} }
.message-panel { .message-panel {
background: #f7f7f7; // background: #f7f7f7;
border: 1px solid #dcdfe6; // border: 1px solid #dcdfe6;
padding: 20px; padding: 20px;
flex: 1; flex: 1;
box-sizing: border-box; box-sizing: border-box;
......
...@@ -417,8 +417,13 @@ export default { ...@@ -417,8 +417,13 @@ export default {
} }
.squre-safe-panel { .squre-safe-panel {
padding: 40px; padding: 40px;
<<<<<<< HEAD
margin-top: 10px;
margin-bottom: 16px;
=======
margin-top: 20px; margin-top: 20px;
// margin-bottom: 60px; // margin-bottom: 60px;
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
/deep/ { /deep/ {
.el-carousel__indicators, .el-carousel__indicators,
.el-carousel__arrow { .el-carousel__arrow {
...@@ -509,7 +514,6 @@ export default { ...@@ -509,7 +514,6 @@ export default {
margin: 40px 0px; margin: 40px 0px;
height: 328px; height: 328px;
background: #ffffff; background: #ffffff;
box-shadow: 0px 0px 20px 0px rgba(88, 80, 255, 0.1);
border-radius: 2px; border-radius: 2px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
......
...@@ -110,6 +110,9 @@ ...@@ -110,6 +110,9 @@
</GLButton> </GLButton>
</div> </div>
<GLTable ref="employeeRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="employeeRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div slot="state" slot-scope="scope">
<span :class="['task_icon',scope.scope.state==1?'green-icon':'yellow-icon']">{{ scope.scope.state== 1 ? '已处理' : '处理中' }}</span>
</div>
<div slot="importNumber" slot-scope="scope"> <div slot="importNumber" slot-scope="scope">
<div class="number-form"> <div class="number-form">
<span>{{ scope.scope.entmicroNumber }}</span> <span>{{ scope.scope.entmicroNumber }}</span>
...@@ -241,11 +244,20 @@ export default { ...@@ -241,11 +244,20 @@ export default {
} }
}, },
{ {
<<<<<<< HEAD
label: '数据处理状态',
prop: 'state',
addHtml: 'state',
// formatter: cellValue => {
// return cellValue.state == 1 ? '已处理' : '处理中'
// }
=======
label: '事件处理状态', label: '事件处理状态',
prop: 'state', prop: 'state',
formatter: cellValue => { formatter: cellValue => {
return cellValue.state == 1 ? '已处理' : '处理中' return cellValue.state == 1 ? '已处理' : '处理中'
} }
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
}, },
{ {
label: '导入人员', label: '导入人员',
...@@ -275,8 +287,9 @@ export default { ...@@ -275,8 +287,9 @@ export default {
methods: { methods: {
importsCount() { importsCount() {
this.$apis.square.importsCount({}).then(res => { this.$apis.square.importsCount({}).then(res => {
console.log(res) if (res) {
this.countAll = res this.countAll = res
}
}) })
}, },
handleReset() { handleReset() {
...@@ -302,9 +315,15 @@ export default { ...@@ -302,9 +315,15 @@ export default {
jumpDetail(status) { jumpDetail(status) {
let url let url
if (status) { if (status) {
<<<<<<< HEAD
url = `/custom/clientManage/index?isJoin=${status}&addWay=数据魔方`
} else {
url = `/custom/clientManage/index?addWay=数据魔方`
=======
url = `/custom/clientManage/index?isJoin=${status}&addWay=企微魔方` url = `/custom/clientManage/index?isJoin=${status}&addWay=企微魔方`
} else { } else {
url = `/custom/clientManage/index?addWay=企微魔方` url = `/custom/clientManage/index?addWay=企微魔方`
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
} }
this.$history.push(url) this.$history.push(url)
}, },
...@@ -353,8 +372,15 @@ export default { ...@@ -353,8 +372,15 @@ export default {
} }
} }
this.$apis.square.queryCrowdTree(params).then(res => { this.$apis.square.queryCrowdTree(params).then(res => {
<<<<<<< HEAD
if (res && res.crowdUnitList) {
const crowdUnitList = res.crowdUnitList.find(item => item.crowdName == '已加企微,待匹配客户')
this.crowdId = crowdUnitList ? crowdUnitList.crowdId : ''
}
=======
const crowdUnitList = res.crowdUnitList.find(item => item.crowdName == '已加企微,待匹配客户') const crowdUnitList = res.crowdUnitList.find(item => item.crowdName == '已加企微,待匹配客户')
this.crowdId = crowdUnitList.crowdId this.crowdId = crowdUnitList.crowdId
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
}) })
} }
}, },
...@@ -482,7 +508,6 @@ export default { ...@@ -482,7 +508,6 @@ export default {
height: 102px; height: 102px;
margin: 20px 0px; margin: 20px 0px;
background: #ffffff; background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
display: flex; display: flex;
.square-num-item { .square-num-item {
width: 50%; width: 50%;
...@@ -516,7 +541,11 @@ export default { ...@@ -516,7 +541,11 @@ export default {
} }
} }
.coustom-box-container { .coustom-box-container {
<<<<<<< HEAD
margin-top: 16px;
=======
margin-top: 20px; margin-top: 20px;
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
background: #ffffff; background: #ffffff;
.square-title { .square-title {
height: 55px; height: 55px;
...@@ -633,7 +662,7 @@ export default { ...@@ -633,7 +662,7 @@ export default {
} }
.square-tabel { .square-tabel {
padding: 20px; padding: 20px;
margin-top: 20px; margin-top: 16px;
} }
.table-btns a { .table-btns a {
color: #5850ff; color: #5850ff;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!