Commit 600fe6a0 by ym

ui

1 parent 125e447f
module.exports = {
presets: ["@vue/cli-plugin-babel/preset"],
plugins: [
[
"component",
{
libraryName: "element-ui",
styleLibraryName: "theme-chalk"
}
]
]
};
presets: ["@vue/cli-plugin-babel/preset"]
};
\ No newline at end of file
{
"name": "scrm-sub-blog",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"axios": "^0.21.1",
"core-js": "^3.4.4",
"echarts": "^5.2.0",
"el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5",
"glsx-common": "^1.4.0",
"glsx-components": "^1.0.4",
"glsx-table": "^1.0.9",
"vue": "^2.6.10",
"vue-router": "^3.1.3",
"vuex": "^3.1.2"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.1.0",
"@vue/cli-plugin-eslint": "^4.1.0",
"@vue/cli-plugin-router": "^4.1.0",
"@vue/cli-plugin-vuex": "^4.1.0",
"@vue/cli-service": "^4.1.0",
"@vue/eslint-config-prettier": "^5.0.0",
"babel-eslint": "^10.0.3",
"babel-plugin-component": "^1.1.1",
"element-theme-chalk": "^2.15.6",
"eslint": "^5.16.0",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-vue": "^5.0.0",
"node-sass": "^4.14.1",
"prettier": "^1.19.1",
"sass-loader": "^8.0.0",
"vue-cli-plugin-element": "^1.0.1",
"vue-template-compiler": "^2.6.10"
},
"browserslist": [
"> 1%",
"last 2 versions"
]
}
"name": "scrm-sub-blog",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"axios": "^0.21.1",
"core-js": "^3.4.4",
"echarts": "^5.2.0",
"el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5",
"glsx-common": "^1.4.0",
"glsx-components": "^1.0.4",
"glsx-table": "^1.0.9",
"vue": "^2.6.10",
"vue-router": "^3.1.3",
"vuex": "^3.1.2"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.1.0",
"@vue/cli-plugin-eslint": "^4.1.0",
"@vue/cli-plugin-router": "^4.1.0",
"@vue/cli-plugin-vuex": "^4.1.0",
"@vue/cli-service": "^4.1.0",
"@vue/eslint-config-prettier": "^5.0.0",
"babel-eslint": "^10.0.3",
"babel-plugin-component": "^1.1.1",
"element-theme-chalk": "^2.15.6",
"eslint": "^5.16.0",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-vue": "^5.0.0",
"node-sass": "^4.14.1",
"prettier": "^1.19.1",
"sass-loader": "^8.0.0",
"vue-cli-plugin-element": "^1.0.1",
"vue-template-compiler": "^2.6.10"
},
"browserslist": [
"> 1%",
"last 2 versions"
]
}
\ No newline at end of file
......@@ -2,20 +2,32 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>微前端子应用:博客</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<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>
</head>
<body>
<noscript>
<noscript>
<strong>We're sorry but module-report doesn't work properly without JavaScript enabled. Please enable it to
continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
<div id="app"></div>
<!-- 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>
</html>
\ No newline at end of file
......@@ -58,5 +58,6 @@ export default {
}
#app {
background: #F4F5FA;
padding-left: 40px;
}
</style>
......@@ -7,15 +7,114 @@
* @returns
*/
import { http } from '@/main'
const getEmpList = params => {
const sessionId = 'mini-a8d84762-da6a-4ff7-b009-eb7fa0c80dfb-rop';
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({
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: 'deviceInfo/listDeviceFileUnstock',
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
getEmpList
listFollowerStaffByPage,
listEntFollowerType,
deleteFollowerStaff,
deleteFollowerType,
listEntmicroStaff,
saveFollowerType,
saveFollowerStaff,
syncEntmicroIsOutsiderStaff,
listDepartmentTree
}
\ No newline at end of file
......@@ -7,24 +7,67 @@
* @returns
*/
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({
url: 'deviceInfo/listDeviceFileUnstock',
url,
method: 'POST',
data: params,
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({
url: 'deviceInfo/listDeviceFileUnstock',
url,
method: 'POST',
data: params,
sign: true
})
}
export default {
GETLISTDEVICEFILEUNSTOCK,
GETLISTDEVICEFILEUNSTOCK1
getChart,
getView,
getSort,
getShop,
getStore
}
\ 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
* {
font-family: PingFangSC-Regular, PingFang SC;
margin: 0;
padding: 0;
font-family: PingFangSC-Regular, PingFang SC;
margin: 0;
padding: 0;
}
img {
width: 100%;
height: 100%;
vertical-align: top;
width: 100%;
height: 100%;
vertical-align: top;
}
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.text-hide-2 {
overflow:hidden;
text-overflow:ellipsis;
display:-webkit-box;
-webkit-box-orient:vertical;
-webkit-line-clamp:2;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.scrm-textRight {
position: relative;
text-align: right;
position: relative;
text-align: right;
}
.scrm-textCenter {
text-align: center;
text-align: center;
}
.scrm-c3 {
color: #333333;
color: #333333;
}
.scrm-f12 {
font-size: 12px;
font-size: 12px;
}
.scrm-f13 {
font-size: 13px;
font-size: 13px;
}
.scrm-f14 {
font-size: 14px;
font-size: 14px;
}
.scrm-f15 {
font-size: 15px;
font-size: 15px;
}
.scrm-f16 {
font-size: 16px;
font-size: 16px;
}
.scrm-f18 {
font-size: 18px;
font-size: 18px;
}
.scrm-f20 {
font-size: 20px;
font-size: 20px;
}
.scrm-f22 {
font-size: 22px;
font-size: 22px;
}
.scrm-f24 {
font-size: 24px;
font-size: 24px;
}
.scrm-m10 {
margin: 10px;
margin: 10px;
}
.scrm-m20 {
margin: 20px;
margin: 20px;
}
.scrm-ml10 {
margin-left: 10px;
margin-left: 10px;
}
.scrm-ml20 {
margin-left: 20px;
margin-left: 20px;
}
.scrm-mr10 {
margin-right: 10px;
margin-right: 10px;
}
.scrm-mr20 {
margin-right: 20px;
margin-right: 20px;
}
.scrm-p10 {
padding: 10px;
padding: 10px;
}
.scrm-p20 {
padding: 20px;
padding: 20px;
}
.scrm-box-f {
background: #FFFFFF;
box-shadow: 0 10px 20px 0 rgba(88,80,255,0.10);
background: #FFFFFF;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.10);
}
\ 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
......@@ -8,30 +8,30 @@
*/
// 本地环境配置
module.exports = {
title: 'scrm-sub-blog',
response: {
data_key: 'data',
message_key: 'message',
code_key: 'returnCode',
code_success_value: '0',
code_message_map: {}
},
request: {
baseURL: 'http://192.168.2.106:8083/scrm-wechat',
// 设置超时时间
timeout: 180000,
// 携带凭证
withCredentials: true,
// 返回数据类型
responseType: 'json'
},
sign: {
app_key: '48e5e13229b82c1b4e6e8c96151f0637',
v: '1.0.0',
format: 'json',
source: ''
},
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b',
title: 'scrm-sub-blog',
response: {
data_key: 'data',
message_key: 'message',
code_key: 'code',
code_success_value: '0',
code_message_map: {}
},
request: {
baseURL: 'http://192.168.3.191:8064',
// 设置超时时间
timeout: 180000,
// 携带凭证
withCredentials: true,
// 返回数据类型
responseType: 'json'
},
sign: {
appKey: '48e5e13229b82c1b4e6e8c96151f0637',
v: '1.0.0',
format: 'json',
source: ''
},
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b',
cdn: 'https://www.xxx.cn/static'
}
cdn: 'https://www.xxx.cn/static'
}
\ No newline at end of file
module.exports = {
title: 'gh-hall',
request: {
// baseURL: 'http://ghwx.cgacar.com/scrm-wechat' // 生产
baseURL: 'http://cim.chinagrandauto.com/scrm-wechat1111' // 生产
// baseURL: 'http://cim.chinagrandauto.com' // 生产
},
sign: {
app_key: '48e5e13229b82c1b4e6e8c96151f0637',
v: '1.0.0',
format: 'json',
source: ''
}
}
title: 'gh-hall',
request: {
// baseURL: 'http://ghwx.cgacar.com/scrm-wechat' // 生产
baseURL: 'http://cim.chinagrandauto.com/scrm-wechat1111' // 生产
// baseURL: 'http://cim.chinagrandauto.com' // 生产
},
sign: {
app_key: '48e5e13229b82c1b4e6e8c96151f0637',
v: '1.0.0',
format: 'json',
source: 'glsx'
}
}
\ No newline at end of file
......@@ -2,24 +2,19 @@ import Vue from 'vue'
import VueRouter from 'vue-router'
import routes from './routes'
Vue.use(VueRouter)
// 处理重复点击同一个路由报错的问题
// 处理重复点击同一个路由报错的问题
const originalPush = VueRouter.prototype.push
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 = []
if (routesData && name && id) {
for (let i = 0, length = routesData.length; i < length; i += 1) {
const element = routesData[i]
if (element && element.path && element.path.includes(name) && element.meta && element.meta.id && element.meta.id.startsWith(id)) {
const path = element.path.slice(name.length + 1)
element.path = path
element.component = () => import('@/views' + path + '.vue')
routes.push(element)
}
}
}
return routes
function getRoutes(routesData) {
return routesData.reduce((routes, route) => {
routes.push({...route,
component: () =>
import ('@/views' + route.path + '.vue')
})
return routes
}, [])
}
export { VueRouter, routes, getRoutes }
\ No newline at end of file
const staticRoutes = Object.freeze([
{
name: 'Home',
path: '/',
meta: {},
component: resolve => require([`@/views/home/index.vue`], resolve)
},
{
name: 'Ehome',
path: '/ehome',
meta: {},
component: resolve => require([`@/views/ehome/index.vue`], resolve)
},
{
name: 'About',
path: '/about',
component: resolve => require([`@/views/about/index.vue`], resolve),
meta: {}
},
{
name: 'EnterpriseWechat',
path: '/enterpriseWechat',
component: resolve => require([`@/views/enterpriseWechat/index.vue`], resolve),
meta: {}
},
{
name: 'Service',
path: '/service',
component: resolve => require([`@/views/service/index.vue`], resolve),
meta: {}
},
{
name: 'FollowUp',
path: '/followUp',
component: resolve => require([`@/views/followUp/index.vue`], resolve),
meta: {}
}
const staticRoutes = Object.freeze([{
name: 'Home',
path: '/home/index',
meta: {},
component: resolve => require([`@/views/home/index.vue`], resolve)
},
{
name: 'Ehome',
path: '/ehome/index',
meta: {},
component: resolve => require([`@/views/ehome/index.vue`], resolve)
},
{
name: 'About',
path: '/about',
component: resolve => require([`@/views/about/index.vue`], resolve),
meta: {}
},
{
name: 'EnterpriseWechat',
path: '/enterpriseWechat/index',
component: resolve => require([`@/views/enterpriseWechat/index.vue`], resolve),
meta: {}
},
{
name: 'Service',
path: '/service/index',
component: resolve => require([`@/views/service/index.vue`], resolve),
meta: {}
},
{
name: 'FollowUp',
path: '/followUp/index',
component: resolve => require([`@/views/followUp/index.vue`], resolve),
meta: {}
}
])
export default staticRoutes
export default staticRoutes
\ No newline at end of file
......@@ -8,7 +8,7 @@ import { getRoutes } from '@/router'
import render from './render'
Vue.use(ElementUI)
Vue.use(GLTable)
import 'glsx-components/dist/glsx-components.css'
import 'glsx-components/src/theme/theme.scss'
import '@/assets/css/common.scss'
let routes = []
let router = null
......@@ -18,12 +18,13 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
console.log(globalState)
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.$setGlobalState = globalState.actions.setGlobalState
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)
routes = getRoutes({ name, id, routesData })
routes = getRoutes(routesData)
subscribe({ messenger })
}
export async function mount(props) {
......
......@@ -12,16 +12,32 @@ import Vue from 'vue'
import store from '@/store'
import { VueRouter } from '@/router'
const render = (base, routes) => {
const router = new VueRouter({
base,
routes,
mode: 'history'
})
const vm = new Vue({
router,
store,
render: h => h(App)
}).$mount('#app')
return { router, vm }
const router = new VueRouter({
base,
routes,
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({
router,
store,
render: h => h(App)
}).$mount('#app')
return { router, vm }
}
export default render
export default render
\ No newline at end of file
......@@ -15,9 +15,9 @@ import { Http, utils } from 'glsx-common'
import render from './render'
import { routes } from '@/router'
export async function start() {
if (window.__POWERED_BY_QIANKUN__) return
const { response, request, sign, secret } = await fetchConfig()
Vue.prototype.$http = new Http({ response, request, sign, secret, alert: message.error, headers: { token: '1112223333444' } })
Vue.use(GLButton, { permissions: ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
render('/', routes)
}
if (window.__POWERED_BY_QIANKUN__) return
const { response, request, sign, secret } = await fetchConfig()
Vue.prototype.$http = new Http({ response, request, sign, secret, alert: message.error, headers: { token: '1112223333444' } })
Vue.use(GLButton, { permissions: ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
render('/', routes)
}
\ No newline at end of file
import { Message } from 'element-ui'
let util = {}
util.cloneText = function(message) {
let input = document.createElement('input')
input.value = message
document.body.appendChild(input)
input.select()
input.setSelectionRange(0, input.value.length), document.execCommand('Copy')
document.body.removeChild(input)
Message.success('复制成功')
let input = document.createElement('input')
input.value = message
document.body.appendChild(input)
input.select()
input.setSelectionRange(0, input.value.length), document.execCommand('Copy')
document.body.removeChild(input)
Message.success('复制成功')
}
export default util
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
\ No newline at end of file
<template>
<div :id="echartId" class="chart-line"></div>
<div :id="echartId" class="chart-line"></div>
</template>
<script>
......@@ -10,37 +10,54 @@ export default {
props: {
echartId: {
type: String,
default: ''
default: "",
},
echartData: {
type: Array,
}
},
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: {
getChartTotal() {
console.log(this.echartId);
getChartTotal(dateTime,lineData) {
var chartDom = document.getElementById(this.echartId);
var myChart = echarts.init(chartDom);
var option;
option = {
xAxis: {
type: "category",
boundaryGap: false,
data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
data: dateTime,
},
yAxis: {
type: "value",
show: false,
},
grid: {
bottom: 0,
top: 0,
},
series: [
{
data: [1, 932, 901, 934, 1290, 1330, 1320],
data: lineData,
type: "line",
symbol: "none",
color: "#5850FF",
areaStyle: {
color: {
type: "linear",
......@@ -67,17 +84,13 @@ export default {
option && myChart.setOption(option);
},
},
mounted() {
this.getChartTotal();
}
};
</script>
<style scoped lang="scss">
.chart-line {
height: 60px;
height: 60px;
}
.summary-header {
display: flex;
......@@ -125,14 +138,14 @@ export default {
}
}
.expand-more {
margin: 20px 0px;
text-align: center;
height: 56px;
background: rgba(0, 0, 0, 0.02);
border-radius: 0px 0px 2px 2px;
font-size: 14px;
line-height: 56px;
color: #000000;
margin-bottom: 20px;
text-align: center;
height: 56px;
background: rgba(0, 0, 0, 0.02);
border-radius: 0px 0px 2px 2px;
font-size: 14px;
line-height: 56px;
color: #000000;
}
#main-customer {
height: 300px;
......
......@@ -3,67 +3,78 @@
<div class="scrm-box-f summary-ranking-box">
<div class="summary-ranking-title scrm-c3">
<span>门店企微客户数排行</span>
<span>
<el-radio v-model="radioStore" label="1">累计新增</el-radio>
<el-radio v-model="radioStore" label="2">今日新增</el-radio>
<el-radio v-model="radioStore" label="3">累计流失</el-radio>
</span>
<el-radio-group v-model="radioStore" @change="tabRank" size="mini">
<el-radio-button label="1">累计新增</el-radio-button>
<el-radio-button label="2">今日新增</el-radio-button>
<el-radio-button label="3">累计流失</el-radio-button>
</el-radio-group>
</div>
<div class="summary-ranking-th">
<div class="summary-ranking-sno">序号</div>
<div class="summary-ranking-name">名店名称</div>
<div class="summary-ranking-value">总产值</div>
</div>
<div class="chart-empty" v-if="chartStatus">
<div class="chart-empty" v-if="custSortList.length == 0">
<img src="@/assets/img/empty.png" />
<div class="chart-empty-d">暂无数据</div>
</div>
<template v-else>
<div class="summary-ranking-td" v-for="(item, index) in summaryArr" :key="index">
<div
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">
<span class="ranking-sno-circle2" v-if="index > 2">{{ index + 1 }}</span>
<span class="ranking-sno-circle" v-else>{{ index + 1 }}</span>
</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-process-panel">
<div class="summary-progress-bar">
<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">100</div>
<div class="summary-progress-value">{{ item.addEntmicroCount }}</div>
</div>
</div>
</div>
</template>
</div>
</div>
<div class="scrm-box-f summary-ranking-box">
<div class="summary-ranking-title scrm-c3">
<span>各门店产值排行 </span>
<span>
<el-radio v-model="radioOutput" label="1">累计新增</el-radio>
<el-radio v-model="radioOutput" label="2">今日新增</el-radio>
<el-select>
<el-option
v-for="item in monthOptions"
:key="item"
:label="item"
:value="item"
>
</el-option>
</el-select>
</span>
<el-radio-group v-model="radioOutput" size="mini">
<el-radio-button label="1">累计新增</el-radio-button>
<el-radio-button label="2">今日新增</el-radio-button>
</el-radio-group>
</div>
<div class="summary-ranking-th">
<div class="summary-ranking-sno">序号</div>
<div class="summary-ranking-name">名店名称</div>
<div class="summary-ranking-value">总产值</div>
</div>
<div class="chart-empty" v-if="chartStatus">
<div class="chart-empty" v-if="summaryArr.length == 0">
<img src="@/assets/img/empty.png" />
<div class="chart-empty-d">暂无数据</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-sno">
<span class="ranking-sno-circle2" v-if="index > 2">{{ index + 1 }}</span>
......@@ -80,26 +91,68 @@
</div>
</div>
</div>
</template>
</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>
<script>
export default {
name: "summaryRanking",
data() {
return {
dialogVisible: false,
rankHeight: 0,
custSortMax: 0,
chartStatus: false,
radioStore: "1",
radioOutput: "1",
summaryArr: [1, 2, 3, 4, 5, 6, 7, 8],
monthOptions: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
custSortList: [],
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>
<style scoped lang="scss">
.summary-ranking-panel {
......@@ -114,6 +167,7 @@ export default {
padding: 0px 20px;
display: flex;
justify-content: space-between;
align-items: center;
}
.summary-ranking-th {
display: flex;
......@@ -133,6 +187,9 @@ export default {
flex: 1;
}
}
.ranking-td-panel {
overflow-y: auto;
}
.summary-ranking-td {
display: flex;
height: 30px;
......@@ -177,6 +234,7 @@ export default {
display: flex;
align-items: center;
.summary-progress-bar {
position: relative;
height: 10px;
flex: 1;
.summary-progress-barout {
......@@ -217,4 +275,4 @@ export default {
height: 32px;
}
}
</style>
</style>
\ No newline at end of file
......@@ -2,16 +2,6 @@
<div class="scrm-main">
<summary-statistics></summary-statistics>
<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>
</template>
......@@ -26,10 +16,10 @@ export default {
},
data() {
return {
dialogVisible: true,
};
},
};
</script>
</script>
<style scoped lang="scss"></style>
<style scoped lang="scss"></style>
\ No newline at end of file
......@@ -2,7 +2,7 @@
<div class="drawer-sale-panel">
<el-form label-width="150px" :model="addForm">
<div class="scrm-textRight sale-reload">
<el-button slot="append" type="primary" @click="addEmpType"
<el-button slot="append" type="primary" @click="syncEntmicroIsOutsiderStaff"
>同步有外部联系人权限的员工</el-button
>
</div>
......@@ -16,11 +16,12 @@
:disable-transitions="false"
@close="remove(idx)"
>
{{ tag.name }}
{{ tag.staffName }}
</el-tag>
<el-input
v-model.trim="newTag"
placeholder="选择员工"
@input="inputTag"
style="outline: none; border: none"
></el-input>
</div>
......@@ -38,17 +39,32 @@
</el-form-item>
<el-form-item label="请选择跟进员工类型:">
<div class="emp-type">
<div @click="handleType(index)" :class="{'checked': typeIndex == index}" class="emp-type-btn" v-for="(item, index) in empType" :key="index"
>{{ item.name }} <i class="el-icon-error" @click="delEmpType(index)" v-if="!item.status"></i
></div>
<div
@click="handleType(index)"
: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 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
>
</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-button @click="onCancel">取消</el-button>
......@@ -62,17 +78,19 @@
import selectEmp from "./selectEmp";
export default {
name: "addSale",
components: {
selectEmp,
},
data() {
return {
addForm: {},
typeIndex: 0,
empType: [
{ name: "新车跟进专员",status: 1},
{ name: "售后跟进专员",status: 1},
{ name: "sdfsdfsd"},
{ name: "新车跟进专员", status: 1 },
{ name: "售后跟进专员", status: 1 },
{ name: "sdfsdfsd" },
],
empTypeValue: "",
newTag: "",
......@@ -80,7 +98,15 @@ export default {
dialog_temp: {},
};
},
methods: {
listEntFollowerType() {
this.$apis.emp
.listEntFollowerType({ merchantId: this.$globalState.session.merchantId })
.then((res) => {
this.empType = res;
});
},
handleType(index) {
this.typeIndex = index;
},
......@@ -91,53 +117,12 @@ export default {
this.$el.querySelector(".tag-input").focus();
}
},
// handleSelect是自己实现的方法
handleSelect(item) {
let addSuucess = false;
if (this.addTag(this.newTag.trim())) {
addSuucess = true;
}
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;
inputTag() {
this.ms = 1000;
clearTimeout(this.timeID);
this.timeID = setTimeout(() => {
this.$refs.selectEmpTabel.listEntmicroStaff(this.newTag);
}, this.ms);
},
remove(index) {
this.innerTags.splice(index, 1);
......@@ -145,34 +130,68 @@ export default {
},
//添加员工
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();
},
reloadTags() {
const arr = [];
this.innerTags.forEach(item=>{
arr.push(item.id)
})
this.$refs.selectEmpTabel.clearSelect(arr)
this.innerTags.forEach((item) => {
arr.push(item.id);
});
this.$refs.selectEmpTabel.clearSelect(arr);
},
addEmpType() {
if(!this.empTypeValue) {
this.$message.error('请输入类型名称');
return;
if (!this.empTypeValue) {
this.$message.error("请输入类型名称");
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 = "";
},
delEmpType(index) {
this.empType.splice(index, 1);
delEmpType(item) {
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() {
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() {
this.$emit("closeDrawer");
},
},
mounted() {
this.listEntFollowerType();
},
};
</script>
......@@ -190,10 +209,10 @@ export default {
}
.sale-type-desc {
font-size: 14px;
font-weight: 400;
color: #ADADAD;
line-height: 17px;
margin-top: 10px;
font-weight: 400;
color: #adadad;
line-height: 17px;
margin-top: 10px;
}
}
.emp-type {
......@@ -205,16 +224,16 @@ margin-top: 10px;
margin-bottom: 10px;
margin-right: 10px;
position: relative;
background: #FFFFFF;
border-radius: 4px;
border: 1px solid #E8E8EA;
line-height: 1;
font-size: 14px;
color: #7D7D7D;
&.checked {
border: 1px solid #5850FF;
color: #5850FF;
}
background: #ffffff;
border-radius: 4px;
border: 1px solid #e8e8ea;
line-height: 1;
font-size: 14px;
color: #7d7d7d;
&.checked {
border: 1px solid #5850ff;
color: #5850ff;
}
i {
position: absolute;
right: -6px;
......@@ -239,13 +258,13 @@ color: #7D7D7D;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 100%;
display: flex;
align-items: center;
/deep/ input {
/* input { */
/* background-color: red!important; 调试用的样式 */
outline: none !important;
border: none !important;
}
align-items: center;
/deep/ input {
/* input { */
/* background-color: red!important; 调试用的样式 */
outline: none !important;
border: none !important;
}
}
.el-tag {
......
<template>
<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="tree-title">所在门店/部门</div>
<el-tree
:data="data"
:data="listTree"
:expand-on-click-node="false"
highlight-current
:props="defaultProps"
......@@ -12,15 +14,14 @@
></el-tree>
</div>
<el-col class="scrm-p10 emp-table-panel">
<glsx-table
<GLTable
ref="saleTable"
:layout="layout"
:tableData="tableData"
:tableTotal="tableTotal"
:tableData="tableEmpData"
:tableParams="tableParams"
:hasNum="false"
:hasPage="false"
>
</glsx-table>
</GLTable>
</el-col>
</div>
</template>
......@@ -28,47 +29,15 @@
<script>
export default {
name: "selectEmp",
data() {
return {
data: [
{
label: "一级 1",
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",
},
],
},
],
},
],
treeHeight: 0,
staffName: "",
listTree: [],
defaultProps: {
children: "children",
label: "label",
label: "departmentName",
},
// 表格参数
tableParams: {
......@@ -83,34 +52,52 @@ export default {
tableColumns: [
{
label: "姓名",
prop: "name",
prop: "staffName",
},
{
label: "职务",
prop: "部门",
prop: "departmentName",
},
],
},
layout: "sizes, prev, pager, next, jumper, ->, total",
tableData: [
{ name: 1, id: 1 },
{ name: 2, id: 2 },
{ name: 3, id: 3 },
],
tableTotal: 0,
tableEmpData: [],
};
},
methods: {
listDepartmentTree() {
this.$apis.emp.listDepartmentTree({ id: 1 }).then((res) => {
this.listTree = res;
});
},
clearSelect(arr) {
this.tableParams.checkSelectVal = arr;
this.$refs.saleTable.$refs.salelistMutiTable.clearSelection();
},
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>
<style scoped lang="scss">
.select-emp-panel {
......@@ -119,9 +106,9 @@ export default {
margin-top: 10px;
width: 200px;
position: relative;
background: #FFFFFF;
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.06);
border: 1px solid #E4E7ED;
background: #ffffff;
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.06);
border: 1px solid #e4e7ed;
.popper-arrow {
border-top-width: 0;
border-width: 6px;
......@@ -133,7 +120,7 @@ border: 1px solid #E4E7ED;
height: 0;
border-color: transparent;
border-style: solid;
border-bottom-color: #E4E7ED;
border-bottom-color: #e4e7ed;
&:after {
content: " ";
border-width: 6px;
......@@ -153,9 +140,9 @@ border: 1px solid #E4E7ED;
.emp-table-panel {
flex: 1;
margin-top: 10px;
background: #FFFFFF;
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.06);
border: 1px solid #E4E7ED;
background: #ffffff;
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.06);
border: 1px solid #e4e7ed;
}
.emp-tree-panel {
margin-right: 10px;
......@@ -173,4 +160,4 @@ border: 1px solid #E4E7ED;
padding: 10px;
}
}
</style>
</style>
\ No newline at end of file
......@@ -9,24 +9,33 @@
<div class="follow-form">
<el-form :inline="true" :model="searchForm" class="follow-form-item">
<el-form-item label="跟进专员类型">
<el-select v-model="searchForm.type" placeholder="请选择">
<el-select
size="small"
v-model="searchForm.followerTypeId"
placeholder="请选择"
>
<el-option
v-for="item in optionsType"
:key="item.value"
:label="item.label"
:value="item.value"
:key="item.id"
:label="item.followName"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<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-button type="primary" @click="handleSearch">查询</el-button>
<el-button type="primary" @click="handleSearch" size="small">查询</el-button>
</el-form-item>
<el-form-item class="follow-form-jump">
<el-button
size="small"
icon="el-icon-plus"
type="primary"
@click="drawer = true"
......@@ -40,8 +49,9 @@
:layout="layout"
:tableData="tableData"
:tableTotal="tableTotal"
:pageConf="pageConf"
:tableParams="tableParams"
:beforeSearchFn="beforeSearchFn"
@refreshTable="handleSearch"
>
<template slot="auth-button" slot-scope="scope" :data="scope.scope">
<el-button type="text" @click="handleDele(scope.scope)">删除</el-button>
......@@ -74,8 +84,8 @@ export default {
drawer: false,
direction: "rtl",
searchForm: {
type: "",
name: "",
followerTypeId: "",
staffName: "",
},
optionsType: [
{
......@@ -94,6 +104,7 @@ export default {
scope: {
scope: "",
},
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "total" },
// 表格参数
tableParams: {
tableOption: true,
......@@ -102,27 +113,33 @@ export default {
tableColumns: [
{
label: "姓名",
prop: "name",
prop: "staffName",
},
{
label: "一级订单",
prop: "部门",
label: "部门",
prop: "departmentName",
},
{
label: "跟进专员类型",
prop: "部门",
prop: "followerTypeName",
},
{
label: "手机号",
prop: "部门",
prop: "staffPhone",
},
{
label: "首次开通时间",
prop: "部门",
prop: "followerCreatedTime",
},
{
label: "是否有外部联系人权限",
prop: "部门",
prop: "isAddOutsider",
formatter: (cellValue) => {
return {
0: "是",
1: "否",
}[cellValue.isAddOutsider];
},
},
],
},
......@@ -145,16 +162,67 @@ export default {
closeDrawer() {
this.handleClose();
},
handSelectdEmp() {
this.handleClose();
handSelectdEmp(followerTypeId, userIds) {
var params = {
followerTypeId,
userIds,
};
this.$apis.emp.saveFollowerStaff(params).then((res) => {
if (res) {
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() {
this.$refs.table.setTableHeightFun();
console.log(this.$apis.emp.getEmpList())
this.listEntFollowerType();
this.handleSearch();
},
};
</script>
......
<template>
<div class="chart-home-panel scrm-box-f">
<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 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>
</template>
<script>
import outputEchart from "./output-echart";
import sameAddEchart from "./same-add-echart";
export default {
name: "customerEchart",
components: {
outputEchart,
sameAddEchart,
},
data() {
return {
permissions: [1211],
......@@ -38,10 +58,63 @@ export default {
.chart-home-left {
width: 50%;
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 {
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>
......@@ -3,10 +3,10 @@
<div class="info-border">
<div class="info-title">企业信息 <span>门店</span></div>
<div class="info-content">
<p>所属企业:</p>
<p>所属门店:</p>
<p>关联企微:</p>
<p>企微成员:</p>
<p>所属企业:- -</p>
<p>所属门店:- -</p>
<p>关联企微:- -</p>
<p>企微成员:- -</p>
</div>
</div>
<div class="info-border consult-box">
......@@ -15,7 +15,7 @@
<div class="info-content">
<div class="info-qrcode">
<div class="info-qrcode-image">
<img src="@/assets/img/home/logo.png" alt="" />
<img src="@/assets/img/qrcode.png" alt="" />
</div>
<div class="info-qrcode-desc">扫码添加您的专属顾问</div>
</div>
......
<template>
<div class="marketing-tools scrm-box-f">
<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>
</div>
......@@ -21,12 +24,14 @@ export default {
},
{
name: "群发助手",
status: 1,
},
{
name: "企业素材库",
},
{
name: "权益裂变",
status: 1,
},
{
name: "优惠券营销",
......@@ -41,7 +46,7 @@ export default {
},
},
};
</script>
</script>
<style lang="scss" scoped>
.marketing-tools {
......@@ -52,7 +57,17 @@ export default {
margin: 0 auto;
text-align: center;
.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;
height: 50px;
margin: 4px auto;
......@@ -68,4 +83,4 @@ export default {
}
}
}
</style>
\ No newline at end of file
</style>
......@@ -15,7 +15,7 @@
<img src="@/assets/img/question.png" slot="reference">
</el-popover>
</div>
<div class="view-title-num">10,000人</div>
<div class="view-title-num">{{customerCount}}人</div>
</div>
<div class="view-num-panel">
<div class="view-num-y">
......@@ -25,7 +25,7 @@
alt=""
/>
<div class="view-customer-desc">企微客户数</div>
<div class="view-customer-num">10,000人</div>
<div class="view-customer-num">{{addEntmicroCount}}人</div>
</div>
<div class="view-num-n">
<img
......@@ -34,11 +34,11 @@
alt=""
/>
<div class="view-customer-desc">未加企微客户数</div>
<div class="view-customer-num">10,000人</div>
<div class="view-customer-num">{{notAddEntmicroCount}}人</div>
</div>
</div>
<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">
<el-button type="primary" size="small">立即召回</el-button>
</div>
......@@ -46,15 +46,15 @@
</div>
<div class="view-prise-r">
<div class="view-prise-h">
<div class="view-h-title">当日新增客户数<span>700人</span></div>
<div class="view-h-desc">当日新增企微客户数:60人</div>
<div class="view-h-title">当日新增客户数<span>{{newCustomerCount}}人</span></div>
<div class="view-h-desc">当日新增企微客户数:{{addEntmicroCount}}人</div>
</div>
<div class="view-prise-h">
<div class="view-h-title">当日新增群客户数<span>700人</span></div>
<div class="view-h-desc">群客户总数:110人</div>
<div class="view-h-title">当日新增群客户数<span>{{todayAddPackmenberCount}}人</span></div>
<div class="view-h-desc">群客户总数:{{packmenberCount}}人</div>
</div>
<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>
......@@ -64,17 +64,48 @@
<script>
export default {
name: "overviewEnterprise",
data() {
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: {
test() {
console.log("点击了按钮");
this.$messenger.send({ from: 11, message: "11111" });
getViewData() {
this.$apis.home.getStore({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;
});
},
},
mounted() {
this.getViewData();
}
};
</script>
......@@ -92,6 +123,9 @@ export default {
font-weight: 600;
color: #333333;
line-height: 18px;
.view-title-desc {
display: flex;
}
img {
width: 14px;
height: 14px;
......@@ -107,6 +141,7 @@ export default {
width: 50px;
height: 50px;
margin-bottom: 30px;
display: inline-block;
}
.view-num-y {
width: 25%;
......
<template>
<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="header-panel">
<img
......@@ -8,9 +8,23 @@
src="@/assets/img/home/home-header.png"
alt=""
/>
<div class="jump-mf-btn">立即使用</div>
</div>
<div class="home-statistics-title">企业数据概览</div>
<overview-enterprise></overview-enterprise>
<div class="summary-panel">
<div class="home-statistics-title">企业数据概览</div>
<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>
<div class="home-overview-content"></div>
<div class="home-statistics-title">精准营销</div>
......@@ -32,8 +46,8 @@
@click="handleNext(1)"
class="guide-btn"
:style="{
left: guideLeft + guideWidth / 2 + imgWidth / 2 - 40 + 'px',
top: guideTop + guideHeight + imgHeight - 20 + 'px',
left: guideLeft + guideWidth / 2 + imgWidth / 2 - 40 - borderLeft + 'px',
top: guideTop + guideHeight + imgHeight + 50 - borderTop + 'px',
}"
>
我知道了
......@@ -43,8 +57,8 @@
@click="handleNext(2)"
class="guide-btn"
:style="{
right: guideRight + guideWidth + imgWidth / 2 - 40 + 'px',
top: guideTop + imgHeight - 40 + 'px',
left: guideLeft - imgWidth / 2 - borderLeft + 'px',
top: guideTop + imgHeight - 30 + 'px',
}"
>
我知道了
......@@ -54,8 +68,8 @@
@click="handleNext(3)"
class="guide-btn"
:style="{
left: guideLeft + guideWidth / 4 + imgWidth / 2 - 100 + 'px',
top: guideTop - guideWidth / 4+imgHeight - 80 + 'px',
left: guideLeft + guideWidth / 4 + imgWidth / 2 - 100 - borderLeft + 'px',
top: guideTop - guideWidth / 4 + imgHeight - 50 - borderTop + 'px',
}"
>
我知道了
......@@ -68,8 +82,8 @@
:style="{
width: imgWidth + 'px',
height: imgHeight + 'px',
left: guideLeft + guideWidth / 2 + 'px',
top: guideTop + guideHeight + 20 + 'px',
left: guideLeft + guideWidth / 2 - borderLeft + 'px',
top: guideTop + guideHeight + 20 - borderTop + 'px',
}"
/>
<img
......@@ -81,8 +95,8 @@
:style="{
width: imgWidth + 'px',
height: imgHeight + 'px',
right: guideRight + guideWidth + 'px',
top: guideTop + 'px',
left: guideLeft - imgWidth - borderLeft + 'px',
top: guideTop - borderTop + 'px',
}"
/>
<img
......@@ -93,8 +107,8 @@
alt=""
:style="{
width: guideWidth / 1.5 + 'px',
left: guideLeft + guideWidth / 4+ 'px',
top: guideTop - guideWidth / 4 + 'px',
left: guideLeft + guideWidth / 4 - borderLeft + 'px',
top: guideTop - guideWidth / 4 - borderTop + 'px',
}"
/>
......@@ -114,7 +128,7 @@
:style="{
width: guideWidth + 'px',
height: guideHeight + 'px',
right: guideRight + 'px',
left: guideLeft + 'px',
top: guideTop + 'px',
}"
></div>
......@@ -133,6 +147,7 @@
</template>
<script>
import util from "@/utils/util";
import overviewEnterprise from "./components/overview-enterprise";
import customerEchart from "./components/customer-echart";
import marketingTools from "./components/marketing-tools";
......@@ -144,8 +159,8 @@ export default {
components: {
overviewEnterprise,
customerEchart,
operationalServices,
customerEchart,
marketingTools,
enterpriseInformation,
accurateMarketing,
......@@ -153,7 +168,8 @@ export default {
data() {
return {
guideStatus: true,
summaryTime: util.getBeforeDate(),
guideStatus: false,
step: 1,
guideWidth: "",
guideHeight: "",
......@@ -177,32 +193,40 @@ export default {
}
},
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) {
this.guideWidth = document.querySelector(".header-panel").offsetWidth;
this.guideHeight = document.querySelector(".header-panel").offsetHeight;
this.imgWidth = this.guideWidth / 2;
this.imgHeight = (this.imgWidth * 342) / 541;
this.guideLeft = document.querySelector(".header-panel").offsetLeft;
this.guideTop = document.querySelector(".header-panel").offsetTop;
this.imgHeight = (this.imgWidth * 246) / 541;
this.guideLeft =
document.querySelector(".header-panel").offsetLeft + this.borderLeft;
this.guideTop =
document.querySelector(".header-panel").offsetTop + this.borderTop;
} else if (this.step == 2) {
this.guideWidth = document.querySelector(".consult-box").offsetWidth;
this.guideHeight = document.querySelector(".consult-box").offsetHeight;
this.imgHeight = this.guideHeight;
this.imgWidth = (this.imgHeight * 614) / 285;
this.guideRight =
document.body.clientWidth -
document.querySelector(".consult-box").offsetLeft -
document.querySelector(".consult-box").offsetWidth;
this.guideTop = document.querySelector(".consult-box").offsetTop;
this.imgWidth = (this.imgHeight * 614) / 222;
this.guideLeft =
document.querySelector(".consult-box").offsetLeft + this.borderLeft;
this.guideTop = document.querySelector(".consult-box").offsetTop + this.borderTop;
} else {
this.guideLeft = document.querySelector(".operational-panel-s").offsetLeft;
this.guideTop = document.querySelector(".operational-panel-s").offsetTop;
document.documentElement.scrollTop = document.body.scrollHeight - 100;
let top = document.querySelector(".accurate-sercives").offsetTop + 100;
this.guideLeft =
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.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.imgHeight = (this.imgWidth * 229) / 668;
this.imgHeight = (this.imgWidth * 222) / 668;
}
},
},
......@@ -214,26 +238,45 @@ export default {
});
},
};
</script>
</script>
<style lang="scss" scoped>
.header-panel {
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 {
width: 100%;
height: 170px;
height: 140px;
}
}
.main-isScroll2 {
position: absolute;
overflow: hidden;
overflow-y: hidden;
width: 100%;
height: 100%;
}
.main-panel {
display: flex;
}
.summary-panel {
display: flex;
justify-content: space-between;
align-items: center;
}
.home-statistics-title {
font-size: 20px;
font-weight: 500;
......@@ -283,7 +326,7 @@ export default {
height: 100%;
}
.guide-box-highlight {
position: absolute;
position: fixed;
outline: 5000px solid rgba(0, 0, 0, 0.75);
border: 2px solid #ffffff;
border-radius: 4px;
......@@ -293,7 +336,6 @@ export default {
}
.guide-step-1 {
z-index: 999;
height: auto;
position: absolute;
top: 10px;
......@@ -312,4 +354,4 @@ export default {
position: absolute;
}
}
</style>
\ No newline at end of file
</style>
......@@ -10,7 +10,9 @@
<el-button type="primary" size="small">化流量为销量</el-button>
</div>
</div>
<div class="service-active-r"></div>
<div class="service-active-r">
<img src="@/assets/img/service/s1.png" />
</div>
</div>
<hr />
</div>
......@@ -27,11 +29,18 @@
我们不仅提供管理工具,我们更有方法论与策略 。
</div>
</div>
<div class="service-content-r"></div>
<div class="service-content-r">
<img src="@/assets/img/service/s2.png" />
</div>
</div>
<div class="service-content-cause">
<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>
</div>
......@@ -70,29 +79,8 @@
您也可在线申请,我们会24小时内安排工作人员主动跟您联系!
</div>
<div class="service-form">
<el-form ref="form" :model="form" label-width="150px">
<el-row>
<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 class="sevice-qrcode">
<img src="@/assets/img/qrcode.png" alt="" />
</div>
</div>
</div>
......@@ -104,10 +92,10 @@
const cause = [
{ name: "活码引流" },
{ name: "批量加好友" },
{ name: "群发助手" },
{ name: "群发助手",status: 1 },
{ name: "企业素材库" },
{ name: "权益裂变" },
{ name: "会员中心" },
{ name: "会员中心",status: 1 },
{ name: "分销裂变" },
{ name: "优惠券营销" },
];
......@@ -124,13 +112,13 @@ export default {
};
},
};
</script>
</script>
<style scoped lang="scss">
.service-panel {
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 68px;
padding: 0px 68px;
width: 100%;
box-sizing: border-box;
}
......@@ -138,13 +126,16 @@ export default {
.service-active-wrap {
display: flex;
.service-active-l {
flex: 1;
width: 50%;
margin-top: 100px;
}
.service-active-r {
width: 380px;
height: 200px;
border: 1px solid #f2f2f2;
margin: 0px 135px;
width: 50%;
margin: 0px auto;
img {
width: 465px;
height: auto;
}
}
}
.service-active-h1 {
......@@ -164,20 +155,23 @@ export default {
}
hr {
margin: 60px 0px;
border: 2px solid #e8e8ea;
}
}
.service-content {
.service-content-wrap {
display: flex;
.service-content-l {
flex: 1;
width: 50%;
}
.service-content-r {
width: 380px;
height: 200px;
border: 1px solid #f2f2f2;
margin: 0px 135px;
width: 50%;
margin: 0 auto;
text-align: center;
img {
display: line-block;
width: 398px;
height: auto;
}
}
.service-content-desc {
margin-top: 15px;
......@@ -201,7 +195,7 @@ export default {
font-weight: 600;
color: #333333;
line-height: 25px;
margin: 30px 0px;
margin-top: 130px;
}
}
.service-content-cause {
......@@ -212,6 +206,16 @@ export default {
.service-cause-border {
text-align: center;
.cause-icon {
position: relative;
width: 76px;
text-align: center;
.hot img {
position: absolute;
right: -10px;
top: 0px;
width: 28px;
height: auto;
}
img {
width: 50px;
height: 50px;
......@@ -230,7 +234,6 @@ export default {
}
hr {
margin: 60px 0px;
border: 2px solid #e8e8ea;
}
}
......@@ -256,6 +259,7 @@ export default {
color: #979797;
margin-bottom: 20px;
th {
vertical-align: middle;
color: #ffffff;
border-width: 1px;
border-left-width: 0px;
......@@ -277,13 +281,11 @@ export default {
}
hr {
margin: 60px 0px;
border: 2px solid #e8e8ea;
}
}
.service-contact {
hr {
margin: 40px 0px;
border: 2px solid #e8e8ea;
}
}
.service-contact-h {
......@@ -308,7 +310,12 @@ export default {
margin-top: 50px;
}
.service-form {
margin-top: 60px;
margin-top: 30px;
.sevice-qrcode {
margin-left: 100px;
width: 200px;
height: 200px;
}
.service-form-btn {
margin-left: 150px;
/deep/ .el-button--small {
......@@ -316,4 +323,4 @@ export default {
}
}
}
</style>
\ No newline at end of file
</style>
......@@ -170,6 +170,13 @@ $dackColor: #4f48e6;
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 {
background-color: $defaultColor;
width: 10px;
......
const path = require('path')
const packageName = require('./package.json').name
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 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 = {
outputDir: `../dist/${packageName}`,
publicPath: node_env ? baseUrl : '/',
assetsDir: 'static',
configureWebpack: {
resolve: {
alias: {
'@': resolve('src'),
assets: resolve('src/assets'),
views: resolve('src/views'),
components: resolve('src/components')
}
outputDir: `../dist/${packageName}`,
publicPath: node_env ? baseUrl : '/',
assetsDir: 'static',
configureWebpack: {
resolve: {
alias: {
'@': resolve('src'),
assets: resolve('src/assets'),
views: resolve('src/views'),
components: resolve('src/components')
}
},
output: {
library: `${packageName}-[name]`,
libraryTarget: 'umd', // 把微应用打包成 umd 库格式
jsonpFunction: `webpackJsonp_${packageName}`
},
externals: {
'vue': 'Vue',
'element-ui': 'ELEMENT',
'vue-router': 'VueRouter',
'vuex': 'Vuex',
'axios': 'axios',
'echarts': 'echarts'
}
},
output: {
library: `${packageName}-[name]`,
libraryTarget: 'umd', // 把微应用打包成 umd 库格式
jsonpFunction: `webpackJsonp_${packageName}`
}
},
devServer: {
hot: true,
disableHostCheck: true,
host: process.env.VUE_APP_HOST,
port: process.env.VUE_APP_PORT,
headers: {
'Access-Control-Allow-Origin': '*' // 主应用获取子应用时跨域响应头
}
},
chainWebpack: config => {
config.plugins.delete('preload') // TODO: need test
config.plugins.delete('prefetch') // TODO: need test
config.module
.rule('fonts')
.test(/.(ttf|otf|eot|woff|woff2)$/)
.use('url-loader')
.loader('url-loader')
.tap(options => {
options = {
// limit: 10000,
name: '/static/fonts/[name].[ext]'
devServer: {
hot: true,
disableHostCheck: true,
host: process.env.VUE_APP_HOST,
port: process.env.VUE_APP_PORT,
headers: {
'Access-Control-Allow-Origin': '*' // 主应用获取子应用时跨域响应头
}
return options
})
.end()
}
}
},
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('prefetch') // TODO: need test
config.module
.rule('fonts')
.test(/.(ttf|otf|eot|woff|woff2)$/)
.use('url-loader')
.loader('url-loader')
.tap(options => {
options = {
// limit: 10000,
name: '/static/fonts/[name].[ext]'
}
return options
})
.end()
}
}
\ 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!