Commit 600fe6a0 by ym

ui

1 parent 125e447f
module.exports = { module.exports = {
presets: ["@vue/cli-plugin-babel/preset"], presets: ["@vue/cli-plugin-babel/preset"]
plugins: [
[
"component",
{
libraryName: "element-ui",
styleLibraryName: "theme-chalk"
}
]
]
}; };
\ No newline at end of file \ No newline at end of file
...@@ -6,6 +6,15 @@ ...@@ -6,6 +6,15 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<!-- 使用CDN的CSS文件 -->
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
<link href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" rel="preload" as="style" />
<link href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" rel="stylesheet" />
<% } %>
<!-- 使用CDN的JS文件 预加载 -->
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %>
<link href="<%= htmlWebpackPlugin.options.cdn.js[i] %>" rel="preload" as="script" />
<% } %>
<title>微前端子应用:博客</title> <title>微前端子应用:博客</title>
</head> </head>
...@@ -16,6 +25,9 @@ ...@@ -16,6 +25,9 @@
</noscript> </noscript>
<div id="app"></div> <div id="app"></div>
<!-- built files will be auto injected --> <!-- built files will be auto injected -->
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %>
<script src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script>
<% } %>
</body> </body>
</html> </html>
\ No newline at end of file \ No newline at end of file
...@@ -58,5 +58,6 @@ export default { ...@@ -58,5 +58,6 @@ export default {
} }
#app { #app {
background: #F4F5FA; background: #F4F5FA;
padding-left: 40px;
} }
</style> </style>
...@@ -7,15 +7,114 @@ ...@@ -7,15 +7,114 @@
* @returns * @returns
*/ */
import { http } from '@/main' import { http } from '@/main'
const sessionId = 'mini-a8d84762-da6a-4ff7-b009-eb7fa0c80dfb-rop';
const getEmpList = params => { const listFollowerStaffByPage = params => {
params.method = 'cn.com.glsx.entmicro.staff.listFollowerStaffByPage'
params.sessionId = sessionId
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取跟进类型列表
const listEntFollowerType = params => {
params.method = 'cn.com.glsx.entmicro.staff.listEntFollowerType'
params.sessionId = sessionId
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
// 删除根据员工
const deleteFollowerStaff = params => {
params.method = 'cn.com.glsx.entmicro.staff.deleteFollowerStaff'
params.sessionId = sessionId
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
// 删除跟进类型
const deleteFollowerType = params => {
params.sessionId = sessionId
params.method = 'cn.com.glsx.entmicro.staff.deleteFollowerType'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
// 查询外部联系人员工
const listEntmicroStaff = params => {
params.sessionId = sessionId
params.method = 'cn.com.glsx.entmicro.staff.listEntmicroStaff'
return http({ return http({
url: 'deviceInfo/listDeviceFileUnstock', url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
// 添加跟进员工
const saveFollowerStaff = params => {
params.sessionId = sessionId
params.method = 'cn.com.glsx.entmicro.staff.saveFollowerStaff'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
// 新增跟进类型
const saveFollowerType = params => {
params.sessionId = sessionId
params.method = 'cn.com.glsx.entmicro.staff.saveFollowerType'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
// 同步企微外部联系人
const syncEntmicroIsOutsiderStaff = params => {
params.sessionId = sessionId
params.method = 'cn.com.glsx.entmicro.staff.syncEntmicroIsOutsiderStaff'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
// 查询组织树
const listDepartmentTree = params => {
params.sessionId = sessionId
params.method = 'cn.com.glsx.entmicro.department.listDepartmentTree'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
}) })
} }
export default { export default {
getEmpList listFollowerStaffByPage,
listEntFollowerType,
deleteFollowerStaff,
deleteFollowerType,
listEntmicroStaff,
saveFollowerType,
saveFollowerStaff,
syncEntmicroIsOutsiderStaff,
listDepartmentTree
} }
\ No newline at end of file \ No newline at end of file
...@@ -7,24 +7,67 @@ ...@@ -7,24 +7,67 @@
* @returns * @returns
*/ */
import { http } from '@/main' import { http } from '@/main'
const GETLISTDEVICEFILEUNSTOCK = params => { const sessionId = 'mini-e2d2767d-b50c-4258-973f-2d7c4c636ed5-rop'
const url = '/rop-scrm-entmicro/router'
const getChart = params => {
params.method = 'org.ore.api.home.view.chart'
params.sessionId = sessionId
return http({ return http({
url: 'deviceInfo/listDeviceFileUnstock', url,
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
}) })
} }
const GETLISTDEVICEFILEUNSTOCK1 = params => { const getSort = params => {
params.method = 'org.ore.api.home.view.sort'
params.sessionId = sessionId
return http({
url,
method: 'POST',
data: params,
sign: true
})
}
const getStore = params => {
params.method = 'org.ore.api.home.view.store.data'
params.sessionId = sessionId
return http({
url,
method: 'POST',
data: params,
sign: true
})
}
const getShop = params => {
params.method = 'org.ore.api.home.view.shop.data'
params.sessionId = sessionId
return http({
url,
method: 'POST',
data: params,
sign: true
})
}
const getView = params => {
params.method = 'org.ore.api.home.view.data'
params.sessionId = sessionId
return http({ return http({
url: 'deviceInfo/listDeviceFileUnstock', url,
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
}) })
} }
export default { export default {
GETLISTDEVICEFILEUNSTOCK, getChart,
GETLISTDEVICEFILEUNSTOCK1 getView,
getSort,
getShop,
getStore
} }
\ No newline at end of file \ No newline at end of file
/**
* 新增参数sign 判断接口是否需要sign签名
*/
/**
* 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
* @param {*} params
* @returns
*/
import { http } from '@/main'
const sessionId = 'ca5da0cc-f97f-4364-b0fd-f36cc7f93405'
const getAccess = params => {
params.method = 'scrm.api.work.wechat.auth.access'
params.sessionId = sessionId
return http({
url: '/rop-scrm-wechat/router',
method: 'POST',
data: params,
sign: true
})
}
const getStatus = params => {
params.method = 'scrm.api.work.wechat.access.status'
params.sessionId = sessionId
return http({
url: '/rop-scrm-wechat/router',
method: 'POST',
data: params,
sign: true
})
}
const getCheckStatus = params => {
params.method = 'scrm.api.work.wechat.access.check.status'
params.sessionId = sessionId
return http({
url: '/rop-scrm-wechat/router',
method: 'POST',
data: params,
sign: true
})
}
const getQrcode = params => {
params.method = 'scrm.api.work.wechat.access.qrcode'
params.sessionId = sessionId
return http({
url: '/rop-scrm-wechat/router',
method: 'POST',
data: params,
sign: true
})
}
const getReportStatus = params => {
params.method = 'scrm.api.work.wechat.access.report.status'
params.sessionId = sessionId
return http({
url: '/rop-scrm-wechat/router',
method: 'POST',
data: params,
sign: true
})
}
const getSecret = params => {
params.method = 'scrm.api.work.wechat.setting.app.secret'
params.sessionId = sessionId
return http({
url: '/rop-scrm-wechat/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
getAccess,
getStatus,
getCheckStatus,
getQrcode,
getReportStatus,
getSecret
}
\ No newline at end of file \ No newline at end of file
...@@ -9,80 +9,103 @@ img { ...@@ -9,80 +9,103 @@ img {
height: 100%; height: 100%;
vertical-align: top; vertical-align: top;
} }
.text-hide { .text-hide {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.text-hide-2 { .text-hide-2 {
overflow:hidden; overflow: hidden;
text-overflow:ellipsis; text-overflow: ellipsis;
display:-webkit-box; display: -webkit-box;
-webkit-box-orient:vertical; -webkit-box-orient: vertical;
-webkit-line-clamp:2; -webkit-line-clamp: 2;
} }
.scrm-textRight { .scrm-textRight {
position: relative; position: relative;
text-align: right; text-align: right;
} }
.scrm-textCenter { .scrm-textCenter {
text-align: center; text-align: center;
} }
.scrm-c3 { .scrm-c3 {
color: #333333; color: #333333;
} }
.scrm-f12 { .scrm-f12 {
font-size: 12px; font-size: 12px;
} }
.scrm-f13 { .scrm-f13 {
font-size: 13px; font-size: 13px;
} }
.scrm-f14 { .scrm-f14 {
font-size: 14px; font-size: 14px;
} }
.scrm-f15 { .scrm-f15 {
font-size: 15px; font-size: 15px;
} }
.scrm-f16 { .scrm-f16 {
font-size: 16px; font-size: 16px;
} }
.scrm-f18 { .scrm-f18 {
font-size: 18px; font-size: 18px;
} }
.scrm-f20 { .scrm-f20 {
font-size: 20px; font-size: 20px;
} }
.scrm-f22 { .scrm-f22 {
font-size: 22px; font-size: 22px;
} }
.scrm-f24 { .scrm-f24 {
font-size: 24px; font-size: 24px;
} }
.scrm-m10 { .scrm-m10 {
margin: 10px; margin: 10px;
} }
.scrm-m20 { .scrm-m20 {
margin: 20px; margin: 20px;
} }
.scrm-ml10 { .scrm-ml10 {
margin-left: 10px; margin-left: 10px;
} }
.scrm-ml20 { .scrm-ml20 {
margin-left: 20px; margin-left: 20px;
} }
.scrm-mr10 { .scrm-mr10 {
margin-right: 10px; margin-right: 10px;
} }
.scrm-mr20 { .scrm-mr20 {
margin-right: 20px; margin-right: 20px;
} }
.scrm-p10 { .scrm-p10 {
padding: 10px; padding: 10px;
} }
.scrm-p20 { .scrm-p20 {
padding: 20px; padding: 20px;
} }
.scrm-box-f { .scrm-box-f {
background: #FFFFFF; background: #FFFFFF;
box-shadow: 0 10px 20px 0 rgba(88,80,255,0.10); box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.10);
} }
\ No newline at end of file \ No newline at end of file

40.5 KB | W: | H:

36.9 KB | W: | H:

src/assets/img/home/guide1.png
src/assets/img/home/guide1.png
src/assets/img/home/guide1.png
src/assets/img/home/guide1.png
  • 2-up
  • Swipe
  • Onion skin

31.2 KB | W: | H:

27.9 KB | W: | H:

src/assets/img/home/guide2.png
src/assets/img/home/guide2.png
src/assets/img/home/guide2.png
src/assets/img/home/guide2.png
  • 2-up
  • Swipe
  • Onion skin

36.2 KB | W: | H:

33.9 KB | W: | H:

src/assets/img/home/guide3.png
src/assets/img/home/guide3.png
src/assets/img/home/guide3.png
src/assets/img/home/guide3.png
  • 2-up
  • Swipe
  • Onion skin

48.3 KB | W: | H:

156 KB | W: | H:

src/assets/img/home/home-header.png
src/assets/img/home/home-header.png
src/assets/img/home/home-header.png
src/assets/img/home/home-header.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -12,12 +12,12 @@ module.exports = { ...@@ -12,12 +12,12 @@ module.exports = {
response: { response: {
data_key: 'data', data_key: 'data',
message_key: 'message', message_key: 'message',
code_key: 'returnCode', code_key: 'code',
code_success_value: '0', code_success_value: '0',
code_message_map: {} code_message_map: {}
}, },
request: { request: {
baseURL: 'http://192.168.2.106:8083/scrm-wechat', baseURL: 'http://192.168.3.191:8064',
// 设置超时时间 // 设置超时时间
timeout: 180000, timeout: 180000,
// 携带凭证 // 携带凭证
...@@ -26,7 +26,7 @@ module.exports = { ...@@ -26,7 +26,7 @@ module.exports = {
responseType: 'json' responseType: 'json'
}, },
sign: { sign: {
app_key: '48e5e13229b82c1b4e6e8c96151f0637', appKey: '48e5e13229b82c1b4e6e8c96151f0637',
v: '1.0.0', v: '1.0.0',
format: 'json', format: 'json',
source: '' source: ''
......
...@@ -9,6 +9,6 @@ module.exports = { ...@@ -9,6 +9,6 @@ module.exports = {
app_key: '48e5e13229b82c1b4e6e8c96151f0637', app_key: '48e5e13229b82c1b4e6e8c96151f0637',
v: '1.0.0', v: '1.0.0',
format: 'json', format: 'json',
source: '' source: 'glsx'
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -2,24 +2,19 @@ import Vue from 'vue' ...@@ -2,24 +2,19 @@ import Vue from 'vue'
import VueRouter from 'vue-router' import VueRouter from 'vue-router'
import routes from './routes' import routes from './routes'
Vue.use(VueRouter) Vue.use(VueRouter)
// 处理重复点击同一个路由报错的问题 // 处理重复点击同一个路由报错的问题
const originalPush = VueRouter.prototype.push const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) { VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err) return originalPush.call(this, location).catch(err => err)
} }
function getRoutes({ name, id, routesData }) {
const routes = [] function getRoutes(routesData) {
if (routesData && name && id) { return routesData.reduce((routes, route) => {
for (let i = 0, length = routesData.length; i < length; i += 1) { routes.push({...route,
const element = routesData[i] component: () =>
if (element && element.path && element.path.includes(name) && element.meta && element.meta.id && element.meta.id.startsWith(id)) { import ('@/views' + route.path + '.vue')
const path = element.path.slice(name.length + 1) })
element.path = path
element.component = () => import('@/views' + path + '.vue')
routes.push(element)
}
}
}
return routes return routes
}, [])
} }
export { VueRouter, routes, getRoutes } export { VueRouter, routes, getRoutes }
\ No newline at end of file \ No newline at end of file
const staticRoutes = Object.freeze([ const staticRoutes = Object.freeze([{
{
name: 'Home', name: 'Home',
path: '/', path: '/home/index',
meta: {}, meta: {},
component: resolve => require([`@/views/home/index.vue`], resolve) component: resolve => require([`@/views/home/index.vue`], resolve)
}, },
{ {
name: 'Ehome', name: 'Ehome',
path: '/ehome', path: '/ehome/index',
meta: {}, meta: {},
component: resolve => require([`@/views/ehome/index.vue`], resolve) component: resolve => require([`@/views/ehome/index.vue`], resolve)
}, },
...@@ -19,19 +18,19 @@ const staticRoutes = Object.freeze([ ...@@ -19,19 +18,19 @@ const staticRoutes = Object.freeze([
}, },
{ {
name: 'EnterpriseWechat', name: 'EnterpriseWechat',
path: '/enterpriseWechat', path: '/enterpriseWechat/index',
component: resolve => require([`@/views/enterpriseWechat/index.vue`], resolve), component: resolve => require([`@/views/enterpriseWechat/index.vue`], resolve),
meta: {} meta: {}
}, },
{ {
name: 'Service', name: 'Service',
path: '/service', path: '/service/index',
component: resolve => require([`@/views/service/index.vue`], resolve), component: resolve => require([`@/views/service/index.vue`], resolve),
meta: {} meta: {}
}, },
{ {
name: 'FollowUp', name: 'FollowUp',
path: '/followUp', path: '/followUp/index',
component: resolve => require([`@/views/followUp/index.vue`], resolve), component: resolve => require([`@/views/followUp/index.vue`], resolve),
meta: {} meta: {}
} }
......
...@@ -8,7 +8,7 @@ import { getRoutes } from '@/router' ...@@ -8,7 +8,7 @@ import { getRoutes } from '@/router'
import render from './render' import render from './render'
Vue.use(ElementUI) Vue.use(ElementUI)
Vue.use(GLTable) Vue.use(GLTable)
import 'glsx-components/dist/glsx-components.css' import 'glsx-components/src/theme/theme.scss'
import '@/assets/css/common.scss' import '@/assets/css/common.scss'
let routes = [] let routes = []
let router = null let router = null
...@@ -18,12 +18,13 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt ...@@ -18,12 +18,13 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt
Vue.prototype.$history = history Vue.prototype.$history = history
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState Vue.prototype.$globalState = globalState
console.log(globalState)
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.$setGlobalState = globalState.actions.setGlobalState // Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] }) 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({ name, id, routesData }) routes = getRoutes(routesData)
subscribe({ messenger }) subscribe({ messenger })
} }
export async function mount(props) { export async function mount(props) {
......
...@@ -17,6 +17,22 @@ const render = (base, routes) => { ...@@ -17,6 +17,22 @@ const render = (base, routes) => {
routes, routes,
mode: 'history' mode: 'history'
}) })
router.beforeEach((to, from, next) => {
if (from.path == '/' && to.path == '/home/index') {
next();
// next('/enterpriseWechat/index')
// Vue.prototype.$apis.ww.getStatus({}).then((res) => {
// if (res.status != 'SUCCESS') {
// next('/enterpriseWechat/index')
// } else {
// next()
// }
// })
} else {
next();
}
})
const vm = new Vue({ const vm = new Vue({
router, router,
store, store,
......
...@@ -9,4 +9,10 @@ util.cloneText = function(message) { ...@@ -9,4 +9,10 @@ util.cloneText = function(message) {
document.body.removeChild(input) document.body.removeChild(input)
Message.success('复制成功') Message.success('复制成功')
} }
util.getBeforeDate = function(sign = '-') {
let day = new Date();
day.setTime(day.getTime() - 24 * 60 * 60 * 1000);
var s = day.getFullYear() + sign + (day.getMonth() + 1) + sign + day.getDate();
return s;
}
export default util export default util
\ No newline at end of file \ No newline at end of file
<template> <template>
<div :id="echartId" class="chart-line"></div> <div :id="echartId" class="chart-line"></div>
</template> </template>
<script> <script>
...@@ -10,37 +10,54 @@ export default { ...@@ -10,37 +10,54 @@ export default {
props: { props: {
echartId: { echartId: {
type: String, type: String,
default: '' default: "",
}, },
echartData: {
type: Array,
}
}, },
data() { data() {
return { return {};
}; },
watch: {
echartData(value) {
let data = value.map(item=>{
return item.customerCount
})
let dateTime = value.map(item=>{
return item.dateTime
})
this.getChartTotal(dateTime,data);
}
}, },
methods: { methods: {
getChartTotal() { getChartTotal(dateTime,lineData) {
console.log(this.echartId);
var chartDom = document.getElementById(this.echartId); var chartDom = document.getElementById(this.echartId);
var myChart = echarts.init(chartDom); var myChart = echarts.init(chartDom);
var option; var option;
option = { option = {
xAxis: { xAxis: {
type: "category", type: "category",
boundaryGap: false, boundaryGap: false,
data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], data: dateTime,
}, },
yAxis: { yAxis: {
type: "value", type: "value",
show: false, show: false,
}, },
grid: {
bottom: 0,
top: 0,
},
series: [ series: [
{ {
data: [1, 932, 901, 934, 1290, 1330, 1320], data: lineData,
type: "line", type: "line",
symbol: "none", symbol: "none",
color: "#5850FF",
areaStyle: { areaStyle: {
color: { color: {
type: "linear", type: "linear",
...@@ -67,10 +84,6 @@ export default { ...@@ -67,10 +84,6 @@ export default {
option && myChart.setOption(option); option && myChart.setOption(option);
}, },
},
mounted() {
this.getChartTotal();
} }
}; };
</script> </script>
...@@ -125,14 +138,14 @@ export default { ...@@ -125,14 +138,14 @@ export default {
} }
} }
.expand-more { .expand-more {
margin: 20px 0px; margin-bottom: 20px;
text-align: center; text-align: center;
height: 56px; height: 56px;
background: rgba(0, 0, 0, 0.02); background: rgba(0, 0, 0, 0.02);
border-radius: 0px 0px 2px 2px; border-radius: 0px 0px 2px 2px;
font-size: 14px; font-size: 14px;
line-height: 56px; line-height: 56px;
color: #000000; color: #000000;
} }
#main-customer { #main-customer {
height: 300px; height: 300px;
......
...@@ -3,67 +3,78 @@ ...@@ -3,67 +3,78 @@
<div class="scrm-box-f summary-ranking-box"> <div class="scrm-box-f summary-ranking-box">
<div class="summary-ranking-title scrm-c3"> <div class="summary-ranking-title scrm-c3">
<span>门店企微客户数排行</span> <span>门店企微客户数排行</span>
<span> <el-radio-group v-model="radioStore" @change="tabRank" size="mini">
<el-radio v-model="radioStore" label="1">累计新增</el-radio> <el-radio-button label="1">累计新增</el-radio-button>
<el-radio v-model="radioStore" label="2">今日新增</el-radio> <el-radio-button label="2">今日新增</el-radio-button>
<el-radio v-model="radioStore" label="3">累计流失</el-radio> <el-radio-button label="3">累计流失</el-radio-button>
</span> </el-radio-group>
</div> </div>
<div class="summary-ranking-th"> <div class="summary-ranking-th">
<div class="summary-ranking-sno">序号</div> <div class="summary-ranking-sno">序号</div>
<div class="summary-ranking-name">名店名称</div> <div class="summary-ranking-name">名店名称</div>
<div class="summary-ranking-value">总产值</div> <div class="summary-ranking-value">总产值</div>
</div> </div>
<div class="chart-empty" v-if="chartStatus"> <div class="chart-empty" v-if="custSortList.length == 0">
<img src="@/assets/img/empty.png" /> <img src="@/assets/img/empty.png" />
<div class="chart-empty-d">暂无数据</div> <div class="chart-empty-d">暂无数据</div>
</div> </div>
<template v-else> <div
<div class="summary-ranking-td" v-for="(item, index) in summaryArr" :key="index"> class="ranking-td-panel"
:style="{
height: rankHeight + 'px',
}"
v-else
>
<div
class="summary-ranking-td"
v-for="(item, index) in custSortList"
:key="index"
>
<div class="summary-ranking-sno"> <div class="summary-ranking-sno">
<span class="ranking-sno-circle2" v-if="index > 2">{{ index + 1 }}</span> <span class="ranking-sno-circle2" v-if="index > 2">{{ index + 1 }}</span>
<span class="ranking-sno-circle" v-else>{{ index + 1 }}</span> <span class="ranking-sno-circle" v-else>{{ index + 1 }}</span>
</div> </div>
<div class="summary-ranking-name">名店名称</div> <div class="summary-ranking-name text-hide">{{ item.shopName }}</div>
<div class="summary-ranking-value"> <div class="summary-ranking-value">
<div class="summary-process-panel"> <div class="summary-process-panel">
<div class="summary-progress-bar"> <div class="summary-progress-bar">
<div class="summary-progress-barout"></div> <div class="summary-progress-barout"></div>
<div class="summary-progress-barin"></div> <div
class="summary-progress-barin"
:style="{ width: (100 * item.addEntmicroCount) / custSortMax + '%' }"
></div>
</div>
<div class="summary-progress-value">{{ item.addEntmicroCount }}</div>
</div> </div>
<div class="summary-progress-value">100</div>
</div> </div>
</div> </div>
</div> </div>
</template>
</div> </div>
<div class="scrm-box-f summary-ranking-box"> <div class="scrm-box-f summary-ranking-box">
<div class="summary-ranking-title scrm-c3"> <div class="summary-ranking-title scrm-c3">
<span>各门店产值排行 </span> <span>各门店产值排行 </span>
<span> <el-radio-group v-model="radioOutput" size="mini">
<el-radio v-model="radioOutput" label="1">累计新增</el-radio> <el-radio-button label="1">累计新增</el-radio-button>
<el-radio v-model="radioOutput" label="2">今日新增</el-radio> <el-radio-button label="2">今日新增</el-radio-button>
<el-select>
<el-option </el-radio-group>
v-for="item in monthOptions"
:key="item"
:label="item"
:value="item"
>
</el-option>
</el-select>
</span>
</div> </div>
<div class="summary-ranking-th"> <div class="summary-ranking-th">
<div class="summary-ranking-sno">序号</div> <div class="summary-ranking-sno">序号</div>
<div class="summary-ranking-name">名店名称</div> <div class="summary-ranking-name">名店名称</div>
<div class="summary-ranking-value">总产值</div> <div class="summary-ranking-value">总产值</div>
</div> </div>
<div class="chart-empty" v-if="chartStatus"> <div class="chart-empty" v-if="summaryArr.length == 0">
<img src="@/assets/img/empty.png" /> <img src="@/assets/img/empty.png" />
<div class="chart-empty-d">暂无数据</div> <div class="chart-empty-d">暂无数据</div>
</div> </div>
<template v-else> <div
class="ranking-td-panel"
:style="{
height: rankHeight + 'px',
}"
v-else
>
<div class="summary-ranking-td" v-for="(item, index) in summaryArr" :key="index"> <div class="summary-ranking-td" v-for="(item, index) in summaryArr" :key="index">
<div class="summary-ranking-sno"> <div class="summary-ranking-sno">
<span class="ranking-sno-circle2" v-if="index > 2">{{ index + 1 }}</span> <span class="ranking-sno-circle2" v-if="index > 2">{{ index + 1 }}</span>
...@@ -80,24 +91,66 @@ ...@@ -80,24 +91,66 @@
</div> </div>
</div> </div>
</div> </div>
</template>
</div> </div>
</div> </div>
<el-dialog center :visible.sync="dialogVisible" width="30%">
<span>您还没有门店,暂无数据,请先创建门店</span>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
</span>
</el-dialog>
</div>
</template> </template>
<script> <script>
export default { export default {
name: "summaryRanking", name: "summaryRanking",
data() { data() {
return { return {
dialogVisible: false,
rankHeight: 0,
custSortMax: 0,
chartStatus: false, chartStatus: false,
radioStore: "1", radioStore: "1",
radioOutput: "1", radioOutput: "1",
summaryArr: [1, 2, 3, 4, 5, 6, 7, 8], custSortList: [],
monthOptions: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], monthOptions: [],
summaryArr: [],
}; };
}, },
methods: {},
methods: {
tabRank() {
this.getSort();
},
getSort() {
this.$apis.home
.getSort({
sortType: this.radioStore,
})
.then((res) => {
this.custSortList = res.custSortList;
if (this.custSortList.length == 0) {
this.dialogVisible = true;
return;
}
this.custSortMax = 0;
this.custSortList.forEach((item) => {
if (item.addEntmicroCount >= this.custSortMax) {
this.custSortMax = item.addEntmicroCount;
}
});
});
},
},
mounted() {
let clientHeight = document.documentElement.clientHeight;
this.rankHeight = clientHeight - 520;
this.getSort();
},
}; };
</script> </script>
...@@ -114,6 +167,7 @@ export default { ...@@ -114,6 +167,7 @@ export default {
padding: 0px 20px; padding: 0px 20px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center;
} }
.summary-ranking-th { .summary-ranking-th {
display: flex; display: flex;
...@@ -133,6 +187,9 @@ export default { ...@@ -133,6 +187,9 @@ export default {
flex: 1; flex: 1;
} }
} }
.ranking-td-panel {
overflow-y: auto;
}
.summary-ranking-td { .summary-ranking-td {
display: flex; display: flex;
height: 30px; height: 30px;
...@@ -177,6 +234,7 @@ export default { ...@@ -177,6 +234,7 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
.summary-progress-bar { .summary-progress-bar {
position: relative;
height: 10px; height: 10px;
flex: 1; flex: 1;
.summary-progress-barout { .summary-progress-barout {
......
<template> <template>
<div class="scrm-box-f"> <div class="scrm-box-f summary-box">
<div class="summary-header"> <div class="summary-header">
<div class="summary-title">汇总</div> <div class="summary-title">汇总</div>
<div class="summary-time"> <div class="summary-time">
<span>统计截止至</span> <span>统计截止至</span>
<el-date-picker v-model="value1" type="date" placeholder="选择日期"> <el-date-picker @change="changeTime" format="yyyy-MM-dd" v-model="summaryTime" type="date" placeholder="选择日期" :clearable="false">
</el-date-picker> </el-date-picker>
</div> </div>
</div> </div>
...@@ -19,12 +19,14 @@ ...@@ -19,12 +19,14 @@
trigger="hover" trigger="hover"
content="各门店客户总数之和,门店之间不去重" content="各门店客户总数之和,门店之间不去重"
> >
<img src="@/assets/img/question.png" slot="reference"> <img src="@/assets/img/question.png" slot="reference" />
</el-popover> </el-popover>
</div> </div>
<div class="summary-item-total">¥51 023 .08</div> <div class="summary-item-total">{{ customerCount }}</div>
<div class="summary-item-number">未加企微客户数: <span>45,646</span></div> <div class="summary-item-number">
<linechart :echartId="echartId1"></linechart> 未加企微客户数: <span>{{ notAddEntmicroCount }}</span>
</div>
<linechart :echartId="echartId1" :echartData="custAddList"></linechart>
</div> </div>
<div class="summary-item"> <div class="summary-item">
<div class="summary-item-title"> <div class="summary-item-title">
...@@ -36,12 +38,14 @@ ...@@ -36,12 +38,14 @@
trigger="hover" trigger="hover"
content="各门店客户总数之和,门店之间不去重" content="各门店客户总数之和,门店之间不去重"
> >
<img src="@/assets/img/question.png" slot="reference"> <img src="@/assets/img/question.png" slot="reference" />
</el-popover> </el-popover>
</div> </div>
<div class="summary-item-total">¥51 023 .08</div> <div class="summary-item-total">{{ addEntmicroCount }}</div>
<div class="summary-item-number">未加企微客户数: <span>45,646</span></div> <div class="summary-item-number">
<linechart :echartId="echartId2"></linechart> 当日新增: <span>{{ newEntmicroCount }}</span>
</div>
<linechart :echartId="echartId2" :echartData="custEntmicroAdds"></linechart>
</div> </div>
<div class="summary-item"> <div class="summary-item">
<div class="summary-item-title"> <div class="summary-item-title">
...@@ -53,12 +57,14 @@ ...@@ -53,12 +57,14 @@
trigger="hover" trigger="hover"
content="各门店客户总数之和,门店之间不去重" content="各门店客户总数之和,门店之间不去重"
> >
<img src="@/assets/img/question.png" slot="reference"> <img src="@/assets/img/question.png" slot="reference" />
</el-popover> </el-popover>
</div> </div>
<div class="summary-item-total">¥51 023 .08</div> <div class="summary-item-total">{{ entmicroLoseCount }}</div>
<div class="summary-item-number">未加企微客户数: <span>45,646</span></div> <div class="summary-item-number">
<linechart :echartId="echartId3"></linechart> 当日新增: <span>{{ todayEntmicroLoseCount }}</span>
</div>
<linechart :echartId="echartId3" :echartData="custLoseList"></linechart>
</div> </div>
<div class="summary-item"> <div class="summary-item">
<div class="summary-item-title"> <div class="summary-item-title">
...@@ -70,18 +76,18 @@ ...@@ -70,18 +76,18 @@
trigger="hover" trigger="hover"
content="各门店客户总数之和,门店之间不去重" content="各门店客户总数之和,门店之间不去重"
> >
<img src="@/assets/img/question.png" slot="reference"> <img src="@/assets/img/question.png" slot="reference" />
</el-popover> </el-popover>
</div> </div>
<div class="summary-item-total">¥51 023 .08</div> <div class="summary-item-total">¥--</div>
<div class="summary-item-number">未加企微客户数: <span>45,646</span></div> <div class="summary-item-number">当日新增: <span>¥--</span></div>
<linechart :echartId="echartId4"></linechart> <linechart :echartId="echartId4"></linechart>
</div> </div>
</div> </div>
<div :class="{ 'expand-panel': expandStatus }" class="summary-line-panel"> <div :class="{ 'expand-panel': expandStatus }" class="summary-line-panel">
<div class="summary-title">汇总</div> <div class="summary-title">汇总</div>
<div class="chart-empty" v-if="chartStatus"> <div class="chart-empty" v-if="chartStatus">
<img src="@/assets/img/empty.png"> <img src="@/assets/img/empty.png" />
<div class="chart-empty-d">暂无数据</div> <div class="chart-empty-d">暂无数据</div>
</div> </div>
<div id="main-customer" v-else></div> <div id="main-customer" v-else></div>
...@@ -100,6 +106,7 @@ ...@@ -100,6 +106,7 @@
</template> </template>
<script> <script>
import util from "@/utils/util";
import linechart from "./linechart"; import linechart from "./linechart";
import * as echarts from "echarts"; import * as echarts from "echarts";
export default { export default {
...@@ -109,13 +116,25 @@ export default { ...@@ -109,13 +116,25 @@ export default {
}, },
data() { data() {
return { return {
value1: "", customerCount: 0,
newCustomerCount: 0,
addEntmicroCount: 0,
notAddEntmicroCount: 0,
newEntmicroCount: 0,
entmicroLoseCount: 0,
todayEntmicroLoseCount: 0,
packmenberCount: 0,
todayAddPackmenberCount: 0,
summaryTime: util.getBeforeDate(),
expandStatus: true, expandStatus: true,
chartStatus: false, chartStatus: false,
echartId1: "customerEchartId1", echartId1: "customerEchartId1",
echartId2: "customerEchartId2", echartId2: "customerEchartId2",
echartId3: "customerEchartId3", echartId3: "customerEchartId3",
echartId4: "customerEchartId4", echartId4: "customerEchartId4",
custAddList: [],
custEntmicroAdds: [],
custLoseList: [],
}; };
}, },
...@@ -123,9 +142,47 @@ export default { ...@@ -123,9 +142,47 @@ export default {
handleExpand() { handleExpand() {
this.expandStatus = !this.expandStatus; this.expandStatus = !this.expandStatus;
}, },
changeTime() {
this.getViewData();
this.getChart();
}, },
getViewData() {
mounted() { this.$apis.home.getShop({
date: this.summaryTime
}).then((res) => {
this.customerCount = res.customerCount;
this.newCustomerCount = res.newCustomerCount;
this.addEntmicroCount = res.addEntmicroCount;
this.notAddEntmicroCount = res.notAddEntmicroCount;
this.newEntmicroCount = res.newEntmicroCount;
this.entmicroLoseCount = res.entmicroLoseCount;
this.todayEntmicroLoseCount = res.todayEntmicroLoseCount;
this.packmenberCount = res.packmenberCount;
this.todayAddPackmenberCount = res.todayAddPackmenberCount;
});
},
getChart() {
this.$apis.home.getChart({ day: 30,date: this.summaryTime}).then((res) => {
this.custAddList = res.custAddList;
this.custEntmicroAdds = res.custEntmicroAdds;
this.custLoseList = res.custLoseList;
let custEntmicroAddsHalf = this.custEntmicroAdds.slice(15);
let custLoseListHalf = this.custLoseList.slice(15);
let dateTime = custEntmicroAddsHalf.map((item) => {
return item.dateTime;
});
let custEntmicroAdds = custEntmicroAddsHalf.map((item) => {
return item.customerCount;
});
let custLoseList = custLoseListHalf.map((item) => {
return item.customerCount;
});
let monthAverg = custEntmicroAddsHalf.map((item) => {
return item.monthAverg;
});
let monthAvergLoss = custLoseListHalf.map((item) => {
return item.monthAverg;
});
var chartDom = document.getElementById("main-customer"); var chartDom = document.getElementById("main-customer");
var myChart = echarts.init(chartDom); var myChart = echarts.init(chartDom);
var option; var option;
...@@ -134,9 +191,31 @@ export default { ...@@ -134,9 +191,31 @@ export default {
tooltip: { tooltip: {
trigger: "item", trigger: "item",
formatter(params) { formatter(params) {
console.log(params); let circleColor;
let Averg;
if (params.seriesName == "每日新增企微用户") {
circleColor = "#5850FF";
Averg = monthAverg[params.dataIndex]
}
if (params.seriesName == "每日新增产值") {
circleColor = "#2CCA74";
}
if (params.seriesName == "每日企微消失用户") {
circleColor = "#FF6D00";
Averg = monthAvergLoss[params.dataIndex]
}
return ( return (
params.name + "<br>" + params.marker + params.seriesName + ":" + params.value params.name +
"<br>" +
`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${circleColor};"></span>` +
params.seriesName +
":" +
params.value +
"<br>" +
`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${circleColor};"></span>` +
(new Date(params.name).getMonth()+1) +
"月均值:" +
Averg
); );
}, },
}, },
...@@ -154,7 +233,7 @@ export default { ...@@ -154,7 +233,7 @@ export default {
type: "category", type: "category",
boundaryGap: false, boundaryGap: false,
color: "#A3A3A3", color: "#A3A3A3",
data: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"], data: dateTime,
}, },
yAxis: { yAxis: {
type: "value", type: "value",
...@@ -166,26 +245,35 @@ export default { ...@@ -166,26 +245,35 @@ export default {
type: "line", type: "line",
stack: "总量", stack: "总量",
lineStyle: { color: "#5850FF " }, lineStyle: { color: "#5850FF " },
data: [120, 132, 101, 134, 90, 230, 210], data: custEntmicroAdds,
}, },
{ {
name: "每日新增产值", name: "每日新增产值",
type: "line", type: "line",
stack: "总量", stack: "总量",
lineStyle: { color: "#2CCA74 " }, lineStyle: { color: "#2CCA74 " },
data: [220, 182, 191, 234, 290, 330, 310], data: [],
}, },
{ {
name: "每日企微消失用户", name: "每日企微消失用户",
type: "line", type: "line",
stack: "总量", stack: "总量",
lineStyle: { color: "#FF6D00 " }, lineStyle: { color: "#FF6D00 " },
data: [150, 232, 201, 154, 190, 330, 410], data: custLoseList,
}, },
], ],
}; };
option && myChart.setOption(option); option && myChart.setOption(option);
});
},
},
mounted() {
this.getViewData();
this.getChart();
window.addEventListener("resize", () => {
this.getChart();
});
}, },
}; };
</script> </script>
...@@ -299,9 +387,9 @@ export default { ...@@ -299,9 +387,9 @@ export default {
text-align: center; text-align: center;
&-d { &-d {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #000000; color: #000000;
line-height: 32px; line-height: 32px;
} }
img { img {
width: 64px; width: 64px;
......
...@@ -2,16 +2,6 @@ ...@@ -2,16 +2,6 @@
<div class="scrm-main"> <div class="scrm-main">
<summary-statistics></summary-statistics> <summary-statistics></summary-statistics>
<summary-ranking></summary-ranking> <summary-ranking></summary-ranking>
<el-dialog
center
:visible.sync="dialogVisible"
width="30%"
>
<span>您还没有门店,暂无数据,请先创建门店</span>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
...@@ -26,7 +16,7 @@ export default { ...@@ -26,7 +16,7 @@ export default {
}, },
data() { data() {
return { return {
dialogVisible: true,
}; };
}, },
}; };
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="drawer-sale-panel"> <div class="drawer-sale-panel">
<el-form label-width="150px" :model="addForm"> <el-form label-width="150px" :model="addForm">
<div class="scrm-textRight sale-reload"> <div class="scrm-textRight sale-reload">
<el-button slot="append" type="primary" @click="addEmpType" <el-button slot="append" type="primary" @click="syncEntmicroIsOutsiderStaff"
>同步有外部联系人权限的员工</el-button >同步有外部联系人权限的员工</el-button
> >
</div> </div>
...@@ -16,11 +16,12 @@ ...@@ -16,11 +16,12 @@
:disable-transitions="false" :disable-transitions="false"
@close="remove(idx)" @close="remove(idx)"
> >
{{ tag.name }} {{ tag.staffName }}
</el-tag> </el-tag>
<el-input <el-input
v-model.trim="newTag" v-model.trim="newTag"
placeholder="选择员工" placeholder="选择员工"
@input="inputTag"
style="outline: none; border: none" style="outline: none; border: none"
></el-input> ></el-input>
</div> </div>
...@@ -38,17 +39,32 @@ ...@@ -38,17 +39,32 @@
</el-form-item> </el-form-item>
<el-form-item label="请选择跟进员工类型:"> <el-form-item label="请选择跟进员工类型:">
<div class="emp-type"> <div class="emp-type">
<div @click="handleType(index)" :class="{'checked': typeIndex == index}" class="emp-type-btn" v-for="(item, index) in empType" :key="index" <div
>{{ item.name }} <i class="el-icon-error" @click="delEmpType(index)" v-if="!item.status"></i @click="handleType(index)"
></div> :class="{ checked: typeIndex == index }"
class="emp-type-btn"
v-for="(item, index) in empType"
:key="index"
>
{{ item.followName }}
<i class="el-icon-error" @click="delEmpType(item)" v-if="index > 1"></i>
</div>
</div> </div>
<div class="sale-select"> <div class="sale-select">
<el-input v-model="empTypeValue" placeholder="添加类型名称" maxlength="8" show-word-limit> </el-input> <el-input
v-model="empTypeValue"
placeholder="添加类型名称"
maxlength="8"
show-word-limit
>
</el-input>
<el-button class="sale-select-btn" type="primary" @click="addEmpType" <el-button class="sale-select-btn" type="primary" @click="addEmpType"
>新增</el-button >新增</el-button
> >
</div> </div>
<div class="sale-type-desc">跟进员工类型最多新增30个,已新增{{32-empType.length}}个</div> <div class="sale-type-desc">
跟进员工类型最多新增30个,已新增{{ empType.length - 2 }}个
</div>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button @click="onCancel">取消</el-button> <el-button @click="onCancel">取消</el-button>
...@@ -62,17 +78,19 @@ ...@@ -62,17 +78,19 @@
import selectEmp from "./selectEmp"; import selectEmp from "./selectEmp";
export default { export default {
name: "addSale", name: "addSale",
components: { components: {
selectEmp, selectEmp,
}, },
data() { data() {
return { return {
addForm: {}, addForm: {},
typeIndex: 0, typeIndex: 0,
empType: [ empType: [
{ name: "新车跟进专员",status: 1}, { name: "新车跟进专员", status: 1 },
{ name: "售后跟进专员",status: 1}, { name: "售后跟进专员", status: 1 },
{ name: "sdfsdfsd"}, { name: "sdfsdfsd" },
], ],
empTypeValue: "", empTypeValue: "",
newTag: "", newTag: "",
...@@ -80,7 +98,15 @@ export default { ...@@ -80,7 +98,15 @@ export default {
dialog_temp: {}, dialog_temp: {},
}; };
}, },
methods: { methods: {
listEntFollowerType() {
this.$apis.emp
.listEntFollowerType({ merchantId: this.$globalState.session.merchantId })
.then((res) => {
this.empType = res;
});
},
handleType(index) { handleType(index) {
this.typeIndex = index; this.typeIndex = index;
}, },
...@@ -91,53 +117,12 @@ export default { ...@@ -91,53 +117,12 @@ export default {
this.$el.querySelector(".tag-input").focus(); this.$el.querySelector(".tag-input").focus();
} }
}, },
// handleSelect是自己实现的方法 inputTag() {
handleSelect(item) { this.ms = 1000;
let addSuucess = false; clearTimeout(this.timeID);
if (this.addTag(this.newTag.trim())) { this.timeID = setTimeout(() => {
addSuucess = true; this.$refs.selectEmpTabel.listEntmicroStaff(this.newTag);
} }, this.ms);
if (addSuucess) {
this.tagChange();
this.newTag = "";
}
console.log("value---1");
console.log(this.innerTags); // 选中的数据保存在了this.innerTags中,这个用来和后端交互
console.log("value---2");
},
// addNew是https://github.com/xiispace/el-input-tag/blob/master/src/ElInputTag.vue上原先的方法
addNew(e) {
if (e && !this.addTagOnKeys.includes(e.keyCode) && e.type !== "blur") {
return;
}
if (e) {
e.stopPropagation();
e.preventDefault();
}
let addSuucess = false;
if (this.newTag.includes(",")) {
this.newTag.split(",").forEach((item) => {
if (this.addTag(item.trim())) {
addSuucess = true;
}
});
} else {
if (this.addTag(this.newTag.trim())) {
addSuucess = true;
}
}
if (addSuucess) {
this.tagChange();
this.newTag = "";
}
},
addTag(tag) {
tag = tag.trim();
if (tag && !this.innerTags.includes(tag)) {
this.innerTags.push(tag);
return true;
}
return false;
}, },
remove(index) { remove(index) {
this.innerTags.splice(index, 1); this.innerTags.splice(index, 1);
...@@ -145,34 +130,68 @@ export default { ...@@ -145,34 +130,68 @@ export default {
}, },
//添加员工 //添加员工
addEmp() { addEmp() {
this.innerTags = this.innerTags.concat(this.$refs.selectEmpTabel.$refs.saleTable.mutiSelectArr['salelist']); this.innerTags = this.innerTags.concat(
this.$refs.selectEmpTabel.$refs.saleTable.mutiSelectArr["salelist"]
);
this.reloadTags(); this.reloadTags();
}, },
reloadTags() { reloadTags() {
const arr = []; const arr = [];
this.innerTags.forEach(item=>{ this.innerTags.forEach((item) => {
arr.push(item.id) arr.push(item.id);
}) });
this.$refs.selectEmpTabel.clearSelect(arr) this.$refs.selectEmpTabel.clearSelect(arr);
}, },
addEmpType() { addEmpType() {
if(!this.empTypeValue) { if (!this.empTypeValue) {
this.$message.error('请输入类型名称'); this.$message.error("请输入类型名称");
return; return;
} }
this.empType.push({ name: this.empTypeValue }); let params = {
followName: this.empTypeValue,
merchantid: 10001001,
};
this.$apis.emp.saveFollowerType(params).then((res) => {
this.listEntFollowerType();
});
this.empTypeValue = ""; this.empTypeValue = "";
}, },
delEmpType(index) { delEmpType(item) {
this.empType.splice(index, 1); this.$apis.emp.deleteFollowerType({ id: item.id }).then((res) => {
this.listEntFollowerType();
});
},
syncEntmicroIsOutsiderStaff() {
console.log(this.$globalState);
let params = {
departmentId: 1,
merchantId: this.$globalState.session.merchantId,
};
this.$apis.emp.syncEntmicroIsOutsiderStaff(params).then((res) => {
if (res) {
this.$message({
message: "同步成功",
type: "success",
});
}
});
}, },
onSubmit() { onSubmit() {
this.$emit("handSelectdEmp"); console.log(this.innerTags);
let userIds = [];
this.innerTags.forEach((item) => {
userIds.push(item.userId);
});
this.$emit("handSelectdEmp", this.empType[this.typeIndex].id, userIds);
}, },
onCancel() { onCancel() {
this.$emit("closeDrawer"); this.$emit("closeDrawer");
}, },
}, },
mounted() {
this.listEntFollowerType();
},
}; };
</script> </script>
...@@ -190,10 +209,10 @@ export default { ...@@ -190,10 +209,10 @@ export default {
} }
.sale-type-desc { .sale-type-desc {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #ADADAD; color: #adadad;
line-height: 17px; line-height: 17px;
margin-top: 10px; margin-top: 10px;
} }
} }
.emp-type { .emp-type {
...@@ -205,16 +224,16 @@ margin-top: 10px; ...@@ -205,16 +224,16 @@ margin-top: 10px;
margin-bottom: 10px; margin-bottom: 10px;
margin-right: 10px; margin-right: 10px;
position: relative; position: relative;
background: #FFFFFF; background: #ffffff;
border-radius: 4px; border-radius: 4px;
border: 1px solid #E8E8EA; border: 1px solid #e8e8ea;
line-height: 1; line-height: 1;
font-size: 14px; font-size: 14px;
color: #7D7D7D; color: #7d7d7d;
&.checked { &.checked {
border: 1px solid #5850FF; border: 1px solid #5850ff;
color: #5850FF; color: #5850ff;
} }
i { i {
position: absolute; position: absolute;
right: -6px; right: -6px;
...@@ -245,7 +264,7 @@ color: #7D7D7D; ...@@ -245,7 +264,7 @@ color: #7D7D7D;
/* background-color: red!important; 调试用的样式 */ /* background-color: red!important; 调试用的样式 */
outline: none !important; outline: none !important;
border: none !important; border: none !important;
} }
} }
.el-tag { .el-tag {
......
<template> <template>
<div class="select-emp-panel"> <div class="select-emp-panel">
<div class="scrm-p10 emp-tree-panel"> <div class="scrm-p10 emp-tree-panel" :style="{
height: treeHeight + 'px',
}">
<div class="popper-arrow"></div> <div class="popper-arrow"></div>
<div class="tree-title">所在门店/部门</div> <div class="tree-title">所在门店/部门</div>
<el-tree <el-tree
:data="data" :data="listTree"
:expand-on-click-node="false" :expand-on-click-node="false"
highlight-current highlight-current
:props="defaultProps" :props="defaultProps"
...@@ -12,15 +14,14 @@ ...@@ -12,15 +14,14 @@
></el-tree> ></el-tree>
</div> </div>
<el-col class="scrm-p10 emp-table-panel"> <el-col class="scrm-p10 emp-table-panel">
<glsx-table <GLTable
ref="saleTable" ref="saleTable"
:layout="layout" :tableData="tableEmpData"
:tableData="tableData"
:tableTotal="tableTotal"
:tableParams="tableParams" :tableParams="tableParams"
:hasNum="false" :hasNum="false"
:hasPage="false"
> >
</glsx-table> </GLTable>
</el-col> </el-col>
</div> </div>
</template> </template>
...@@ -28,47 +29,15 @@ ...@@ -28,47 +29,15 @@
<script> <script>
export default { export default {
name: "selectEmp", name: "selectEmp",
data() { data() {
return { return {
data: [ treeHeight: 0,
{ staffName: "",
label: "一级 1", listTree: [],
children: [
{
label: "二级 1-1",
children: [
{
label: "三级 1-1-1",
},
],
},
],
},
{
label: "一级 2",
children: [
{
label: "二级 2-1",
children: [
{
label: "三级 2-1-1",
},
],
},
{
label: "二级 2-2",
children: [
{
label: "三级 2-2-1",
},
],
},
],
},
],
defaultProps: { defaultProps: {
children: "children", children: "children",
label: "label", label: "departmentName",
}, },
// 表格参数 // 表格参数
tableParams: { tableParams: {
...@@ -83,31 +52,49 @@ export default { ...@@ -83,31 +52,49 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: "姓名", label: "姓名",
prop: "name", prop: "staffName",
}, },
{ {
label: "职务", label: "职务",
prop: "部门", prop: "departmentName",
}, },
], ],
}, },
layout: "sizes, prev, pager, next, jumper, ->, total", tableEmpData: [],
tableData: [
{ name: 1, id: 1 },
{ name: 2, id: 2 },
{ name: 3, id: 3 },
],
tableTotal: 0,
}; };
}, },
methods: { methods: {
listDepartmentTree() {
this.$apis.emp.listDepartmentTree({ id: 1 }).then((res) => {
this.listTree = res;
});
},
clearSelect(arr) { clearSelect(arr) {
this.tableParams.checkSelectVal = arr; this.tableParams.checkSelectVal = arr;
this.$refs.saleTable.$refs.salelistMutiTable.clearSelection(); this.$refs.saleTable.$refs.salelistMutiTable.clearSelection();
}, },
handleNodeClick(data) { handleNodeClick(data) {
console.log(data); this.departmentId = data.id
this.listEntmicroStaff();
},
listEntmicroStaff(staffName) {
let params = {
departmentId: this.departmentId,
staffName: staffName?staffName:this.staffName,
merchantid: this.$globalState.session.merchantId,
};
this.$apis.emp.listEntmicroStaff(params).then((res) => {
this.tableEmpData = res;
});
}
}, },
mounted() {
let clientHeight = document.documentElement.clientHeight;
this.treeHeight = clientHeight - 450
this.listDepartmentTree();
this.listEntmicroStaff();
}, },
}; };
</script> </script>
...@@ -119,9 +106,9 @@ export default { ...@@ -119,9 +106,9 @@ export default {
margin-top: 10px; margin-top: 10px;
width: 200px; width: 200px;
position: relative; position: relative;
background: #FFFFFF; background: #ffffff;
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.06); box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.06);
border: 1px solid #E4E7ED; border: 1px solid #e4e7ed;
.popper-arrow { .popper-arrow {
border-top-width: 0; border-top-width: 0;
border-width: 6px; border-width: 6px;
...@@ -133,7 +120,7 @@ border: 1px solid #E4E7ED; ...@@ -133,7 +120,7 @@ border: 1px solid #E4E7ED;
height: 0; height: 0;
border-color: transparent; border-color: transparent;
border-style: solid; border-style: solid;
border-bottom-color: #E4E7ED; border-bottom-color: #e4e7ed;
&:after { &:after {
content: " "; content: " ";
border-width: 6px; border-width: 6px;
...@@ -153,9 +140,9 @@ border: 1px solid #E4E7ED; ...@@ -153,9 +140,9 @@ border: 1px solid #E4E7ED;
.emp-table-panel { .emp-table-panel {
flex: 1; flex: 1;
margin-top: 10px; margin-top: 10px;
background: #FFFFFF; background: #ffffff;
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.06); box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.06);
border: 1px solid #E4E7ED; border: 1px solid #e4e7ed;
} }
.emp-tree-panel { .emp-tree-panel {
margin-right: 10px; margin-right: 10px;
......
...@@ -9,24 +9,33 @@ ...@@ -9,24 +9,33 @@
<div class="follow-form"> <div class="follow-form">
<el-form :inline="true" :model="searchForm" class="follow-form-item"> <el-form :inline="true" :model="searchForm" class="follow-form-item">
<el-form-item label="跟进专员类型"> <el-form-item label="跟进专员类型">
<el-select v-model="searchForm.type" placeholder="请选择"> <el-select
size="small"
v-model="searchForm.followerTypeId"
placeholder="请选择"
>
<el-option <el-option
v-for="item in optionsType" v-for="item in optionsType"
:key="item.value" :key="item.id"
:label="item.label" :label="item.followName"
:value="item.value" :value="item.id"
> >
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="员工搜索"> <el-form-item label="员工搜索">
<el-input v-model="searchForm.name" placeholder="请输入员工姓名"></el-input> <el-input
size="small"
v-model="searchForm.staffName"
placeholder="请输入员工姓名"
></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="handleSearch">查询</el-button> <el-button type="primary" @click="handleSearch" size="small">查询</el-button>
</el-form-item> </el-form-item>
<el-form-item class="follow-form-jump"> <el-form-item class="follow-form-jump">
<el-button <el-button
size="small"
icon="el-icon-plus" icon="el-icon-plus"
type="primary" type="primary"
@click="drawer = true" @click="drawer = true"
...@@ -40,8 +49,9 @@ ...@@ -40,8 +49,9 @@
:layout="layout" :layout="layout"
:tableData="tableData" :tableData="tableData"
:tableTotal="tableTotal" :tableTotal="tableTotal"
:pageConf="pageConf"
:tableParams="tableParams" :tableParams="tableParams"
:beforeSearchFn="beforeSearchFn" @refreshTable="handleSearch"
> >
<template slot="auth-button" slot-scope="scope" :data="scope.scope"> <template slot="auth-button" slot-scope="scope" :data="scope.scope">
<el-button type="text" @click="handleDele(scope.scope)">删除</el-button> <el-button type="text" @click="handleDele(scope.scope)">删除</el-button>
...@@ -74,8 +84,8 @@ export default { ...@@ -74,8 +84,8 @@ export default {
drawer: false, drawer: false,
direction: "rtl", direction: "rtl",
searchForm: { searchForm: {
type: "", followerTypeId: "",
name: "", staffName: "",
}, },
optionsType: [ optionsType: [
{ {
...@@ -94,6 +104,7 @@ export default { ...@@ -94,6 +104,7 @@ export default {
scope: { scope: {
scope: "", scope: "",
}, },
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "total" },
// 表格参数 // 表格参数
tableParams: { tableParams: {
tableOption: true, tableOption: true,
...@@ -102,27 +113,33 @@ export default { ...@@ -102,27 +113,33 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: "姓名", label: "姓名",
prop: "name", prop: "staffName",
}, },
{ {
label: "一级订单", label: "部门",
prop: "部门", prop: "departmentName",
}, },
{ {
label: "跟进专员类型", label: "跟进专员类型",
prop: "部门", prop: "followerTypeName",
}, },
{ {
label: "手机号", label: "手机号",
prop: "部门", prop: "staffPhone",
}, },
{ {
label: "首次开通时间", label: "首次开通时间",
prop: "部门", prop: "followerCreatedTime",
}, },
{ {
label: "是否有外部联系人权限", label: "是否有外部联系人权限",
prop: "部门", prop: "isAddOutsider",
formatter: (cellValue) => {
return {
0: "是",
1: "否",
}[cellValue.isAddOutsider];
},
}, },
], ],
}, },
...@@ -145,16 +162,67 @@ export default { ...@@ -145,16 +162,67 @@ export default {
closeDrawer() { closeDrawer() {
this.handleClose(); this.handleClose();
}, },
handSelectdEmp() { handSelectdEmp(followerTypeId, userIds) {
var params = {
followerTypeId,
userIds,
};
this.$apis.emp.saveFollowerStaff(params).then((res) => {
if (res) {
this.handleClose(); this.handleClose();
this.handleSearch();
}
});
},
handleSearch() {
var params = {
...JSON.parse(JSON.stringify(this.searchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum,
};
this.$apis.emp.listFollowerStaffByPage(params).then((res) => {
console.log(res);
this.tableData = res.data;
this.tableTotal = res.total;
});
},
listEntFollowerType() {
this.$apis.emp
.listEntFollowerType({ merchantId: this.$globalState.session.merchantId })
.then((res) => {
this.optionsType = [{ followName: "全部", id: "" }].concat(res);
});
},
handleDele(scope) {
this.$confirm("是否删除该员工?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$apis.emp.deleteFollowerStaff({ userId: scope.userId }).then((res) => {
if (res) {
this.$message({
type: "success",
message: "删除成功!",
});
}
this.handleSearch();
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
}, },
handleSearch() {},
handleDele() {},
}, },
mounted() { mounted() {
this.$refs.table.setTableHeightFun(); this.$refs.table.setTableHeightFun();
console.log(this.$apis.emp.getEmpList()) this.listEntFollowerType();
this.handleSearch();
}, },
}; };
</script> </script>
......
<template> <template>
<div class="chart-home-panel scrm-box-f"> <div class="chart-home-panel scrm-box-f">
<div class="chart-home-left"> <div class="chart-home-left">
<output-echart></output-echart> <div class="view-l-title">
<div class="view-title-desc">
<span>总产值</span>
</div>
<div class="view-title-num">- -人</div>
</div>
<div class="view-chart">
<div class="view-chart-empty">
<img src="@/assets/img/empty.png" />
<div>暂无数据</div>
</div>
</div>
</div> </div>
<div class="chart-home-right"> <div class="chart-home-right">
<same-add-echart></same-add-echart> <div class="view-l-title">
<div class="view-title-desc">
<span>当日新增总产值</span>
</div>
<div class="view-title-num">¥ - -</div>
</div>
<div class="view-r-value">
<div class="view-value-panle">
<div class="view-value">当日新增精品升级产值</div>
<div class="view-value-price" style="color: #fe9c1c">¥ - -</div>
</div>
<div class="view-value-panle">
<div class="view-value">当日新增权益产值</div>
<div class="view-value-price" style="color: #716aff">¥ - -</div>
</div>
</div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import outputEchart from "./output-echart";
import sameAddEchart from "./same-add-echart";
export default { export default {
name: "customerEchart", name: "customerEchart",
components: {
outputEchart,
sameAddEchart,
},
data() { data() {
return { return {
permissions: [1211], permissions: [1211],
...@@ -38,10 +58,63 @@ export default { ...@@ -38,10 +58,63 @@ export default {
.chart-home-left { .chart-home-left {
width: 50%; width: 50%;
padding: 20px; padding: 20px;
.view-chart {
width: 100%;
height: 258px;
display: flex;
justify-content: center;
align-items: center;
&-empty {
width: 80px;
height: auto;
font-size: 14px;
margin-top: 15px;
font-weight: 400;
color: #000000;
line-height: 22px;
text-align: center;
}
img {
width: 64px;
height: 41px;
}
}
} }
.chart-home-right { .chart-home-right {
width: 50%; width: 50%;
padding: 20px; padding: 20px 40px;
.view-r-value {
margin-top: 100px;
display: flex;
.view-value-panle {
width: 50%;
text-align: center;
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 22px;
.view-value-price {
margin: 20px 0px;
}
}
}
}
.view-l-title {
display: flex;
justify-content: space-between;
font-size: 18px;
font-weight: 600;
color: #333333;
line-height: 18px;
.view-title-desc {
display: flex;
}
img {
width: 14px;
height: 14px;
margin-left: 6px;
margin-top: 2px;
}
} }
} }
</style> </style>
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
<div class="info-border"> <div class="info-border">
<div class="info-title">企业信息 <span>门店</span></div> <div class="info-title">企业信息 <span>门店</span></div>
<div class="info-content"> <div class="info-content">
<p>所属企业:</p> <p>所属企业:- -</p>
<p>所属门店:</p> <p>所属门店:- -</p>
<p>关联企微:</p> <p>关联企微:- -</p>
<p>企微成员:</p> <p>企微成员:- -</p>
</div> </div>
</div> </div>
<div class="info-border consult-box"> <div class="info-border consult-box">
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<div class="info-content"> <div class="info-content">
<div class="info-qrcode"> <div class="info-qrcode">
<div class="info-qrcode-image"> <div class="info-qrcode-image">
<img src="@/assets/img/home/logo.png" alt="" /> <img src="@/assets/img/qrcode.png" alt="" />
</div> </div>
<div class="info-qrcode-desc">扫码添加您的专属顾问</div> <div class="info-qrcode-desc">扫码添加您的专属顾问</div>
</div> </div>
......
<template> <template>
<div class="marketing-tools scrm-box-f"> <div class="marketing-tools scrm-box-f">
<div class="marketing-item" v-for="(item, index) in tools" :key="index"> <div class="marketing-item" v-for="(item, index) in tools" :key="index">
<div class="marketing-icon"><img :src="require('../../../assets/img/service/tool' + (index+1) + '.png')"></div> <div class="marketing-icon">
<div class="hot" v-if="item.status"><img src="@/assets/img/hot.png"></div>
<img :src="require('../../../assets/img/service/tool' + (index + 1) + '.png')" />
</div>
<div class="marketing-desc">{{ item.name }}</div> <div class="marketing-desc">{{ item.name }}</div>
</div> </div>
</div> </div>
...@@ -21,12 +24,14 @@ export default { ...@@ -21,12 +24,14 @@ export default {
}, },
{ {
name: "群发助手", name: "群发助手",
status: 1,
}, },
{ {
name: "企业素材库", name: "企业素材库",
}, },
{ {
name: "权益裂变", name: "权益裂变",
status: 1,
}, },
{ {
name: "优惠券营销", name: "优惠券营销",
...@@ -52,7 +57,17 @@ export default { ...@@ -52,7 +57,17 @@ export default {
margin: 0 auto; margin: 0 auto;
text-align: center; text-align: center;
.marketing-icon { .marketing-icon {
img { position: relative;
width: 76px;
text-align: center;
.hot img{
position: absolute;
right: -10px;
top: 0px;
width: 28px;
height: auto;
}
>img {
width: 50px; width: 50px;
height: 50px; height: 50px;
margin: 4px auto; margin: 4px auto;
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<img src="@/assets/img/question.png" slot="reference"> <img src="@/assets/img/question.png" slot="reference">
</el-popover> </el-popover>
</div> </div>
<div class="view-title-num">10,000人</div> <div class="view-title-num">{{customerCount}}人</div>
</div> </div>
<div class="view-num-panel"> <div class="view-num-panel">
<div class="view-num-y"> <div class="view-num-y">
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
alt="" alt=""
/> />
<div class="view-customer-desc">企微客户数</div> <div class="view-customer-desc">企微客户数</div>
<div class="view-customer-num">10,000人</div> <div class="view-customer-num">{{addEntmicroCount}}人</div>
</div> </div>
<div class="view-num-n"> <div class="view-num-n">
<img <img
...@@ -34,11 +34,11 @@ ...@@ -34,11 +34,11 @@
alt="" alt=""
/> />
<div class="view-customer-desc">未加企微客户数</div> <div class="view-customer-desc">未加企微客户数</div>
<div class="view-customer-num">10,000人</div> <div class="view-customer-num">{{notAddEntmicroCount}}人</div>
</div> </div>
</div> </div>
<div class="view-l-loss"> <div class="view-l-loss">
<div class="view-loss-desc">企微流失客户总数<span>100</span>人</div> <div class="view-loss-desc">企微流失客户总数<span>{{entmicroLoseCount}}</span>人</div>
<div class="view-loss-btn"> <div class="view-loss-btn">
<el-button type="primary" size="small">立即召回</el-button> <el-button type="primary" size="small">立即召回</el-button>
</div> </div>
...@@ -46,15 +46,15 @@ ...@@ -46,15 +46,15 @@
</div> </div>
<div class="view-prise-r"> <div class="view-prise-r">
<div class="view-prise-h"> <div class="view-prise-h">
<div class="view-h-title">当日新增客户数<span>700人</span></div> <div class="view-h-title">当日新增客户数<span>{{newCustomerCount}}人</span></div>
<div class="view-h-desc">当日新增企微客户数:60人</div> <div class="view-h-desc">当日新增企微客户数:{{addEntmicroCount}}人</div>
</div> </div>
<div class="view-prise-h"> <div class="view-prise-h">
<div class="view-h-title">当日新增群客户数<span>700人</span></div> <div class="view-h-title">当日新增群客户数<span>{{todayAddPackmenberCount}}人</span></div>
<div class="view-h-desc">群客户总数:110人</div> <div class="view-h-desc">群客户总数:{{packmenberCount}}人</div>
</div> </div>
<div class="view-prise-f"> <div class="view-prise-f">
<div class="view-h-title">当日企微流失数<span>700人</span></div> <div class="view-h-title">当日企微流失数<span>{{todayEntmicroLoseCount}}人</span></div>
</div> </div>
</div> </div>
</div> </div>
...@@ -64,17 +64,48 @@ ...@@ -64,17 +64,48 @@
<script> <script>
export default { export default {
name: "overviewEnterprise", name: "overviewEnterprise",
data() { data() {
return { return {
permissions: [1211], customerCount: 0,
newCustomerCount: 0,
addEntmicroCount: 0,
notAddEntmicroCount: 0,
newEntmicroCount: 0,
entmicroLoseCount: 0,
todayEntmicroLoseCount: 0,
packmenberCount: 0,
todayAddPackmenberCount: 0,
}; };
}, },
props: {
summaryTime: {
type: String
}
},
watch: {
summaryTime() {
this.getViewData()
}
},
methods: { methods: {
test() { getViewData() {
console.log("点击了按钮"); this.$apis.home.getStore({date: this.summaryTime}).then((res) => {
this.$messenger.send({ from: 11, message: "11111" }); this.customerCount = res.customerCount;
this.newCustomerCount = res.newCustomerCount;
this.addEntmicroCount = res.addEntmicroCount;
this.notAddEntmicroCount = res.notAddEntmicroCount;
this.newEntmicroCount = res.newEntmicroCount;
this.entmicroLoseCount = res.entmicroLoseCount;
this.todayEntmicroLoseCount = res.todayEntmicroLoseCount;
this.packmenberCount = res.packmenberCount;
this.todayAddPackmenberCount = res.todayAddPackmenberCount;
});
}, },
}, },
mounted() {
this.getViewData();
}
}; };
</script> </script>
...@@ -92,6 +123,9 @@ export default { ...@@ -92,6 +123,9 @@ export default {
font-weight: 600; font-weight: 600;
color: #333333; color: #333333;
line-height: 18px; line-height: 18px;
.view-title-desc {
display: flex;
}
img { img {
width: 14px; width: 14px;
height: 14px; height: 14px;
...@@ -107,6 +141,7 @@ export default { ...@@ -107,6 +141,7 @@ export default {
width: 50px; width: 50px;
height: 50px; height: 50px;
margin-bottom: 30px; margin-bottom: 30px;
display: inline-block;
} }
.view-num-y { .view-num-y {
width: 25%; width: 25%;
......
<template> <template>
<div class="main"> <div class="main">
<div class="main-panel" :class="{ 'main-isScroll': guideStatus }"> <div class="main-panel" :class="{ 'main-isScroll2': guideStatus }">
<div class="main-left"> <div class="main-left">
<div class="header-panel"> <div class="header-panel">
<img <img
...@@ -8,9 +8,23 @@ ...@@ -8,9 +8,23 @@
src="@/assets/img/home/home-header.png" src="@/assets/img/home/home-header.png"
alt="" alt=""
/> />
<div class="jump-mf-btn">立即使用</div>
</div> </div>
<div class="summary-panel">
<div class="home-statistics-title">企业数据概览</div> <div class="home-statistics-title">企业数据概览</div>
<overview-enterprise></overview-enterprise> <div class="summary-time">
<span>统计截止至 </span>
<el-date-picker
format="yyyy-MM-dd"
v-model="summaryTime"
type="date"
placeholder="选择日期"
:clearable="false"
>
</el-date-picker>
</div>
</div>
<overview-enterprise :summaryTime="summaryTime"></overview-enterprise>
<customer-echart></customer-echart> <customer-echart></customer-echart>
<div class="home-overview-content"></div> <div class="home-overview-content"></div>
<div class="home-statistics-title">精准营销</div> <div class="home-statistics-title">精准营销</div>
...@@ -32,8 +46,8 @@ ...@@ -32,8 +46,8 @@
@click="handleNext(1)" @click="handleNext(1)"
class="guide-btn" class="guide-btn"
:style="{ :style="{
left: guideLeft + guideWidth / 2 + imgWidth / 2 - 40 + 'px', left: guideLeft + guideWidth / 2 + imgWidth / 2 - 40 - borderLeft + 'px',
top: guideTop + guideHeight + imgHeight - 20 + 'px', top: guideTop + guideHeight + imgHeight + 50 - borderTop + 'px',
}" }"
> >
我知道了 我知道了
...@@ -43,8 +57,8 @@ ...@@ -43,8 +57,8 @@
@click="handleNext(2)" @click="handleNext(2)"
class="guide-btn" class="guide-btn"
:style="{ :style="{
right: guideRight + guideWidth + imgWidth / 2 - 40 + 'px', left: guideLeft - imgWidth / 2 - borderLeft + 'px',
top: guideTop + imgHeight - 40 + 'px', top: guideTop + imgHeight - 30 + 'px',
}" }"
> >
我知道了 我知道了
...@@ -54,8 +68,8 @@ ...@@ -54,8 +68,8 @@
@click="handleNext(3)" @click="handleNext(3)"
class="guide-btn" class="guide-btn"
:style="{ :style="{
left: guideLeft + guideWidth / 4 + imgWidth / 2 - 100 + 'px', left: guideLeft + guideWidth / 4 + imgWidth / 2 - 100 - borderLeft + 'px',
top: guideTop - guideWidth / 4+imgHeight - 80 + 'px', top: guideTop - guideWidth / 4 + imgHeight - 50 - borderTop + 'px',
}" }"
> >
我知道了 我知道了
...@@ -68,8 +82,8 @@ ...@@ -68,8 +82,8 @@
:style="{ :style="{
width: imgWidth + 'px', width: imgWidth + 'px',
height: imgHeight + 'px', height: imgHeight + 'px',
left: guideLeft + guideWidth / 2 + 'px', left: guideLeft + guideWidth / 2 - borderLeft + 'px',
top: guideTop + guideHeight + 20 + 'px', top: guideTop + guideHeight + 20 - borderTop + 'px',
}" }"
/> />
<img <img
...@@ -81,8 +95,8 @@ ...@@ -81,8 +95,8 @@
:style="{ :style="{
width: imgWidth + 'px', width: imgWidth + 'px',
height: imgHeight + 'px', height: imgHeight + 'px',
right: guideRight + guideWidth + 'px', left: guideLeft - imgWidth - borderLeft + 'px',
top: guideTop + 'px', top: guideTop - borderTop + 'px',
}" }"
/> />
<img <img
...@@ -93,8 +107,8 @@ ...@@ -93,8 +107,8 @@
alt="" alt=""
:style="{ :style="{
width: guideWidth / 1.5 + 'px', width: guideWidth / 1.5 + 'px',
left: guideLeft + guideWidth / 4+ 'px', left: guideLeft + guideWidth / 4 - borderLeft + 'px',
top: guideTop - guideWidth / 4 + 'px', top: guideTop - guideWidth / 4 - borderTop + 'px',
}" }"
/> />
...@@ -114,7 +128,7 @@ ...@@ -114,7 +128,7 @@
:style="{ :style="{
width: guideWidth + 'px', width: guideWidth + 'px',
height: guideHeight + 'px', height: guideHeight + 'px',
right: guideRight + 'px', left: guideLeft + 'px',
top: guideTop + 'px', top: guideTop + 'px',
}" }"
></div> ></div>
...@@ -133,6 +147,7 @@ ...@@ -133,6 +147,7 @@
</template> </template>
<script> <script>
import util from "@/utils/util";
import overviewEnterprise from "./components/overview-enterprise"; import overviewEnterprise from "./components/overview-enterprise";
import customerEchart from "./components/customer-echart"; import customerEchart from "./components/customer-echart";
import marketingTools from "./components/marketing-tools"; import marketingTools from "./components/marketing-tools";
...@@ -144,8 +159,8 @@ export default { ...@@ -144,8 +159,8 @@ export default {
components: { components: {
overviewEnterprise, overviewEnterprise,
customerEchart,
operationalServices, operationalServices,
customerEchart,
marketingTools, marketingTools,
enterpriseInformation, enterpriseInformation,
accurateMarketing, accurateMarketing,
...@@ -153,7 +168,8 @@ export default { ...@@ -153,7 +168,8 @@ export default {
data() { data() {
return { return {
guideStatus: true, summaryTime: util.getBeforeDate(),
guideStatus: false,
step: 1, step: 1,
guideWidth: "", guideWidth: "",
guideHeight: "", guideHeight: "",
...@@ -177,32 +193,40 @@ export default { ...@@ -177,32 +193,40 @@ export default {
} }
}, },
getRezie() { getRezie() {
// document.body.parentNode.style.overflowY = "hidden"; this.borderLeft = document.querySelector(".el-main").offsetLeft + 5;
this.borderTop = document.querySelector(".el-main").offsetTop + 5;
if (this.step == 1) { if (this.step == 1) {
this.guideWidth = document.querySelector(".header-panel").offsetWidth; this.guideWidth = document.querySelector(".header-panel").offsetWidth;
this.guideHeight = document.querySelector(".header-panel").offsetHeight; this.guideHeight = document.querySelector(".header-panel").offsetHeight;
this.imgWidth = this.guideWidth / 2; this.imgWidth = this.guideWidth / 2;
this.imgHeight = (this.imgWidth * 342) / 541; this.imgHeight = (this.imgWidth * 246) / 541;
this.guideLeft = document.querySelector(".header-panel").offsetLeft; this.guideLeft =
this.guideTop = document.querySelector(".header-panel").offsetTop; document.querySelector(".header-panel").offsetLeft + this.borderLeft;
this.guideTop =
document.querySelector(".header-panel").offsetTop + this.borderTop;
} else if (this.step == 2) { } else if (this.step == 2) {
this.guideWidth = document.querySelector(".consult-box").offsetWidth; this.guideWidth = document.querySelector(".consult-box").offsetWidth;
this.guideHeight = document.querySelector(".consult-box").offsetHeight; this.guideHeight = document.querySelector(".consult-box").offsetHeight;
this.imgHeight = this.guideHeight; this.imgHeight = this.guideHeight;
this.imgWidth = (this.imgHeight * 614) / 285; this.imgWidth = (this.imgHeight * 614) / 222;
this.guideRight = this.guideLeft =
document.body.clientWidth - document.querySelector(".consult-box").offsetLeft + this.borderLeft;
document.querySelector(".consult-box").offsetLeft - this.guideTop = document.querySelector(".consult-box").offsetTop + this.borderTop;
document.querySelector(".consult-box").offsetWidth;
this.guideTop = document.querySelector(".consult-box").offsetTop;
} else { } else {
this.guideLeft = document.querySelector(".operational-panel-s").offsetLeft; let top = document.querySelector(".accurate-sercives").offsetTop + 100;
this.guideTop = document.querySelector(".operational-panel-s").offsetTop; this.guideLeft =
document.documentElement.scrollTop = document.body.scrollHeight - 100; document.querySelector(".operational-panel-s").offsetLeft + this.borderLeft;
this.guideTop =
document.querySelector(".operational-panel-s").offsetTop -
top -
10 +
this.borderTop;
this.guideWidth = document.querySelector(".operational-panel-s").offsetWidth; this.guideWidth = document.querySelector(".operational-panel-s").offsetWidth;
this.guideHeight = document.querySelector(".operational-panel-s").offsetHeight; this.guideHeight =
document.querySelector(".operational-panel-s").offsetHeight + 10;
document.querySelector(".main-panel").scrollTop = top;
this.imgWidth = this.guideWidth / 1.5; this.imgWidth = this.guideWidth / 1.5;
this.imgHeight = (this.imgWidth * 229) / 668; this.imgHeight = (this.imgWidth * 222) / 668;
} }
}, },
}, },
...@@ -219,21 +243,40 @@ export default { ...@@ -219,21 +243,40 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.header-panel { .header-panel {
width: 100%; width: 100%;
height: 170px; height: 140px;
position: relative;
.jump-mf-btn {
position: absolute;
background: #f4c647;
border-radius: 4px;
padding: 6px 10px;
font-size: 10px;
font-weight: 500;
color: #ffffff;
line-height: 12px;
cursor: pointer;
bottom: 10px;
right: 21%;
}
> img { > img {
width: 100%; width: 100%;
height: 170px; height: 140px;
} }
} }
.main-isScroll2 { .main-isScroll2 {
position: absolute; position: absolute;
overflow: hidden; overflow-y: hidden;
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.main-panel { .main-panel {
display: flex; display: flex;
} }
.summary-panel {
display: flex;
justify-content: space-between;
align-items: center;
}
.home-statistics-title { .home-statistics-title {
font-size: 20px; font-size: 20px;
font-weight: 500; font-weight: 500;
...@@ -283,7 +326,7 @@ export default { ...@@ -283,7 +326,7 @@ export default {
height: 100%; height: 100%;
} }
.guide-box-highlight { .guide-box-highlight {
position: absolute; position: fixed;
outline: 5000px solid rgba(0, 0, 0, 0.75); outline: 5000px solid rgba(0, 0, 0, 0.75);
border: 2px solid #ffffff; border: 2px solid #ffffff;
border-radius: 4px; border-radius: 4px;
...@@ -293,7 +336,6 @@ export default { ...@@ -293,7 +336,6 @@ export default {
} }
.guide-step-1 { .guide-step-1 {
z-index: 999; z-index: 999;
height: auto; height: auto;
position: absolute; position: absolute;
top: 10px; top: 10px;
......
...@@ -10,7 +10,9 @@ ...@@ -10,7 +10,9 @@
<el-button type="primary" size="small">化流量为销量</el-button> <el-button type="primary" size="small">化流量为销量</el-button>
</div> </div>
</div> </div>
<div class="service-active-r"></div> <div class="service-active-r">
<img src="@/assets/img/service/s1.png" />
</div>
</div> </div>
<hr /> <hr />
</div> </div>
...@@ -27,11 +29,18 @@ ...@@ -27,11 +29,18 @@
我们不仅提供管理工具,我们更有方法论与策略 。 我们不仅提供管理工具,我们更有方法论与策略 。
</div> </div>
</div> </div>
<div class="service-content-r"></div> <div class="service-content-r">
<img src="@/assets/img/service/s2.png" />
</div>
</div> </div>
<div class="service-content-cause"> <div class="service-content-cause">
<div class="service-cause-border" v-for="(item, index) in cause" :key="index"> <div class="service-cause-border" v-for="(item, index) in cause" :key="index">
<div class="cause-icon"><img :src="require('../../assets/img/service/tool' + (index+1) + '.png')"></div> <div class="cause-icon">
<div class="hot" v-if="item.status"><img src="@/assets/img/hot.png" /></div>
<img
:src="require('../../assets/img/service/tool' + (index + 1) + '.png')"
/>
</div>
<div class="cause-name">{{ item.name }}</div> <div class="cause-name">{{ item.name }}</div>
</div> </div>
</div> </div>
...@@ -70,29 +79,8 @@ ...@@ -70,29 +79,8 @@
您也可在线申请,我们会24小时内安排工作人员主动跟您联系! 您也可在线申请,我们会24小时内安排工作人员主动跟您联系!
</div> </div>
<div class="service-form"> <div class="service-form">
<el-form ref="form" :model="form" label-width="150px"> <div class="sevice-qrcode">
<el-row> <img src="@/assets/img/qrcode.png" alt="" />
<el-col :span="8">
<el-form-item label="您的姓名">
<el-input v-model="form.name"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="您的电话号码">
<el-input v-model="form.name"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16">
<el-form-item label="描述说明">
<el-input type="textarea" rows="5" v-model="form.remark"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="service-form-btn">
<el-button type="primary" size="small">确定</el-button>
</div> </div>
</div> </div>
</div> </div>
...@@ -104,10 +92,10 @@ ...@@ -104,10 +92,10 @@
const cause = [ const cause = [
{ name: "活码引流" }, { name: "活码引流" },
{ name: "批量加好友" }, { name: "批量加好友" },
{ name: "群发助手" }, { name: "群发助手",status: 1 },
{ name: "企业素材库" }, { name: "企业素材库" },
{ name: "权益裂变" }, { name: "权益裂变" },
{ name: "会员中心" }, { name: "会员中心",status: 1 },
{ name: "分销裂变" }, { name: "分销裂变" },
{ name: "优惠券营销" }, { name: "优惠券营销" },
]; ];
...@@ -130,7 +118,7 @@ export default { ...@@ -130,7 +118,7 @@ export default {
.service-panel { .service-panel {
background: #ffffff; background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1); box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 68px; padding: 0px 68px;
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
} }
...@@ -138,13 +126,16 @@ export default { ...@@ -138,13 +126,16 @@ export default {
.service-active-wrap { .service-active-wrap {
display: flex; display: flex;
.service-active-l { .service-active-l {
flex: 1; width: 50%;
margin-top: 100px;
} }
.service-active-r { .service-active-r {
width: 380px; width: 50%;
height: 200px; margin: 0px auto;
border: 1px solid #f2f2f2; img {
margin: 0px 135px; width: 465px;
height: auto;
}
} }
} }
.service-active-h1 { .service-active-h1 {
...@@ -164,20 +155,23 @@ export default { ...@@ -164,20 +155,23 @@ export default {
} }
hr { hr {
margin: 60px 0px; margin: 60px 0px;
border: 2px solid #e8e8ea;
} }
} }
.service-content { .service-content {
.service-content-wrap { .service-content-wrap {
display: flex; display: flex;
.service-content-l { .service-content-l {
flex: 1; width: 50%;
} }
.service-content-r { .service-content-r {
width: 380px; width: 50%;
height: 200px; margin: 0 auto;
border: 1px solid #f2f2f2; text-align: center;
margin: 0px 135px; img {
display: line-block;
width: 398px;
height: auto;
}
} }
.service-content-desc { .service-content-desc {
margin-top: 15px; margin-top: 15px;
...@@ -201,7 +195,7 @@ export default { ...@@ -201,7 +195,7 @@ export default {
font-weight: 600; font-weight: 600;
color: #333333; color: #333333;
line-height: 25px; line-height: 25px;
margin: 30px 0px; margin-top: 130px;
} }
} }
.service-content-cause { .service-content-cause {
...@@ -212,6 +206,16 @@ export default { ...@@ -212,6 +206,16 @@ export default {
.service-cause-border { .service-cause-border {
text-align: center; text-align: center;
.cause-icon { .cause-icon {
position: relative;
width: 76px;
text-align: center;
.hot img {
position: absolute;
right: -10px;
top: 0px;
width: 28px;
height: auto;
}
img { img {
width: 50px; width: 50px;
height: 50px; height: 50px;
...@@ -230,7 +234,6 @@ export default { ...@@ -230,7 +234,6 @@ export default {
} }
hr { hr {
margin: 60px 0px; margin: 60px 0px;
border: 2px solid #e8e8ea;
} }
} }
...@@ -256,6 +259,7 @@ export default { ...@@ -256,6 +259,7 @@ export default {
color: #979797; color: #979797;
margin-bottom: 20px; margin-bottom: 20px;
th { th {
vertical-align: middle;
color: #ffffff; color: #ffffff;
border-width: 1px; border-width: 1px;
border-left-width: 0px; border-left-width: 0px;
...@@ -277,13 +281,11 @@ export default { ...@@ -277,13 +281,11 @@ export default {
} }
hr { hr {
margin: 60px 0px; margin: 60px 0px;
border: 2px solid #e8e8ea;
} }
} }
.service-contact { .service-contact {
hr { hr {
margin: 40px 0px; margin: 40px 0px;
border: 2px solid #e8e8ea;
} }
} }
.service-contact-h { .service-contact-h {
...@@ -308,7 +310,12 @@ export default { ...@@ -308,7 +310,12 @@ export default {
margin-top: 50px; margin-top: 50px;
} }
.service-form { .service-form {
margin-top: 60px; margin-top: 30px;
.sevice-qrcode {
margin-left: 100px;
width: 200px;
height: 200px;
}
.service-form-btn { .service-form-btn {
margin-left: 150px; margin-left: 150px;
/deep/ .el-button--small { /deep/ .el-button--small {
......
...@@ -170,6 +170,13 @@ $dackColor: #4f48e6; ...@@ -170,6 +170,13 @@ $dackColor: #4f48e6;
background: #fff; background: #fff;
} }
.el-radio-button__orig-radio:checked+.el-radio-button__inner {
background-color: $defaultColor;
border-color: $defaultColor;
-webkit-box-shadow: -1px 0 0 0 $defaultColor;
box-shadow: -1px 0 0 0 $defaultColor
}
.el-radio__inner:after { .el-radio__inner:after {
background-color: $defaultColor; background-color: $defaultColor;
width: 10px; width: 10px;
......
const path = require('path') const path = require('path')
const packageName = require('./package.json').name const packageName = require('./package.json').name
const node_env = process.env.NODE_ENV === 'production' const node_env = process.env.NODE_ENV === 'production'
// const baseUrl = process.env.VUE_APP_BASE_URL; // const baseUrl = process.env.VUE_APP_BASE_URL;
const baseUrl = '/' const baseUrl = '/'
const resolve = dir => path.join(__dirname, dir) const resolve = dir => path.join(__dirname, dir)
const CDN_DOMAIN = 'https://cdn.bootcss.com'
const cdn = {
css: [
`${CDN_DOMAIN}/element-ui/2.11.1/theme-chalk/index.css`
],
js: [
`${CDN_DOMAIN}/vue/2.6.10/vue.min.js`,
`${CDN_DOMAIN}/vue-router/3.0.6/vue-router.min.js`,
`${CDN_DOMAIN}/element-ui/2.11.1/index.js`,
`${CDN_DOMAIN}/vuex/3.1.1/vuex.min.js`,
`${CDN_DOMAIN}/axios/0.19.0/axios.min.js`,
`${CDN_DOMAIN}/echarts/4.3.0-rc.1/echarts.min.js`
]
}
module.exports = { module.exports = {
outputDir: `../dist/${packageName}`, outputDir: `../dist/${packageName}`,
publicPath: node_env ? baseUrl : '/', publicPath: node_env ? baseUrl : '/',
...@@ -21,6 +35,14 @@ module.exports = { ...@@ -21,6 +35,14 @@ module.exports = {
library: `${packageName}-[name]`, library: `${packageName}-[name]`,
libraryTarget: 'umd', // 把微应用打包成 umd 库格式 libraryTarget: 'umd', // 把微应用打包成 umd 库格式
jsonpFunction: `webpackJsonp_${packageName}` jsonpFunction: `webpackJsonp_${packageName}`
},
externals: {
'vue': 'Vue',
'element-ui': 'ELEMENT',
'vue-router': 'VueRouter',
'vuex': 'Vuex',
'axios': 'axios',
'echarts': 'echarts'
} }
}, },
devServer: { devServer: {
...@@ -33,6 +55,12 @@ module.exports = { ...@@ -33,6 +55,12 @@ module.exports = {
} }
}, },
chainWebpack: config => { chainWebpack: config => {
config.plugin('html')
.tap(args => {
// args[0].minify.removeComments = false;
args[0].cdn = cdn
return args
})
config.plugins.delete('preload') // TODO: need test config.plugins.delete('preload') // TODO: need test
config.plugins.delete('prefetch') // TODO: need test config.plugins.delete('prefetch') // TODO: need test
config.module config.module
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!