Commit df353fd1 by yangming

new

1 parent 0b4923bb
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
"core-js": "^3.4.4", "core-js": "^3.4.4",
"el-tree-transfer": "^2.2.6", "el-tree-transfer": "^2.2.6",
"glsx-common": "^1.4.6", "glsx-common": "^1.4.6",
"glsx-components": "^1.2.2", "glsx-components": "^1.2.4",
"glsx-table": "^1.0.9", "glsx-table": "^1.0.9",
"vue-draggable-resizable": "^2.3.0" "vue-draggable-resizable": "^2.3.0"
}, },
......
...@@ -18,6 +18,15 @@ export default { ...@@ -18,6 +18,15 @@ export default {
} }
}, },
created() { created() {
document.onkeydown = function () {
var evt = window.event || arguments[0]
if (evt && evt.keyCode == 13) {
if (typeof evt.cancelBubble != 'undefined') evt.cancelBubble = true
if (typeof evt.stopPropagation == 'function') evt.stopPropagation()
return false
}
return true
}
this.myMsg = this.msg this.myMsg = this.msg
this.myMessage = this.message this.myMessage = this.message
} }
...@@ -30,7 +39,7 @@ export default { ...@@ -30,7 +39,7 @@ export default {
line-height: 36px; line-height: 36px;
} }
#app { #app {
background: #F4F5FA; background: #f4f5fa;
padding: 0px 20px 20px 40px; padding: 0px 20px 20px 40px;
position: absolute; position: absolute;
box-sizing: border-box; box-sizing: border-box;
......
...@@ -35,6 +35,16 @@ const getCard = params => { ...@@ -35,6 +35,16 @@ const getCard = params => {
sign: true sign: true
}) })
} }
const getPackage = params => {
params.method = 'scrm.api.equity.package.info.list.with.page'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const findAllByPage = params => { const findAllByPage = params => {
params.method = 'entmicro.api.dracIm.findAllByPage' params.method = 'entmicro.api.dracIm.findAllByPage'
params.sessionId = session params.sessionId = session
...@@ -129,6 +139,7 @@ export default { ...@@ -129,6 +139,7 @@ export default {
getCoupon, getCoupon,
getMerchant, getMerchant,
getCard, getCard,
getPackage,
listChannelCodeBill, listChannelCodeBill,
findAllByPage, findAllByPage,
dracImMessage, dracImMessage,
......
...@@ -96,7 +96,7 @@ const findMessageStatic = params => { ...@@ -96,7 +96,7 @@ const findMessageStatic = params => {
} }
const viewChart = params => { const viewChart = params => {
params.method = 'entmicro.api.customer.view.chart' params.method = 'entmicro.api.drac.statistic.getCustomerStatisticCodeTrend'
params.sessionId = session params.sessionId = session
return http({ return http({
url: 'rop-scrm-entmicro/router', url: 'rop-scrm-entmicro/router',
......
/** const TYPE = Object.freeze({
* type : primary,success,default,error,danger none: ''
* size: 按钮大小,参照elementui })
* id: 权限判断id
* mode:按钮类型 是a标签还是button,可选值为:button、link
*/
import { Button, Link } from 'element-ui'
// 权限校验 // 权限校验
function judgePermissions(options) { function permission(ctx) {
if (!options) { console.log(ctx)
return false if (!ctx) return TYPE.none
} const {
let _list = options.parent.permissions || [] props: { fn, mode },
let _o = options.props parent: {
let idx = _list.findIndex(k => k == _o.id) $GLBUTTION_PERMISSIONS: { routes = [], routerBase }
}
// 如果没有权限,则返回空标签 } = ctx
if (idx < 0) { const router = routes.find(route => location.pathname === `${routerBase}${route.path.split(':/')[0]}`)
return '' if (router && router.meta && router.meta.permissions && router.meta.permissions.includes(fn)) {
} return mode
if (_o.mode == 'link') {
return 'a'
}
return 'button'
}
// 获取class
function getClass(context) {
let o = context.props
let _class = []
_class.push('el-' + o.mode)
_class.push('el-' + o.mode + '--' + o.type)
if (o.size) {
_class.push('el-' + o.mode + '--' + o.size)
}
if (o.class) {
_class.push(o.class)
} }
return _class return TYPE.none
} }
export default { export default {
functional: true, functional: true,
name: 'GLButton',
props: { props: {
type: { fn: {
type: String, type: String
default: 'default'
},
size: {
type: String,
default: 'medium'
},
id: {
type: [String, Number]
}, },
mode: { mode: {
type: String, type: String,
default: 'button' default: 'el-button'
},
class: {
type: String,
default: ''
} }
}, },
render: function(createElement, context) { render: function(createElement, context) {
let _props = context.props return createElement(permission(context), context.data, context.children)
let options = {
props: _props,
attrs: context.props,
class: getClass(context),
on: {
click: event => {
context.listeners.click('click', event)
}
}
}
return createElement(judgePermissions(context), options, context.children)
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -12,5 +12,5 @@ import Vue from 'vue' ...@@ -12,5 +12,5 @@ import Vue from 'vue'
import _button from '@/components/glsx-button/index' import _button from '@/components/glsx-button/index'
Vue.component('basic-dialog', () => Vue.component('basic-dialog', () =>
import ('./basic-dialog/index.vue')) import ('./basic-dialog/index.vue'))
Vue.component('glsx-button', _button) Vue.component('GLButton', _button)
// Vue.component('glsx-table', glsxTable) // Vue.component('glsx-table', glsxTable)
\ No newline at end of file \ No newline at end of file
<template> <template>
<div class="square-main" v-loading="loading"> <div class="square-main" v-loading="loading">
<el-dialog title="选择跟进专员" :visible.sync="dialogVisible" width="50%" :before-close="handleClose"> <el-dialog title="选择跟进专员" :visible.sync="dialogVisible" width="50%" :before-close="handleClose">
<el-form :inline="true" :model="tableSearchForm" label-width="80px"> <el-form :inline="true" :model="tableSearchForm">
<el-form-item size="small" label="员工"> <el-form-item size="small" label="员工">
<el-input v-model="tableSearchForm.staffName" placeholder="请输入员工姓名"></el-input> <el-input v-model="tableSearchForm.staffName" placeholder="请输入员工姓名"></el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" style="float: right"> <el-form-item size="small">
<el-button type="primary" @click="handleSearch">查询</el-button> <el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch" @selectionTable="selectionTable"></GLTable> <GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch" @selectionTable="selectionTable"></GLTable>
<span slot="footer" class="dialog-footer"> <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" @click="handleCancel">取 消</el-button>
<el-button size="small" type="primary" @click.native="handleSelect">确 定</el-button> <el-button size="small" type="primary" @click.native="handleSelect">确 定</el-button>
</span> </span>
...@@ -58,6 +59,9 @@ export default { ...@@ -58,6 +59,9 @@ export default {
} }
}, },
methods: { methods: {
jumpUrl() {
this.$history.push('/home/followUp/index')
},
getFollower() { getFollower() {
var params = { var params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)), ...JSON.parse(JSON.stringify(this.tableSearchForm)),
...@@ -122,6 +126,13 @@ export default { ...@@ -122,6 +126,13 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.dialog-jump {
color: #5850FF;
float: left;
line-height: 24px;
text-decoration: underline;
cursor: pointer;
}
.square-main { .square-main {
/deep/ { /deep/ {
.el-table { .el-table {
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
</div> </div>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<a class="dialog-jump" @click="jumpUrl">没有意向标签?点我创建</a>
<el-button size="small" @click="dialogVisible = false">取 消</el-button> <el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="handleSelect">确 定</el-button> <el-button size="small" type="primary" @click="handleSelect">确 定</el-button>
</span> </span>
...@@ -86,10 +87,10 @@ export default { ...@@ -86,10 +87,10 @@ export default {
} }
}, },
watch: { watch: {
labelTreeRets: { labelTreeRetSelect: {
handler() { handler() {
this.selectNum = 0 this.selectNum = 0
this.labelTreeRets.forEach(item => { this.labelTreeRetSelect.forEach(item => {
this.selectNum += item.tagChecked.length this.selectNum += item.tagChecked.length
}) })
}, },
...@@ -97,6 +98,9 @@ export default { ...@@ -97,6 +98,9 @@ export default {
} }
}, },
methods: { methods: {
jumpUrl() {
this.$history.push('/custom/tagsManage/index')
},
init(item) { init(item) {
this.labelGroupName = '' this.labelGroupName = ''
this.dialogVisible = true this.dialogVisible = true
...@@ -262,12 +266,19 @@ export default { ...@@ -262,12 +266,19 @@ export default {
}, },
mounted() { mounted() {
let clientHeight = document.documentElement.clientHeight let clientHeight = document.documentElement.clientHeight
this.heightBox = clientHeight - 0.15 * clientHeight - 300 this.heightBox = clientHeight - 0.15 * clientHeight - 350
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.dialog-jump {
color: #5850FF;
float: left;
line-height: 24px;
text-decoration: underline;
cursor: pointer;
}
.tag-panel { .tag-panel {
display: flex; display: flex;
.tag-panel-select { .tag-panel-select {
......
...@@ -5,63 +5,52 @@ ...@@ -5,63 +5,52 @@
<div class="model-panel-tab"> <div class="model-panel-tab">
<label>活动类型:</label> <label>活动类型:</label>
<el-tabs v-model="activeName" @tab-click="handleClick" type="card"> <el-tabs v-model="activeName" @tab-click="handleClick" type="card">
<el-tab-pane label="券营销" name="1"></el-tab-pane> <el-tab-pane label="精品券" name="1"></el-tab-pane>
<el-tab-pane label="权益卡" name="2"></el-tab-pane> <el-tab-pane label="商城券" name="2"></el-tab-pane>
<el-tab-pane label="权益卡试用" name="3"></el-tab-pane>
<el-tab-pane label="权益套餐" name="4"></el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
<div class="model-item-panel" v-if="modelList.length > 0" v-loading="loading"> <div class="model-item-panel" v-if="modelList.length > 0" v-loading="loading">
<div <div class="model-item" :class="{ checked: selectItem == item }" v-for="(item, index) in modelList" :key="index" @click="handleSelectItem(item)">
class="model-item" <div class="model-item-title" :title="item.cardClassName" v-show="activeName == 3">{{ item.cardClassName }}</div>
:class="{ checked: selectItem == item }" <div class="model-item-title" :title="item.couponName" v-show="activeName == 2">{{ item.couponName }}</div>
v-for="(item, index) in modelList" <div class="model-item-title" :title="item.cardClassName" v-show="activeName == 1">{{ item.couponName }}</div>
:key="index" <div class="model-item-title" :title="item.packageName" v-show="activeName == 4">{{ item.packageName }}</div>
@click="handleSelectItem(item)" <div class="model-item-content" v-show="activeName == 1 || activeName == 4"></div>
> <div class="model-item-content" v-show="activeName == 2">剩余数量:{{ item.residueAmount }}</div>
<div class="model-item-title" v-show="activeName == 2">{{ item.cardClassName }}</div> <div class="model-item-content" v-show="activeName == 1">剩余数量:{{ item.remainAmount }}</div>
<div class="model-item-title" v-show="activeName == 1">{{ item.couponName }}</div> <div class="model-item-content" v-show="activeName == 3">价格:{{ item.price }}元</div>
<div class="model-item-content" v-show="activeName == 4">价格:{{ item.packagePrice }}元</div>
<div class="model-item-content" v-show="activeName == 1">数量:{{ item.residueAmount }}</div> <div class="model-item-content" v-show="activeName == 2 && item.effectiveType == 1">有效期:{{ item.effectiveDays }}天</div>
<div class="model-item-content" v-show="activeName == 2">价格:{{ item.price }}</div> <div class="model-item-content" v-show="activeName == 2 && item.effectiveType == 3">有效期:无限制</div>
<div <div class="model-item-content" v-show="activeName == 2 && item.effectiveType == 2">有效期:{{ item.effectiveStartTime ? item.effectiveStartTime.split(' ')[0] : '' }}~{{ item.effectiveEndTime ? item.effectiveEndTime.split(' ')[0] : '' }}</div>
class="model-item-content" <div class="model-item-content" v-show="activeName == 3 && item.effectiveType == 3">有效期:{{ item.effectiveStartTime ? item.effectiveStartTime.split(' ')[0] : '' }}~{{ item.effectiveEndTime ? item.effectiveEndTime.split(' ')[0] : '' }}</div>
v-show="activeName == 2 && item.effectiveType == 2" <div class="model-item-content" v-show="activeName == 3 && item.effectiveType == 1">有效期:无限制</div>
>有效期:{{ item.effectiveNum }}天</div> <div class="model-item-content" v-show="activeName == 3 && item.effectiveType == 2">有效期:{{ item.effectiveNum}}天</div>
<div <div class="model-item-content" v-show="activeName == 2">
class="model-item-content" 类型:
v-show="activeName == 2 && item.effectiveType == 1" <span>{{ item.discountType == 2 ? '折扣券' : item.discountType == 3 ? '代金券' : item.discountType == 4 ? '兑换券': ''}}</span>
>有效期:无限制</div> </div>
<div <div class="model-item-content" v-show="activeName == 1">
class="model-item-content" 类型:
v-show="activeName == 1 && item.effectiveType == 2" <span>精品券</span>
>有效期:{{ item.effectiveStartTime }}~{{ item.effectiveEndTime }}</div> </div>
<div <div class="model-item-content" v-show="activeName == 3">
class="model-item-content" 类型:
v-show="activeName == 1 && item.effectiveType == 1" <span>权益卡</span>
>有效期:{{ item.effectiveDays }}天</div> </div>
<div <div class="model-item-content" v-show="activeName == 4">
class="model-item-content" 类型:
v-show="activeName == 1 && item.effectiveType == 3" <span>权益套餐</span>
>有效期:无限制</div> </div>
<div
class="model-item-content"
v-show="activeName == 1"
>类型:{{ item.discountType == 1 ? '满减劵' : item.discountType == 2 ? '折扣券' : item.discountType == 3 ? '代金券' : item.discountType == 4 ? '实物券' : item.discountType == 5 ? '购车代金券' : item.discountType == 6 ? '商品折扣券' : item.discountType == 7 ? '会员服务' : '' }}</div>
<div class="model-item-content" v-show="activeName == 2">类型:权益卡</div>
</div> </div>
</div> </div>
<div class="model-item-empty" v-else v-loading="loading"> <div class="model-item-empty" v-else v-loading="loading">
<img src="@/assets/img/empty.png" /> <img src="@/assets/img/empty.png" />
<div class="empty-item">暂无数据</div> <div class="empty-item">暂无数据</div>
</div> </div>
<el-pagination <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageNum" :page-sizes="[12, 24, 36, 48]" :page-size="pageSize" :total="tableTotal" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNum"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize"
:total="tableTotal"
layout="total, sizes, prev, pager, next, jumper"
></el-pagination>
</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" @click="dialogVisible = false">取 消</el-button>
...@@ -81,7 +70,7 @@ export default { ...@@ -81,7 +70,7 @@ export default {
activeName: '1', activeName: '1',
modelList: [], modelList: [],
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 12,
tableTotal: 0, tableTotal: 0,
selectItem: {} selectItem: {}
} }
...@@ -99,7 +88,7 @@ export default { ...@@ -99,7 +88,7 @@ export default {
return return
} }
this.dialogVisible = false this.dialogVisible = false
this.$emit('selectActivity', { marketingId: this.selectItem.id, marketingType: this.activeName, marketingName: this.activeName == 2 ? this.selectItem.cardClassName : this.selectItem.couponName }) this.$emit('selectActivity', { marketingId: this.selectItem.id, marketingType: this.activeName, marketingName: this.activeName == 3 ? this.selectItem.cardClassName : this.activeName == 4 ? this.selectItem.packageName : this.selectItem.couponName })
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.pageSize = val this.pageSize = val
...@@ -115,16 +104,29 @@ export default { ...@@ -115,16 +104,29 @@ export default {
let market = '' let market = ''
switch (this.activeName) { switch (this.activeName) {
case '1': case '1':
market = 'getMerchant' market = 'getCoupon'
break break
case '2': case '2':
market = 'getMerchant'
break
case '3':
market = 'getCard' market = 'getCard'
break break
case '4':
market = 'getPackage'
break
} }
let params = { let params = {
pageSize: this.pageSize, pageSize: this.pageSize,
pageNum: this.pageNum pageNum: this.pageNum
} }
if (this.activeName == 3) {
params.tryAble = 1
params.merchantId = this.$globalState.session.merchantId
}
if (this.activeName == 2) {
params.discountTypes = [2,3,4]
}
this.$apis.marketing[market](params).then(res => { this.$apis.marketing[market](params).then(res => {
this.modelList = res.list ? res.list : res.data this.modelList = res.list ? res.list : res.data
this.tableTotal = res.total this.tableTotal = res.total
...@@ -178,6 +180,7 @@ export default { ...@@ -178,6 +180,7 @@ export default {
.el-tabs__item.is-active { .el-tabs__item.is-active {
background-color: #fff; background-color: #fff;
border-radius: 4px; border-radius: 4px;
font-weight: 600;
} }
} }
} }
...@@ -201,8 +204,10 @@ export default { ...@@ -201,8 +204,10 @@ export default {
display: grid; display: grid;
grid-template-columns: repeat(4, 25%); grid-template-columns: repeat(4, 25%);
grid-row-gap: 10px; grid-row-gap: 10px;
height: 40vh; height: 38vh;
padding: 10px;
overflow: auto; overflow: auto;
text-align: center;
.model-item { .model-item {
position: relative; position: relative;
height: 128px; height: 128px;
...@@ -245,6 +250,9 @@ export default { ...@@ -245,6 +250,9 @@ export default {
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
span {
color: #5850ff;
}
} }
} }
} }
......
...@@ -9,14 +9,7 @@ ...@@ -9,14 +9,7 @@
</div>--> </div>-->
<!-- <div id="toolbar-container" style="display: none;"></div> <!-- <div id="toolbar-container" style="display: none;"></div>
<div id="text-container" class="editor-container"></div>--> <div id="text-container" class="editor-container"></div>-->
<div <wTextarea ref="textContent" :value.sync="textValue" @updateText="updateText"></wTextarea>
id="editor"
ref="editor"
@input="changeInput"
class="text-editor"
contenteditable="true"
autofocus
></div>
<!-- <el-input <!-- <el-input
type="textarea" type="textarea"
:rows="9" :rows="9"
...@@ -27,23 +20,24 @@ ...@@ -27,23 +20,24 @@
style="-webkit-user-modify: read-write-plaintext-only !important;" style="-webkit-user-modify: read-write-plaintext-only !important;"
placeholder="请输入内容" placeholder="请输入内容"
></el-input>--> ></el-input>-->
<div v-for="itm in previewList" :key="itm.id"> <div v-for="(itm, index) in previewList" :key="itm.id">
<div class="welcome-file" v-if="itm.attType != 1"> <div class="welcome-file" v-if="itm.attType != 1">
<template v-if="itm.attType == 2"> <template v-if="itm.attType == 2">
<img src="@/assets/img/guestCustom/icon-img.png" alt /> <i v-show="index == previewList.length - 1 && loading" class="el-icon-loading"></i>
<span>{{ itm.attContent }}</span> <img v-show="!loading" src="@/assets/img/guestCustom/icon-img.png" alt />
<span :title="itm.attContent">{{ itm.attContent }}</span>
</template> </template>
<template v-else-if="itm.attType == 3"> <template v-else-if="itm.attType == 3">
<img src="@/assets/img/guestCustom/icon-img.png" alt /> <img src="@/assets/img/guestCustom/icon-img.png" alt />
<span>{{ itm.attContent }}</span> <span :title="itm.attContent">{{ itm.attContent }}</span>
</template> </template>
<template v-else-if="itm.attType == 7"> <template v-else-if="itm.attType == 7">
<img src="@/assets/img/guestCustom/icon-applet.png" alt /> <img src="@/assets/img/guestCustom/icon-applet.png" alt />
<span>{{ itm.attContent.marketingName }}</span> <span :title="itm.attContent.marketingName">{{ itm.attContent.marketingName }}</span>
</template> </template>
<template v-else-if="itm.attType == 5"> <template v-else-if="itm.attType == 5">
<img src="@/assets/img/guestCustom/icon-applet.png" alt /> <img src="@/assets/img/guestCustom/icon-applet.png" alt />
<span>{{ itm.attContent.title }}</span> <span :title="itm.attContent.title">{{ itm.attContent.title }}</span>
</template> </template>
<i class="el-icon-circle-close" @click="close(index)"></i> <i class="el-icon-circle-close" @click="close(index)"></i>
</div> </div>
...@@ -53,33 +47,15 @@ ...@@ -53,33 +47,15 @@
<!-- <i class="el-icon-circle-plus-outline"></i> --> <!-- <i class="el-icon-circle-plus-outline"></i> -->
<img :src="require(`@/assets/img/guestCustom/add-${item.type}.png`)" alt /> <img :src="require(`@/assets/img/guestCustom/add-${item.type}.png`)" alt />
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
<input <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)" />
v-if="item.type == 'img'" <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)" />
type="file"
style="opacity: 0"
:id="item.name + 'file'"
ref="file"
class="welcome-input"
: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)"
/>
<el-link v-else style="opacity: 0" @click="handleFun(item.funName)">{{ item.name }}</el-link> <el-link v-else style="opacity: 0" @click="handleFun(item.funName)">{{ item.name }}</el-link>
</div> </div>
</div> </div>
</div> </div>
<div class="tips-text"> <div class="tips-text">
<img src="@/assets/img/guestCustom/tips.png" class="tips-icon" alt /> <img src="@/assets/img/guestCustom/tips.png" class="tips-icon" alt />
<span>客户每个月最多接收来自同一企业的管理员的 4 条群发消息,4条消息可在同一天发送,达到上限后,无法再接收管理员的群发消息。</span> <span>如在企业微信管理后台已为所选员工设置了欢迎语,则此处设置的将不生效。</span>
</div> </div>
</div> </div>
<ActivityModel ref="activity" @selectActivity="selectActivity"></ActivityModel> <ActivityModel ref="activity" @selectActivity="selectActivity"></ActivityModel>
...@@ -97,15 +73,18 @@ const ATT_TYPE = { ...@@ -97,15 +73,18 @@ const ATT_TYPE = {
} }
// import E from 'wangeditor' // import E from 'wangeditor'
import ActivityModel from './activityModel' import ActivityModel from './activityModel'
import wTextarea from './tag-textarea'
import { utils } from 'glsx-common' import { utils } from 'glsx-common'
export default { export default {
name: 'WelcomeWords', name: 'WelcomeWords',
components: { components: {
ActivityModel ActivityModel,
wTextarea
}, },
props: { eventBus: Object }, props: { eventBus: Object },
data() { data() {
return { return {
loading: false,
btnList: [ btnList: [
// { // {
// id: 1, // id: 1,
...@@ -139,7 +118,8 @@ export default { ...@@ -139,7 +118,8 @@ export default {
sendType: '', sendType: '',
sendTime: '', sendTime: '',
sendDate: '', sendDate: '',
editor: {} editor: {},
textValue: ''
} }
}, },
mounted() { mounted() {
...@@ -160,6 +140,9 @@ export default { ...@@ -160,6 +140,9 @@ export default {
this.eventBus.$emit('update', this.previewList) this.eventBus.$emit('update', this.previewList)
}, },
methods: { methods: {
updateText(val) {
this.textInput(val)
},
// 上传图片 // 上传图片
handleImgChange(e, targetItem) { handleImgChange(e, targetItem) {
var reader = new FileReader() var reader = new FileReader()
...@@ -172,7 +155,12 @@ export default { ...@@ -172,7 +155,12 @@ export default {
this.$message.error('上传图片大小不能超过' + limitSize + 'MB!') this.$message.error('上传图片大小不能超过' + limitSize + 'MB!')
return true return true
} }
this.loading = true
reader.readAsDataURL(file) reader.readAsDataURL(file)
this.previewList.push({
attType: ATT_TYPE.IMAGE,
attContent: ''
})
reader.onload = e => { reader.onload = e => {
var image = new Image() var image = new Image()
image.src = e.target.result image.src = e.target.result
...@@ -182,12 +170,14 @@ export default { ...@@ -182,12 +170,14 @@ export default {
const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1] const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
this.$apis.common.pictureUpload({ file: base64 }).then(res => { this.$apis.common.pictureUpload({ file: base64 }).then(res => {
if (res) { if (res) {
console.log(res) let len = this.previewList.length - 1
this.previewList.push({ this.previewList[len].attContent = res
attType: ATT_TYPE.IMAGE, document.querySelector('.upload-img').value = ''
attContent: res } else {
}) let len = this.previewList.length - 1
this.previewList.splice(len, 1)
} }
this.loading = false
}) })
} }
} }
...@@ -218,27 +208,9 @@ export default { ...@@ -218,27 +208,9 @@ export default {
}) })
} }
}, },
// 添加昵称
handleFun(name) { handleFun(name) {
if (name == 'nickname') { if (name == 'nickname') {
this.$refs.editor.focus() this.$refs.textContent.addTag('@昵称')
this.insertHtmlAtCaret('@昵称')
this.changeInput()
// var range = window.getSelection().getRangeAt(0)
// console.log(range)
// range.selectNodeContents(range.endContainer.childNodes[range.startOffset - 2])
// var el = document.createElement('span')
// el.setAttribute('contenteditable', false)
// el.setAttribute('class', 'nickname')
// el.innerHTML = '@昵称<i class="el-icon-error"></i>'
// el.innerHTML = '<span id="nick" contenteditable="false" class="nickname">@昵称<i class="el-icon-error"></i></span>'
// var node = document.getElementById('nick')
// var targetNode = document.getElementById('editor')
// targetNode.appendChild(el)
// var EL = document.createElement('div')
// EL.setAttribute('contenteditable', true)
// targetNode.appendChild(EL)
// this.editor.txt.append('<span class="nickname">@昵称<i class="el-icon-error"></i><span>')
} else if (name == 'activity') { } else if (name == 'activity') {
this.$refs.activity.init() this.$refs.activity.init()
} }
...@@ -311,7 +283,7 @@ export default { ...@@ -311,7 +283,7 @@ export default {
} }
} }
}, },
changeInput: utils.debounce(function() { changeInput: utils.debounce(function () {
console.log(document.getElementById('editor').childNodes) console.log(document.getElementById('editor').childNodes)
var allNodes = document.getElementById('editor').childNodes var allNodes = document.getElementById('editor').childNodes
var str = '' var str = ''
...@@ -324,18 +296,17 @@ export default { ...@@ -324,18 +296,17 @@ export default {
}) })
console.log(str) console.log(str)
this.textInput(str) this.textInput(str)
},300), }, 300),
updateList(val) { updateList(val) {
console.log(val)
this.previewList = val this.previewList = val
this.eventBus.$emit('update', this.previewList) this.eventBus.$emit('update', this.previewList)
const obj = val.find(item => item.attType == 1) const obj = val.find(item => item.attType == 1)
if (obj) { let attContent = obj.attContent.replaceAll('[@昵称]', '<wise id="1">@昵称</wise>')
this.text = obj.attContent document.querySelector('.w-textarea_input').focus()
} else { setTimeout(() => {
this.text = '' document.querySelector('.w-textarea_input').innerHTML = attContent
} }, 100)
const editor = document.getElementById('editor')
editor.innerHTML = this.text
} }
} }
} }
...@@ -377,6 +348,10 @@ export default { ...@@ -377,6 +348,10 @@ export default {
} }
i { i {
font-size: 16px; font-size: 16px;
cursor: pointer;
}
.el-icon-loading {
font-size: 24px;
} }
&:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;
...@@ -397,15 +372,19 @@ export default { ...@@ -397,15 +372,19 @@ export default {
span { span {
font-size: 14px; font-size: 14px;
margin-left: 5px; margin-left: 5px;
cursor: pointer;
} }
input { input {
position: absolute; position: absolute;
width: 100%; width: 100%;
cursor: pointer; cursor: pointer;
font-size: 0;
height: 40px;
} }
img { img {
width: 16px; width: 16px;
height: 16px; height: 16px;
cursor: pointer;
} }
.el-link { .el-link {
position: absolute; position: absolute;
......
...@@ -5,7 +5,7 @@ const staticRoutes = Object.freeze([{ ...@@ -5,7 +5,7 @@ const staticRoutes = Object.freeze([{
meta: {}, meta: {},
}, { }, {
name: 'channel', name: 'channel',
path: '/channel/store/:id/:codeUuid', path: '/channel/store/:id/:codeUuid/:codeState',
component: resolve => require([`@/views/channel/store.vue`], resolve), component: resolve => require([`@/views/channel/store.vue`], resolve),
meta: {} meta: {}
}, { }, {
...@@ -57,6 +57,6 @@ const staticRoutes = Object.freeze([{ ...@@ -57,6 +57,6 @@ const staticRoutes = Object.freeze([{
name: 'friends', name: 'friends',
path: '/friends/index/:id', path: '/friends/index/:id',
component: resolve => require([`@/views/friends/index.vue`], resolve), component: resolve => require([`@/views/friends/index.vue`], resolve),
meta: {} meta: { permissions: ['新增'] }
}]) }])
export default staticRoutes export default staticRoutes
\ No newline at end of file \ No newline at end of file
...@@ -2,7 +2,8 @@ import Vue from 'vue' ...@@ -2,7 +2,8 @@ import Vue from 'vue'
// import { message } from '@/plugins/element.js' // import { message } from '@/plugins/element.js'
import { fetchConfig } from '@/config' import { fetchConfig } from '@/config'
import ElementUI from 'element-ui' import ElementUI from 'element-ui'
import { GLButton ,GLTable} from 'glsx-components' //权限按钮 (根据权限动态创建) import { GLTable} from 'glsx-components' //权限按钮 (根据权限动态创建)
import GLButton from 'glsx-components/src/packages/Button'
import { getRoutes } from '@/router' import { getRoutes } from '@/router'
import render from './render' import render from './render'
Vue.use(ElementUI) Vue.use(ElementUI)
...@@ -14,7 +15,7 @@ import '@/assets/css/common.scss' ...@@ -14,7 +15,7 @@ import '@/assets/css/common.scss'
let routes = [] let routes = []
let router = null let router = null
let instance = null let instance = null
export async function bootstrap({ name, id, history, common, messenger, globalState }) { export async function bootstrap({ name, id, history, common, messenger, globalState,routerBase }) {
const { response, request, sign, secret, request_common, sign_common } = await fetchConfig() const { response, request, sign, secret, request_common, sign_common } = await fetchConfig()
Vue.prototype.$history = history Vue.prototype.$history = history
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
...@@ -22,10 +23,11 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt ...@@ -22,10 +23,11 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt
Vue.prototype.$common = common Vue.prototype.$common = common
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_common = new common.Http({ response, signWay: "md5", request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } }) Vue.prototype.$http_common = new common.Http({ response, signWay: "md5", request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
const routesData = common.utils.deepClone(globalState.routers) const routesData = common.utils.deepClone(globalState.routers)
routes = getRoutes(routesData) routes = getRoutes(routesData)
subscribe({ messenger }) subscribe({ messenger })
console.log(routes,routesData)
Vue.use(GLButton, { routes, routerBase})
} }
export async function mount(props) { export async function mount(props) {
console.log('11111', props) console.log('11111', props)
......
...@@ -33,10 +33,10 @@ ...@@ -33,10 +33,10 @@
个标签 个标签
</span> </span>
<div class="el-input-tag input-tag-wrapper"> <div class="el-input-tag input-tag-wrapper">
<template v-if="tagging && tagging.length>0"> <template v-if="tagging && tagging.length > 0">
<template v-for="item in tagging"> <template v-for="item in tagging">
<el-tag v-for="(tag, idx) in item.labelList" :key="idx" closable :disable-transitions="false" @close="removeTag(item.labelList, idx)"> <el-tag v-for="(tag, idx) in item.labelList" :key="idx" closable :disable-transitions="false" @close="removeTag(item.labelList, idx)">
{{ tag?tag.name:'' }} {{ tag ? tag.name : '' }}
</el-tag> </el-tag>
</template> </template>
</template> </template>
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
<label>自动发送欢迎语</label> <label>自动发送欢迎语</label>
<el-switch v-model="autoWelcome" active-color="#5850FF" inactive-color="#999999"></el-switch> <el-switch v-model="autoWelcome" active-color="#5850FF" inactive-color="#999999"></el-switch>
</div> </div>
<div class="welcome-box"> <div class="welcome-box" v-show="autoWelcome">
<welcome-words :eventBus="eventBus" ref="welcome"></welcome-words> <welcome-words :eventBus="eventBus" ref="welcome"></welcome-words>
</div> </div>
</div> </div>
...@@ -110,7 +110,7 @@ export default { ...@@ -110,7 +110,7 @@ export default {
addCodeForm: { addCodeForm: {
codeName: '', codeName: '',
codeRemark: '', codeRemark: '',
autoAdd: false autoAdd: true
}, },
staffStatus: false, staffStatus: false,
staffInfo: [], staffInfo: [],
...@@ -119,7 +119,7 @@ export default { ...@@ -119,7 +119,7 @@ export default {
codeId: null, codeId: null,
footerLeft: 0, footerLeft: 0,
footerWidth: 0, footerWidth: 0,
autoWelcome: false, autoWelcome: true,
codeRules: { codeRules: {
codeName: [{ required: true, message: '请输入渠道名称', trigger: 'blur' }] codeName: [{ required: true, message: '请输入渠道名称', trigger: 'blur' }]
} }
...@@ -164,7 +164,7 @@ export default { ...@@ -164,7 +164,7 @@ export default {
tagSelected(item) { tagSelected(item) {
this.tagging = item this.tagging = item
}, },
handleSave: utils.debounce(function(){ handleSave: utils.debounce(function () {
if (this.staffInfo.length == 0) { if (this.staffInfo.length == 0) {
this.staffStatus = true this.staffStatus = true
return return
...@@ -172,7 +172,21 @@ export default { ...@@ -172,7 +172,21 @@ export default {
this.$refs['codeForm'].validate(valid => { this.$refs['codeForm'].validate(valid => {
if (valid) { if (valid) {
let param = Object.assign({ id: this.codeId }, this.addCodeForm) let param = Object.assign({ id: this.codeId }, this.addCodeForm)
param.tagging = JSON.stringify(this.tagging) let tagging = this.tagging.map(item => {
let tagIds = item.labelList.map(tag => {
return tag.id
})
let name = item.labelList.map(tag => {
return tag.name
})
return {
groupId: item.labelGroup.id,
tagIds: tagIds.join(','),
name: name.join(','),
labelType: item.labelGroup.name
}
})
param.tagging = JSON.stringify(tagging)
param.autoWelcome = this.autoWelcome ? 1 : 0 param.autoWelcome = this.autoWelcome ? 1 : 0
param.codeSystem = 0 param.codeSystem = 0
let staffId = [] let staffId = []
...@@ -188,22 +202,23 @@ export default { ...@@ -188,22 +202,23 @@ export default {
delete param.staffInfo delete param.staffInfo
param.staffId = staffId.join(',') param.staffId = staffId.join(',')
param.autoAdd ? (param.autoAdd = 1) : (param.autoAdd = 0) param.autoAdd ? (param.autoAdd = 1) : (param.autoAdd = 0)
const previewList = this.$common ? this.$common.utils.deepClone(this.$refs.welcome.previewList) : this.$refs.welcome.previewList const previewList = this.$common ? this.$common.utils.deepClone(this.$refs.welcome.previewList) : this.$refs.welcome.previewList
const attachmentList = previewList.map(item => { const attachmentList = previewList.map(item => {
if (item.attType == 1) { if (item.attType == 1) {
item.attContent = item.attContent.replace('@昵称', '[@昵称]') item.attContent = item.attContent.replaceAll('[@昵称]', '@昵称')
} else if (item.attType == 7) { item.attContent = item.attContent.replaceAll('@昵称', '[@昵称]')
item.attContent = JSON.stringify(item.attContent) } else if (item.attType == 7) {
} item.attContent = JSON.stringify(item.attContent)
return item }
}) return item
param.welcomeInfo = attachmentList })
param.welcomeInfo = attachmentList
this.$apis.channel[channel](param).then(res => { this.$apis.channel[channel](param).then(res => {
if (res) this.$router.push('/channel/index') if (res) this.$router.push('/channel/index')
}) })
} }
}) })
},300), }, 300),
detailChannelCode(id, codeUuid) { detailChannelCode(id, codeUuid) {
let param = { let param = {
id, id,
...@@ -213,7 +228,23 @@ export default { ...@@ -213,7 +228,23 @@ export default {
this.addCodeForm = Object.assign({}, res) this.addCodeForm = Object.assign({}, res)
this.addCodeForm.autoAdd = this.addCodeForm.autoAdd == 1 ? true : false this.addCodeForm.autoAdd = this.addCodeForm.autoAdd == 1 ? true : false
this.staffInfo = res.staffInfo this.staffInfo = res.staffInfo
this.tagging = eval(res.tagging) 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 }
})
return {
labelGroup: {
id: item.groupId,
name: item.labelType
},
labelList
}
})
this.tagging = taggingList
this.autoWelcome = res.autoWelcome ? true : false this.autoWelcome = res.autoWelcome ? true : false
const previewList = res.welcomeInfo.map(item => { const previewList = res.welcomeInfo.map(item => {
if (item.attType == 7) item.attContent = JSON.parse(item.attContent) if (item.attType == 7) item.attContent = JSON.parse(item.attContent)
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
</div> </div>
<div slot="reference" class="name-wrapper"> <div slot="reference" class="name-wrapper">
<div class="accountType-row" v-for="(item, index) in scope.scope.staffInfo" :key="index" v-show="index < 4"> <div class="accountType-row" v-for="(item, index) in scope.scope.staffInfo" :key="index" v-show="index < 4">
{{ index == 3 && scope.scope.staffInfo.length > 3 ? '...' : item.staffName }} {{ index == 3 && scope.scope.staffInfo.length > 3 ? '...('+scope.scope.staffInfo.length+')' : item.staffName }}
</div> </div>
</div> </div>
</el-popover> </el-popover>
...@@ -44,19 +44,22 @@ ...@@ -44,19 +44,22 @@
<div slot="tagging" slot-scope="scope" class="tag-panel"> <div slot="tagging" slot-scope="scope" class="tag-panel">
<el-popover trigger="hover" placement="top" v-if="scope.scope.taggingList && scope.scope.taggingList.length > 3"> <el-popover trigger="hover" placement="top" v-if="scope.scope.taggingList && scope.scope.taggingList.length > 3">
<div class="accountType-row" v-for="(item, index) in scope.scope.taggingList" :key="index"> <div class="accountType-row" v-for="(item, index) in scope.scope.taggingList" :key="index">
{{ item?item.name:'' }} {{ item ? item.name : '' }}
</div> </div>
<div slot="reference" class="name-wrapper"> <div slot="reference" class="name-wrapper">
<div class="accountType-row" v-for="(item, index) in scope.scope.taggingList" :key="index" v-show="index < 4"> <div class="accountType-row" v-for="(item, index) in scope.scope.taggingList" :key="index" v-show="index < 4">
{{ index == 3 && scope.scope.taggingList.length > 3 ? '...' : item?item.name:'' }} {{ index == 3 && scope.scope.taggingList.length > 3 ? '...('+scope.scope.taggingList.length+')' : item ? item.name : '' }}
</div> </div>
</div> </div>
</el-popover> </el-popover>
<template v-if="scope.scope.taggingList && scope.scope.taggingList.length <= 3"> <template v-if="scope.scope.taggingList && scope.scope.taggingList.length <= 3 && scope.scope.taggingList.length > 0">
<div class="accountType-row" v-for="(item, index) in scope.scope.taggingList" :key="index"> <div class="accountType-row" v-for="(item, index) in scope.scope.taggingList" :key="index">
{{ item?item.name:'' }} {{ item ? item.name : '' }}
</div> </div>
</template> </template>
<div v-if="!scope.scope.taggingList || (scope.scope.taggingList && scope.scope.taggingList.length == 0)">
--
</div>
</div> </div>
<div slot="codeRemark" slot-scope="scope"> <div slot="codeRemark" slot-scope="scope">
<div class="codeName">{{ scope.scope.codeName }}</div> <div class="codeName">{{ scope.scope.codeName }}</div>
...@@ -132,7 +135,7 @@ export default { ...@@ -132,7 +135,7 @@ export default {
}, },
methods: { methods: {
handleDetail(scope) { handleDetail(scope) {
this.$router.push('/channel/store/' + scope.id + '/' + scope.codeUuid) this.$router.push('/channel/store/' + scope.id + '/' + scope.codeUuid + '/' + scope.codeState)
}, },
handleEdit(scope) { handleEdit(scope) {
this.$router.push('/channel/addCode/' + scope.id + '/' + scope.codeUuid) this.$router.push('/channel/addCode/' + scope.id + '/' + scope.codeUuid)
...@@ -208,16 +211,14 @@ export default { ...@@ -208,16 +211,14 @@ export default {
this.tableData = res.data this.tableData = res.data
this.tableData.forEach(item => { this.tableData.forEach(item => {
this.$set(item, 'taggingList', []) this.$set(item, 'taggingList', [])
let tagging = eval(item.tagging) const tagging = eval(item.tagging)
if (tagging && tagging.length > 0) { tagging.forEach(itm => {
tagging.forEach(tag => { let name = itm.name.split(',')
tag.labelList.forEach(itm => { name.forEach((tag, index) => {
item.taggingList.push(itm) item.taggingList.push({ name: tag })
})
}) })
} })
}) })
console.log(this.tableData)
this.tableTotal = res.count this.tableTotal = res.count
} }
}) })
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</div> </div>
<div class="chart-desc-item" v-for="(item, index) in codeIds" :key="index"> <div class="chart-desc-item" v-for="(item, index) in codeIds" :key="index">
<div class="chart-item-title"> <div class="chart-item-title">
<span :style="{color: colorList[index]}">—</span> <span :style="{color: colorList[index],'font-size': '18px'}">—</span>
{{ item.codeName }} {{ item.codeName }}
</div> </div>
<div class="chart-item-num">{{ item.totalNum }}</div> <div class="chart-item-num">{{ item.totalNum }}</div>
...@@ -120,6 +120,7 @@ export default { ...@@ -120,6 +120,7 @@ export default {
this.trendType = 1 this.trendType = 1
} }
this.codeTrend() this.codeTrend()
this.codeSearch()
} }
}, },
methods: { methods: {
...@@ -128,6 +129,7 @@ export default { ...@@ -128,6 +129,7 @@ export default {
this.startTime = '' this.startTime = ''
this.endTime = '' this.endTime = ''
this.codeTrend() this.codeTrend()
this.codeSearch()
}, },
handleSearch() { handleSearch() {
this.codeSearch() this.codeSearch()
......
...@@ -36,7 +36,15 @@ export default { ...@@ -36,7 +36,15 @@ export default {
return { return {
name: codeName[index], name: codeName[index],
type: 'line', type: 'line',
data: newlyQyCount data: newlyQyCount,
itemStyle: {
normal: {
color: this.colorList[index],
lineStyle: {
color: this.colorList[index]
}
}
}
} }
}) })
echarts.init(document.getElementById('channel-main')).clear() echarts.init(document.getElementById('channel-main')).clear()
...@@ -72,12 +80,12 @@ export default { ...@@ -72,12 +80,12 @@ export default {
} }
myChart.setOption(option) myChart.setOption(option)
let dataList = [] let dataList = []
seriesList.forEach(item=>{ seriesList.forEach(item => {
dataList = dataList.concat(item.data) dataList = dataList.concat(item.data)
}) })
if(dataList.every(item => item == 0)) { if (dataList.every(item => item == 0)) {
this.lineStatus = false this.lineStatus = false
}else { } else {
this.lineStatus = true this.lineStatus = true
} }
} }
......
<template> <template>
<div class="square-main"> <div class="square-main">
<el-dialog title="选择渠道" :visible.sync="dialogVisible" width="70%" :before-close="handleClose"> <el-dialog title="选择渠道" :visible.sync="dialogVisible" width="70%" :before-close="handleCancel">
<div class="square-tabel"> <div class="square-tabel">
<div class="square-tabel-select"> <div class="square-tabel-select">
<GLTable ref="table" :hasPage="false" :tableData="tableData" :tableTotal="tableTotal" :tableParams="tableParams" @refreshTable="handleSearch" @selectionTable="selectionTable"></GLTable> <GLTable ref="table" :hasPage="false" :tableData="tableData" :tableTotal="tableTotal" :tableParams="tableParams" @refreshTable="handleSearch" @selectionTable="selectionTable"></GLTable>
...@@ -9,8 +9,9 @@ ...@@ -9,8 +9,9 @@
<div class="selected-title">已选渠道</div> <div class="selected-title">已选渠道</div>
<div class="selected-panel"> <div class="selected-panel">
<div class="selected-item" v-for="(item, index) in selectedList" :key="index"> <div class="selected-item" v-for="(item, index) in selectedList" :key="index">
<div><span :style="{color: colorList[index]}">—</span> <div>
{{ item.codeName }} <span :style="{ color: colorList[index] ,'font-size': '18px'}">—</span>
{{ item.codeName }}
</div> </div>
<img src="@/assets/img/channel/del.png" @click="delTag(item)" /> <img src="@/assets/img/channel/del.png" @click="delTag(item)" />
</div> </div>
...@@ -18,7 +19,7 @@ ...@@ -18,7 +19,7 @@
</div> </div>
</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" @click="handleCancel">取 消</el-button>
<el-button size="small" type="primary" @click="handleSelect">确 定</el-button> <el-button size="small" type="primary" @click="handleSelect">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
...@@ -99,6 +100,10 @@ export default { ...@@ -99,6 +100,10 @@ export default {
delTag(item) { delTag(item) {
this.$refs.table.$refs.salelistMutiTable.toggleRowSelection(item) this.$refs.table.$refs.salelistMutiTable.toggleRowSelection(item)
}, },
handleCancel() {
this.dialogVisible = false
this.$refs.table.$refs.salelistMutiTable.clearSelection()
},
handleSelect: utils.debounce(function () { handleSelect: utils.debounce(function () {
if (this.selectedList.length == 0) { if (this.selectedList.length == 0) {
this.$message.error('请选择渠道') this.$message.error('请选择渠道')
......
...@@ -2,9 +2,6 @@ ...@@ -2,9 +2,6 @@
<div class="channel-main scrm-box-f" v-loading="loading"> <div class="channel-main scrm-box-f" v-loading="loading">
<div class="channel-header"> <div class="channel-header">
<el-button type="primary" size="small" @click="goBack">返回</el-button> <el-button type="primary" size="small" @click="goBack">返回</el-button>
<el-upload action='#' class="image-uploader" :before-upload="upLoadImg">
<el-button type="primary" size="small">创建活码海报</el-button>
</el-upload>
</div> </div>
<div class="poster-body"> <div class="poster-body">
<div class="poster-item" @dblclick="setPoster(item)" @mouseenter="item.show = true" @mouseleave="item.show = false" v-for="(item, index) in posterList" :key="index"> <div class="poster-item" @dblclick="setPoster(item)" @mouseenter="item.show = true" @mouseleave="item.show = false" v-for="(item, index) in posterList" :key="index">
...@@ -24,6 +21,19 @@ ...@@ -24,6 +21,19 @@
</div> </div>
<div class="poster-item-link" @click="downloadIamge(item.autoUrl)">下载海报</div> <div class="poster-item-link" @click="downloadIamge(item.autoUrl)">下载海报</div>
</div> </div>
<div class="poster-item">
<div class="poster-item-box">
<div>
<div class="poster-upload-image">
<img src="@/assets/img/channel/upload.png" />
<div class="poster-tips">上传海报图片,将自动配上渠道活码</div>
</div>
<el-upload action="#" class="image-uploader" :before-upload="upLoadImg">
<div class="poster-item-link">上传海报</div>
</el-upload>
</div>
</div>
</div>
</div> </div>
<el-dialog v-loading="loadingDrag" title="创建活码海报" :visible.sync="dialogVisible" width="50%" :before-close="handleClose"> <el-dialog v-loading="loadingDrag" title="创建活码海报" :visible.sync="dialogVisible" width="50%" :before-close="handleClose">
<div class="poster-draggable-title">拖动活码可调整活码位置</div> <div class="poster-draggable-title">拖动活码可调整活码位置</div>
...@@ -126,7 +136,6 @@ export default { ...@@ -126,7 +136,6 @@ export default {
leavePoster() {}, leavePoster() {},
upLoadImg(file) { upLoadImg(file) {
console.log(file.size / 1024 / 1000 > 5) console.log(file.size / 1024 / 1000 > 5)
this.loading = true
let fileName = file.name let fileName = file.name
if (file.name.lastIndexOf('.') === -1) { if (file.name.lastIndexOf('.') === -1) {
this.$message.info('路径不正确') this.$message.info('路径不正确')
...@@ -138,11 +147,11 @@ export default { ...@@ -138,11 +147,11 @@ export default {
this.$message.info('图片格式不正确') this.$message.info('图片格式不正确')
return false return false
} }
if (file.size / 1024 / 1000 > 5) { if (file.size / 1024 / 1000 > 10) {
this.$message.info('请上次小于5M的图片') this.$message.info('请上传小于10M的图片')
return return
} }
// if (fileSize < 3145728) { this.loading = true
if (window.FileReader) { if (window.FileReader) {
let reader = new FileReader() let reader = new FileReader()
let self = this let self = this
...@@ -187,8 +196,8 @@ export default { ...@@ -187,8 +196,8 @@ export default {
this.height = height this.height = height
}, },
savePoster() { savePoster() {
this.loadingDrag = true; this.loadingDrag = true
let { x, y, width, height, backUrl, codeUrl, id ,dragHeight} = this let { x, y, width, height, backUrl, codeUrl, id, dragHeight } = this
let params = { let params = {
x, x,
y, y,
...@@ -262,6 +271,7 @@ export default { ...@@ -262,6 +271,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.channel-main { .channel-main {
padding: 10px 20px; padding: 10px 20px;
min-height: calc(100% - 30px);
} }
.image-uploader { .image-uploader {
display: inline-block; display: inline-block;
...@@ -328,6 +338,21 @@ export default { ...@@ -328,6 +338,21 @@ export default {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
text-align: center;
.poster-upload-image {
text-align: center;
font-size: 14px;
font-weight: 400;
color: #999999;
line-height: 20px;
img {
width: 90px;
height: auto;
}
.poster-tips {
margin: 10px 0px 20px;
}
}
.poster-image { .poster-image {
background-size: 100% 100%; background-size: 100% 100%;
width: 300px; width: 300px;
......
...@@ -76,11 +76,11 @@ export default { ...@@ -76,11 +76,11 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '新增客户数', label: '新增客户数',
prop: 'newlyTotalCount' prop: 'newlyCount'
}, },
{ {
label: '留存客户数', label: '留存客户数',
prop: 'keepTotalCount' prop: 'newlyKeepCount'
}, },
{ {
label: '日期', label: '日期',
...@@ -98,11 +98,11 @@ export default { ...@@ -98,11 +98,11 @@ export default {
}, },
{ {
label: '新增客户数', label: '新增客户数',
prop: 'newlyTotalCount' prop: 'newlyCount'
}, },
{ {
label: '留存客户数', label: '留存客户数',
prop: 'keepTotalCount' prop: 'newlyKeepCount'
}, },
{ {
label: '日期', label: '日期',
...@@ -113,7 +113,10 @@ export default { ...@@ -113,7 +113,10 @@ export default {
pageMemberConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' }, pageMemberConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
layout: 'sizes, prev, pager, next, jumper, ->, total', layout: 'sizes, prev, pager, next, jumper, ->, total',
tagging: [], tagging: [],
welcomeInfo: [],
tableTotal: 0, tableTotal: 0,
codeState: '',
codeUuid: '',
codeId: '' codeId: ''
} }
}, },
...@@ -128,11 +131,41 @@ export default { ...@@ -128,11 +131,41 @@ export default {
} }
this.$apis.channel.detailChannelCode(param).then(res => { this.$apis.channel.detailChannelCode(param).then(res => {
this.detailCodeForm = Object.assign({}, res) this.detailCodeForm = Object.assign({}, res)
this.tagging = eval('(' + res.tagging + ')') 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 }
})
return {
labelGroup: {
id: item.groupId,
name: item.labelType
},
labelList
}
})
this.tagging = taggingList
this.welcomeInfo = res.welcomeInfo.map(item => {
let attContent
if (item.attType == 7) {
attContent = eval('(' + item.attContent + ')')
} else if (item.attType == 1) {
attContent = item.attContent.replaceAll('[@昵称]', '<span style="color:#5850FF">@昵称</span>')
} else {
attContent = item.attContent
}
return {
attType: item.attType,
attContent
}
})
}) })
}, },
listTime(codeId) { listTime() {
this.$apis.overview.listTime({ codeId }).then(res => { this.$apis.overview.listTime({ codeId: this.codeId }).then(res => {
this.getTimeApi = res this.getTimeApi = res
}) })
}, },
...@@ -142,19 +175,21 @@ export default { ...@@ -142,19 +175,21 @@ export default {
...JSON.parse(JSON.stringify(this.tableSearchForm)), ...JSON.parse(JSON.stringify(this.tableSearchForm)),
pageSize: this.$refs.memberTabel.page.pageSize, pageSize: this.$refs.memberTabel.page.pageSize,
pageNum: this.$refs.memberTabel.page.pageNum, pageNum: this.$refs.memberTabel.page.pageNum,
codeId: this.codeId codeState: this.codeState
} }
this.$apis.overview.listStaff(params).then(res => { this.$apis.overview.listStaff(params).then(res => {
this.getMemberApi = res.data; this.getMemberApi = res.data
this.tableTotal = res.count this.tableTotal = res.count
}) })
} }
}, },
mounted() { mounted() {
const { id, codeUuid } = this.$route.params const { id, codeUuid, codeState } = this.$route.params
this.codeId = id; this.codeId = id
this.codeState = codeState
this.codeUuid = codeUuid
this.detailChannelCode(id, codeUuid) this.detailChannelCode(id, codeUuid)
this.listTime(id) this.listTime()
this.listStaff() this.listStaff()
} }
} }
...@@ -207,6 +242,43 @@ export default { ...@@ -207,6 +242,43 @@ export default {
} }
} }
} }
.welcome-panel {
.welcome-title {
font-size: 16px;
color: #333333;
text-align: left;
line-height: 16px;
font-weight: 500;
padding: 20px 0px;
border-bottom: 1px solid #d8d8d8;
}
.welcome-box {
margin: 20px 0px;
display: flex;
font-size: 14px;
color: #333333;
text-align: right;
line-height: 20px;
font-weight: 400;
&-contant {
text-align: left;
}
&-contaner {
margin: 20px;
background: rgba(247, 247, 247, 0.52);
border-radius: 2px;
line-height: 22px;
padding: 10px;
min-width: 500px;
}
img {
width: 16px;
height: 16px;
vertical-align: sub;
margin-right: 5px;
}
}
}
.count-panel { .count-panel {
display: flex; display: flex;
&-item { &-item {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<div class="drainage-title" v-else>批量加好友</div> <div class="drainage-title" v-else>批量加好友</div>
<div class="drainage-panel"> <div class="drainage-panel">
<div class="drainage-config-wrap"> <div class="drainage-config-wrap">
<div class="drainage-item-label" v-if="configType">平台将识别尚未补充联系方式的企微客户,并自动发送消息提醒对应员工跟进。若客户尚未添加任何员工,系统将自动分配员工进行跟进。</div> <div class="drainage-item-label" v-if="configType">平台将识别尚未补充联系方式的企微客户,并自动发送消息提醒对应员工跟进。</div>
<div class="drainage-item-label" v-else>通过企微魔方导入客户数据后,平台将识别尚未添加企微的客户,并自动发送消息提醒对应员工跟进。</div> <div class="drainage-item-label" v-else>通过企微魔方导入客户数据后,平台将识别尚未添加企微的客户,并自动发送消息提醒对应员工跟进。</div>
<div class="drainage-item-switch"> <div class="drainage-item-switch">
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</div> </div>
</div> </div>
<div class="config-title"> <div class="config-title">
<span v-if="!editStatus" @click="editStatus = true"> <span v-if="!editStatus && !configType" @click="editStatus = true">
<label>编辑配置</label> <label>编辑配置</label>
<i class="el-icon-edit-outline"></i> <i class="el-icon-edit-outline"></i>
</span> </span>
...@@ -136,10 +136,10 @@ ...@@ -136,10 +136,10 @@
</div> </div>
</div> </div>
</div> </div>
<div class="drainage-wrap scrm-box-f"> <div class="drainage-wrap scrm-box-f" v-if="!configType">
<div class="drainage-title">营销配置</div> <div class="drainage-title">营销配置</div>
<div class="drainage-form"> <div class="drainage-form">
<div class="drainage-form-item el-form-item is-required" v-if="editStatus"> <div class="drainage-form-item el-form-item is-required" v-if="editStatus">
<label class="el-form-item__label">跟进员工</label> <label class="el-form-item__label">跟进员工</label>
<div style="position: relative"> <div style="position: relative">
<el-button size="small" @click="handleAddEmp"> <el-button size="small" @click="handleAddEmp">
...@@ -152,20 +152,21 @@ ...@@ -152,20 +152,21 @@
{{ tag.staffName }} {{ tag.staffName }}
</el-tag> </el-tag>
</div> </div>
<div class="el-form-item__error" v-if="imNameStatus">请选择跟进专员</div> <div class="el-form-item__error" v-if="imNameStatus">请选择跟进专员</div>
</div> </div>
</div> </div>
<div class="drainage-form-item" v-else> <div class="drainage-form-item" v-else>
<label>跟进员工</label> <label>跟进员工</label>
<div class="drainage-emp"> <div class="drainage-emp">
<template v-for="item in staffIds"> <div class="emp-tag" :key="index" v-for="(item, index) in staffIds">
{{ item.staffName }} {{ item.staffName }}
</template> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div <div
v-if="(editStatus && !configType) || configType"
class="footer-panel" class="footer-panel"
:style="{ :style="{
left: footerLeft + 'px', left: footerLeft + 'px',
...@@ -174,7 +175,7 @@ ...@@ -174,7 +175,7 @@
> >
<el-button type="primary" @click="goback" v-if="configType">返回</el-button> <el-button type="primary" @click="goback" v-if="configType">返回</el-button>
<el-button type="primary" @click="handleCancel" v-if="!configType">取消</el-button> <el-button type="primary" @click="handleCancel" v-if="!configType">取消</el-button>
<el-button type="primary" @click="handleSave">确定</el-button> <el-button type="primary" @click="handleSave" v-if="!configType">确定</el-button>
</div> </div>
<select-emp @selectTable="selectTable" ref="selectEmpForm"></select-emp> <select-emp @selectTable="selectTable" ref="selectEmpForm"></select-emp>
</div> </div>
...@@ -203,31 +204,54 @@ export default { ...@@ -203,31 +204,54 @@ export default {
} }
}, },
watch: { watch: {
$route:{ $route: {
handler(newRouter){ handler(newRouter) {
this.init() this.init()
}, }
}
}
}, },
methods: { methods: {
goback() { goback() {
this.$router.push('/square/index') this.$router.push('/square/index')
}, },
handleAddSwitch() { handleAddSwitch() {
if(this.noStatus) { if (this.noStatus) {
this.handleSwitch()
return return
} }
if (this.addValue) { if (this.addValue) {
this.$alert('启动前,先完善营销配置', '提示', { this.handleSwitch()
confirmButtonText: '知道了'
})
} else { } else {
this.$alert('系统将停止此类营销,营销配置仍然保留', '提示', { this.$alert('系统将停止此类营销,营销配置仍然保留', '提示', {
confirmButtonText: '知道了' showConfirmButton: false,
center: true
}).catch(action => {
this.handleSwitch()
}) })
} }
}, },
handleSwitch() {
let params = {
id: this.configItem.id,
delFlag: this.addValue ? 0 : 1,
configType: this.configType ? 2 : 1,
}
let config;
if (this.configItem.id) {
config = 'updateConfig'
} else {
config = 'addConfig'
}
this.$apis.marketing[config](params).then(res => {
if (res) {
this.$message({
message: '操作成功',
type: 'success'
})
this.init()
}
})
},
remove(index) { remove(index) {
this.staffIds.splice(index, 1) this.staffIds.splice(index, 1)
}, },
...@@ -240,21 +264,21 @@ export default { ...@@ -240,21 +264,21 @@ export default {
}) })
}, },
handleAddEmp() { handleAddEmp() {
this.imNameStatus = false; this.imNameStatus = false
this.$refs.selectEmpForm.init(this.staffIds) this.$refs.selectEmpForm.init(this.staffIds)
}, },
handleCancel() { handleCancel() {
this.init() this.init()
}, },
handleSave() { handleSave() {
if(this.editStatus && this.staffIds && this.staffIds.length == 0) { if (this.editStatus && this.staffIds && this.staffIds.length == 0) {
this.imNameStatus = true; this.imNameStatus = true
return return
} }
let params = { let params = {
configType: this.configType ? 2 : 1, configType: this.configType ? 2 : 1,
id: this.configItem.id, id: this.configItem.id,
staffIds: JSON.stringify(this.staffIds) staffIds: this.configType ? null : JSON.stringify(this.staffIds)
} }
let config let config
if (this.configItem.id) { if (this.configItem.id) {
...@@ -284,15 +308,15 @@ export default { ...@@ -284,15 +308,15 @@ export default {
}) })
}, },
findAllByPage() { findAllByPage() {
this.$apis.marketing.findAllByPage({pageSize:1,pageNum:1}).then(res => { this.$apis.marketing.findAllByPage({ pageSize: 1, pageNum: 1 }).then(res => {
if(res.data && res.data.length) { if (res.data && res.data.length) {
this.noStatus = true; this.noStatus = true
} }
}) })
}, },
init() { init() {
this.editStatus = false; this.editStatus = false
this.findAllByPage(); this.findAllByPage()
let { id } = this.$route.params let { id } = this.$route.params
if (id) { if (id) {
this.configType = true this.configType = true
...@@ -347,8 +371,21 @@ export default { ...@@ -347,8 +371,21 @@ export default {
} }
} }
.drainage-emp { .drainage-emp {
height: 36px; display: flex;
line-height: 36px; margin-top: 6px;
flex-wrap: wrap;
div {
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 24px;
height: 26px;
padding: 0px 5px;
border-radius: 4px;
border: 1px solid #333333;
margin-right: 5px;
margin-bottom: 5px;
}
} }
.input-tag-wrapper { .input-tag-wrapper {
position: relative; position: relative;
......
...@@ -88,7 +88,7 @@ export default { ...@@ -88,7 +88,7 @@ export default {
type: this.activeName, type: this.activeName,
}; };
this.$apis.marketing.dracImMessage(params).then((res) => { this.$apis.marketing.dracImMessage(params).then((res) => {
console.log(res); this.messageRadio = {};
this.modelList = res.data; this.modelList = res.data;
this.tableTotal = res.count; this.tableTotal = res.count;
this.loading = false; this.loading = false;
......
...@@ -26,11 +26,40 @@ ...@@ -26,11 +26,40 @@
<div class="welcome-panel"> <div class="welcome-panel">
<div class="welcome-switch"> <div class="welcome-switch">
<label>自动发送欢迎语</label> <label>自动发送欢迎语</label>
<el-switch v-model="autoWelcome" active-color="#5850FF" inactive-color="#999999"></el-switch> <el-switch v-model="autoWelcome" :disabled="!editStatus" active-color="#5850FF" inactive-color="#999999"></el-switch>
</div> </div>
<div class="welcome-box"> <div class="welcome-box" v-show="editStatus && autoWelcome">
<welcome-words :eventBus="eventBus" ref="welcome"></welcome-words> <welcome-words :eventBus="eventBus" ref="welcome"></welcome-words>
</div> </div>
<div class="welcome-box" v-show="!editStatus && autoWelcome">
<div class="welcome-box-contaner">
<div :key="index" v-for="(item, index) in welcomeInfo">
<div v-if="item.attType == 1">
<div v-html="item.attContent" class="welcome-box-name"></div>
</div>
<div v-else-if="item.attType == 2">
<img src="@/assets/img/guestCustom/icon-img.png" alt="" />
<span>{{ item.attContent }}</span>
</div>
<div v-else-if="item.attType == 3">
<img src="@/assets/img/guestCustom/icon-img.png" alt="" />
<span>{{ item.attContent }}</span>
</div>
<div v-else-if="item.attType == 4">
<img src="@/assets/img/guestCustom/icon-link.png" alt="" />
<span>{{ item.attContent }}</span>
</div>
<div v-else-if="item.attType == 5">
<img src="@/assets/img/guestCustom/icon-applet.png" alt="" />
<span>{{ item.attContent }}</span>
</div>
<div v-else-if="item.attType == 7">
<img src="@/assets/img/guestCustom/icon-applet.png" alt="" />
<span>{{ item.attContent.marketingName }}</span>
</div>
</div>
</div>
</div>
</div> </div>
</div> </div>
<div class="drainage-wrap scrm-box-f"> <div class="drainage-wrap scrm-box-f">
...@@ -63,9 +92,9 @@ ...@@ -63,9 +92,9 @@
<div class="drainage-form-item" v-else> <div class="drainage-form-item" v-else>
<label>跟进员工</label> <label>跟进员工</label>
<div class="drainage-emp"> <div class="drainage-emp">
<template v-for="item in dracImFollowStaffResponses"> <div :key="index" v-for="(item, index) in dracImFollowStaffResponses">
{{ item.staffName }} {{ item.staffName }}
</template> </div>
</div> </div>
</div> </div>
<div class="drainage-form-item"> <div class="drainage-form-item">
...@@ -77,16 +106,15 @@ ...@@ -77,16 +106,15 @@
<el-time-picker is-range :disabled="!editStatus" value-format="HH:mm:ss" v-model="addForm.time" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围"></el-time-picker> <el-time-picker is-range :disabled="!editStatus" value-format="HH:mm:ss" v-model="addForm.time" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围"></el-time-picker>
</el-form-item> </el-form-item>
<el-form-item label="短信内容" prop="content"> <el-form-item label="短信内容" prop="content">
<el-input type="textarea" v-model="addForm.content" rows="5" :disabled="!editStatus" maxlength="500" show-word-limit></el-input> <el-input type="textarea" v-model="addForm.content" rows="5" :disabled="!editStatus" maxlength="280" show-word-limit></el-input>
<div class="select-panel" v-if="editStatus"> <div class="select-panel" v-if="editStatus">
<div @click="handleSelectMessage"> <div @click="handleSelectMessage">
<i class="el-icon-circle-plus-outline"><span>选择模板</span></i> <i class="el-icon-circle-plus-outline"><span>选择模板</span></i>
</div> </div>
</div> </div>
<div class="form-tips">共可输入500字,70字內(含70字)计一条,超过70字,按70字/条计费。</div> <div class="form-tips">70字內(含70字)计一条,超过70字,按70字/条计费。</div>
<div class="form-tips">提示:当前短信已有{{ addForm.content.length }}字,按{{ content.length }}条短信发送且计费。</div> <div class="form-tips">提示:当前短信已有{{ addForm.content.length }}字,按{{ content.length }}条短信发送且计费。</div>
</el-form-item> </el-form-item>
<el-form-item label="审核通知人:">短信内容审核结果会通过企微消息的形式发送给设置的员工,员工可以及时跟进。</el-form-item>
<el-form-item label="自动打标签"> <el-form-item label="自动打标签">
<div class="tag-item-panel" v-if="editStatus"> <div class="tag-item-panel" v-if="editStatus">
<div> <div>
...@@ -100,11 +128,11 @@ ...@@ -100,11 +128,11 @@
</div> </div>
</div> </div>
</div> </div>
<div v-else> <div v-else class="drainage-emp">
<template v-for="item in tagging"> <template v-for="item in tagging">
<template v-for="tag in item.labelList"> <div :key="index" v-for="(tag, index) in item.labelList">
{{ tag.name }} {{ tag.name }}
</template> </div>
</template> </template>
</div> </div>
</el-form-item> </el-form-item>
...@@ -174,8 +202,9 @@ export default { ...@@ -174,8 +202,9 @@ export default {
}, },
data() { data() {
return { return {
welcomeInfo: [],
eventBus: new Vue(), eventBus: new Vue(),
autoWelcome: false, autoWelcome: true,
imName: '', imName: '',
imNameStatus: false, imNameStatus: false,
empStatus: false, empStatus: false,
...@@ -305,12 +334,26 @@ export default { ...@@ -305,12 +334,26 @@ export default {
exportUrl: this.exportUrl exportUrl: this.exportUrl
} }
} else { } else {
let tagging = this.tagging.map(item => {
let tagIds = item.labelList.map(tag => {
return tag.id
})
let name = item.labelList.map(tag => {
return tag.name
})
return {
groupId: item.labelGroup.id,
tagIds: tagIds.join(','),
name: name.join(','),
labelType: item.labelGroup.name
}
})
config = 'exportAdd' config = 'exportAdd'
params = { params = {
autoWelcome: this.autoWelcome ? 1 : 0, autoWelcome: this.autoWelcome ? 1 : 0,
imName: this.imName, imName: this.imName,
imType: 2, imType: 2,
tagging: JSON.stringify(this.tagging), tagging: JSON.stringify(tagging),
exportUrl: this.exportUrl, exportUrl: this.exportUrl,
dracImFollowStaffRequestList: this.dracImFollowStaffResponses, dracImFollowStaffRequestList: this.dracImFollowStaffResponses,
dracImMessageConfigRequest: { dracImMessageConfigRequest: {
...@@ -323,7 +366,8 @@ export default { ...@@ -323,7 +366,8 @@ export default {
const previewList = this.$common ? this.$common.utils.deepClone(this.$refs.welcome.previewList) : this.$refs.welcome.previewList const previewList = this.$common ? this.$common.utils.deepClone(this.$refs.welcome.previewList) : this.$refs.welcome.previewList
const attachmentList = previewList.map(item => { const attachmentList = previewList.map(item => {
if (item.attType == 1) { if (item.attType == 1) {
item.attContent = item.attContent.replace('@昵称', '[@昵称]') item.attContent = item.attContent.replaceAll('[@昵称]', '@昵称')
item.attContent = item.attContent.replaceAll('@昵称', '[@昵称]')
} else if (item.attType == 7) { } else if (item.attType == 7) {
item.attContent = JSON.stringify(item.attContent) item.attContent = JSON.stringify(item.attContent)
} }
...@@ -366,10 +410,27 @@ export default { ...@@ -366,10 +410,27 @@ export default {
this.autoWelcome = res.autoWelcome ? true : false this.autoWelcome = res.autoWelcome ? true : false
const previewList = res.dracScrmWelcomeConfigDTOS.map(item => { const previewList = res.dracScrmWelcomeConfigDTOS.map(item => {
if (item.attType == 7) item.attContent = JSON.parse(item.attContent) if (item.attType == 7) item.attContent = JSON.parse(item.attContent)
if (item.attType == 1) item.attContent = item.attContent.replaceAll('[@昵称]', '<span style="color:#5850FF">@昵称</span>')
return item return item
}) })
this.$refs.welcome.updateList(previewList) this.welcomeInfo = previewList
this.tagging = eval(res.tagging) 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 }
})
return {
labelGroup: {
id: item.groupId,
name: item.labelType
},
labelList
}
})
this.tagging = taggingList
}) })
} }
}, },
...@@ -412,6 +473,20 @@ export default { ...@@ -412,6 +473,20 @@ export default {
} }
.welcome-box { .welcome-box {
margin-left: 55px; margin-left: 55px;
&-contaner {
margin: 20px;
background: rgba(247, 247, 247, 0.52);
border-radius: 2px;
line-height: 22px;
padding: 10px;
min-width: 500px;
}
img {
width: 16px;
height: 16px;
vertical-align: sub;
margin-right: 5px;
}
} }
} }
} }
...@@ -641,7 +716,21 @@ export default { ...@@ -641,7 +716,21 @@ export default {
} }
} }
.drainage-emp { .drainage-emp {
line-height: 36px; display: flex;
margin-top: 6px;
flex-wrap: wrap;
div {
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 24px;
height: 26px;
padding: 0px 5px;
border-radius: 4px;
border: 1px solid #333333;
margin-right: 5px;
margin-bottom: 5px;
}
} }
.input-tag-wrapper { .input-tag-wrapper {
position: relative; position: relative;
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
新增营销 新增营销
</el-button> </el-button>
<!-- <GLButton type="primary" @click="addConfig" size="small" fn="新增" mode="el-button">新增营销</GLButton> -->
<label>结合门店营销活动,指定客户创建智能营销,提高活动转化率</label> <label>结合门店营销活动,指定客户创建智能营销,提高活动转化率</label>
<el-popover placement="top" width="400" trigger="hover" content="通过导入的客户,门店可通过智能外呼及智能短信,结合营销活动的需要向离店用户进行智能营销,可实现标准、高效的营销同时实现用户线上化。"> <el-popover placement="top" width="400" trigger="hover" content="通过导入的客户,门店可通过智能外呼及智能短信,结合营销活动的需要向离店用户进行智能营销,可实现标准、高效的营销同时实现用户线上化。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" /> <img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
...@@ -54,12 +56,8 @@ export default { ...@@ -54,12 +56,8 @@ export default {
label: '待处理' label: '待处理'
}, },
{ {
value: '2',
label: '处理中'
},
{
value: '3', value: '3',
label: '已处理' label: '已完成'
} }
], ],
pickerOptions: { pickerOptions: {
...@@ -95,8 +93,7 @@ export default { ...@@ -95,8 +93,7 @@ export default {
}, },
{ {
label: '创建人', label: '创建人',
prop: 'staffPhone', prop: 'createdName'
width: '130px'
}, },
{ {
label: '操作', label: '操作',
......
...@@ -53,7 +53,7 @@ export default { ...@@ -53,7 +53,7 @@ export default {
labelLine: { labelLine: {
show: false, show: false,
}, },
data: [{ value: 100 }, { value: this.coustomCount.split('%')[0] }], data: [{ value: 100 }, { value: this.coustomCount}],
}, },
], ],
}; };
......
...@@ -21,14 +21,14 @@ export default { ...@@ -21,14 +21,14 @@ export default {
methods: { methods: {
getChart(lineData) { getChart(lineData) {
let newCustomerCount = lineData.customerGrowthTrends.map(item => { let entMicroCount = lineData.map(item => {
return item.newCustomerCount return item.entMicroCount
}) })
let newEntmicroCount = lineData.customerGrowthTrends.map(item => { let notAddEntMicroCount = lineData.map(item => {
return item.newEntmicroCount return item.notAddEntMicroCount
}) })
let dateTime = lineData.customerGrowthTrends.map(item => { let dateTime = lineData.map(item => {
return item.dateTime return item.dayTime
}) })
let chartDom = document.getElementById('channel-main') let chartDom = document.getElementById('channel-main')
let myChart = echarts.init(chartDom) let myChart = echarts.init(chartDom)
...@@ -55,12 +55,12 @@ export default { ...@@ -55,12 +55,12 @@ export default {
dataZoom: [ dataZoom: [
{ {
type: 'inside', type: 'inside',
start: 0, startValue: 0,
end: 20 endValue: 29
}, },
{ {
start: 0, startValue: 0,
end: 20 endValue: 29
} }
], ],
xAxis: { xAxis: {
...@@ -74,22 +74,22 @@ export default { ...@@ -74,22 +74,22 @@ export default {
}, },
series: [ series: [
{ {
name: '未匹配企微', name: '未加企微客户数',
type: 'line', type: 'line',
lineStyle: { color: '#5850FF' }, lineStyle: { color: '#5850FF' },
data: newCustomerCount data: notAddEntMicroCount
}, },
{ {
name: '已匹配企微', name: '企微客户数',
type: 'line', type: 'line',
lineStyle: { color: '#FF6D00' }, lineStyle: { color: '#FF6D00' },
data: newEntmicroCount data: entMicroCount
} }
] ]
} }
option && myChart.setOption(option) option && myChart.setOption(option)
if(newCustomerCount.every(item => item == 0) && newEntmicroCount.every(item => item == 0)) { if(notAddEntMicroCount.every(item => item == 0) && entMicroCount.every(item => item == 0)) {
this.lineStatus = false this.lineStatus = false
}else { }else {
this.lineStatus = true this.lineStatus = true
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<div class="circle-box"> <div class="circle-box">
<echart-circle bgColor1="#F0F0F0" bgColor2="#6F76EE" coustomId="coustomId_5" :coustomCount="percentage"></echart-circle> <echart-circle bgColor1="#F0F0F0" bgColor2="#6F76EE" coustomId="coustomId_5" :coustomCount="percentage"></echart-circle>
<div class="circle-box-item"> <div class="circle-box-item">
<div class="circle-item-scale">{{percentage}}</div> <div class="circle-item-scale">{{percentage}}%</div>
<div class="circle-item-num">{{totalCount}}</div> <div class="circle-item-num">{{totalCount}}</div>
</div> </div>
</div> </div>
......
...@@ -49,9 +49,9 @@ ...@@ -49,9 +49,9 @@
智能外呼 智能外呼
</div> </div>
<ul class="store-item-ul"> <ul class="store-item-ul">
<li>意向判断、精准记录</li> <li>客户意向判断</li>
<li>话术灵活、语气灵动</li> <li>营销话术灵活</li>
<li>多路并发、提效降本</li> <li>多线并发外呼</li>
</ul> </ul>
</div> </div>
<div class="store-item-s"> <div class="store-item-s">
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="user-panel"> <div class="user-panel" v-loading="loading">
<div class="user-panel-line scrm-box-f"> <div class="user-panel-line scrm-box-f">
<div class="echart-title">用户线上化趋势</div> <div class="echart-title">用户线上化趋势</div>
<div class="echart-count-panel"> <div class="echart-count-panel">
...@@ -76,14 +76,14 @@ ...@@ -76,14 +76,14 @@
<div class="echart-icon"><img src="@/assets/img/overview/h5.png" /></div> <div class="echart-icon"><img src="@/assets/img/overview/h5.png" /></div>
<div class="echart-num-desc"> <div class="echart-num-desc">
<div class="echart-num-1">客户总数</div> <div class="echart-num-1">客户总数</div>
<div class="echart-num-2">{{ customerCount }}人</div> <div class="echart-num-2">{{ totalCount }}人</div>
</div> </div>
</div> </div>
<div class="echart-count-item"> <div class="echart-count-item">
<div class="echart-icon"><img src="@/assets/img/overview/h6.png" /></div> <div class="echart-icon"><img src="@/assets/img/overview/h6.png" /></div>
<div class="echart-num-desc"> <div class="echart-num-desc">
<div class="echart-num-1">匹配企微客户数</div> <div class="echart-num-1">企微客户数</div>
<div class="echart-num-2">{{ entmicroCustomerCount }}人</div> <div class="echart-num-2">{{ entMicroCount }}人</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -91,10 +91,8 @@ ...@@ -91,10 +91,8 @@
</div> </div>
<div class="user-panel-balance scrm-box-f"> <div class="user-panel-balance scrm-box-f">
<div class="balance-title">资源剩余</div> <div class="balance-title">资源剩余</div>
<div class="balance-image" v-if="customerCount"><img src="@/assets/img/overview/balance1.png" /></div> <div class="balance-image"><img src="@/assets/img/overview/balance3.png" /></div>
<div class="balance-image" v-if="customerCount"><img src="@/assets/img/overview/balance2.png" /></div> <div class="balance-image"><img src="@/assets/img/overview/balance4.png" /></div>
<div class="balance-image" v-if="!customerCount"><img src="@/assets/img/overview/balance3.png" /></div>
<div class="balance-image" v-if="!customerCount"><img src="@/assets/img/overview/balance4.png" /></div>
</div> </div>
</div> </div>
<div class="statistics-main"> <div class="statistics-main">
...@@ -115,12 +113,16 @@ export default { ...@@ -115,12 +113,16 @@ export default {
}, },
data() { data() {
return { return {
loading: false,
activeName: 'first', activeName: 'first',
customerCount: 0, entMicroCount: 0,
entmicroCustomerCount: 0 totalCount: 0
} }
}, },
methods: { methods: {
jumpUrl() {
this.$router.push('/square/import')
},
jumpChannel() { jumpChannel() {
this.$router.push('/channel/index') this.$router.push('/channel/index')
}, },
...@@ -128,10 +130,12 @@ export default { ...@@ -128,10 +130,12 @@ export default {
this.$router.push('/square/import') this.$router.push('/square/import')
}, },
viewChart() { viewChart() {
this.$apis.overview.viewChart({ day: 30 }).then(res => { this.loading = true;
this.customerCount = res.customerCount this.$apis.overview.viewChart({}).then(res => {
this.entmicroCustomerCount = res.entmicroCustomerCount this.loading = false;
this.$refs.customerForm.getChart(res) this.entMicroCount = res.entMicroCount
this.totalCount = res.totalCount
this.$refs.customerForm.getChart(res.trendItemList)
}) })
}, },
handleClick() {} handleClick() {}
...@@ -282,10 +286,10 @@ export default { ...@@ -282,10 +286,10 @@ export default {
font-size: 12px !important; font-size: 12px !important;
} }
.store-item-s { .store-item-s {
padding: 10px !important; padding: 6px !important;
} }
.store-item-title { .store-item-title {
font-size: 17px !important; font-size: 15px !important;
} }
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<div class="squre-main"> <div class="squre-main">
<el-button type="primary" size="small" @click="goBack">返回</el-button> <el-button type="primary" size="small" @click="goBack">返回</el-button>
<div class="squre-title">
企微魔方
<span>智能分析客户数据,自动人群分类,推荐策略。</span>
</div>
<div class="squre-safe-panel scrm-box-f" v-loading="loading"> <div class="squre-safe-panel scrm-box-f" v-loading="loading">
<div class="dialog-step"> <div class="dialog-step">
<div class="el-steps el-steps--horizontal"> <div class="el-steps el-steps--horizontal">
<div class="el-step is-horizontal" style="flex-basis: 50%; margin-right: 0px"> <div class="el-step is-horizontal" style="flex-basis: 50%; margin-right: 0px">
<div class="el-step__head is-finish"> <div class="el-step__head is-finish">
<div class="el-step__line" style="margin-right: 0px"> <div class="el-step__line" style="margin-right: 0px">
<i class="el-step__line-inner" style="transition-delay: 0ms; border-width: 0px; width: 0%"></i> <i class="el-step__line-inner" style="transition-delay: 0ms; border-width: 0px; width: 0%"></i>
</div> </div>
<div class="el-step__icon is-text"> <div class="el-step__icon is-text">
<div class="el-step__icon-inner"><i class="el-icon-check"></i></div> <div class="el-step__icon-inner"><i class="el-icon-check"></i></div>
</div> </div>
<div class="el-step__main el-step__desc"> <div class="el-step__main el-step__desc">
<div class="el-step__title">导入信息</div> <div class="el-step__title">导入信息</div>
<div class="el-step__title">数据脱敏</div> <div class="el-step__title">数据脱敏</div>
</div>
</div> </div>
</div> </div>
<div class="el-step is-horizontal" style="flex-basis: 50%; margin-right: 0px"> </div>
<div class="el-step__head is-finish"> <div class="el-step is-horizontal" style="flex-basis: 50%; margin-right: 0px">
<div class="el-step__line" style="margin-right: 0px"> <div class="el-step__head is-finish">
<i class="el-step__line-inner" style="transition-delay: -150ms; border-width: 0px; width: 0%"></i> <div class="el-step__line" style="margin-right: 0px">
</div> <i class="el-step__line-inner" style="transition-delay: -150ms; border-width: 0px; width: 0%"></i>
<div class="el-step__icon is-text"> </div>
<!----> <div class="el-step__icon is-text">
<div class="el-step__icon-inner">2</div> <!---->
</div> <div class="el-step__icon-inner">2</div>
<div class="el-step__main el-step__desc"> </div>
<div class="el-step__title">智能识别</div> <div class="el-step__main el-step__desc">
<div class="el-step__title">自动归类</div> <div class="el-step__title">智能识别</div>
</div> <div class="el-step__title">自动归类</div>
</div> </div>
</div> </div>
<div class="el-step is-horizontal is-flex" style="flex-basis: 50%; max-width: 33.3333%"> </div>
<div class="el-step__head"> <div class="el-step is-horizontal is-flex" style="flex-basis: 50%; max-width: 33.3333%">
<div class="el-step__line"><i class="el-step__line-inner"></i></div> <div class="el-step__head">
<div class="el-step__icon is-text"> <div class="el-step__line"><i class="el-step__line-inner"></i></div>
<!----> <div class="el-step__icon is-text">
<div class="el-step__icon-inner">3</div> <!---->
</div> <div class="el-step__icon-inner">3</div>
<div class="el-step__main el-step__desc"> </div>
<div class="el-step__title is-wait">集客引流</div> <div class="el-step__main el-step__desc">
<div class="el-step__title is-wait">集客引流</div>
<div class="el-step__title is-wait">策略推荐</div> <div class="el-step__title is-wait">策略推荐</div>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="safe-upload-panel" id="drop_area"> <div class="safe-upload-panel" id="drop_area">
<el-upload action="" class="image-uploader" :before-upload="uploadFile"> <el-upload action="" class="image-uploader" :before-upload="uploadFile">
<div class="safe-upload-icon"><i class="el-icon-tickets"></i></div> <div class="safe-upload-icon"><i class="el-icon-tickets"></i></div>
...@@ -141,10 +145,10 @@ export default { ...@@ -141,10 +145,10 @@ export default {
}, },
downloadModel() { downloadModel() {
this.$apis.square.downloadModel({}).then(res => { this.$apis.square.downloadModel({}).then(res => {
const link = document.createElement('a'); const link = document.createElement('a')
link.setAttribute('href', res); //设置下载文件的url地址 link.setAttribute('href', res) //设置下载文件的url地址
//link.setAttribute('download', 'download'); //用于设置下载文件的文件名 //link.setAttribute('download', 'download'); //用于设置下载文件的文件名
link.click(); link.click()
}) })
}, },
enentDrop(e) { enentDrop(e) {
...@@ -223,6 +227,21 @@ export default { ...@@ -223,6 +227,21 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.squre-title {
margin-top: 20px;
font-size: 20px;
font-weight: 600;
color: #333333;
line-height: 20px;
letter-spacing: 1px;
span {
margin-left: 4px;
font-size: 14px;
font-weight: 400;
color: #999999;
line-height: 14px;
}
}
.dialog-step { .dialog-step {
width: 80%; width: 80%;
margin: 0 auto 40px; margin: 0 auto 40px;
...@@ -300,7 +319,8 @@ export default { ...@@ -300,7 +319,8 @@ export default {
padding: 40px; padding: 40px;
margin-top: 20px; margin-top: 20px;
/deep/ { /deep/ {
.el-carousel__indicators,.el-carousel__arrow { .el-carousel__indicators,
.el-carousel__arrow {
display: none; display: none;
} }
} }
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<div class="coustom-box-item"> <div class="coustom-box-item">
<div class="coustom-box-title">待添加企微客户</div> <div class="coustom-box-title">待添加企微客户</div>
<div class="coustom-echart"> <div class="coustom-echart">
<echart-circle bgColor="#6395FA" coustomId="coustomId_1" :lineData="[countAll.unQyCount,countAll.totalCount - countAll.unQyCount]"></echart-circle> <echart-circle bgColor="#6395FA" coustomId="coustomId_1" :lineData="[countAll.unQyCount, countAll.totalCount - countAll.unQyCount]"></echart-circle>
<div class="coustom-echart-desc"> <div class="coustom-echart-desc">
<div class="coustom-echart-title">人群占比</div> <div class="coustom-echart-title">人群占比</div>
<div class="coustom-echart-num">{{ countAll.unQyCount }}/{{ countAll.totalCount }}</div> <div class="coustom-echart-num">{{ countAll.unQyCount }}/{{ countAll.totalCount }}</div>
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<div class="coustom-box-item"> <div class="coustom-box-item">
<div class="coustom-box-title">信息待完善客户</div> <div class="coustom-box-title">信息待完善客户</div>
<div class="coustom-echart"> <div class="coustom-echart">
<echart-circle bgColor="#5AD8A6" coustomId="coustomId_2" :lineData="[countAll.unInfoCount,countAll.totalCount - countAll.unInfoCount]"></echart-circle> <echart-circle bgColor="#5AD8A6" coustomId="coustomId_2" :lineData="[countAll.unInfoCount, countAll.totalCount - countAll.unInfoCount]"></echart-circle>
<div class="coustom-echart-desc"> <div class="coustom-echart-desc">
<div class="coustom-echart-title">人群占比</div> <div class="coustom-echart-title">人群占比</div>
<div class="coustom-echart-num">{{ countAll.unInfoCount }}/{{ countAll.totalCount }}</div> <div class="coustom-echart-num">{{ countAll.unInfoCount }}/{{ countAll.totalCount }}</div>
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
<div class="coustom-box-item"> <div class="coustom-box-item">
<div class="coustom-box-title">待续保客户</div> <div class="coustom-box-title">待续保客户</div>
<div class="coustom-echart"> <div class="coustom-echart">
<echart-circle bgColor="#5D7092" coustomId="coustomId_3" :lineData="[countAll.unRenewCount,countAll.totalCount - countAll.unRenewCount]"></echart-circle> <echart-circle bgColor="#5D7092" coustomId="coustomId_3" :lineData="[countAll.unRenewCount, countAll.totalCount - countAll.unRenewCount]"></echart-circle>
<div class="coustom-echart-desc"> <div class="coustom-echart-desc">
<div class="coustom-echart-title">人群占比</div> <div class="coustom-echart-title">人群占比</div>
<div class="coustom-echart-num">{{ countAll.unRenewCount }}/{{ countAll.totalCount }}</div> <div class="coustom-echart-num">{{ countAll.unRenewCount }}/{{ countAll.totalCount }}</div>
...@@ -59,15 +59,15 @@ ...@@ -59,15 +59,15 @@
<div class="coustom-box-config">敬请期待</div> <div class="coustom-box-config">敬请期待</div>
</div> </div>
<div class="coustom-box-item"> <div class="coustom-box-item">
<div class="coustom-box-title">待定保客户</div> <div class="coustom-box-title">待首保客户</div>
<div class="coustom-echart"> <div class="coustom-echart">
<echart-circle bgColor="#5B8FF9" coustomId="coustomId_4" :lineData="[countAll.unRegularCount,countAll.totalCount - countAll.unRegularCount]"></echart-circle> <echart-circle bgColor="#5B8FF9" coustomId="coustomId_4" :lineData="[countAll.unRegularCount, countAll.totalCount - countAll.unRegularCount]"></echart-circle>
<div class="coustom-echart-desc"> <div class="coustom-echart-desc">
<div class="coustom-echart-title">人群占比</div> <div class="coustom-echart-title">人群占比</div>
<div class="coustom-echart-num">{{ countAll.unRegularCount }}/{{ countAll.totalCount }}</div> <div class="coustom-echart-num">{{ countAll.unRegularCount }}/{{ countAll.totalCount }}</div>
</div> </div>
</div> </div>
<div class="coustom-box-content">智能提醒用户定期保养,推荐保养项目和优惠活动,提高用户返店率。</div> <div class="coustom-box-content">智能提醒用户回店首保,提高用户返店率。</div>
<div class="coustom-box-config">敬请期待</div> <div class="coustom-box-config">敬请期待</div>
</div> </div>
</div> </div>
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
导入魔方 导入魔方
</el-button> </el-button>
<el-form-item size="small" label="导入时间"> <el-form-item size="small" label="导入时间">
<el-date-picker :default-time="['00:00:00', '23:59:59']" :picker-options="pickerOptions" v-model="createTime" type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss" start-placeholder="开始时间" end-placeholder="结束时间"></el-date-picker> <el-date-picker :picker-options="pickerOptions" v-model="createTime" type="daterange" value-format="yyyy-MM-dd" start-placeholder="开始时间" end-placeholder="结束时间"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item size="small" style="float: right"> <el-form-item size="small" style="float: right">
<el-button @click="handleReset">重置</el-button> <el-button @click="handleReset">重置</el-button>
...@@ -87,8 +87,13 @@ ...@@ -87,8 +87,13 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<GLTable ref="employeeRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="employeeRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div slot="importNumber" slot-scope="scope">{{ scope.scope.entmicroNumber }} | {{ scope.scope.importNumber }}</div> <div slot="importNumber" slot-scope="scope">
<div slot="newCostomerNumber" slot-scope="scope">{{ scope.scope.newCustomerNumber }} | {{ scope.scope.importNumber }}</div> <div class="number-form"><span>{{ scope.scope.entmicroNumber }}</span> | <span>{{ scope.scope.importNumber }}</span></div>
</div>
<div slot="newCostomerNumber" slot-scope="scope">
<div class="number-form"><span>{{ scope.scope.newCustomerNumber }}</span> | <span>{{ scope.scope.importNumber }}</span>
</div>
</div>
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">详情</el-button> <el-button type="text" @click="handleDetail(scope.scope)">详情</el-button>
</div> </div>
...@@ -192,8 +197,8 @@ export default { ...@@ -192,8 +197,8 @@ export default {
watch: { watch: {
createTime(value) { createTime(value) {
if (value) { if (value) {
this.tableSearchForm.startTime = value[0] this.tableSearchForm.startTime = value[0] + ' 00:00:00'
this.tableSearchForm.endTime = value[1] this.tableSearchForm.endTime = value[1] + ' 23:59:59'
} else { } else {
delete this.tableSearchForm.startTime delete this.tableSearchForm.startTime
delete this.tableSearchForm.endTime delete this.tableSearchForm.endTime
...@@ -210,9 +215,10 @@ export default { ...@@ -210,9 +215,10 @@ export default {
this.countAll = res this.countAll = res
}) })
}, },
handleReset() { handleReset() {
this.tableSearchForm = {}; this.tableSearchForm = {}
this.handleSearch(); this.createTime = null
this.handleSearch()
}, },
handleSearch() { handleSearch() {
this.$refs.employeeRef.refreshTable() this.$refs.employeeRef.refreshTable()
...@@ -232,19 +238,29 @@ export default { ...@@ -232,19 +238,29 @@ export default {
findLogin() { findLogin() {
this.$apis.square.findLoginCount({ loginType: 1005 }).then(res => { this.$apis.square.findLoginCount({ loginType: 1005 }).then(res => {
if (res) { if (res) {
this.dialogVisible = true this.dialogVisible = true
} }
}) })
} }
}, },
mounted() { mounted() {
this.importsCount() this.importsCount()
this.findLogin(); this.findLogin()
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.number-form {
span {
display: inline-block;
min-width: 80px;
text-align: left;
&:first-child {
text-align: right;
}
}
}
.dialog-wrap-box { .dialog-wrap-box {
z-index: 2001; z-index: 2001;
position: fixed; position: fixed;
...@@ -408,7 +424,7 @@ export default { ...@@ -408,7 +424,7 @@ export default {
} }
} }
.square-tabel { .square-tabel {
padding: 10px; padding: 20px;
margin-top: 20px; margin-top: 20px;
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!