Commit 6d52cbed by 前端

fixed

1 parent 2ea4cbdd
Showing 51 changed files with 2943 additions and 325 deletions
......@@ -13,9 +13,10 @@
"core-js": "^3.4.4",
"el-tree-transfer": "^2.2.6",
"glsx-common": "^1.4.9",
"glsx-components": "^1.4.7",
"glsx-components": "^1.5.2",
"glsx-table": "^1.0.9",
"vue-draggable-resizable": "^2.3.0",
"vue-template-compiler": "^2.7.9",
"vuedraggable": "^2.24.3",
"xlsx": "^0.18.5"
},
......@@ -37,8 +38,7 @@
"postcss-loader": "^6.2.0",
"prettier": "^1.19.1",
"sass-loader": "^8.0.0",
"vue-cli-plugin-element": "^1.0.1",
"vue-template-compiler": "^2.6.10"
"vue-cli-plugin-element": "^1.0.1"
},
"browserslist": [
"> 1%",
......
......@@ -17,6 +17,11 @@ export default {
gs: ''
}
},
beforeDestroy() {
document.onkeydown = function() {
return true
}
},
created() {
document.onkeydown = function() {
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
}
......@@ -6,7 +6,7 @@
* @param {*} params
* @returns
*/
import { http, http_tag } from '@/main'
import { http } from '@/main'
let session = 'mini-c38a80dd-cf48-4491-8933-fb2eb57fb4ca-rop'
const getListApi = params => {
params.method = 'entmicro.api.staff.listFollowerStaffByPage'
......@@ -31,7 +31,7 @@ const getFollower = params => {
const querylabeltree = params => {
params.method = 'scrm.api.datahub.labelgroup.queryLabelTree'
params.sessionId = session
return http_tag({
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
......@@ -40,7 +40,7 @@ const querylabeltree = params => {
}
const queryCrowdtree = params => {
params.method = 'scrm.api.datahub.user.queryCrowdTree'
return http_tag({
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
......
img {
width: 100%;
height: 100%;
vertical-align: top;
width: 100%;
height: 100%;
vertical-align: top;
}
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.text-hide-2 {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.scrm-textRight {
position: relative;
text-align: right;
position: relative;
text-align: right;
}
.scrm-textCenter {
text-align: center;
text-align: center;
}
.scrm-c3 {
color: #333333;
color: #333333;
}
.scrm-f12 {
font-size: 12px;
font-size: 12px;
}
.scrm-f13 {
font-size: 13px;
font-size: 13px;
}
.scrm-f14 {
font-size: 14px;
font-size: 14px;
}
.scrm-f15 {
font-size: 15px;
font-size: 15px;
}
.scrm-f16 {
font-size: 16px;
font-size: 16px;
}
.scrm-f18 {
font-size: 18px;
font-size: 18px;
}
.scrm-f20 {
font-size: 20px;
font-size: 20px;
}
.scrm-f22 {
font-size: 22px;
font-size: 22px;
}
.scrm-f24 {
font-size: 24px;
font-size: 24px;
}
.scrm-m10 {
margin: 10px;
margin: 10px;
}
.scrm-m20 {
margin: 20px;
margin: 20px;
}
.scrm-ml10 {
margin-left: 10px;
margin-left: 10px;
}
.scrm-ml20 {
margin-left: 20px;
margin-left: 20px;
}
.scrm-mr10 {
margin-right: 10px;
margin-right: 10px;
}
.scrm-mr20 {
margin-right: 20px;
margin-right: 20px;
}
.scrm-p10 {
padding: 10px;
padding: 10px;
}
.scrm-p20 {
padding: 20px;
padding: 20px;
}
.scrm-box-f {
background: #ffffff;
// box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
background: #ffffff;
// box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
}
.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 {
/*滚动条整体样式*/
width: 6px;
height: 4px;
/*滚动条整体样式*/
width: 6px;
height: 4px;
}
::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/
border-radius: 4px;
background-color: rgba(144, 147, 153, 0.3);
/*滚动条里面小方块*/
border-radius: 4px;
background-color: rgba(144, 147, 153, 0.3);
}
.glsx-table .line-ellipsis {
display: inline;
display: inline;
}
.el-form--inline .el-form-item {
margin-right: 0px;
margin-right: 0px;
}
.el-tag {
color: #666 !important;
font-size: 14px !important;
color: #666 !important;
font-size: 14px !important;
}
.el-tag.el-tag--info {
background: #fafbfe !important;
border: 1px solid #e8e8ea !important;
border-radius: 4px;
background: #fafbfe !important;
border: 1px solid #e8e8ea !important;
border-radius: 4px;
}
.el-tag.el-tag--info.el-tag--plain {
background: transparent !important;
background: transparent !important;
}
.el-dialog__title {
height: 30px;
display: block;
height: 30px;
display: block;
}
.el-table--enable-row-hover .el-table__body tr:hover {
background: #f4f3ff !important;
background: #f4f3ff !important;
}
.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;
// display: none;
}
.el-message-box__content {
text-align: center;
padding: 50px 0px 50px;
text-align: center;
padding: 50px 0px 50px;
}
.el-message-box__status.el-icon-warning {
display: none;
// display: none;
}
.el-message-box__btns {
text-align: center;
padding: 20px 0px 10px;
border-top: 1px solid #e6e6e6;
text-align: center;
padding: 20px 0px 10px;
border-top: 1px solid #e6e6e6;
}
.el-message-box__btns button:nth-child(2) {
margin-left: 40px;
margin-left: 40px;
}
.el-message-box__status + .el-message-box__message {
padding: 0px 10px;
padding: 0px 10px;
}
.el-message-box--center {
padding: 0px;
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);
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;
color: #5850ff;
font-size: 16px;
}
.el-radio:focus:not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner {
box-shadow: none !important;
box-shadow: none !important;
}

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
......@@ -110,7 +110,6 @@ export default {
let widthMuti = this.textType == 'user' ? 17 : this.textType == 'tag' ? 20 : 0
// 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
console.log(document.querySelector(`.${this.identification}`).scrollWidth)
}
},
handleRemove() {
......@@ -122,10 +121,10 @@ export default {
<style scoped lang="scss">
.full-container {
display: inline-block;
margin-right: 6px;
margin-right: 4px;
/deep/ {
.el-tag {
margin-right: 10px;
// margin-right: 10px;
line-height: 26px;
height: 26px;
}
......
......@@ -26,7 +26,6 @@ export default {
},
filters: {
ellipsis(value,that) {
console.log(value,that)
if (value.length > that.textLength) {
that.tooltipStatus = true
return value.slice(0, that.textLength) + '...'
......
<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>
<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>
<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>
......@@ -216,7 +216,6 @@ export default {
}
})
.filter(item => item)
console.log(labelTreeRets)
this.$emit('tagSelected', labelTreeRets)
},
//全选
......@@ -355,5 +354,6 @@ export default {
}
.tag-selected-box {
min-height: 200px;
overflow: auto;
}
</style>
......@@ -264,11 +264,16 @@ export default {
}
let htm = target.innerHTML
const list = emoji.flat(Infinity)
<<<<<<< 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 replaceImg = cutImg.replace(/(\d){3}.png">/g, function (str) {
>>>>>>> fbad4209013d5b97224e1e78016ca7165eb5df09
let s = list[parseInt(str.split('.')[0]) - 1]
return `[${s}]`
})
......@@ -301,11 +306,16 @@ export default {
let htm = target.innerHTML
console.log(htm)
const list = emoji.flat(Infinity)
<<<<<<< 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 replaceImg = cutImg.replace(/(\d){3}.png">/g, function (str) {
>>>>>>> fbad4209013d5b97224e1e78016ca7165eb5df09
let s = list[parseInt(str.split('.')[0]) - 1]
return `[${s}]`
})
......
......@@ -51,7 +51,11 @@
<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-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
<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
</div>
</div>
</div>
......@@ -78,7 +82,10 @@ const ATT_TYPE = {
}
import emoji from '@/utils/emo'
import ActivityModel from './activityModel'
<<<<<<< HEAD
// import materialModel from './materialModel'
=======
>>>>>>> fbad4209013d5b97224e1e78016ca7165eb5df09
import Emotion from './emotionWords'
import wTextarea from './tag-textarea'
import { utils } from 'glsx-common'
......@@ -86,7 +93,10 @@ export default {
name: 'WelcomeWords',
components: {
ActivityModel,
<<<<<<< HEAD
// materialModel,
=======
>>>>>>> fbad4209013d5b97224e1e78016ca7165eb5df09
Emotion,
wTextarea
},
......@@ -95,7 +105,10 @@ export default {
return {
loading: false,
emotionStatus: false,
<<<<<<< HEAD
isMaterialVisible: false,
=======
>>>>>>> fbad4209013d5b97224e1e78016ca7165eb5df09
btnList: [
{
id: 1,
......@@ -328,8 +341,13 @@ export default {
this.previewList = val
this.eventBus.$emit('update', this.previewList)
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>')
const htm = attContent.replace(/\[[\u4E00-\u9FA56]{1,4}]/gi, function (res) {
>>>>>>> fbad4209013d5b97224e1e78016ca7165eb5df09
let word = res.replace(/\[|\]/gi, '')
const list = emoji.flat(Infinity)
let index = parseInt(list.indexOf(word)) + 1
......
......@@ -3,8 +3,8 @@
* @version:
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: limin
* @LastEditTime: 2021-09-07 14:38:52
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-26 15:54:49
*/
// 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js')
......@@ -17,8 +17,8 @@ export const fetchConfig = function(isEnv = true) {
Object.assign(request, { timeout })
return Promise.resolve(cfg)
}
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.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')
}
export const config = {
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 = ''
})
}
}
}
}
/*
* @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 { message } from '@/plugins/element.js'
import { fetchConfig } from '@/config'
import ElementUI from 'element-ui'
import { GLTable, GLButton, GLFooter, GLCombiForm, GLDialog } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { GLTable, GLButton, GLFooter, GLCombiForm, GLDialog, GLTableButton, GLTabs } from 'glsx-components' //权限按钮 (根据权限动态创建)
import GLEditor from 'glsx-components/src/packages/Editor' //权限按钮 (根据权限动态创建)
import GLFull from '@/components/GLFull'
import { getRoutes } from '@/router'
......@@ -12,10 +20,13 @@ Vue.use(GLTable)
Vue.use(GLFooter)
Vue.use(GLCombiForm)
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)
// import 'glsx-components/src/theme/theme.scss'
import 'glsx-components/dist/glsx-components.css'
import '@/assets/css/common.scss'
......
......@@ -110,6 +110,6 @@ util.downloadIamge = function(imgsrc, name = new Date().getTime()) {
a.href = url // 将生成的URL设置为a.href属性
a.dispatchEvent(event) // 触发a的单击事件
}
image.src = imgsrc
image.src = imgsrc.replace(/https?:/, '')
}
export default util
<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>
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>
......@@ -7,10 +7,11 @@
<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">
<GLButton type="text" @click="handleDetail(scope.scope)" fn="到店咨询客户数据">数据</GLButton>
<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>
<GLButton type="text" @click="handleAddPoster(scope.scope)" fn="活码海报">活码海报</GLButton> -->
</div>
<div slot="yesterdayNum" slot-scope="scope">
<div class="link-dialog" @click="handleEmpDetail(scope.scope, 'day')" v-if="scope.scope.yesterdayNum">{{ scope.scope.yesterdayNum }}</div>
......@@ -22,20 +23,9 @@
</div>
<div slot="staffInfo" slot-scope="scope">
<el-popover trigger="hover" placement="top" v-if="staffNameSplit(scope.scope.staffName).length > 3">
<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>
<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 v-for="(item, index) in staffNameSplit(scope.scope.staffName)" :key="index" v-show="index < 4">
<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>
......@@ -46,19 +36,7 @@
</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>
<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">
<i class="el-icon-user-solid"></i>
......@@ -67,11 +45,13 @@
</div> -->
</div>
<div slot="qrCode" slot-scope="scope">
<el-popover placement="bottom" width="400" trigger="click">
<img :src="scope.scope.qrCode" style="width: 360px; height: 360px" />
<img :src="scope.scope.qrCode" style="width: 80px; height: 80px" slot="reference" />
<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 class="download-link" @click="downloadIamge(scope.scope.qrCode)">下载二维码</div>
</div>
<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">
......@@ -107,7 +87,7 @@
<script>
import util from '@/utils/util'
import empDetail from './empDetail.vue'
import empDetail from '@/components/empDetail'
export default {
components: { empDetail },
name: 'channelList',
......@@ -135,6 +115,52 @@ export default {
}
],
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: {
listName: 'data',
tableOption: false,
......@@ -142,47 +168,49 @@ export default {
{
label: '渠道名称',
prop: 'codeRemark',
minWidth: 200,
addHtml: 'codeRemark'
},
{
label: '今日新增客户数',
prop: 'yesterdayNum',
width: '130px',
width: 130,
addHtml: 'yesterdayNum'
},
{
label: '总新增客户数',
prop: 'totalNum',
width: '120px',
width: 120,
addHtml: 'totalNum'
},
{
label: '使用专员',
prop: 'staffInfo',
width: '130px',
minWidth: 400,
addHtml: 'staffInfo',
align: 'left'
},
{
label: '活码',
prop: 'qrCode',
addHtml: 'qrCode'
addHtml: 'qrCode',
width: '100px'
},
{
label: '标签',
prop: 'tagging',
addHtml: 'tagging',
width: '150px'
minWidth: 200
},
{
label: '创建时间',
prop: 'createdTime',
width: '180px'
minWidth: 180
},
{
label: '操作',
prop: 'optionBtns',
width: '220px',
width: '170px',
addHtml: 'optionBtns',
fixed: 'right'
}
......@@ -314,14 +342,19 @@ export default {
/deep/ .el-popover {
max-width: 1000px;
}
.name-wrapper {
display: flex;
}
}
.download-link {
cursor: pointer;
margin-top: 6px;
margin-top: 4px;
font-size: 14px;
font-weight: 400;
color: #666666;
color: #5850ff;
font-weight: 600;
color: #5850ff;
line-height: 20px;
text-align: center;
}
.codeRemark {
font-size: 14px;
......@@ -417,7 +450,7 @@ export default {
padding: 6px;
display: inline-block;
margin-bottom: 5px;
margin-right: 5px;
margin-right: 4px;
&-tag {
display: inline-block;
border: 1px solid #e8e8ea;
......
......@@ -64,9 +64,9 @@
<script>
import utils from '@/utils/util'
import linechart from './linechart'
import selectChannel from './selectChannel'
import empDetail from './empDetail.vue'
import linechart from '@/components/linechart'
import selectChannel from '@/components/selectChannel'
import empDetail from '@/components/empDetail'
export default {
name: 'channelStatistics',
components: {
......
......@@ -151,21 +151,20 @@ export default {
label: '客户性别',
prop: 'customerSex',
formatter: cellValue => {
console.log(cellValue)
return cellValue.customerSex == 1 ? '男' : '女'
},
width: '80px'
minWidth: 100
},
{
label: '状态',
prop: 'status',
addHtml: 'status',
width: '80px'
minWidth: 100
},
{
label: '跟进员工',
prop: 'followStaff',
width: '80px'
minWidth: 100
},
{
label: '添加时间',
......@@ -174,7 +173,7 @@ export default {
{
label: '操作',
prop: 'optionBtns',
width: '80px',
minWidth: '80px',
addHtml: 'optionBtns'
}
]
......@@ -230,6 +229,7 @@ export default {
})
},
init(item, value, day) {
this.createTime = []
this.pStatus = null
this.staffIds = null
......
<template>
<div class="channel-main">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="渠道码列表" name="first"></el-tab-pane>
<el-tab-pane label="数据统计" name="second"></el-tab-pane>
</el-tabs>
<GLTabs v-model="activeName" :tabPaneList="tabPaneList" class="tabs-panel"></GLTabs>
<channel-list v-if="activeName == 'first'"></channel-list>
<channel-statistics v-if="activeName == 'second'"></channel-statistics>
</div>
......@@ -20,10 +17,31 @@ export default {
},
data() {
return {
activeName: 'first'
activeName: 'first',
tabPaneList: [
{
label: '渠道码列表',
name: 'first'
},
{
label: '数据统计',
name: 'second'
}
]
}
},
methods: {
render(createElement){
createElement('div',{
class:{
'channel-main':true
}
},[
createElement('el-tabs',{
})
])
},
jumpWx() {
this.$history.push('/settings/enterpriseWechat/index')
},
......@@ -62,10 +80,8 @@ export default {
<style lang="scss" scoped>
.channel-main {
/deep/ {
.el-tabs__nav-wrap::after {
height: 0px;
}
.tabs-panel {
margin-bottom: 10px;
}
}
</style>
......@@ -33,9 +33,9 @@
</div>
</div>
</div>
<GLDialog @onOk="savePoster" @onCancel="dialogVisible = false" v-loading="loadingDrag" title="创建活码海报" :visible.sync="dialogVisible">
<el-dialog title="创建活码海报" :visible.sync="dialogVisible">
<div class="poster-draggable-title">拖动活码可调整活码位置</div>
<div class="poster-draggable">
<div class="poster-draggable" v-loading="loadingDrag">
<div
class="poster-image"
v-if="dragHeight"
......@@ -55,7 +55,7 @@
:style="{
'background-image': 'url(' + codeUrl + ')'
}"
:parent="true"
parent=".poster-image"
@dragging="onDrag"
@resizing="onResize"
:customId="index"
......@@ -63,11 +63,11 @@
></vue-draggable-resizable>
</div>
</div>
<!-- <span slot="footer" class="dialog-footer">
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="savePoster">确 定</el-button>
</span> -->
</GLDialog>
</span>
</el-dialog>
</div>
</template>
......@@ -252,11 +252,10 @@ export default {
getDraggable(img_url) {
let img = new Image()
img.src = img_url
let self = this
img.onload = function() {
self.dragHeight = (img.height * 375) / img.width
self.dialogVisible = true
self.loading = false
img.onload = () => {
this.dragHeight = (img.height * 375) / img.width
this.dialogVisible = true
this.loading = false
}
}
},
......@@ -300,6 +299,8 @@ export default {
.poster-draggable {
display: flex;
justify-content: center;
// height: 500px;
// overflow: auto;
.poster-image {
background-size: 100% 100%;
width: 375px;
......
......@@ -11,20 +11,43 @@
<el-row>
<el-form-item size="small" label="使用员工:">
<div class="form-row">
<div class="emp-item" v-for="(item, index) in detailCodeForm.staffInfo" :key="index">
<i class="el-icon-user-solid"></i>
{{ item.staffName }}
</div>
<template v-for="(item, index) in detailCodeForm.staffInfo">
<div class="emp-item" :key="index" v-if="index < 10">
<i class="el-icon-user-solid"></i>
{{ 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>
</el-form-item>
</el-row>
<el-row>
<el-form-item size="small" label="标签:">
<div class="form-row">
<template v-for="item in tagging">
<div class="tag-item" v-for="(tag, idx) in item.labelList" :key="idx">
{{ tag.name }}
<template v-for="(tag, idx) in tagging">
<div class="tag-item" :key="idx" v-if="idx < 10">
{{ tag }}
</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>
</div>
</el-form-item>
......@@ -180,7 +203,14 @@ export default {
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 => {
let attContent
if (item.attType == 7) {
......@@ -240,45 +270,6 @@ export default {
}
.detail-form {
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-title {
font-size: 16px;
......@@ -369,34 +360,67 @@ 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 {
margin-top: 20px;
margin-bottom: 10px;
display: inline-block;
/deep/ {
.el-checkbox:last-of-type {
margin-right: 8px;
}
.el-tabs__nav {
border: 0;
border: none;
}
.el-tabs__header {
border: 0;
background-color: #f4f6fc;
margin: 0px;
}
.el-tabs__item {
border: none;
width: 180px;
height: 32px;
line-height: 32px;
margin: 2px;
text-align: center;
}
.el-tabs__item.is-active {
background-color: #fff;
border-radius: 4px;
font-weight: 600;
background: #fff;
border-bottom: none !important;
}
.el-tabs__item {
border: 1px solid #e5e5e5 !important;
border-bottom: none;
border-radius: 4px 4px 0px 0px;
background: #fafafa;
&:first-child {
margin-right: 5px;
}
}
}
}
......
......@@ -4,29 +4,32 @@
<div class="drainage-title">营销配置</div>
<div class="form-main">
<div class="drainage-form">
<div class="drainage-form-item">
<!-- <div class="drainage-form-item">
<label class="is-require" style="line-height: 32px">营销名称</label>
<div style="position: relative">
<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>
</div>
</div> -->
<div class="drainage-form-item">
<label>群发短信</label>
<div class="message-panel">
<el-form ref="configForm" label-position="left" label-width="100px" :model="addForm" :rules="addRules" class="code-body-form">
<!-- <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-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">
<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>
<div class="form-tips">70字內(含70字)计一条,超过70字,按70字/条计费。</div>
<div class="form-tips">提示:当前短信已有{{ addForm.content.length }}字,按{{ content.length }}条短信发送且计费。</div>
</el-form-item>
<div class="drainage-form-item">
<label style="width: 100px; text-align: left; color: #666">
自动打标签
<label>
自动打标签:
<el-popover placement="top" width="400" trigger="hover" content="提示:通过该营销活动添加员工企微的客户,将自动使用以下标签进行标记。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover>
......@@ -43,8 +46,8 @@
</div>
</div>
<div class="drainage-form-item">
<label>
跟进员工
<label style="margin-left: 20px">
跟进员工:
<el-popover placement="top" width="400" trigger="hover" content="用户点击短信中的链接后,将自动分配以下某位员工的企微名片,客户添加好友将自动回复后台所配置的欢迎语。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover>
......@@ -71,7 +74,7 @@
<div class="chanel-form-title">欢迎语</div>
<div class="welcome-panel">
<div class="welcome-switch">
<label>自动发送欢迎语</label>
<label>自动发送欢迎语:</label>
<el-switch v-model="autoWelcome" :disabled="!editStatus" active-color="#5850FF" inactive-color="#999999"></el-switch>
</div>
<div class="welcome-box" v-show="!editStatus && autoWelcome">
......@@ -219,30 +222,33 @@ export default {
this.addForm.content = res.dracImMessageConResponse.content
this.imName = res.imName
this.autoWelcome = res.autoWelcome ? true : false
const previewList = res.dracScrmWelcomeConfigDTOS.map(item => {
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>')
return item
})
console.log(previewList)
this.welcomeInfo = previewList
const tagging = eval(res.tagging)
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 }
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
}
})
return {
labelGroup: {
id: item.groupId,
name: item.labelType
},
labelList
}
})
this.tagging = taggingList
this.tagging = taggingList
}
this.$nextTick(() => {
this.saveStatus = false
})
......@@ -282,7 +288,7 @@ export default {
}
}
.welcome-box {
margin-left: 48px;
margin-left: 70px;
&-contaner {
margin: 20px;
background: rgba(247, 247, 247, 0.52);
......@@ -449,9 +455,11 @@ export default {
}
}
label {
width: 120px;
font-size: 14px;
text-align: right;
margin-right: 20px;
color: #666;
width: 140px;
margin-right: 12px;
height: 36px;
line-height: 36px;
img {
......
......@@ -21,15 +21,16 @@
</el-row>
</el-form>
<GLTable v-loading="loading" ref="table" @refreshTable="handleSearch" :searchForm="tableSearchForm" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams">
<div slot="status" slot-scope="scope">
<span :class="['task_icon',scope.scope.status==1?'green-icon':'yellow-icon']">{{ scope.scope.statusName }}</span>
</div>
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">短信内容</el-button>
</div>
</GLTable>
<GLDialog title="提示" :hasFooter="true" :content="messageContent" :visible.sync="dialogVisible" mode="small">
<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>
<el-button size="small" type="primary" @click="dialogVisible = false">确定</el-button>
</span>
</GLDialog>
</div>
......@@ -75,7 +76,8 @@ export default {
},
{
label: '发送状态',
prop: 'statusName'
prop: 'statusName',
addHtml: 'status'
},
{
label: '发送时间',
......
......@@ -4,7 +4,7 @@
<div class="drainage-title">指定客户</div>
<div class="drainage-form">
<div class="drainage-form-item">
<label>指定方式</label>
<label style="margin: 0 0 0 32px">指定方式:</label>
<div class="upload-box drainage-type">
<el-radio-group v-model="selectType">
<el-radio :label="1">通过标签筛选</el-radio>
......@@ -14,7 +14,7 @@
</div>
</div>
<div class="drainage-form-item" v-if="selectType == 1">
<label>客户信息</label>
<label style="margin: 0 0 0 32px">客户信息:</label>
<div class="upload-box">
<el-button size="small" @click="handleScreenTag">
<i class="el-icon-plus"></i>
......@@ -36,7 +36,7 @@
</div>
</div>
<div class="drainage-form-item" v-if="selectType == 3">
<label>客户信息</label>
<label style="margin: 0 0 0 32px">客户信息:</label>
<div class="upload-box">
<el-button size="small" @click="handleCrowd">
<i class="el-icon-plus"></i>
......@@ -58,7 +58,7 @@
</div>
</div>
<div class="drainage-form-item" v-if="selectType == 2">
<label>客户信息</label>
<label style="margin: 0 0 0 32px">客户信息:</label>
<div class="upload-box">
<div class="upload-file-panel">
<div class="image-uploader">
......@@ -83,22 +83,25 @@
<div class="drainage-title">营销配置</div>
<div class="form-main">
<div class="drainage-form">
<div class="drainage-form-item">
<!-- <div class="drainage-form-item">
<label class="is-require" style="line-height: 32px">营销名称</label>
<div style="position: relative">
<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>
</div>
</div> -->
<div class="drainage-form-item">
<label>群发短信</label>
<div class="message-panel">
<el-form ref="configForm" label-position="left" label-width="100px" :model="addForm" :rules="addRules" class="code-body-form">
<el-form-item label="推送规则:"><div class="configForm-desc">系统将在「开始营销时间」之后启动短信营销,并在「截止营销时间」之后停止短信下放。由于相关管控限制,营销类短信无法实时触达用户,若短信时效要求很高,请谨慎使用。</div></el-form-item>
<el-form-item size="small" label="营销时间" prop="time">
<!-- <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="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-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>
<div class="select-panel" v-if="editStatus">
<div @click="handleSelectMessage">
......@@ -109,8 +112,8 @@
<div class="form-tips">提示:当前短信已有{{ addForm.content.length }}字,按{{ content.length }}条短信发送且计费。</div>
</el-form-item>
<div class="drainage-form-item">
<label style="width: 100px; text-align: left; color: #666">
自动打标签
<label>
自动打标签:
<el-popover placement="top" width="400" trigger="hover" content="提示:通过该营销活动添加员工企微的客户,将自动使用以下标签进行标记。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover>
......@@ -139,8 +142,8 @@
</div>
</div>
<div class="drainage-form-item" v-if="editStatus">
<label class="is-require">
跟进员工
<label class="is-require" style="margin-left: 20px">
跟进员工:
<el-popover placement="top" width="400" trigger="hover" content="用户点击短信中的链接后,将自动分配以下某位员工的企微名片,客户添加好友将自动回复后台所配置的欢迎语。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover>
......@@ -161,8 +164,8 @@
</div>
</div>
<div class="drainage-form-item" v-else>
<label>
跟进员工
<label style="margin-left: 20px">
跟进员工:
<el-popover placement="top" width="400" trigger="hover" content="用户点击短信中的链接后,将自动分配以下某位员工的企微名片,客户添加好友将自动回复后台所配置的欢迎语。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover>
......@@ -189,7 +192,7 @@
<div class="chanel-form-title">欢迎语</div>
<div class="welcome-panel">
<div class="welcome-switch">
<label>自动发送欢迎语</label>
<label>自动发送欢迎语:</label>
<el-switch v-model="autoWelcome" :disabled="!editStatus" active-color="#5850FF" inactive-color="#999999"></el-switch>
</div>
<div class="welcome-box" v-show="editStatus && autoWelcome">
......@@ -313,6 +316,7 @@ export default {
footerLeft: 0,
footerWidth: 0,
addForm: {
imName: '',
desc: '',
content: `【${this.$globalState.session.merchantName}】`,
time: ['9:00:00', '18:00:00']
......@@ -331,6 +335,7 @@ export default {
ModelItem: {},
merchantName: this.$globalState.session.merchantName,
addRules: {
imName: [{ required: true, message: '请输入营销名称', trigger: 'blur' }],
time: [
{ required: true, message: '请选择营销时间', trigger: 'change' },
{ validator: validateTime, trigger: 'change' }
......@@ -344,7 +349,7 @@ export default {
},
watch: {
'addForm.content': {
handler: function() {
handler: function () {
this.content = []
let str = this.addForm.content
let num = 70
......@@ -380,7 +385,7 @@ export default {
deep: true
},
tagging: {
handler: function() {
handler: function () {
this.taggingLength = 0
this.tagging.forEach(item => {
this.taggingLength += item.labelList.length
......@@ -631,7 +636,7 @@ export default {
const groupIds = this.crowding.map(item => item.crowdId)
let params = {
autoWelcome: this.autoWelcome ? 1 : 0,
imName: this.imName,
imName: this.addForm.imName,
imType: 2,
tagging: JSON.stringify(tagging),
filterTagging: JSON.stringify(this.filterTagging),
......@@ -707,7 +712,7 @@ export default {
this.dracImFollowStaffResponses = res.dracImFollowStaffResponses
this.addForm.time = [res.dracImMessageConResponse.startTime, res.dracImMessageConResponse.endTime]
this.addForm.content = res.dracImMessageConResponse.content
this.imName = res.imName
this.addForm.imName = res.imName
this.autoWelcome = res.autoWelcome ? true : false
const previewList = res.dracScrmWelcomeConfigDTOS.map(item => {
if (item.attType == 7) item.attContent = JSON.parse(item.attContent)
......@@ -776,7 +781,7 @@ export default {
}
}
.welcome-box {
margin-left: 48px;
margin-left: 61px;
&-contaner {
margin: 20px;
background: rgba(247, 247, 247, 0.52);
......@@ -947,9 +952,11 @@ export default {
}
}
label {
width: 120px;
font-size: 14px;
text-align: right;
margin-right: 20px;
color: #666;
width: 140px;
margin-right: 12px;
height: 36px;
line-height: 36px;
img {
......@@ -982,7 +989,9 @@ export default {
color: #717171;
line-height: 30px;
border: 1px solid #dcdfe6;
width: 580px !important;
border-top: 0px;
box-sizing: border-box;
> div {
cursor: pointer;
margin-right: 10px;
......@@ -995,7 +1004,7 @@ export default {
.upload-box {
margin-bottom: 10px;
&.drainage-type {
margin-left: -10px;
margin-left: -28px;
}
.tag-count {
color: #666666;
......
......@@ -14,8 +14,11 @@
</div>
<div class="square-tabel scrm-box-f">
<div class="square-tabel-form">
<GLCombiForm ref="formSearch" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLCombiForm :rowNumber="1" ref="formSearch" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<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">
<GLButton type="text" @click="handleDetail(scope.scope)" fn="智能营销配置">查看配置</GLButton>
<!-- <GLButton :disabled="scope.scope.imStatus!=1" type="text" @click="handleStatistics(scope.scope)" fn="营销统计">营销统计</GLButton> -->
......@@ -92,26 +95,28 @@ export default {
tableColumns: [
{
label: '营销名称',
prop: 'imName'
prop: 'imName',
minWidth: '150px'
},
{
label: '营销客户数',
prop: 'customerCount',
width: '120px'
minWidth: '120px'
},
{
label: '状态',
prop: 'imStatusName'
prop: 'imStatusName',
addHtml:'imStatus'
},
{
label: '创建时间',
prop: 'createdTime',
width: '180px'
minWidth: '180px'
},
{
label: '创建人',
prop: 'createdName',
width: '220px'
minWidth: '220px'
},
{
label: '操作',
......
......@@ -71,14 +71,14 @@
<div class="form-main">
<div class="drainage-form">
<div class="drainage-form-item">
<label>群发短信</label>
<div class="message-panel">
<el-form ref="configForm" label-position="left" label-width="100px" :model="addForm" :rules="addRules" class="code-body-form">
<!-- <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="推送时间:">系统将在「开始营销时间」之后启动智系统将在「开始营销时间」之后启动短信营销,并在「截止营销时间」之后停止短信发送。由于相关管控限制,营销类短信无法实时触达用户,若短信时效要求很高,请谨慎使用。</el-form-item>
<el-form-item size="small" label="营销时间" prop="time">
<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">
<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>
<div class="select-panel" v-if="editStatus">
<div @click="handleSelectMessage">
......@@ -89,8 +89,8 @@
<div class="form-tips">提示:当前短信已有{{ addForm.content.length }}字,按{{ content.length }}条短信发送且计费。</div>
</el-form-item>
<div class="drainage-form-item">
<label style="width: 100px; text-align: left; color: #666">
自动打标签
<label style="width: 140px;font-size:14px; text-align: right; color: #666">
自动打标签:
<el-popover placement="top" width="400" trigger="hover" content="提示:通过该营销活动添加员工企微的客户,将自动使用以下标签进行标记。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover>
......@@ -120,8 +120,8 @@
</div>
</div>
<div class="drainage-form-item" v-if="editStatus">
<label class="is-require">
跟进员工
<label class="is-require" style="width: 140px;font-size:14px; text-align: right; color: #666">
跟进员工:
<el-popover placement="top" width="400" trigger="hover" content="用户点击短信中的链接后,将自动分配以下某位员工的企微名片,客户添加好友将自动回复后台所配置的欢迎语。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover>
......@@ -142,8 +142,8 @@
</div>
</div>
<div class="drainage-form-item" v-else>
<label>
跟进员工
<label style="width: 140px;font-size:14px; text-align: right; color: #666;margin-left:20px;">
跟进员工:
<el-popover placement="top" width="400" trigger="hover" content="用户点击短信中的链接后,将自动分配以下某位员工的企微名片,客户添加好友将自动回复后台所配置的欢迎语。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover>
......@@ -170,7 +170,7 @@
<div class="chanel-form-title">欢迎语</div>
<div class="welcome-panel">
<div class="welcome-switch">
<label>自动发送欢迎语</label>
<label>自动发送欢迎语:</label>
<el-switch :disabled="!editStatus" v-model="autoWelcome" active-color="#5850FF" inactive-color="#999999"></el-switch>
</div>
<div class="welcome-box" v-show="editStatus && autoWelcome">
......@@ -620,7 +620,7 @@ export default {
}
}
.welcome-box {
margin-left: 48px;
margin-left: 60px;
&-contaner {
margin: 20px;
background: rgba(247, 247, 247, 0.52);
......@@ -817,9 +817,9 @@ export default {
display: flex;
margin-top: 20px;
label {
width: 120px;
width: 140px;
text-align: right;
margin-right: 20px;
margin-right: 12px;
height: 36px;
line-height: 36px;
img {
......@@ -828,6 +828,7 @@ export default {
vertical-align: middle;
}
&.is-require {
padding-left: 20px;
&::before {
content: '*';
color: #f56c6c;
......@@ -855,6 +856,8 @@ export default {
line-height: 30px;
border: 1px solid #dcdfe6;
border-top: 0px;
width: 580px!important;
box-sizing: border-box;
> div {
cursor: pointer;
margin-right: 10px;
......@@ -898,8 +901,8 @@ export default {
}
}
.message-panel {
background: #f7f7f7;
border: 1px solid #dcdfe6;
// background: #f7f7f7;
// border: 1px solid #dcdfe6;
padding: 20px;
flex: 1;
box-sizing: border-box;
......
......@@ -110,6 +110,9 @@
</GLButton>
</div>
<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 class="number-form">
<span>{{ scope.scope.entmicroNumber }}</span>
......@@ -241,11 +244,12 @@ export default {
}
},
{
label: '事件处理状态',
label: '数据处理状态',
prop: 'state',
formatter: cellValue => {
return cellValue.state == 1 ? '已处理' : '处理中'
}
addHtml: 'state',
// formatter: cellValue => {
// return cellValue.state == 1 ? '已处理' : '处理中'
// }
},
{
label: '导入人员',
......@@ -275,8 +279,9 @@ export default {
methods: {
importsCount() {
this.$apis.square.importsCount({}).then(res => {
console.log(res)
this.countAll = res
if (res) {
this.countAll = res
}
})
},
handleReset() {
......@@ -302,9 +307,9 @@ export default {
jumpDetail(status) {
let url
if (status) {
url = `/custom/clientManage/index?isJoin=${status}&addWay=企微魔方`
url = `/custom/clientManage/index?isJoin=${status}&addWay=数据魔方`
} else {
url = `/custom/clientManage/index?addWay=企微魔方`
url = `/custom/clientManage/index?addWay=数据魔方`
}
this.$history.push(url)
},
......@@ -353,8 +358,10 @@ export default {
}
}
this.$apis.square.queryCrowdTree(params).then(res => {
const crowdUnitList = res.crowdUnitList.find(item => item.crowdName == '已加企微,待匹配客户')
this.crowdId = crowdUnitList.crowdId
if (res && res.crowdUnitList) {
const crowdUnitList = res.crowdUnitList.find(item => item.crowdName == '已加企微,待匹配客户')
this.crowdId = crowdUnitList ? crowdUnitList.crowdId : ''
}
})
}
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!