Commit d94870db by ym

init

0 parents
Showing 93 changed files with 4552 additions and 0 deletions
NODE_ENV='development'
# must start with VUE_APP_
VUE_APP_ENV = 'development'
VUE_APP_PORT = 6654
NODE_ENV='production'
# must start with VUE_APP_
VUE_APP_ENV = 'production'
\ No newline at end of file
{
"root": true,
"env": {
"node": true
},
"extends": ["plugin:vue/essential", "@vue/prettier"],
"rules": {
"no-console": "off",
"no-unused-vars":"off",
"prettier.endOfLine": "crlf",
"endOfLine":"auto"
},
"parserOptions": {
"parser": "babel-eslint"
}
}
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
{
"printWidth": 800,
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "none",
"semi": false,
"wrap_line_length": 820,
"wrap_attributes": "auto",
"proseWrap": "always",
"arrowParens": "avoid",
"bracketSpacing": true,
"htmlWhitespaceSensitivity": "ignore",
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
"jsxBracketSameLine": true,
"files.insertFinalNewline": true,
"useTabs": false,
"eslintIntegration": true,
"overrides": [
{
"files": ".prettierrc",
"options": {
"parser": "json"
}
}
],
"endOfLine": "auto"
}
# subapp-blog
微前端博客子应用
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
module.exports = {
presets: ["@vue/cli-plugin-babel/preset"]
};
\ No newline at end of file
This diff could not be displayed because it is too large.
{
"name": "drainage",
"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",
"el-tree-transfer": "^2.2.6",
"glsx-common": "^1.4.6",
"glsx-components": "^1.1.1",
"glsx-table": "^1.0.9",
"vue-draggable-resizable": "^2.3.0"
},
"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",
"autoprefixer": "^8.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",
"postcss-loader": "^6.2.0",
"prettier": "^1.19.1",
"sass-loader": "^8.0.0",
"vue-cli-plugin-element": "^1.0.1",
"vue-template-compiler": "^2.6.10"
},
"browserslist": [
"> 1%",
"last 3 versions",
"not ie <= 8",
"chrome >= 14",
"safari >= 3"
]
}
module.exports = {
plugins: {
autoprefixer: {}
}
}
\ No newline at end of file
No preview for this file type
<!DOCTYPE html>
<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">
<meta name="referrer" content="no-referrer">
<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>
<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 -->
<% 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
var express = require('express')
// var history = require('connect-history-api-fallback')
var cors = require('cors')
var app = express()
// app.use(history())
app.use(cors())
app.use(express.static('./dist'))
app.get('/', function(req, res) {
res.send('Hello jq')
})
const port = 6654
app.listen(port)
console.log(`服务已运行:\r\n http://127.0.0.1:${port}`)
\ No newline at end of file
<template>
<div id="app">
<router-view />
</div>
</template>
<script>
export default {
name: 'report-app',
props: {
msg: String,
message: String
},
data() {
return {
myMsg: '',
gs: ''
}
},
created() {
this.myMsg = this.msg
this.myMessage = this.message
}
}
</script>
<style lang="scss">
.parent-child-communication {
padding: 20px 0;
line-height: 36px;
}
#app {
background: #F4F5FA;
padding: 0px 20px 20px 40px;
position: absolute;
box-sizing: border-box;
width: 100%;
top: 0px;
left: 0px;
overflow-y: auto;
height: 100%;
}
</style>
\ No newline at end of file
/*
所有模块都定义在 modules
|-modules
|----demo.js
|----demo1.js
|----...
|-index.js ---动态对外暴露所有模块 无须手动添加
参考demo.js 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
*/
const modulesFiles = require.context('./modules', true, /\.js$/)
const modules = modulesFiles.keys().reduce((modules, modulePath) => {
const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1')
const value = modulesFiles(modulePath)
modules[moduleName] = value.default
return modules
}, {})
export default modules
/**
* 新增参数sign 判断接口是否需要sign签名
*/
/**
* 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
* @param {*} params
* @returns
*/
import { http } from '@/main'
const getListApi = params => {
params.method = 'cn.com.glsx.entmicro.staff.listFollowerStaffByPage'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
getListApi,
}
\ No newline at end of file
/**
* 新增参数sign 判断接口是否需要sign签名
*/
/**
* 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
* @param {*} params
* @returns
*/
import { http } from '@/main'
const pictureUpload = params => {
params.method = "glsx.accounts.biz.common.pictureUpload"
return http({
url: '/router?method=glsx.accounts.biz.common.pictureUpload',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file']
})
}
export default {
pictureUpload
}
\ No newline at end of file
img {
width: 100%;
height: 100%;
vertical-align: top;
}
.text-hide {
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;
}
.scrm-textRight {
position: relative;
text-align: right;
}
.scrm-textCenter {
text-align: center;
}
.scrm-c3 {
color: #333333;
}
.scrm-f12 {
font-size: 12px;
}
.scrm-f13 {
font-size: 13px;
}
.scrm-f14 {
font-size: 14px;
}
.scrm-f15 {
font-size: 15px;
}
.scrm-f16 {
font-size: 16px;
}
.scrm-f18 {
font-size: 18px;
}
.scrm-f20 {
font-size: 20px;
}
.scrm-f22 {
font-size: 22px;
}
.scrm-f24 {
font-size: 24px;
}
.scrm-m10 {
margin: 10px;
}
.scrm-m20 {
margin: 20px;
}
.scrm-ml10 {
margin-left: 10px;
}
.scrm-ml20 {
margin-left: 20px;
}
.scrm-mr10 {
margin-right: 10px;
}
.scrm-mr20 {
margin-right: 20px;
}
.scrm-p10 {
padding: 10px;
}
.scrm-p20 {
padding: 20px;
}
.scrm-box-f {
background: #FFFFFF;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.10);
}
.scrm-flex {
display: flex;
}
::-webkit-scrollbar {
/*滚动条整体样式*/
width: 6px;
height: 4px;
}
::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/
border-radius: 4px;
background-color: rgba(144, 147, 153, .3);
}
.glsx-table .line-ellipsis {
display: inline;
}
\ No newline at end of file
.left {
float: left;
}
.right {
float: right;
}
.align-right {
text-align: right;
}
.left{float:left}.right{float:right}.align-right{text-align:right}
.left {
float: left;
}
.right {
float: right;
}
.align-right {
text-align: right;
}
/**
* 根据路由匹配地址
* @param {*} data 路由数据
* @param {*} base 路由前缀
* @param {*} options 粗略的配置项
*/
function routeMatch(data, base, options = { url: 'url', name: 'name', id: 'id', permissions: 'permissions' }) {
if (!Array.isArray(data)) return []
// 主视图路由 正式项目需要区分登陆注册等
/* let userRouter = {
path: "/layout",
name: "layout",
component: () => import('@/views/layout/index.vue'),
redirect: '/index',
children: []
}; */
// 创建路由盒子
let routerBox = []
// 将菜单数据处理为一维函数 如果有多级菜单
// let menu = flattenDeep(data, 'children');
let menu = data
// 遍历处理路由
menu.forEach(item => {
if (!item[options.url]) return
let _url = item[options.url].replace(base, '')
try {
let routerItem = {
path: _url, // 路由路径名
name: item[options.name] || item[options.id], // 命名路由 用于配合菜单简洁跳转
meta: {
purview: item[options.permissions]
}, // 路由元信息 定义路由时即可携带的参数,可用来管理每个路由的按钮操作权限
component: () => import(`@/views${_url}/index.vue`) // 路由映射真实视图路径
}
routerBox.push(routerItem)
} catch (err) {
item[options.url] = '/err-404'
}
})
// 推入需要授权后等异步加载的,非服务端获取的功能性页面
// routerBox.push(...nextRouter);
let errorBox = {
path: '*',
redirect: '/err-404'
}
routerBox.push(errorBox)
return routerBox
}
export default routeMatch
/**
* type : primary,success,default,error,danger
* size: 按钮大小,参照elementui
* id: 权限判断id
* mode:按钮类型 是a标签还是button,可选值为:button、link
*/
import { Button, Link } from 'element-ui'
// 权限校验
function judgePermissions(options) {
if (!options) {
return false
}
let _list = options.parent.permissions || []
let _o = options.props
let idx = _list.findIndex(k => k == _o.id)
// 如果没有权限,则返回空标签
if (idx < 0) {
return ''
}
if (_o.mode == 'link') {
return 'a'
}
return 'button'
}
// 获取class
function getClass(context) {
let o = context.props
let _class = []
_class.push('el-' + o.mode)
_class.push('el-' + o.mode + '--' + o.type)
if (o.size) {
_class.push('el-' + o.mode + '--' + o.size)
}
if (o.class) {
_class.push(o.class)
}
return _class
}
export default {
functional: true,
props: {
type: {
type: String,
default: 'default'
},
size: {
type: String,
default: 'medium'
},
id: {
type: [String, Number]
},
mode: {
type: String,
default: 'button'
},
class: {
type: String,
default: ''
}
},
render: function(createElement, context) {
let _props = context.props
let options = {
props: _props,
attrs: context.props,
class: getClass(context),
on: {
click: event => {
context.listeners.click('click', event)
}
}
}
return createElement(judgePermissions(context), options, context.children)
}
}
/*
* @Descripttion:
* @version: 1.0.0
* @Author: limin
* @Date: 2021-09-06 10:10:44
* @LastEditors: limin
* @LastEditTime: 2021-09-06 10:11:49
* @FilePath: \scrm\scrm-sub-blog\src\components\index.js
*/
import Vue from 'vue'
// 导入权限按钮
import _button from '@/components/glsx-button/index'
import glsxTable from '@/components/glsx-table/index.vue'
Vue.component('glsx-button', _button)
// Vue.component('glsx-table', glsxTable)
\ No newline at end of file
.vdr {
touch-action: none;
position: absolute;
box-sizing: border-box;
border: 1px dashed black;
}
.handle {
box-sizing: border-box;
position: absolute;
width: 10px;
height: 10px;
background: #EEE;
border: 1px solid #333;
}
.handle-tl {
top: -10px;
left: -10px;
cursor: nw-resize;
}
.handle-tm {
top: -10px;
left: 50%;
margin-left: -5px;
cursor: n-resize;
}
.handle-tr {
top: -10px;
right: -10px;
cursor: ne-resize;
}
.handle-ml {
top: 50%;
margin-top: -5px;
left: -10px;
cursor: w-resize;
}
.handle-mr {
top: 50%;
margin-top: -5px;
right: -10px;
cursor: e-resize;
}
.handle-bl {
bottom: -10px;
left: -10px;
cursor: sw-resize;
}
.handle-bm {
bottom: -10px;
left: 50%;
margin-left: -5px;
cursor: s-resize;
}
.handle-br {
bottom: -10px;
right: -10px;
cursor: se-resize;
}
@media only screen and (max-width: 768px) {
[class*="handle-"]:before {
content: '';
left: -10px;
right: -10px;
bottom: -10px;
top: -10px;
position: absolute;
}
}
/*
* @Descripttion:
* @version:
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: limin
* @LastEditTime: 2021-06-08 16:55:43
*/
// 根据环境引入不同配置 process.env.VUE_APP_ENV
const environment = process.env.NODE_ENV || 'production'
let config = require('./env.' + environment)
module.exports = config
/*
* @Descripttion:
* @version:
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: limin
* @LastEditTime: 2021-09-06 17:38:28
*/
// 本地环境配置
module.exports = {
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.1.254',
// 设置超时时间
timeout: 180000,
// 携带凭证
withCredentials: true,
// 返回数据类型
responseType: 'json'
},
sign: {
appKey: '48e5e13229b82c1b4e6e8c96151f0637',
v: '1.0.0',
format: 'json',
source: ''
},
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b',
cdn: 'https://www.xxx.cn/static'
}
\ No newline at end of file
/*
* @Descripttion:
* @version:
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: limin
* @LastEditTime: 2021-09-06 17:38:28
*/
// 本地环境配置
module.exports = {
title: 'scrm-sub-blog',
response: {
data_key: 'data',
message_key: 'message',
code_key: 'code',
code_success_value: '0',
code_message_map: {}
},
request: {
baseURL: 'https://scrm.test.glsx.com.cn',
// 设置超时时间
timeout: 180000,
// 携带凭证
withCredentials: true,
// 返回数据类型
responseType: 'json'
},
sign: {
appKey: '48e5e13229b82c1b4e6e8c96151f0637',
v: '1.0.0',
format: 'json',
source: ''
},
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b',
cdn: 'https://www.xxx.cn/static'
}
\ No newline at end of file
/*
* @Descripttion:
* @version:
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: limin
* @LastEditTime: 2021-09-07 14:38:52
*/
// 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js')
let cfg = require('./conf.js')
import { Http } from 'glsx-common'
let timeout = 30000 //超时时间
export const fetchConfig = function(isEnv = true) {
// if (isEnv) {
// let { request } = cfg
// Object.assign(request, { timeout })
// return Promise.resolve(cfg)
// }
return new Http().get('https://oss-config.test.glsx.com.cn/mock/616d28231072f92988f059fb/home/config')
}
export const config = {
install(vue, cfg) {
vue.prototype.$config = cfg
}
}
\ No newline at end of file
/*
* @Descripttion:
* @version: 1.0.0
* @Author: limin
* @Date: 2021-08-13 14:12:11
* @LastEditors: limin
* @LastEditTime: 2021-09-14 09:34:52
* @FilePath: \scrm\scrm-sub-blog\src\main.js
*/
import Vue from 'vue'
import apis from './api'
import './public-path'
// import 'glsx-components/dist/glsx-components.css'
import { start } from '@/setup'
Vue.config.productionTip = false
Vue.prototype.$apis = apis
start()
export { bootstrap, mount, unmount }
from '@/setup'
export const http = params => Vue.prototype.$http(params)
\ No newline at end of file
File mode changed
import Vue from 'vue'
import { Message, Autocomplete, Popover, Tag, Tooltip, Table, TableColumn, Steps, Step, Loading, Drawer, Pagination, Button, ButtonGroup, Form, FormItem, Input, Radio, RadioGroup, Checkbox, CheckboxGroup, Switch, Select, Option, TimePicker, Row, Col, DatePicker, Tree } from 'element-ui'
Vue.use(Button)
Vue.use(ButtonGroup)
Vue.use(Form)
Vue.use(FormItem)
Vue.use(Input)
Vue.use(Checkbox)
Vue.use(CheckboxGroup)
Vue.use(Switch)
Vue.use(Select)
Vue.use(Option)
Vue.use(TimePicker)
Vue.use(Col)
Vue.use(Row)
Vue.use(DatePicker)
Vue.use(Tree)
Vue.use(Table)
Vue.use(TableColumn)
Vue.use(Loading)
Vue.use(Drawer)
Vue.use(Pagination)
Vue.use(Steps)
Vue.use(Step)
Vue.use(Tooltip)
Vue.use(Autocomplete)
Vue.use(Tag)
Vue.use(Popover)
export const message = Message
\ No newline at end of file
if (window.__POWERED_BY_QIANKUN__) {
// eslint-disable-next-line no-undef
__webpack_public_path__ = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__;
}
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)
}
function getRoutes(routesData) {
return routesData.reduce((routes, route) => {
routes.push({...route, component: () =>
import ('@/views' + route.compath + '.vue') })
return routes
}, [])
}
export { VueRouter, routes, getRoutes }
\ No newline at end of file
const staticRoutes = Object.freeze([{
name: 'channel',
path: '/channel/index',
component: resolve => require([`@/views/channel/index.vue`], resolve),
meta: {},
}, {
name: 'channel',
path: '/channel/store',
component: resolve => require([`@/views/channel/store.vue`], resolve),
meta: {}
}, {
name: 'addCode',
path: '/channel/addCode',
component: resolve => require([`@/views/channel/addCode.vue`], resolve),
meta: {}
}, {
name: 'poster',
path: '/channel/poster',
component: resolve => require([`@/views/channel/poster.vue`], resolve),
meta: {}
}, {
name: 'square',
path: '/square/index',
component: resolve => require([`@/views/square/index.vue`], resolve),
meta: {}
}, {
name: 'import',
path: '/square/import',
component: resolve => require([`@/views/square/import.vue`], resolve),
meta: {}
}, {
name: 'importResult',
path: '/square/importResult',
component: resolve => require([`@/views/square/importResult.vue`], resolve),
meta: {}
}, {
name: 'drainage',
path: '/square/drainage',
component: resolve => require([`@/views/square/drainage.vue`], resolve),
meta: {}
}, {
name: 'marketing',
path: '/marketing/index',
component: resolve => require([`@/views/marketing/index.vue`], resolve),
meta: {}
}, {
name: 'overview',
path: '/overview/index',
component: resolve => require([`@/views/overview/index.vue`], resolve),
meta: {}
}])
export default staticRoutes
\ No newline at end of file
/*
* @Descripttion:
* @version: 1.0.0
* @Author: limin
* @Date: 2021-09-23 19:31:52
* @LastEditors: limin
* @LastEditTime: 2021-09-24 10:41:09
* @FilePath: \scrm\scrm-sub-blog\src\setup\index.js
*/
import { bootstrap, mount, unmount } from './qiankun'
import { start } from './single'
export { bootstrap, mount, unmount, start }
import Vue from 'vue'
// import { message } from '@/plugins/element.js'
import { fetchConfig } from '@/config'
import ElementUI from 'element-ui'
import { GLButton, GLTable } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router'
import render from './render'
Vue.use(ElementUI)
Vue.use(GLTable)
// import GLTable from '@/components/glsx-table/index'
// Vue.component('GLTable', GLTable)
import 'glsx-components/src/theme/theme.scss'
import '@/assets/css/common.scss'
let routes = []
let router = null
let instance = null
export async function bootstrap({ name, id, history, common, messenger, globalState }) {
const { response, request, sign, secret } = await fetchConfig()
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = 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(routesData)
subscribe({ messenger })
}
export async function mount(props) {
console.log('11111', props)
const insts = render(props.routerBase, routes)
router = insts.router
instance = insts.vm
}
export async function unmount() {
instance.$destroy()
instance.$el.innerHTML = ''
instance = null
router = null
}
function subscribe({ messenger }) {
messenger.subscribe(v => {
console.log(`监听到子应用${v.from}发来消息:`, v)
})
}
\ No newline at end of file
/*
* @Descripttion:
* @version: 1.0.0
* @Author: limin
* @Date: 2021-09-23 19:04:32
* @LastEditors: limin
* @LastEditTime: 2021-09-23 20:34:32
* @FilePath: \scrm\scrm-sub-blog\src\qiankun\render.js
*/
import App from '../App.vue'
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 }
}
export default render
\ No newline at end of file
/*
* @Descripttion:
* @version: 1.0.0
* @Author: limin
* @Date: 2021-09-23 19:02:23
* @LastEditors: limin
* @LastEditTime: 2021-09-24 10:41:17
* @FilePath: \scrm\scrm-sub-blog\src\setup\single.js
*/
import Vue from 'vue'
import { message } from '@/plugins/element.js'
import { fetchConfig } from '@/config'
// import { GLButton } from 'glsx-components' //权限按钮 (根据权限动态创建)
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)
}
\ No newline at end of file
/*
* @Descripttion:
* @version: 1.0.0
* @Author: limin
* @Date: 2021-08-13 14:12:11
* @LastEditors: limin
* @LastEditTime: 2021-08-25 14:14:44
* @FilePath: \scrm\scrm-base\src\store\index.js
*/
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const modulesFiles = require.context('./modules', true, /\.js$/)
const modules = modulesFiles.keys().reduce(
(result, modulePath) => {
const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1')
const value = modulesFiles(modulePath)
result.getters[moduleName] = state => state[moduleName]
result.modules[moduleName] = value.default
return result
},
{ modules: {}, getters: {} }
)
const store = new Vuex.Store(modules)
export default store
export default {
namespaced: true,
state: {
size: 10, // 分页 页大小
token: ''
},
mutations: {
// 设置分页大小
SET_PAGE_SIZE(state, data) {
state.size = data
},
// 设置token
SET_TOKEN(state, data) {
state.token = data
}
},
actions: {
// 设置分页大小
setPageSize({ commit }, data) {
commit('SET_PAGE_SIZE', data)
},
// 设置token
setToken({ commit }, data) {
commit('SET_TOKEN', data)
}
}
}
export default {
namespaced: true,
state: {},
mutations: {},
actions: {}
}
import { isFunction } from './fns'
export function matchesSelectorToParentElements (el, selector, baseNode) {
let node = el
const matchesSelectorFunc = [
'matches',
'webkitMatchesSelector',
'mozMatchesSelector',
'msMatchesSelector',
'oMatchesSelector'
].find(func => isFunction(node[func]))
if (!isFunction(node[matchesSelectorFunc])) return false
do {
if (node[matchesSelectorFunc](selector)) return true
if (node === baseNode) return false
node = node.parentNode
} while (node)
return false
}
export function getComputedSize ($el) {
const style = window.getComputedStyle($el)
return [
parseFloat(style.getPropertyValue('width'), 10),
parseFloat(style.getPropertyValue('height'), 10)
]
}
export function addEvent (el, event, handler) {
if (!el) {
return
}
if (el.attachEvent) {
el.attachEvent('on' + event, handler)
} else if (el.addEventListener) {
el.addEventListener(event, handler, true)
} else {
el['on' + event] = handler
}
}
export function removeEvent (el, event, handler) {
if (!el) {
return
}
if (el.detachEvent) {
el.detachEvent('on' + event, handler)
} else if (el.removeEventListener) {
el.removeEventListener(event, handler, true)
} else {
el['on' + event] = null
}
}
export function isFunction (func) {
return (typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]')
}
export function snapToGrid (grid, pendingX, pendingY, scale = 1) {
const [scaleX, scaleY] = typeof scale === 'number' ? [scale, scale] : scale
const x = Math.round((pendingX / scaleX) / grid[0]) * grid[0]
const y = Math.round((pendingY / scaleY) / grid[1]) * grid[1]
return [x, y]
}
export function getSize (el) {
const rect = el.getBoundingClientRect()
return [
parseInt(rect.width),
parseInt(rect.height)
]
}
export function computeWidth (parentWidth, left, right) {
return parentWidth - left - right
}
export function computeHeight (parentHeight, top, bottom) {
return parentHeight - top - bottom
}
export function restrictToBounds (value, min, max) {
if (min !== null && value < min) {
return min
}
if (max !== null && max < value) {
return max
}
return value
}
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('复制成功')
}
util.getBeforeDate = function(sign = '-') {
let day = new Date();
let month = day.getMonth() + 1;
let date = day.getDate();
if (month < 10) month = '0' + month;
if (date < 10) date = '0' + date;
var s = day.getFullYear() + sign + month + sign + date;
return s;
}
util.getBeforeMonth = function(days) {
let month = new Date().getMonth() + 1;
let year = new Date().getFullYear();
let arr = new Array();
for (let i = 0; i < days; i++) {
if (month <= 0) {
year = year - 1;
month = month + 12;
}
if (month < 10) month = '0' + month;
arr[i] = year + '年' + month + '月'
month--
}
return arr;
}
export default util
\ No newline at end of file
<template>
<div class="scrm-main">
<div class="channel-main scrm-box-f">
<div class="chanel-form-title">基本信息</div>
<div class="chanel-form-box">
<el-form
ref="codeForm"
:model="addCodeForm"
class="code-body-form"
label-width="120px"
:rules="baseRules"
>
<el-row>
<el-form-item label="渠道名称" prop="name">
<el-input
size="small"
v-model="addCodeForm.name"
placeholder="请输入渠道名称"
></el-input>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="备注">
<el-input
size="small"
v-model="addCodeForm.name"
placeholder="请输入备注"
></el-input>
<div class="form-tips">设置备注,便于后续管理查找</div>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="自动通过验证">
<el-switch
v-model="addCodeForm.value"
active-color="#5850FF"
inactive-color="#999999"
>
</el-switch>
<span class="form-tips-btn">开启后,客户添加使用人员无需好友验证</span>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="选择标签">
<el-button size="small" @click="handleAddEmp"
><i class="el-icon-plus"></i> 选择标签</el-button
>
<span class="form-tips-btn">已选择<span>8</span>个标签</span>
<div class="el-input-tag input-tag-wrapper">
<el-tag
v-for="(tag, idx) in innerTags"
:key="idx"
closable
:disable-transitions="false"
@close="remove(tag)"
>
{{ tag.staffName }}
</el-tag>
</div>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="选择专员">
<el-button size="small" @click="handleAddEmp"
><i class="el-icon-plus"></i> 选择专员</el-button
>
<span class="form-tips-btn">已选择<span>8</span>人</span>
<div class="el-input-tag input-tag-wrapper">
<el-tag
v-for="(tag, idx) in innerTags"
:key="idx"
closable
:disable-transitions="false"
@close="remove(tag)"
>
{{ tag.staffName }}
</el-tag>
</div>
</el-form-item>
</el-row>
</el-form>
</div>
</div>
<div class="channel-main-welcome scrm-box-f">
<div class="chanel-form-title">欢迎语</div>
</div>
<div
class="footer-panel"
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px',
}"
>
<el-button type="primary">返回</el-button>
<el-button type="primary">提交</el-button>
<el-button type="primary">取消</el-button>
<el-button
type="primary"
v-show="active == 2 && statusQrcode != 'SUCCESS'"
@click="handleNext"
>确定</el-button
>
<el-button
type="primary"
v-show="active == 2 && statusQrcode == 'SUCCESS'"
@click="handleNext"
>下一步</el-button
>
</div>
</div>
</template>
<script>
export default {
name: "addCode",
data() {
return {
addCodeForm: {},
footerLeft: 0,
footerWidth: 0,
innerTags: [{ staffName: "等级考试" }],
};
},
methods: {},
mounted() {
this.footerLeft = document.querySelector(".base-container-right").offsetLeft;
this.footerWidth = document.documentElement.clientWidth - this.footerLeft;
}
};
</script>
<style lang="scss" scoped>
.channel-main-welcome {
margin-top: 20px;
}
.footer-panel {
display: flex;
align-items: center;
justify-content: center;
position: fixed;
bottom: 0px;
height: 64px;
background: #ffffff;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
}
.chanel-form-title {
padding: 20px;
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 16px;
border-bottom: 1px solid #d8d8d8;
}
.code-body-form {
padding: 20px;
.form-tips {
font-size: 14px;
font-weight: 400;
color: #999999;
line-height: 20px;
}
.form-tips-btn {
font-size: 14px;
font-weight: 400;
color: #999999;
line-height: 20px;
margin-left: 10px;
> span {
color: #5850ff;
}
}
.input-tag-wrapper {
position: relative;
font-size: 14px;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
box-sizing: border-box;
color: #606266;
display: inline-block;
outline: none;
padding: 0 10px 0 5px;
flex-wrap: wrap;
line-height: 36px;
height: 36px;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 350px;
display: flex;
align-items: center;
margin-top: 6px;
}
.el-tag {
margin-right: 4px;
height: 26px;
line-height: 24px;
}
}
</style>
\ No newline at end of file
<template>
<div>
<div class="form-header">
<el-button type="primary" size="small" icon="el-icon-add">新建渠道活码</el-button>
</div>
<div class="form-panel scrm-box-f">
<el-form
:inline="true"
:model="tableSearchForm"
class="follow-form-item"
label-width="80px"
>
<el-row>
<el-form-item size="small" label="渠道名称">
<el-input
size="small"
v-model="tableSearchForm.merchantLoginAccount"
placeholder="请输入渠道名称"
>
</el-input>
</el-form-item>
<el-form-item size="small" style="float: right">
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-row>
</el-form>
<GLTable
ref="employeeRef"
:getListApi="getListApi"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
>
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">数据</el-button>
<el-button type="text" @click="handleEdit(2, scope.scope)">修改</el-button>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button>
</div>
<template slot="otherOptions" slot-scope="scope">
<el-popover placement="top" width="180" trigger="hover">
<p>启用前,你可先为该员工创建角色,配置其所需的功能权限。如下所示:</p>
<p>1. 角色管理-创建角色</p>
<p>2. 选择员工账户-修改角色</p>
<el-switch
:size="size"
slot="reference"
v-model="scope.scope.statusName"
active-value="启用"
inactive-value="禁用"
@change="(e) => handleSwitchChange(e, scope.scope)"
></el-switch>
</el-popover>
</template>
</GLTable>
</div>
</div>
</template>
<script>
export default {
name: "channelList",
data() {
return {
tableSearchForm: {},
getListApi: this.$apis.channel.getListApi,
tableParams: {
listName: "data",
tableOption: false,
otherOptions: {
label: "启用开关",
},
tableColumns: [
{
label: "渠道名称",
prop: "staffName",
},
{
label: "昨日新增客户数",
prop: "entmicroName",
minWidth: "100px",
},
{
label: "总新增客户数",
prop: "roleName",
},
{
label: "使用人员",
prop: "staffPhone",
width: "130px",
},
{
label: "活码",
prop: "merchantName",
},
{
label: "标签",
prop: "belongingEntmicroName",
},
{
label: "创建时间",
prop: "statusName",
},
{
label: "操作",
prop: "optionBtns",
width: "140px",
addHtml: "optionBtns",
fixed: "right",
},
{
label: "启用开关",
prop: "otherOptions",
width: "80px",
addHtml: "otherOptions",
fixed: "right",
},
],
},
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "count" },
baseData: {
allMerchantList: [],
roleList: [],
staffStatusList: [],
},
};
},
methods: {
handleSearch() {},
},
};
</script>
<style lang="scss" scoped>
.form-header {
margin-bottom: 20px;
}
.form-panel {
padding: 10px;
}
</style>
\ No newline at end of file
<template>
<div class="channel-main scrm-box-f">
<div class="scrm-flex">
<el-radio-group v-model="timeRadio" size="mini">
<el-radio-button label="1">昨天</el-radio-button>
<el-radio-button label="2">近1周</el-radio-button>
<el-radio-button label="3">近2周</el-radio-button>
<el-radio-button label="4">近1个月</el-radio-button>
</el-radio-group>
<el-form
:inline="true"
:model="tableSearchForm"
class="follow-form-item"
label-width="80px"
>
<el-form-item size="small" label="添加时间">
<el-date-picker
v-model="tableSearchForm.time"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item size="small" label="渠道名称">
<el-input
size="small"
v-model="tableSearchForm.merchantLoginAccount"
placeholder="请输入渠道名称"
>
</el-input>
</el-form-item>
<el-form-item size="small" style="float: right">
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
</div>
<div class="channel-chart">
<div class="channel-chart-box">
<div class="channel-chart-title">新增客户走势</div>
<div class="channel-chart-container">
<linechart></linechart>
</div>
</div>
<div class="channel-chart-desc">
<div class="chart-desc">
<div class="chart-desc-title">
<div class="chart-title-time">昨日</div>
<div class="chart-title-num">各渠道新增客户数</div>
</div>
<div class="chart-desc-item" v-for="(item,index) in chartItem" :key="index">
<div class="chart-item-title"><span>-</span> {{item.name}}</div>
<div class="chart-item-num">{{item.num}}</div>
</div>
</div>
<div>
<div class="chart-desc-add">+选择查看渠道</div>
<div class="chart-desc-addNum">最多同时查看8个渠道数据</div>
</div>
</div>
</div>
<GLTable
ref="employeeRef"
:getListApi="getListApi"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
>
</GLTable>
</div>
</template>
<script>
import linechart from "./linechart";
export default {
name: "channelStatistics",
components: {
linechart
},
data() {
return {
chartItem: [{
name: '到店咨询客户',
num: 10
},{
name: '到店咨询客户',
num: 10
},{
name: '到店咨询客户',
num: 10
}],
timeRadio: 1,
tableSearchForm: {},
getListApi: this.$apis.channel.getListApi,
tableParams: {
listName: "data",
tableOption: false,
otherOptions: {
label: "启用开关",
},
tableColumns: [
{
label: "渠道名称",
prop: "staffName",
},
{
label: "新增客户数",
prop: "entmicroName",
minWidth: "100px",
},
{
label: "留存客户数",
prop: "roleName",
},
{
label: "日期",
prop: "staffPhone",
width: "130px",
},
],
},
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "count" },
baseData: {
allMerchantList: [],
roleList: [],
staffStatusList: [],
},
};
},
methods: {},
};
</script>
<style lang="scss" scoped>
.channel-main {
padding: 10px;
}
.channel-chart {
display: flex;
.channel-chart-desc {
width: 300px;
min-height: 310px;
padding: 10px;
display: flex;
flex-direction: column;
justify-content: space-between;
margin-bottom: 30px;
.chart-desc-title {
display: flex;
justify-content: space-between;
font-size: 14px;
font-weight: 500;
color: #333333;
line-height: 20px;
.chart-title-time {
color: #5850ff;
}
}
.chart-desc-item {
display: flex;
justify-content: space-between;
font-size: 12px;
font-weight: 400;
color: #666666;
line-height: 17px;
margin-top: 10px;
}
.chart-desc-add {
font-size: 12px;
font-weight: 400;
color: #5850ff;
line-height: 17px;
text-align: center;
}
.chart-desc-addNum {
font-size: 12px;
font-weight: 400;
color: #666666;
line-height: 17px;
text-align: center;
}
}
&-box {
flex: 1;
.channel-chart-title {
font-size: 18px;
font-weight: 600;
color: #333333;
line-height: 25px;
}
.channel-chart-container {
margin-top: 20px;
}
}
}
</style>
\ No newline at end of file
<template>
<div id="channel-main" class="chart-line"></div>
</template>
<script>
import * as echarts from "echarts";
export default {
name: "linechart",
data() {
return {};
},
methods: {
getChart() {
let chartDom = document.getElementById("channel-main");
let myChart = echarts.init(chartDom);
let option;
option = {
legend: {
left: "auto",
},
grid: {
left: "3%",
right: "4%",
bottom: "3%",
containLabel: true,
},
xAxis: {
type: "category",
boundaryGap: false,
data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
},
yAxis: {
type: "value",
},
series: [
{
name: "Email",
type: "line",
stack: "Total",
data: [120, 132, 101, 134, 90, 230, 210],
},
{
name: "Union Ads",
type: "line",
stack: "Total",
data: [220, 182, 191, 234, 290, 330, 310],
},
{
name: "Video Ads",
type: "line",
stack: "Total",
data: [150, 232, 201, 154, 190, 330, 410],
},
{
name: "Direct",
type: "line",
stack: "Total",
data: [320, 332, 301, 334, 390, 330, 320],
},
{
name: "Search Engine",
type: "line",
stack: "Total",
data: [820, 932, 901, 934, 1290, 1330, 1320],
},
],
};
option && myChart.setOption(option);
},
},
mounted() {
this.getChart();
},
};
</script>
<style scoped lang="scss">
.chart-line {
height: 300px;
}
</style>
\ No newline at end of file
<template>
<div class="channel-main">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="渠道码列表" name="first"></el-tab-pane>
<el-tab-pane label="数据统计" name="second"></el-tab-pane>
</el-tabs>
<channel-list v-show="activeName == 'first'"></channel-list>
<channel-statistics v-show="activeName == 'second'"></channel-statistics>
</div>
</template>
<script>
import channelList from "./components/channelList";
import channelStatistics from "./components/channelStatistics";
export default {
name: 'channel',
components: {
channelList,
channelStatistics
},
data() {
return {
activeName: 'first'
}
},
methods: {
handleClick() {
}
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<template>
<div class="channel-main scrm-box-f">
<div class="channel-header">
<el-button type="primary" size="small" @click="goBack">返回</el-button>
<el-upload action="" class="image-uploader" :before-upload="upLoadImg">
<el-button type="primary" size="small">创建活码海报</el-button>
</el-upload>
</div>
<div class="poster-body">
<div
class="poster-item"
@dblclick="setPoster"
@mouseenter="item.show = true"
@mouseleave="item.show = false"
v-for="(item, index) in posterList"
:key="index"
>
<div class="poster-del" v-show="item.show">
<img src="@/assets/img/del.png" />
</div>
<div class="poster-item-box">
<div
class="poster-image"
v-if="imgWidth"
:style="{
background: 'url(' + img_url + ')',
width: imgWidth + 'px',
height: imgHeight + 'px',
}"
></div>
</div>
<div class="poster-item-link">下载海报</div>
</div>
</div>
<el-dialog
title="创建活码海报"
:visible.sync="dialogVisible"
width="50%"
:before-close="handleClose"
>
<div class="poster-draggable-title">拖动活码可调整活码位置</div>
<div class="poster-draggable">
<div
class="poster-image"
v-if="dragHeight"
:style="{
background: 'url(' + img_url + ')',
height: dragHeight + 'px',
}"
>
<vue-draggable-resizable
:w="w1"
:h="h1"
:x="x1"
:y="y1"
:min-width="20"
:min-height="20"
class="img_cl"
:parent="true"
@dragging="onDrag"
@resizing="onResize"
:customId="index"
@activated="onActivated"
>
</vue-draggable-resizable>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="dialogVisible = false"
>确 定</el-button
>
</span>
</el-dialog>
</div>
</template>
<script>
import VueDraggableResizable from "@/components/vue-draggable-resizable";
import "@/components/vue-draggable-resizable.css";
export default {
name: "poster",
components: {
VueDraggableResizable,
},
data() {
return {
dialogVisible: false,
posterList: [{ show: false }, { show: false }],
img_url: "",
dragHeight: 0,
imgWidth: 0,
imgHeight: 0,
x1: 0,
y1: 0,
w1: 50,
h1: 50,
};
},
methods: {
goBack() {},
setPoster() {
this.dialogVisible = true;
},
enterPoster() {},
leavePoster() {},
upLoadImg(file) {
let fileName = file.name;
if (file.name.lastIndexOf(".") === -1) {
this.$message.info("路径不正确");
return false;
}
let AllImgExt = ".jpg|.jpeg|.gif|.bmp|.png|.swf";
let extName = file.name.substring(file.name.lastIndexOf(".")).toLowerCase();
if (AllImgExt.indexOf(extName + "|") === -1) {
this.$message.info("图片格式不正确");
return false;
}
// if (fileSize < 3145728) {
if (window.FileReader) {
let reader = new FileReader();
let self = this;
reader.readAsDataURL(file);
reader.onload = (img) => {
console.log(file);
let type = fileName.split(".")[1];
let imgUrl = img.target.result.split(",")[1];
// self.loadingImg = true;
self.$apis.common
.pictureUpload({
file: `${type}@${imgUrl}`,
})
.then((res) => {
if (res) {
self.accountAddForm.merchantFiles.push({
fileUrl: res,
fileName: "",
});
}
});
};
}
},
onDrag(a, b, c, d, e) {
console.log(a, b, c, d, e);
},
onActivated(index) {
console.log(index);
},
onResize() {},
getPoster() {
let img_url = "https://img1.baidu.com/it/u=3246628741,3439955235&fm=26&fmt=auto";
this.img_url = img_url;
let img = new Image();
img.src = img_url;
let self = this;
img.onload = function () {
if (img.width > img.height) {
self.imgWidth = 280;
self.imgHeight = (img.height * 280) / img.width;
} else {
self.imgHeight = 280;
self.imgWidth = (img.width * 280) / img.height;
}
};
},
getDraggable() {
let img_url = "https://img1.baidu.com/it/u=3246628741,3439955235&fm=26&fmt=auto";
let img = new Image();
img.src = img_url;
let self = this;
img.onload = function () {
self.dragHeight = (img.height * 300) / img.width;
};
},
},
mounted() {
this.getPoster();
this.getDraggable();
},
};
</script>
<style lang="scss" scoped>
.channel-main {
padding: 10px 20px;
}
.image-uploader {
display: inline-block;
margin-left: 20px;
}
.poster-draggable-title {
font-size: 14px;
font-weight: 400;
color: #5850ff;
line-height: 20px;
text-align: center;
margin-bottom: 10px;
}
.poster-draggable {
display: flex;
justify-content: center;
.poster-image {
background-size: 100% 100%;
width: 375px;
.img_cl {
background-image: url("../../assets/img/qrcode.png");
background-size: 100% 100%;
}
}
}
.poster-body {
display: flex;
flex-wrap: wrap;
margin-top: 20px;
.poster-item {
margin: 0px 15px 20px 0px;
position: relative;
overflow: hidden;
.poster-del {
transition: all 1s ease;
position: absolute;
right: -52px;
top: -52px;
width: 104px;
height: 104px;
border-radius: 50%;
background: rgba($color: #5850ff, $alpha: 0.15);
text-align: center;
line-height: 104px;
img {
width: 20px;
height: auto;
margin-top: 60px;
margin-right: 40px;
cursor: pointer;
}
}
&-box {
width: 300px;
height: 300px;
background: #f7f7f7;
border-radius: 8px;
display: flex;
justify-content: center;
align-items: center;
.poster-image {
background-size: 100% 100%;
width: 300px;
height: 300px;
.img_cl {
background-image: url("../../assets/img/qrcode.png");
background-size: 100% 100%;
}
}
}
&-link {
margin-top: 10px;
text-align: center;
font-size: 14px;
font-weight: 500;
color: #5850ff;
line-height: 20px;
}
}
}
</style>
\ No newline at end of file
<template>
<div class="channel-main scrm-box-f">
<div><el-button type="primary" size="small" @click="goback">返回</el-button></div>
<div class="detail-form">
<el-form :inline="true" :model="detailForm" label-width="120px">
<el-row><el-form-item size="small" label="渠道名称:"> </el-form-item></el-row>
<el-row><el-form-item size="small" label="备注:"> </el-form-item></el-row>
<el-row
><el-form-item size="small" label="使用员工:">
<div class="form-row">
<div class="emp-item">收到回复</div>
<div class="emp-item">收到回复</div>
</div> </el-form-item
></el-row>
<el-row
><el-form-item size="small" label="标签:">
<div class="form-row">
<div class="tag-item">龙湖</div>
<div class="tag-item">龙湖龙湖龙湖</div>
</div>
</el-form-item></el-row
>
</el-form>
<div class="count-panel">
<div class="count-panel-item">
<div class="count-item-title">昨日新增客户</div>
<div class="count-item-num">75人</div>
<img src="@/assets/img/channel/count1.png" class="count-item-icon" />
</div>
<div class="count-panel-item">
<div class="count-item-title">总新增客户</div>
<div class="count-item-num">75人</div>
<img src="@/assets/img/channel/count2.png" class="count-item-icon" />
</div>
<div class="count-panel-item">
<div class="count-item-title">
<span>留存客户总数</span>
<el-popover
placement="top"
title="说明"
width="200"
trigger="hover"
content="该渠道所有扫码新增的客户中,目前未删好友的客户数"
>
<img
src="@/assets/img/question.png"
slot="reference"
class="count-item-question"
/>
</el-popover>
</div>
<div class="count-item-num">75人</div>
<img src="@/assets/img/channel/count3.png" class="count-item-icon" />
</div>
</div>
</div>
<GLTable
ref="employeeRef"
:getListApi="getListApi"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
:hasNum="false"
>
</GLTable>
</div>
</template>
<script>
export default {
name: "store",
data() {
return {
tableSearchForm: {},
getListApi: this.$apis.channel.getListApi,
tableParams: {
listName: "data",
tableOption: false,
otherOptions: {
label: "启用开关",
},
tableColumns: [
{
label: "渠道名称",
prop: "staffName",
},
{
label: "新增客户数",
prop: "entmicroName",
minWidth: "100px",
},
{
label: "留存客户数",
prop: "roleName",
},
{
label: "日期",
prop: "staffPhone",
width: "130px",
},
],
},
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "count" },
baseData: {
allMerchantList: [],
roleList: [],
staffStatusList: [],
},
};
},
methods: {
goback() {},
},
};
</script>
<style lang="scss" scoped>
.channel-main {
padding: 20px;
.detail-form {
margin-top: 10px;
.form-row {
display: flex;
margin-top: 5px;
.tag-item {
display: inline-block;
border-radius: 4px;
border: 1px solid #999999;
text-align: center;
min-width: 76px;
padding: 8px 6px;
line-height: 14px;
box-sizing: border-box;
font-size: 14px;
font-weight: 400;
color: #999999;
margin-right: 5px;
}
.emp-item {
position: relative;
display: inline-block;
font-size: 14px;
font-weight: 400;
color: #666666;
line-height: 20px;
padding-left: 12px;
margin-right: 25px;
&::before {
content: "";
position: absolute;
top: 6px;
left: 0px;
width: 8px;
height: 8px;
background: #5850ff;
border-radius: 50%;
}
}
}
.count-panel {
display: flex;
&-item {
position: relative;
margin: 10px 20px 20px 0px;
padding: 20px;
box-sizing: border-box;
width: 216px;
height: 116px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
.count-item-title {
font-size: 14px;
font-weight: 500;
color: #666666;
line-height: 20px;
}
.count-item-num {
font-size: 26px;
font-weight: 600;
color: #333333;
line-height: 26px;
margin-top: 28px;
}
.count-item-icon {
position: absolute;
width: 40px;
height: 40px;
right: 20px;
top: 20px;
}
.count-item-question {
height: 14px;
width: 14px;
margin-left: 5px;
margin-top: 3px;
}
}
}
}
}
</style>
\ No newline at end of file
<template>
<div class="square-main">
<div class="square-main-header">
<el-button size="small" type="primary" @click="handleSearch"
><i class="el-icon-plus"></i> 导入魔方</el-button
>
<label>结合门店营销活动,指定客户创建智能营销,提高活动转化率</label>
<el-popover
placement="top"
title="说明"
width="400"
trigger="hover"
content="通过导入的客户,门店可通过智能外呼及智能短信,结合营销活动的需要向离店用户进行智能营销,可实现标准、高效的营销同时实现用户线上化。"
>
<img
src="@/assets/img/question.png"
slot="reference"
class="count-item-question"
/>
</el-popover>
</div>
<div class="square-tabel scrm-box-f">
<div class="square-tabel-form">
<el-form
:inline="true"
:model="tableSearchForm"
class="follow-form-item"
label-width="120px"
>
<el-form-item size="small" label="添加时间">
<el-date-picker
v-model="tableSearchForm.time"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item size="small" label="状态">
<el-select v-model="tableSearchForm.status" placeholder="请选择">
<el-option
v-for="item in optionstatus"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item size="small" label="ID">
<el-input v-model="tableSearchForm.id" placeholder="请输入ID"></el-input>
</el-form-item>
<el-form-item size="small" style="float: right">
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<GLTable
ref="employeeRef"
:getListApi="getListApi"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
>
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">营销配置</el-button>
</div>
</GLTable>
</div>
</div>
</div>
</template>
<script>
export default {
name: "marketing",
data() {
return {
optionstatus: [
{
value: "1",
label: "进行中",
},
{
value: "2",
label: "已完成",
},
],
dialogVisible: true,
tableSearchForm: {},
getListApi: this.$apis.channel.getListApi,
tableParams: {
listName: "data",
tableOption: false,
tableColumns: [
{
label: "ID",
prop: "staffName",
},
{
label: "营销客户数",
prop: "entmicroName",
minWidth: "100px",
},
{
label: "状态",
prop: "roleName",
},
{
label: "创建时间",
prop: "staffPhone",
width: "130px",
},
{
label: "创建人",
prop: "staffPhone",
width: "130px",
},
{
label: "操作",
prop: "optionBtns",
width: "100px",
addHtml: "optionBtns",
fixed: "right",
},
],
},
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "count" },
baseData: {
allMerchantList: [],
roleList: [],
staffStatusList: [],
},
};
},
methods: {
handleSearch() {},
handleDetail() {},
},
};
</script>
<style lang="scss" scoped>
.square-main-header {
display: flex;
align-items: center;
label {
margin: 0px 20px 0px 10px;
}
img {
width: 14px;
height: 14px;
vertical-align: middle;
}
}
.dialog-wrap-box {
z-index: 2001;
position: fixed;
width: 100%;
height: 100%;
top: 0px;
left: 0px;
background: rgba(0, 0, 0, 0.5);
.dialog-wrap-panel {
background: #ffffff;
position: absolute;
top: 50%;
left: 10%;
transform: translateY(-50%);
height: 360px;
width: 80%;
.dialog-wrap-items {
position: relative;
display: flex;
width: 100%;
height: 360px;
.footer-btn {
cursor: pointer;
position: absolute;
bottom: -50px;
left: 50%;
text-align: center;
width: 120px;
margin-left: -60px;
height: 34px;
line-height: 34px;
background: #5850ff;
border-radius: 4px;
font-size: 14px;
color: #ffffff;
}
}
.dialog-wrap-item {
padding: 30px;
width: 33.33%;
text-align: center;
border-right: 1px solid #eeeeee;
.dialog-item-title {
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 22px;
}
img {
width: 200px;
height: auto;
margin: 20px;
}
.dialog-item-content {
font-size: 14px;
width: 240px;
margin: 0 auto;
font-weight: 400;
color: #333333;
line-height: 20px;
}
}
}
}
.square-title {
font-size: 20px;
font-weight: 600;
color: #333333;
line-height: 20px;
letter-spacing: 1px;
img {
width: 14px;
height: 14px;
margin-top: 5px;
}
}
.square-num-box {
height: 102px;
margin: 20px 0px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
display: flex;
.square-num-item {
width: 33.33%;
padding-left: 20px;
.square-num-title {
margin-top: 20px;
font-size: 14px;
font-weight: 400;
color: rgba(0, 0, 0, 0.65);
line-height: 22px;
}
.square-num-count {
font-size: 30px;
font-weight: 600;
color: rgba(0, 0, 0, 0.85);
line-height: 38px;
}
}
}
.coustom-box {
margin-top: 20px;
display: flex;
&-item {
box-sizing: border-box;
width: 25%;
margin-right: 20px;
padding: 20px;
height: 334px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
text-align: center;
&:last-child {
margin-right: 0px;
}
.coustom-box-title {
font-size: 20px;
font-weight: 500;
color: #424242;
line-height: 28px;
letter-spacing: 1px;
margin: 10px;
}
.coustom-echart {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 20px;
.coustom-echart-desc {
margin-left: 10px;
font-size: 14px;
font-weight: 400;
color: rgba(0, 0, 0, 0.65);
line-height: 22px;
.coustom-echart-num {
font-size: 20px;
}
}
}
.coustom-box-content {
font-size: 14px;
font-weight: 500;
color: #a3a3a3;
line-height: 20px;
text-align: left;
height: 110px;
}
.coustom-box-config {
margin: 10px auto;
display: inline-block;
border-radius: 4px;
border: 1px solid #5850ff;
padding: 7px 28px;
font-size: 14px;
font-weight: 400;
color: #5850ff;
line-height: 14px;
}
}
}
.square-tabel {
padding: 10px;
margin-top: 20px;
}
</style>
\ No newline at end of file
<template>
<div :id="coustomId" class="coustom-main"></div>
</template>
<script>
import * as echarts from "echarts";
export default {
name: "echartCircle",
props: {
coustomId: {
type: String,
default: "",
},
bgColor1: {
type: String,
default: "",
},
bgColor2: {
type: String,
default: "",
},
coustomCount: {
type: Array,
},
},
data() {
return {};
},
methods: {
getEchart() {
const chartDom = document.getElementById(this.coustomId);
const myChart = echarts.init(chartDom);
let option;
option = {
series: [
{
type: "pie",
radius: ["40%", "70%"],
hoverAnimation: false,
avoidLabelOverlap: false,
color: [this.bgColor1, this.bgColor2],
label: {
show: false,
position: "center",
},
labelLine: {
show: false,
},
data: [{ value: 1 }, { value: 1 }],
},
],
};
option && myChart.setOption(option);
},
},
mounted() {
this.getEchart();
},
};
</script>
<style lang="scss" scoped>
.coustom-main {
width: 74px;
height: 74px;
}
</style>
\ No newline at end of file
<template>
<div id="channel-main" class="chart-line"></div>
</template>
<script>
import * as echarts from "echarts";
export default {
name: "linechart",
data() {
return {};
},
methods: {
getChart() {
let chartDom = document.getElementById("channel-main");
let myChart = echarts.init(chartDom);
let option;
option = {
legend: {
left: "auto",
icon: "stack",
itemHeight: 2,
textStyle: { color: ["#5850FF", "#FF6D00"] },
itemWidth: 12,
},
color: ["#5850FF", "#FF6D00"],
grid: {
left: "3%",
right: "4%",
bottom: "3%",
containLabel: true,
},
dataZoom: [
{
type: "inside",
start: 0,
end: 20,
},
{
start: 0,
end: 20,
},
],
xAxis: {
type: "category",
boundaryGap: false,
data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
},
yAxis: {
type: "value",
},
series: [
{
name: "未匹配企微",
type: "line",
lineStyle: { color: "#5850FF" },
data: [120, 132, 101, 134, 90, 230, 210],
},
{
name: "已匹配企微",
type: "line",
lineStyle: { color: "#FF6D00" },
data: [220, 182, 191, 234, 290, 330, 310],
},
],
};
option && myChart.setOption(option);
},
},
mounted() {
this.getChart();
},
};
</script>
<style scoped lang="scss">
.chart-line {
height: 300px;
}
</style>
\ No newline at end of file
<template>
<div class="form-panel scrm-box-f">
<div class="statistics-panel">
<div class="statistics-panel-item">
<div class="statistics-title">
<span>任务完成率</span>
<el-popover
placement="top"
title="说明"
width="300"
trigger="hover"
content="当前外呼任务的完成情况,分子为完成数量,分母为任务总数量。"
>
<img
src="@/assets/img/question.png"
slot="reference"
class="count-item-question"
/>
</el-popover>
</div>
<div class="circle-box">
<echart-circle
bgColor1="#F0F0F0"
bgColor2="#6F76EE"
coustomId="coustomId_5"
></echart-circle>
<div class="circle-box-item">
<div class="circle-item-scale">60%</div>
<div class="circle-item-num">28000</div>
</div>
</div>
</div>
</div>
<el-form
:inline="true"
:model="tableSearchForm"
class="follow-form-item"
label-width="80px"
>
<el-row>
<el-form-item size="small" label="电话号码">
<el-input
size="small"
v-model="tableSearchForm.merchantLoginAccount"
placeholder="请输入电话号码"
>
</el-input>
</el-form-item>
<el-form-item size="small" label="发送状态">
<el-input
size="small"
v-model="tableSearchForm.merchantLoginAccount"
placeholder="请输入电话号码"
>
</el-input>
</el-form-item>
<el-form-item size="small" style="float: right">
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-row>
</el-form>
<GLTable
ref="employeeRef"
:getListApi="getListApi"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
>
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">短信内容</el-button>
</div>
</GLTable>
</div>
</template>
<script>
import echartCircle from "./echartCircle";
export default {
name: "channelList",
components: {
echartCircle,
},
data() {
return {
tableSearchForm: {},
getListApi: this.$apis.channel.getListApi,
tableParams: {
listName: "data",
tableOption: false,
otherOptions: {
label: "启用开关",
},
tableColumns: [
{
label: "用户联系方式",
prop: "staffName",
},
{
label: "发送状态",
prop: "entmicroName",
},
{
label: "发送时间",
prop: "roleName",
},
{
label: "操作",
prop: "optionBtns",
width: "140px",
addHtml: "optionBtns",
fixed: "right",
},
],
},
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "count" },
baseData: {
allMerchantList: [],
roleList: [],
staffStatusList: [],
},
};
},
methods: {
handleSearch() {},
},
};
</script>
<style lang="scss" scoped>
.form-header {
margin-bottom: 20px;
}
.form-panel {
padding: 20px;
.statistics-panel {
display: flex;
&-item {
width: 33.33%;
.statistics-title {
font-size: 16px;
font-weight: 500;
color: #424242;
line-height: 22px;
img {
width: 14px;
height: 14px;
margin-left: 10px;
margin-top: 4px;
}
}
.circle-box {
margin: 20px 0px;
display: flex;
align-items: center;
.circle-box-item {
margin-left: 10px;
font-size: 14px;
font-weight: 400;
color: rgba(0, 0, 0, 0.65);
line-height: 22px;
.circle-item-num {
font-size: 22px;
font-weight: 600;
color: #333333;
line-height: 30px;
}
}
}
}
}
}
</style>
\ No newline at end of file
<template>
<div class="channel-main scrm-box-f">
<div>
<div class="statistics-panel">
<div class="statistics-panel-item">
<div class="statistics-title">
<span>任务完成率</span>
<el-popover
placement="top"
title="说明"
width="300"
trigger="hover"
content="当前外呼任务的完成情况,分子为完成数量,分母为任务总数量。"
>
<img
src="@/assets/img/question.png"
slot="reference"
class="count-item-question"
/>
</el-popover>
</div>
<div class="circle-box">
<echart-circle
bgColor1="#F0F0F0"
bgColor2="#6F76EE"
coustomId="coustomId_1"
></echart-circle>
<div class="circle-box-item">
<div class="circle-item-scale">60%</div>
<div class="circle-item-num">28000</div>
</div>
</div>
</div>
<div class="statistics-panel-item">
<div class="statistics-title">
<span>号码接通率</span>
<el-popover
placement="top"
title="说明"
width="300"
trigger="hover"
content="当前外呼任务的呼叫接通情况,分子为接通的电话数,分母为外呼的总通话数据量,其中分母不包括未外呼的电话,如空号不外呼、达到外呼次数限制等。"
>
<img
src="@/assets/img/question.png"
slot="reference"
class="count-item-question"
/>
</el-popover>
</div>
<div class="circle-box">
<echart-circle
bgColor1="#F0F0F0"
bgColor2="#5AD8A6"
coustomId="coustomId_2"
></echart-circle>
<div class="circle-box-item">
<div class="circle-item-scale">60%</div>
<div class="circle-item-num">28000</div>
</div>
</div>
</div>
<div class="statistics-panel-item">
<div class="statistics-title">
<span>号码异常</span>
<el-popover
placement="top"
title="说明"
width="300"
trigger="hover"
content="当前外呼任务中,对话到达了在对话流中勾选了“标记为完结节点”的节点,分子为已标记完结的通话数量,分母为接通的电话数量。"
>
<img
src="@/assets/img/question.png"
slot="reference"
class="count-item-question"
/>
</el-popover>
</div>
<div class="circle-box">
<echart-circle
bgColor1="#5AD8A6"
bgColor2="#7D82EF"
coustomId="coustomId_3"
></echart-circle>
<div class="circle-box-item">
<div class="circle-item-num">280</div>
<div class="circle-item-scale">
<span>空号:97</span><span>停机:20</span>
</div>
</div>
</div>
</div>
</div>
<div>
<el-form
:inline="true"
:model="tableSearchForm"
class="follow-form-item"
label-width="80px"
>
<el-form-item size="small" label="电话号码">
<el-input
size="small"
v-model="tableSearchForm.merchantLoginAccount"
placeholder="请输入电话号码"
>
</el-input>
</el-form-item>
<el-form-item size="small" label="是否应答">
<el-input
size="small"
v-model="tableSearchForm.merchantLoginAccount"
placeholder="请输入渠道名称"
>
</el-input>
</el-form-item>
<el-form-item size="small" label="通话状态">
<el-input
size="small"
v-model="tableSearchForm.merchantLoginAccount"
placeholder="请输入渠道名称"
>
</el-input>
</el-form-item>
<el-form-item size="small" style="float: right">
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
</div>
</div>
<GLTable
ref="employeeRef"
:getListApi="getListApi"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
>
</GLTable>
</div>
</template>
<script>
import echartCircle from "./echartCircle";
export default {
name: "messageStatistics",
components: {
echartCircle,
},
data() {
return {
chartItem: [
{
name: "到店咨询客户",
num: 10,
},
{
name: "到店咨询客户",
num: 10,
},
{
name: "到店咨询客户",
num: 10,
},
],
timeRadio: 1,
tableSearchForm: {},
getListApi: this.$apis.channel.getListApi,
tableParams: {
listName: "data",
tableOption: false,
otherOptions: {
label: "启用开关",
},
tableColumns: [
{
label: "用户联系方式备份",
prop: "staffName",
},
{
label: "最后拨打时间",
prop: "entmicroName",
},
{
label: "通话时长",
prop: "roleName",
},
{
label: "是否应答",
prop: "staffPhone",
},
{
label: "通话状态",
prop: "staffPhone",
},
],
},
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "count" },
baseData: {
allMerchantList: [],
roleList: [],
staffStatusList: [],
},
};
},
methods: {},
};
</script>
<style lang="scss" scoped>
.channel-main {
padding: 20px;
.statistics-panel {
display: flex;
&-item {
width: 33.33%;
.statistics-title {
font-size: 16px;
font-weight: 500;
color: #424242;
line-height: 22px;
img {
width: 14px;
height: 14px;
margin-left: 10px;
margin-top: 4px;
}
}
.circle-box {
margin: 20px 0px;
display: flex;
align-items: center;
.circle-box-item {
margin-left: 10px;
font-size: 14px;
font-weight: 400;
color: rgba(0, 0, 0, 0.65);
line-height: 22px;
span {
display: inline-block;
position: relative;
padding-left: 10px;
margin-right: 15px;
&:last-child {
&::before {
background: #7d82ef;
}
}
&::before {
content: "";
position: absolute;
border-radius: 50%;
top: 8px;
left: 0px;
width: 6px;
height: 6px;
background: #5ad8a6;
}
}
.circle-item-num {
font-size: 22px;
font-weight: 600;
color: #333333;
line-height: 30px;
}
}
}
}
}
}
.channel-chart {
display: flex;
.channel-chart-desc {
width: 300px;
min-height: 310px;
padding: 10px;
display: flex;
flex-direction: column;
justify-content: space-between;
margin-bottom: 30px;
.chart-desc-title {
display: flex;
justify-content: space-between;
font-size: 14px;
font-weight: 500;
color: #333333;
line-height: 20px;
.chart-title-time {
color: #5850ff;
}
}
.chart-desc-item {
display: flex;
justify-content: space-between;
font-size: 12px;
font-weight: 400;
color: #666666;
line-height: 17px;
margin-top: 10px;
}
.chart-desc-add {
font-size: 12px;
font-weight: 400;
color: #5850ff;
line-height: 17px;
text-align: center;
}
.chart-desc-addNum {
font-size: 12px;
font-weight: 400;
color: #666666;
line-height: 17px;
text-align: center;
}
}
&-box {
flex: 1;
.channel-chart-title {
font-size: 18px;
font-weight: 600;
color: #333333;
line-height: 25px;
}
.channel-chart-container {
margin-top: 20px;
}
}
}
</style>
\ No newline at end of file
<template>
<div class="overview-main">
<div class="overview-header">
<span>引流获客概览</span>
<el-popover
placement="top"
title="说明"
width="400"
trigger="hover"
content="引流获客整合通过整合活码营销、企微魔方,可分别针对到店用户及离店用户提供企微线上化方案。帮助门店迅速的形成企微客户池,为后续营销活动搭建起稳定高频的触达通道。"
>
<img
src="@/assets/img/question.png"
slot="reference"
class="count-item-question"
/>
</el-popover>
</div>
<div class="scrm-box-f store-panel">
<div class="store-panel-item">
<div class="store-item">
<div class="store-item-s">
<div class="store-item-title">到店用户线上化</div>
<el-button type="primary" size="small">配置活码</el-button>
</div>
<div class="store-item-s">
<div class="store-item-icon">
<img src="@/assets/img/overview/h1.png" />
渠道活码
</div>
<ul class="store-item-ul">
<li>自动分配跟进员工</li>
<li>区分渠道统计效果</li>
<li>自动回复指定活动</li>
</ul>
</div>
<div class="store-item-s">
<div class="store-item-icon">
<img src="@/assets/img/overview/h2.png" />
海报活码
</div>
<ul class="store-item-ul">
<li>灵活搭配门店活动</li>
<li>可作为门店易拉宝</li>
<li>独立统计活动效果</li>
</ul>
</div>
</div>
</div>
<div class="store-panel-item">
<div class="store-item">
<div class="store-item-s">
<div class="store-item-title">离店用户线上化</div>
<el-button type="primary" size="small">企微魔方</el-button>
</div>
<div class="store-item-s">
<div class="store-item-icon">
<img src="@/assets/img/overview/h3.png" />
智能外呼
</div>
<ul class="store-item-ul">
<li>意向判断、精准记录</li>
<li>话术灵活、语气灵动</li>
<li>多路并发、提效降本</li>
</ul>
</div>
<div class="store-item-s">
<div class="store-item-icon">
<img src="@/assets/img/overview/h4.png" />
客户分群
</div>
<ul class="store-item-ul">
<li>客户分群推荐策略</li>
<li>自动分配员工跟进</li>
<li>自动化引流获客</li>
</ul>
</div>
</div>
</div>
</div>
<div class="user-panel">
<div class="user-panel-line scrm-box-f">
<div class="echart-title">用户线上化趋势</div>
<div class="echart-count-panel">
<div class="echart-count-item">
<div class="echart-icon"><img src="@/assets/img/overview/h5.png" /></div>
<div class="echart-num-desc">
<div class="echart-num-1">客户总数</div>
<div class="echart-num-2">1,242,323人</div>
</div>
</div>
<div class="echart-count-item">
<div class="echart-icon"><img src="@/assets/img/overview/h6.png" /></div>
<div class="echart-num-desc">
<div class="echart-num-1">匹配企微客户数</div>
<div class="echart-num-2">1,242,323人</div>
</div>
</div>
</div>
<linechart></linechart>
</div>
<div class="user-panel-balance scrm-box-f">
<div class="balance-title">资源剩余</div>
<div class="balance-image"><img src="@/assets/img/overview/balance1.png" /></div>
<div class="balance-image"><img src="@/assets/img/overview/balance2.png" /></div>
</div>
</div>
<div class="statistics-main">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="短信营销统计" name="first"></el-tab-pane>
<el-tab-pane label="外呼营销统计" name="second"></el-tab-pane>
<message-list v-show="activeName == 'first'"></message-list>
<message-statistics v-show="activeName == 'second'"></message-statistics>
</el-tabs>
</div>
</div>
</template>
<script>
import messageStatistics from "./components/messageStatistics";
import messageList from "./components/messageList";
import linechart from "./components/linechart";
export default {
name: "channel",
components: {
messageStatistics,
messageList,
linechart,
},
data() {
return {
activeName: "first",
};
},
methods: {
handleClick() {},
},
};
</script>
<style lang="scss" scoped>
.overview-header {
font-size: 20px;
font-weight: 500;
color: #333333;
line-height: 20px;
letter-spacing: 1px;
img {
width: 14px;
height: auto;
margin-top: 3px;
margin-left: 6px;
}
}
.store-panel {
margin: 20px auto;
padding: 20px;
display: flex;
.store-panel-item {
height: 200px;
background: rgba(245, 244, 250, 0.7);
border-radius: 8px;
width: 50%;
&:first-child {
margin-right: 20px;
}
.store-item {
display: flex;
max-width: 580px;
}
.store-item-s {
width: 33.33%;
padding: 30px 20px;
.store-item-title {
font-size: 20px;
font-weight: 500;
color: #333333;
line-height: 20px;
letter-spacing: 1px;
margin: 10px 0px 70px;
}
.store-item-icon {
display: flex;
align-items: center;
img {
width: 40px;
height: 40px;
margin-right: 6px;
}
}
.store-item-ul {
padding-left: 18px;
margin-top: 20px;
font-size: 14px;
font-weight: 400;
color: #666666;
line-height: 30px;
li {
color: #999999;
}
}
}
}
}
.user-panel {
display: flex;
&-line {
flex: 1;
padding: 20px;
.echart-title {
font-size: 20px;
font-weight: 500;
color: #333333;
line-height: 20px;
letter-spacing: 1px;
}
.echart-count-panel {
margin-top: 30px;
margin-bottom: 40px;
display: flex;
.echart-count-item {
display: flex;
margin-right: 40px;
.echart-icon {
width: 48px;
height: 48px;
margin-right: 10px;
}
.echart-num-desc {
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 22px;
.echart-num-2 {
font-size: 22px;
margin-top: 4px;
}
}
}
}
}
&-balance {
width: 275px;
margin-left: 20px;
padding: 20px;
.balance-title {
font-size: 20px;
font-weight: 500;
color: #333333;
line-height: 28px;
letter-spacing: 1px;
}
.balance-image {
width: 160px;
height: 160px;
margin: 20px auto;
}
}
}
@media screen and (max-width: 1340px) {
.store-item-ul {
font-size: 12px!important;
}
.store-item-s {
padding: 10px!important;
}
.store-item-title {
font-size: 17px!important;
}
}
</style>
\ No newline at end of file
<template>
<div :id="coustomId" class="coustom-main"></div>
</template>
<script>
import * as echarts from "echarts";
export default {
name: "echartCircle",
props: {
coustomId: {
type: String,
default: "",
},
bgColor: {
type: String,
default: "",
},
coustomCount: {
type: Array,
},
},
data() {
return {};
},
methods: {
getEchart() {
const chartDom = document.getElementById(this.coustomId);
const myChart = echarts.init(chartDom);
let option;
option = {
series: [
{
type: "pie",
radius: ["40%", "70%"],
hoverAnimation: false,
avoidLabelOverlap: false,
color: ["rgba(0,0,0,.06)", this.bgColor],
label: {
show: false,
position: "center",
},
labelLine: {
show: false,
},
data: [{ value: 1 }, { value: 1 }],
},
],
};
option && myChart.setOption(option);
},
},
mounted() {
this.getEchart();
},
};
</script>
<style lang="scss" scoped>
.coustom-main {
width: 64px;
height: 64px;
}
</style>
\ No newline at end of file
<template>
<div class="square-main">
<el-dialog
title="选择跟进专员"
:visible.sync="dialogVisible"
width="50%"
:before-close="handleClose"
>
<el-form :inline="true" :model="tableSearchForm" label-width="80px">
<el-form-item size="small" label="员工">
<el-input v-model="tableSearchForm.name" placeholder="请输入员工姓名"></el-input>
</el-form-item>
<el-form-item size="small" style="float: right">
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<GLTable
ref="employeeRef"
:getListApi="getListApi"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
:hasNum="false"
>
</GLTable>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="dialogVisible = false"
>确 定</el-button
>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: "selectEmp",
data() {
return {
dialogVisible: false,
tableSearchForm: {},
getListApi: this.$apis.channel.getListApi,
tableParams: {
listName: "data",
tableOption: false,
otherOptions: {
label: "启用开关",
},
tableColumns: [
{
label: "姓名",
prop: "staffName",
},
{
label: "部门",
prop: "entmicroName",
},
{
label: "测试专员类型",
prop: "roleName",
},
],
},
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "count" },
baseData: {
allMerchantList: [],
roleList: [],
staffStatusList: [],
},
};
},
methods: {
init() {
this.dialogVisible = true;
},
},
};
</script>
<style lang="scss" scoped></style>
\ No newline at end of file
<template>
<div class="square-main">
<div class="drainage-wrap scrm-box-f">
<div class="drainage-title">客户引流企微</div>
<div class="drainage-panel">
<div class="drainage-config-wrap">
<div class="drainage-item-label">
平台通过智能外呼精准获取客户意向,结束通话后自动下发引流短信,用户一键接入微信生态。用户接入企微后可领取会员权益卡,实现高效锁客及后续营销策略提供精准触达的通道。
</div>
<div class="drainage-item-switch">
<el-switch v-model="value" active-color="#5850FF" inactive-color="#999999">
</el-switch>
</div>
</div>
<div class="config-title">
<label>编辑配置</label>
<i class="el-icon-edit-outline"></i>
</div>
<div class="config-market">
<div class="config-market-item checked">
<div class="config-market-title">首次营销</div>
<div class="config-market-select">
<div class="config-market-s1">
<div class="config-line"></div>
<div class="config-market-icon">
<img src="@/assets/img/square/icon1.png" />
</div>
<div class="config-market-name">非企微客户</div>
</div>
<div class="config-market-s1">
<div class="config-line"></div>
<div class="config-market-icon">
<img src="@/assets/img/square/icon2.png" />
</div>
<div class="config-market-name">导入客户信息后</div>
</div>
<div class="config-market-s1">
<div class="config-market-icon">
<img src="@/assets/img/square/icon3.png" />
</div>
<div class="config-market-name">首次营销</div>
</div>
</div>
</div>
<div class="config-market-item">
<el-switch
v-model="value1"
active-color="#5850FF"
inactive-color="#999999"
class="config-switch-icon"
></el-switch>
<div class="config-market-title">二次营销</div>
<div class="config-market-select">
<div class="config-market-s1">
<div class="config-line"></div>
<div class="config-market-icon">
<img src="@/assets/img/square/icon1.png" />
</div>
<div class="config-market-name">非企微客户</div>
</div>
<div class="config-market-s1">
<div class="config-line"></div>
<div class="config-market-icon">
<img src="@/assets/img/square/icon4.png" />
</div>
<div class="config-market-name">首次营销30天后</div>
</div>
<div class="config-market-s1">
<div class="config-market-icon">
<img src="@/assets/img/square/icon5.png" />
</div>
<div class="config-market-name">再次营销</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="drainage-wrap scrm-box-f">
<div class="drainage-title">营销配置</div>
<div class="drainage-form">
<div class="drainage-form-item">
<label>跟进员工</label>
<div class="el-input-tag input-tag-wrapper">
<el-tag
v-for="(tag, idx) in innerTags"
:key="idx"
closable
:disable-transitions="false"
@close="remove(tag)"
>
{{ tag.staffName }}
</el-tag>
</div>
<el-button size="small" @click="handleAddEmp"
><i class="el-icon-plus"></i> 选择跟进专员</el-button
>
<div class="drainage-coutom-count">已经选择2人</div>
</div>
</div>
</div>
<select-emp ref="selectEmpForm"></select-emp>
</div>
</template>
<script>
import selectEmp from "./components/selectEmp";
export default {
name: "drainage",
components: {
selectEmp
},
data() {
return {
dialogVisible: true,
value: false,
value1: false,
innerTags: [{ staffName: "都是" }],
};
},
methods: {
remove() {},
handleAddEmp() {
this.$refs.selectEmpForm.init()
}
},
};
</script>
<style lang="scss" scoped>
.drainage-wrap {
margin-bottom: 20px;
.drainage-title {
padding-left: 20px;
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 57px;
height: 57px;
border-bottom: 1px solid #d8d8d8;
}
.drainage-form {
padding: 20px;
.drainage-form-item {
display: flex;
label {
width: 120px;
text-align: right;
margin-right: 20px;
height: 36px;
line-height: 36px;
}
}
.input-tag-wrapper {
position: relative;
font-size: 14px;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
box-sizing: border-box;
color: #606266;
display: inline-block;
outline: none;
padding: 0 10px 0 5px;
flex-wrap: wrap;
line-height: 36px;
height: 36px;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 350px;
display: flex;
align-items: center;
margin-right: 20px;
}
.el-tag {
margin-right: 4px;
height: 26px;
line-height: 24px;
}
.drainage-coutom-count {
font-size: 14px;
font-weight: 400;
color: #7d7d7d;
line-height: 36px;
margin-left: 20px;
}
}
.drainage-panel {
padding: 20px;
.drainage-config-wrap {
display: flex;
justify-content: space-between;
align-items: center;
.drainage-item-label {
width: 50%;
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
}
}
.config-title {
font-size: 14px;
font-weight: 400;
color: #5850ff;
line-height: 20px;
margin: 20px 0px;
i {
margin-left: 6px;
}
}
.config-market {
display: flex;
&-item {
position: relative;
padding: 10px;
width: 50%;
height: 150px;
background: #f6f6ff;
border-radius: 4px;
opacity: 0.8;
box-sizing: border-box;
&:first-child {
margin-right: 20px;
}
&.checked {
border: 1px solid #5850ff;
.config-market-title {
color: #5850ff;
}
.config-market-icon {
background: linear-gradient(
153deg,
#8085ef 0%,
#6f76ee 100%,
#6f76ee 100%
) !important;
}
.config-market-name {
color: #333333 !important;
}
.config-line {
border: 1px solid #5850ff !important;
}
}
.config-market-title {
font-size: 16px;
font-weight: 400;
color: #999999;
line-height: 22px;
text-align: center;
}
.config-switch-icon {
position: absolute;
right: 10px;
top: 10px;
}
.config-market-select {
display: flex;
.config-market-s1 {
width: 33.33%;
margin: 0 auto;
text-align: center;
position: relative;
.config-line {
position: absolute;
top: 45px;
right: -30%;
width: 60%;
border: 1px solid #999999;
}
.config-market-icon {
width: 56px;
height: 56px;
background: #999999;
border-radius: 50%;
margin: 20px auto 10px;
}
.config-market-name {
font-size: 14px;
font-weight: 400;
color: #adadad;
line-height: 20px;
}
}
}
}
}
}
}
</style>
\ No newline at end of file
<template>
<div class="squre-main">
<el-button type="primary" size="small" @click="goBack">返回</el-button>
<div class="squre-safe-panel scrm-box-f">
<div class="safe-upload-panel" id="drop_area">
<el-upload action="" class="image-uploader" :before-upload="upLoadImg">
<div class="safe-upload-icon"><i class="el-icon-tickets"></i></div>
</el-upload>
<div class="safe-upload-tips">点击或将文件拖拽到这里上传</div>
<div class="safe-upload-xl">支持扩展名:.csv .xls .xlsl</div>
<div class="safe-upload-link">下载模版</div>
</div>
<div class="safe-upload-footer">
<el-button type="primary" size="small">提交</el-button>
<el-button size="small">返回</el-button>
</div>
</div>
<div class="squre-safe-panel scrm-box-f">
<div class="squre-safe-title">数据隐私&安全</div>
<div class="swiper-container">
<div class="swiper-wrap">
<div class="swiper-wrap-item">加密传输</div>
<div class="swiper-wrap-item">脱敏传输</div>
<div class="swiper-wrap-item">去标识化</div>
<div class="swiper-wrap-item">限制访问</div>
</div>
<div class="swiper-container-panel">
<div class="swiper-container-content">
从海量数据中发现、分类和保护敏感数据,分析使用情况并进行风险预警,帮助用户防止数据泄漏和满足GDPR等合规要求
</div>
<div class="swiper-container-image">
<img src="@/assets/img/square/safe1.png" />
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "import",
data() {
return {
borderhover: false, //文件拖拖动到区域的hover效果
imgArr: [],
fileData: [],
};
},
methods: {
goBack() {},
enentDrop(e) {
this.borderhover = false;
e.stopPropagation();
e.preventDefault(); //必填字段
let fileData = e.dataTransfer.files;
console.log(fileData);
this.uploadFile(fileData);
},
uploadFile(file) {
let AllImgExt = ".csv|.xls|.xlsl";
let extName = file[0].name.substring(file[0].name.lastIndexOf(".")).toLowerCase();
if (file.length > 1) {
this.$message.error("只能上传一个文件");
return false;
}
if (AllImgExt.indexOf(extName + "|") === -1) {
this.$message.error("上传格式不正确");
return false;
}
},
},
mounted() {
let _this = this;
var dropbox = document.getElementById("drop_area");
dropbox.addEventListener("drop", this.enentDrop, false);
dropbox.addEventListener("dragleave", function (e) {
e.stopPropagation();
e.preventDefault();
_this.borderhover = false;
});
dropbox.addEventListener("dragenter", function (e) {
e.stopPropagation();
e.preventDefault();
_this.borderhover = true;
});
dropbox.addEventListener("dragover", function (e) {
e.stopPropagation();
e.preventDefault();
_this.borderhover = true;
});
},
};
</script>
<style lang="scss" scoped>
.squre-safe-panel {
padding: 40px;
margin-top: 20px;
.safe-upload-panel {
margin: 20px auto;
padding: 20px;
box-sizing: border-box;
width: 384px;
height: 214px;
background: rgba(0, 0, 0, 0.02);
border-radius: 4px;
border: 1px solid rgba(0, 0, 0, 0.15);
text-align: center;
.safe-upload-icon {
margin: 20px 0px;
i {
font-size: 35px;
color: #5850ff;
}
}
.safe-upload-tips {
font-size: 14px;
font-weight: 400;
color: rgba(0, 0, 0, 0.65);
line-height: 22px;
}
.safe-upload-xl {
font-size: 12px;
font-weight: 400;
color: rgba(0, 0, 0, 0.45);
line-height: 20px;
}
.safe-upload-link {
font-size: 14px;
font-weight: 400;
color: #5850ff;
line-height: 22px;
margin-top: 10px;
cursor: pointer;
}
}
.safe-upload-footer {
width: 300px;
display: flex;
justify-content: space-between;
margin: 0 auto;
}
.squre-safe-title {
text-align: center;
font-size: 32px;
font-weight: 500;
color: rgba(0, 0, 0, 0.85);
line-height: 40px;
}
.swiper-container {
width: 70%;
margin: 40px auto;
.swiper-wrap {
display: flex;
justify-content: center;
text-align: center;
.swiper-wrap-item {
width: 20%;
font-size: 24px;
font-weight: 300;
color: #464646;
line-height: 32px;
letter-spacing: 2px;
}
}
.swiper-container-content {
font-size: 16px;
font-weight: 500;
color: rgba(0, 0, 0, 0.85);
line-height: 24px;
margin-right: 80px;
}
.swiper-container-panel {
padding: 40px;
box-sizing: border-box;
margin: 40px 0px;
height: 328px;
background: #ffffff;
box-shadow: 0px 0px 20px 0px rgba(88, 80, 255, 0.1);
border-radius: 2px;
display: flex;
justify-content: space-between;
align-items: center;
.swiper-container-image {
img {
height: 248px;
width: auto;
}
}
}
}
}
</style>
\ No newline at end of file
<template>
<div class="squre-main">
<el-button type="primary" size="small" @click="goBack">返回</el-button>
<div class="squre-success-panel scrm-box-f">
<div class="contact-us-wrap">
<img src="@/assets/img/qrcode.png">
<div class="contact-us-about">联系我们</div>
</div>
<div class="squre-success-image"><i class="el-icon-success"></i></div>
<div class="squre-success-tips">提交成功</div>
<div class="squre-success-content">
所提交的数据已经过加密,并安全存储专属加密区。
</div>
<div class="squre-success-content">
针对导入的结果有疑问请扫码联系我们,我们将为您提供专业答疑和营销推荐。
</div>
<div class="squre-success-footer">
<div class="squre-success-item">
<div class="success-item-title">本次导入总客户数</div>
<div class="success-item-num">1,000</div>
</div>
<div class="squre-success-item">
<div class="success-item-title">新导入客户数</div>
<div class="success-item-num">1,000</div>
</div>
<div class="squre-success-item">
<div class="success-item-title">企微客户占比</div>
<div class="success-item-num">1,000</div>
</div>
</div>
</div>
<div class="custom-title">客户分群营销</div>
<div class="custom-wrap">
<div class="custom-wrap-item">
<div class="custom-wrap-itemBox">
<div class="custom-wrap-title">待添加企微客户</div>
<div class="custom-wrap-sta">
<div class="custom-count-item">
<div class="custom-count-title">属于本次导入</div>
<div class="custom-count-num">107人</div>
</div>
<div class="custom-count-item">
<div class="custom-count-title">人群累计人数</div>
<div class="custom-count-num">107人</div>
</div>
</div>
<div class="custom-wrap-content">
当前客户池中,尚未匹配到企微账号的数量。推荐使用以下营销策略,吸引用户添加企微。
</div>
<div class="custom-wrap-config">营销配置</div>
</div>
</div>
<div class="custom-wrap-item">
<div class="custom-wrap-itemBox">
<div class="custom-wrap-title">待续保客户</div>
<div class="custom-wrap-sta">
<div class="custom-count-item">
<div class="custom-count-title">属于本次导入</div>
<div class="custom-count-num">107人</div>
</div>
<div class="custom-count-item">
<div class="custom-count-title">人群累计人数</div>
<div class="custom-count-num">107人</div>
</div>
</div>
<div class="custom-wrap-content">
提前给车险快到期的用户自动推荐适合该客户的优惠服务,提高客户续保率。
</div>
<div class="custom-wrap-config">敬请期待</div>
</div>
</div>
<div class="custom-wrap-item">
<div class="custom-wrap-itemBox">
<div class="custom-wrap-title">待定保客户</div>
<div class="custom-wrap-sta">
<div class="custom-count-item">
<div class="custom-count-title">属于本次导入</div>
<div class="custom-count-num">107人</div>
</div>
<div class="custom-count-item">
<div class="custom-count-title">人群累计人数</div>
<div class="custom-count-num">107人</div>
</div>
</div>
<div class="custom-wrap-content">
智能提醒用户定期保养,推荐保养项目和优惠活动,提高用户返店率。
</div>
<div class="custom-wrap-config">敬请期待</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "importResult",
data() {
return {};
},
methods: {
goBack() {},
},
};
</script>
<style lang="scss" scoped>
.squre-success-panel {
margin-top: 20px;
position: relative;
.contact-us-wrap {
position: absolute;
top: 0px;
right: 0px;
width: 144px;
height: 191px;
background: #ffffff;
box-shadow: 0px 3px 6px -4px rgba(0, 0, 0, 0.12), 0px 6px 16px 0px rgba(0, 0, 0, 0.08),
0px 9px 28px 8px rgba(0, 0, 0, 0.05);
text-align: center;
img {
width: 124px;
height: 124px;
margin: 15px 0px;
}
.contact-us-about {
font-size: 14px;
font-weight: 500;
color: #333333;
line-height: 20px;
}
}
.squre-success-image {
padding-top: 45px;
text-align: center;
i {
font-size: 64px;
color: #73d13d;
}
}
.squre-success-tips {
text-align: center;
font-size: 24px;
font-weight: 500;
color: #000000;
line-height: 32px;
margin: 20px 0px 10px;
}
.squre-success-content {
text-align: center;
font-size: 14px;
font-weight: 400;
color: #000000;
line-height: 22px;
}
.squre-success-footer {
display: flex;
.squre-success-item {
width: 33.33%;
text-align: center;
margin: 20px auto;
.success-item-title {
font-size: 14px;
font-weight: 400;
color: rgba(0, 0, 0, 0.65);
line-height: 22px;
}
.success-item-num {
font-size: 30px;
font-weight: 500;
color: rgba(0, 0, 0, 0.85);
line-height: 38px;
}
}
}
}
.custom-title {
margin: 20px 0px;
font-size: 20px;
font-weight: 500;
color: #333333;
line-height: 20px;
letter-spacing: 1px;
}
.custom-wrap {
display: flex;
.custom-wrap-item {
box-sizing: border-box;
width: 33.33%;
padding: 30px 0px;
text-align: center;
height: 334px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
margin-right: 20px;
&:last-child {
margin-right: 0px;
}
.custom-wrap-itemBox {
width: 70%;
margin: 0 auto;
}
.custom-wrap-title {
font-size: 20px;
font-weight: 500;
color: #424242;
line-height: 28px;
}
.custom-wrap-sta {
display: flex;
justify-content: space-between;
margin: 20px 0px;
.custom-count-title {
font-size: 14px;
font-weight: 400;
color: rgba(0, 0, 0, 0.65);
line-height: 22px;
}
.custom-count-num {
font-size: 20px;
font-weight: 500;
color: rgba(0, 0, 0, 0.85);
line-height: 34px;
}
}
.custom-wrap-content {
font-size: 14px;
font-weight: 500;
color: #a3a3a3;
line-height: 20px;
text-align: left;
height: 110px;
}
.custom-wrap-config {
margin: 10px auto;
display: inline-block;
border-radius: 4px;
border: 1px solid #5850ff;
padding: 7px 28px;
font-size: 14px;
font-weight: 400;
color: #5850ff;
line-height: 14px;
}
}
}
</style>
\ No newline at end of file
const path = require('path')
const packageName = require('./package.json').name
const node_env = process.env.NODE_ENV === 'production'
const publicPath = node_env ? `/child/${packageName}/` : '/'
const resolve = dir => path.join(__dirname, dir)
const CDN_DOMAIN = 'https://cdn.bootcdn.net/'
const cdn = {
css: [
`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/theme-chalk/index.css`
],
js: [
`${CDN_DOMAIN}ajax/libs/vue/2.6.11/vue.min.js`,
`${CDN_DOMAIN}ajax/libs/vue-router/3.2.0/vue-router.min.js`,
`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/index.js`,
`${CDN_DOMAIN}ajax/libs/vuex/3.6.2/vuex.min.js`,
`${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js`
]
}
module.exports = {
outputDir: `../dist/${packageName}`,
publicPath,
assetsDir: 'static',
productionSourceMap: false,
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'
}
},
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.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!